|  Developer
Updated on January 6, 2023

array

  • The array gives possibility to create array of types described in this page.
  • ‘value’ — array of one of supported types.
  • ‘valueType’ — “array”
  • ‘elementType’ — valid value type of elements in the array. If element type is container (dictionary or array), split subtypes by ‘.’
  • [deprecated] ‘valueType’ — #subtype_array. Add suffix to name of existing type.

 

Edit
Edit
				
					{
    "valueType": "array",
    "elementType": "int",
    "value": [ 11, 232, 5 ]
}				
			
Edit
				
					{
    "valueType": "array",
    "elementType": "daily_interval",
    "value": [
        {
            "startDateTime": "2019-10-30T21:30:00",
            "stopDateTime": "2019-11-30T22:30:00"
        },
        {
            "startDateTime": "2020-10-30T19:30:00",
            "stopDateTime": "2020-11-30T20:30:00"
        }
    ]
}				
			
Edit
				
					{
    "valueType": "int_array",
    "value": [ 11, 232, 5 ]
}				
			
Edit
Edit
				
					{
    "valueType": "int_array",
    "value": [ 11, 232, 5 ]
}				
			
Edit
				
					{
    "valueType": "daily_interval_array",
    "value": [
        {
            "startDateTime": "2019-10-30T21:30:00",
            "stopDateTime": "2019-11-30T22:30:00"
        },
        {
            "startDateTime": "2020-10-30T19:30:00",
            "stopDateTime": "2020-11-30T20:30:00"
        }
    ]
}				
			
rgb
  • RGB color value
Example:
				
					{
    ...
    "valueType": "rgb",
    "value": {
        "wwhite":10,
        "cwhite":10,
        "red":10.
        "green":10,
        "blue":10,
        "amber":10,
        "cyan":10,
        "purple":10,
        "indexed":10
    }
    ...
}				
			
cameraStream
  • Camera stream
Example:
				
					{
    ...
    "valueType": "cameraStream",
    "value": {
        "localRtspUrl": "rtsp://127.0.0.1:554"
    }
    ...
}				
			
userCode
  • Special User Code format. Value contains optional field “mode”. It can take values from list userCodeModes in item. If UI sets userCode without “mode” field, mode will be set to “enabled”.
Edit
				
					{
    ...
    "valueType": "userCode",
    "value": {
        "code": "some code",
        "name": "code name",
        "mode": "disabled" // optional. Default is "enabled"
    }
    ...
}				
			
Edit
				
					"items": [
    {
        "_id": "5dba9a9ae4de1406ac0a9329",
        "deviceId": "5dba9a9ae4de1406ac0a9325",
        "elementType": "userCode",
        "elementsMaxNumber": 30,
        "userCodeRestriction": "\d{4}",
        "userCodeModes": [ "enabled", "disabled", "passage" ]
        "hasGetter": true,
        "hasSetter": true,
        "name": "user_codes",
        "show": true,
        "value": {
            "1": {
                "value": {
                    "code": "5609",
                    "name": "Hare",
                    "mode": "passage"
                }
            },
            "3": {
                "value": {
                    "code": "4321",
                    "name": "Wolf",
                    "mode": "disabled"
                }
            }
        },
        "valueFormatted": "",
        "valueType": "dictionary"
    }
]				
			
weekly_interval
  • Special weekly interval format Value contains time interval and set of week days. If startTime > stopTime, stopTime means time in next day.
Example:
				
					{
    ...
    "valueType": "weekly_interval",
    "value": {
        "weekDays": [ "monday", "thursday" ],
        "startTime": "11:50:54",
        "stopTime": "17:59:59",
    }
    ...
}				
			
daily_interval
  • Special daily interval format
Example:
				
					{
    ...
    "valueType": "daily_interval",
    "value": {
        "startDateTime": "2020-01-03T11:50:54",
        "stopDateTime": "2020-04-30T17:59:59",
    }
    ...
}				
			
token
  • Value of enumeration from ‘enum’ field
Example:
				
					{
    ...
    "valueType": "token",
    "value": "ezlo.device.value.dry_ok",
    "enum": [
        "ezlo.device.value.dry_ok",
        "ezlo.device.value.leak",
        "ezlo.device.value.unknown_event"
    ],
    ...
}				
			
button_state
  • Value for scenes controller buttons
Example:
				
					{
    ...
    "valueType": "button_state",
    "value": {button_number = 1, button_state = "press_1_time"},
    "enum": [
        "press_1_time",
        "held_down",
        "released"
    ],
    ...
}				
			
user_lock_operation
  • User lock operation value
  • ‘action’ — display what user has done
  • ‘userId’ — user id of user code (PIN code). Value ‘-1’ is invalid user id
Edit
Actions
Edit
				
					{
    ...
    "valueType": "user_lock_operation",
    "value": {
        "action": "unknown",
        "userId": -1
    },
    ...
}				
			
user_code_action
  • User code action value
  • ‘action’ — display what user has done
  • ‘userId’ — user id of user code (PIN code). Value ‘-1’ is invalid user id
Edit
Actions
Edit
				
					{
    ...
    "valueType": "user_code_action",
    "value": {
        "action": "unknown",
        "userId": -1
    },
    ...
}				
			
shutter_second_part
  • User code action value
  • ‘action’ — display what user has done
  • ‘userId’ — user id of user code (PIN code). Value ‘-1’ is invalid user id

 

Edit
Functions
Edit
				
					{
    ...
    "valueType": "shutter_second_part",
    "value": {
        "deviceId": "device_id_1",
        "partFunction": "front"
    },
    ...
}				
			
sound_info
  • Tone info
  • ‘name’ — name of the tone
  • ‘duration’ — duration of the tone in seconds
Example:
				
					{
    ...
    "valueType": "sound_info",
    "value": {
        "name": "1AMBUL~1",
        "duration": 20
    },
    ...
}				
			
camera_hotzone
  • Camera hotzone
  • ‘name’ – name of the hotzone
  • ‘detected’ – dictionary of detected object types with list of detected object IDs
  • NOTE: “detected” dictionary keys are dynamically added/removed
 
Edit
Functions
Edit
				
					    {
        ...
        "valueType": "camera_hotzone",
        "value": {
            "name": "hotzone1",
            "detected": {
                "objects": ["id1", "id2"],
                "persons": ["id1", "id2"],
                "qrcodes": ["id1", "id2"]
            }
        },
        ...
    }				
			
hotzone_match
  • Hotzone match is a filter for hotzone objects
  • ‘match’ – match policy
  • ‘list’ – list of object IDs to check. Field is needed when ‘match’ policy requires the list of IDs
Edit
Match policies Description
match any detected objects
match any detected objects from specified list
match all detected objects from specified list
match when only one object is detected from specified list
match any object other that from specified list
match none objects
Edit
				
					{
    ...
    "valueType": "hotzone_match",
    "value": {
        "match": "anyOf",
        "list":["id1", "id2"]
    },
    ...
}				
			
geofence
  • Geofence value
  • ‘modified’ – time in seconds ( since the Unix Epoch ) when geofence was triggered

Example

				
					    {
        ...
        "valueType": "geofence",
        "value": {
            "modified": 1234
        },
        ...
    }