Versions Compared

Key

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

...

Tip

Настройка конфигурации ПК Axxon Next

Получение информации об устройстве

Code Block
{
    "method": "axxonsoft.bl.config.ConfigurationService.ListUnits",
    "data": {
        "unit_uids": [
            "hosts/Server1/DeviceIpint.10"
        ]
    }
}

...

Дочерние объекты устройства (видеоканалы, потоки, микрофоны, динамики, телеметрия, датчики и реле) будут указаны в дочерних units.

Получение информации по дочерним объектам устройств

Пример запроса на получение информации о видеоканале:

...

Expand


Code Block
{
                    "uid": "hosts/Server1/DeviceIpint.10/VideoChannel.0",
                    "display_id": "0",
                    "type": "VideoChannel",
                    "display_name": "",
                    "access_point": "",
                    "properties": [
                        {
                            "id": "channel_id",
                            "name": "",
                            "type": "int32",
                            "readonly": true,
                            "value_int32": 0
                        },
                        {
                            "id": "display_name",
                            "name": "Display name",
                            "type": "string",
                            "readonly": false,
                            "value_string": "axis"
                        },
                        {
                            "id": "comment",
                            "name": "Comment",
                            "type": "string",
                            "readonly": false,
                            "value_string": "звука нет, но Вы держитесь"
                        },
                        {
                            "id": "enabled",
                            "name": "Enable VideoChannel",
                            "type": "bool",
                            "readonly": false,
                            "value_bool": true
                        },
                        {
                            "id": "brightness",
                            "name": "",
                            "type": "int32",
                            "readonly": false,
                            "range_constraint": {},
                            "value_int32": 50
                        },
                        {
                            "id": "contrast",
                            "name": "",
                            "type": "int32",
                            "readonly": false,
                            "range_constraint": {},
                            "value_int32": 50
                        },
                        {
                            "id": "digitalPtz",
                            "name": "",
                            "type": "bool",
                            "readonly": false,
                            "value_bool": false
                        },
                        {
                            "id": "flickerfree",
                            "name": "",
                            "type": "string",
                            "readonly": false,
                            "enum_constraint": {},
                            "value_string": "auto"
                        },
                        {
                            "id": "imageFlip",
                            "name": "",
                            "type": "int32",
                            "readonly": false,
                            "enum_constraint": {},
                            "value_int32": 0
                        },
                        {
                            "id": "maxZoom",
                            "name": "",
                            "type": "int32",
                            "readonly": false,
                            "enum_constraint": {},
                            "value_int32": 250
                        },
                        {
                            "id": "saturation",
                            "name": "",
                            "type": "int32",
                            "readonly": false,
                            "range_constraint": {},
                            "value_int32": 50
                        },
                        {
                            "id": "sharpness",
                            "name": "",
                            "type": "int32",
                            "readonly": false,
                            "range_constraint": {},
                            "value_int32": 50
                        }
                    ],
                    "units": [
                        {
                            "uid": "hosts/Server1/DeviceIpint.10/VideoChannel.0/Streaming.0",
                            "display_id": "0",
                            "type": "Streaming",
                            "display_name": "",
                            "access_point": "",
                            "properties": [],
                            "units": [],
                            "factory": [],
                            "destruction_args": [],
                            "discoverable": false,
                            "status": "UNIT_STATUS_ACTIVE",
                            "stripped": false,
                            "opaque_params": [],
                            "assigned_templates": []
                        },
                        {
                            "uid": "hosts/Server1/DeviceIpint.10/VideoChannel.0/Streaming.1",
                            "display_id": "1",
                            "type": "Streaming",
                            "display_name": "",
                            "access_point": "",
                            "properties": [],
                            "units": [],
                            "factory": [],
                            "destruction_args": [],
                            "discoverable": false,
                            "status": "UNIT_STATUS_ACTIVE",
                            "stripped": false,
                            "opaque_params": [],
                            "assigned_templates": []
                        },
                        {
                            "uid": "hosts/Server1/DeviceIpint.10/VideoChannel.0/Detector.motion_detection",
                            "display_id": "motion_detection",
                            "type": "Detector",
                            "display_name": "",
                            "access_point": "",
                            "properties": [],
                            "units": [],
                            "factory": [],
                            "destruction_args": [],
                            "discoverable": false,
                            "status": "UNIT_STATUS_INACTIVE",
                            "stripped": false,
                            "opaque_params": [],
                            "assigned_templates": []
                        },
                        {
                            "uid": "hosts/Server1/DeviceIpint.10/VideoChannel.0/Detector.tampering_detection",
                            "display_id": "tampering_detection",
                            "type": "Detector",
                            "display_name": "",
                            "access_point": "",
                            "properties": [],
                            "units": [],
                            "factory": [],
                            "destruction_args": [],
                            "discoverable": false,
                            "status": "UNIT_STATUS_INACTIVE",
                            "stripped": false,
                            "opaque_params": [],
                            "assigned_templates": []
                        },
                        {
                            "uid": "hosts/Server1/DeviceIpint.10/VideoChannel.0/Detector.audio_detection",
                            "display_id": "audio_detection",
                            "type": "Detector",
                            "display_name": "",
                            "access_point": "",
                            "properties": [],
                            "units": [],
                            "factory": [],
                            "destruction_args": [],
                            "discoverable": false,
                            "status": "UNIT_STATUS_INACTIVE",
                            "stripped": false,
                            "opaque_params": [],
                            "assigned_templates": []
                        }
                    ],
                    "factory": [],
                    "destruction_args": [],
                    "discoverable": false,
                    "status": "UNIT_STATUS_ACTIVE",
                    "stripped": false,
                    "opaque_params": [],
                    "assigned_templates": []
                }


