Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Получение информации об автоматическом правиле

    Ответ:

    Expand


    Code Block
    {
        "items": [
            {
                "guid": "4932bbc7-c702-4a18-b050-2898b1b61738",
                "name": "6534k_1.КамераCamera. Детектор движения",
                "mode": {
                    "enabled": true,
                    "user_role": "",
                    "is_add_to_menu": false,
                    "autorule": {
                        "zone_ap": "hosts/Server1/DeviceIpint.6/SourceEndpoint.video:0:0",
                        "only_if_armed": false,
                        "timezone_id": "00000000-0000-0000-0000-000000000000"
                    }
                },
                "conditions": {
                    "0": {
                        "path": "/C:0",
                        "detector": {
                            "event_type": "MotionDetected",
                            "source_ap": "hosts/Server1/AVDetector.4/EventSupplier",
                            "state": "BEGAN",
                            "details": []
                        }
                    }
                },
                "rules": {
                    "1": {
                        "path": "/E:1",
                        "action": {
                            "timeout_ms": 0,
                            "cancel_conditions": {
                                "0": {
                                    "path": "/E:1/C:0",
                                    "detector": {
                                        "event_type": "MotionDetected",
                                        "source_ap": "hosts/Server1/AVDetector.4/EventSupplier",
                                        "state": "ENDED",
                                        "details": []
                                    }
                                }
                            },
                            "action": {
                                "raise_alert": {
                                    "zone": "hosts/Server1/DeviceIpint.1/SourceEndpoint.video:0:0",
                                    "archive": "hosts/Server1/MultimediaStorage.AliceBlue/MultimediaStorage",
                                    "offset_ms": 0,
                                    "mode": "RAM_AlwaysIfNoActiveAlert"
                                }
                            }
                        }
                    },
                    "0": {
                        "path": "/E:0",
                        "action": {
                            "timeout_ms": 0,
                            "cancel_conditions": {
                                "0": {
                                    "path": "/E:0/C:0",
                                    "detector": {
                                        "event_type": "MotionDetected",
                                        "source_ap": "hosts/Server1/AVDetector.6/EventSupplier",
                                        "state": "BEGAN",
                                        "details": []
                                    }
                                }
                            },
                            "action": {
                                "write_archive": {
                                    "camera": "hosts/Server1/DeviceIpint.1/SourceEndpoint.video:0:0",
                                    "archive": "hosts/Server1/MultimediaStorage.AliceBlue/MultimediaStorage",
                                    "min_prerecord_ms": 0,
                                    "post_event_timeout_ms": 0
                                }
                            }
                        }
                    }
                }
            }
        ]
    }



  2. Создание макрокоманды.

...