Go to documentation repository
Page History
...
| Section | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| Tip |
|---|
Manage macros Zarządzanie makrami za pomocą metod using gRPC API methods |
Konfigurowanie makr jest opisane w proto-pliku Macros configuration is described in the LogicService.proto file.
Each macro consists ofKażde z makr składa się z:
- guid - an idID makra;
- name - a namenazwy;
- mode - operation modetrybu operacji;
- conditions - launch conditionswarunków uruchomienia;
- rules - ruleszasad.
...
Tryby pracy
mode contains the general informationzawiera ogólne informacje:
- enabled or lub disabled - whether the macro is enabled or disabledczy makro jest włączone, czy wyłączone;
- user_role - a role for which the macro will be available in the layout menurola, dla której makro będzie dostępne w menu układów;
- is_add_to_menu - add macros to the layout menuczy makro jest dodane do menu układów;
time_zone - time zone id, if the macro should be launched on timeID strefy czasowej jeśli makro ma być uruchamiane o określonym czasie;
Code Block "time_zone": { "timezone_id": "6fb68cf4-ca6a-46a1-b2e3-ab4cfdaa0444" }autorule
Info title Note Contains the general information for launching the automatic rulesZawiera ogólne informacje o uruchamianiu automatycznych zasad:
- zone_ap - a camera under which the rule is createdkamera, dla której zasada została utworzona;
- only_if_armed - operate only in armed modemakro aktywne jedynie w trybie uzbrojonym;
- timezone_id - id of the time zoneID strefy czasowej;
Code Block "autorule": { "zone_ap": "hosts/Server1/DeviceIpint.30/SourceEndpoint.video:0:0", "only_if_armed": false, "timezone_id": "00000000-0000-0000-0000-000000000000" }continuous
Info title Note Contains the general information for launching the continuous macrosZawiera informacje na temat makra cyklicznego:
- server - a ServerSerwer;
- timezone_id - id of the time zoneID strefy czasowej;
- heartbeat_ms - launch cycle in millisecondcykl uruchamiania w milisekundach;
- random - random launch of a macrolosowe uruchamianie makra.
Code Block "continuous": { "server": "Server1", "timezone_id": "00000000-0000-0000-0000-000000000000", "heartbeat_ms": 3600000, "random": true }
Launch conditions
Warunki uruchamiania
Następujące warunki są dostępne (zobacz: The following are available (see Konfiguracja filtrów dla makr reagujących na zdarzenie, Wyzwalanie makr poprzez dane statystyczne):
detector
Code Block "detector": { "event_type": "sitDown", "source_ap": "hosts/Server1/HumanBoneDetector.1/EventSupplier", "state": "BEGAN", "details": [] }timezone
Code Block "timezone": { "timezone_id": "6fb68cf4-ca6a-46a1-b2e3-ab4cfdaa0444", "boundary_case": "TB_BEGINING" }alert
Code Block "alert": { "zone_ap": "hosts/Server1/DeviceIpint.10/SourceEndpoint.video:0:0", "alert_case": "AC_ALERT_DANGEROUS" }device
Code Block "device": { "device": "hosts/Server1/DeviceIpint.69", "state": "IPDS_CONNECTED", "threshold": 0 }archive_write
Code Block "archive_write": { "camera": "hosts/Server1/DeviceIpint.28/SourceEndpoint.video:0:0", "state": "ON" }- relay
Code Block "relay": { "relay": "hosts/Server1/DeviceIpint.10/StateControl.relay0:0", "state": "ON" } - volume_health
Code Block "volume_health": { "storage": "hosts/Server1/MultimediaStorage.AliceBlue/MultimediaStorage", "volume": "", "health": "VH_CORRUPTED" } server_state
Info title Note observer - a server from which the macro is launched;
subject - a server from which the state should be received.
Code Block "server_state": { "observer": "Server1", "subject": "Server2", "state": "SS_OFFLINE" }text
Info title Note The Event Source object should be created (see Obiekty typu Źródło Zdarzeń).
Code Block "text": { "source": "hosts/Server1/DeviceIpint.110/SourceEndpoint.textEvent:0", "text": "Cash" }arm
Info title Note Arming the camera.
Code Block "arm": { "zone": "hosts/Server1/DeviceIpint.10/SourceEndpoint.video:0:0", "state": "CS_ArmPrivate" }recognition
Code Block "recognition": { "camera": "hosts/Server1/DeviceIpint.1/SourceEndpoint.video:0:0", "list": "797703ea-6917-4341-888b-b6f0579f5d91", "type": "DT_Plate", "objects": [ "53502573-a985-4198-a5b6-69db476cc755" ] }statistics
Code Block "statistics": { "point": "archive_usage", "item": "hosts/Server1/MultimediaStorage.AntiqueWhite/MultimediaStorage", "value": 100, "delta": 0, "trend": "ET_RISING" }
Actions
Akcje
rules zawierają akcje, które są wykonywane przez makro (zobacz: rules contains the actions that should be run in the macro (see Ustawienia akcji w makrach).
...