В свойствах properties содержатся параметры видео, в дочерних - потоки и детекторы, если созданы.

Изменение конфигурации

Добавление устройства

Добавление виртуальной видеокамеры без настроек:

Code Block
{
    "method": "axxonsoft.bl.config.ConfigurationService.ChangeConfig",
    "data": {
        "added": [
            {
                "uid": "hosts/Server1",
                "units": [
                    {
                        "type": "DeviceIpint",
                        "units": [],
                        "properties": [
                            {
                                "id": "vendor",
                                "value_string": "AxxonSoft",
                                "properties": [
                                    {
                                        "id": "model",
                                        "value_string": "Virtual",
                                        "properties": []
                                    }
                                ]
                            },
                            {
                                "id": "display_name",
                                "value_string": "newOrder2",
                                "properties": []
                            },
                            {
                                "id": "blockingConfiguration",
                                "value_bool": false,
                                "properties": []
                            },
                            {
                                "id": "display_id",
                                "value_int32string": "199"
                            }
                        ]
                    }
                ]
            }
        ]
    }
}

где uid - Сервер, где создается устройство.

В результате будет создана камера с дочерними микрофоном, встроенным архивом и датчиком. Все дочерние объекты кроме видеоканала будут выключены. 


Code Block
{    
	"failed": [],    
	"added": ["hosts/Server1/DeviceIpint.199"]
}

где 199 - id созданного устройства.

Info
titleПримечание

В некоторых случаях id созданного устройства может не совпадать с заданным значением display_id в запросе.

Изменение папки с видео для виртуальной камеры

Code Block
{
    "method": "axxonsoft.bl.config.ConfigurationService.ChangeConfig",
    "data": {
        "changed": [
            {
                "uid": "hosts/Server1/DeviceIpint.199/VideoChannel.0/Streaming.0",
                "type": "Streaming",
                "properties": [
                    {
                        "id": "folder",
                        "value_string": "D:/Video"
                    }
                ],
                "opaque_params": []
            }
        ]
    }


Включение/выключение объекта

Каждый unit содержит свойство enabled.

...

Code Block
{
    "method":"axxonsoft.bl.config.ConfigurationService.ChangeConfig",
    "data":{
        "changed":[{
              "uid": "hosts/Server1/DeviceIpint.10/Microphone.0",
              "type": "Microphone",
              "properties": [ {
                  "id": "enabled",
                  "value_bool": true
                } ],
               "units":[]
        }]
    }
}

Удаление устройства

Code Block
{
    "method": "axxonsoft.bl.config.ConfigurationService.ChangeConfig",
    "data": {
        "removed": [
            {
                "uid": "hosts/Server1/DeviceIpint.199"
            }
        ]
    }
}