{"openapi":"3.1.0","info":{"title":"UniFi Protect API","version":"7.0.107"},"servers":[{"url":"/integration"}],"paths":{"/v1/meta/info":{"get":{"summary":"Get application information","description":"Get generic information about the Protect application","tags":["Information about application"],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","properties":{"applicationVersion":{"$ref":"#/components/schemas/protectVersion"}},"required":["applicationVersion"]}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}}},"/v1/viewers/{id}":{"get":{"summary":"Get viewer details","description":"Get detailed information about a specific viewer","tags":["Viewer information & management"],"parameters":[{"in":"path","name":"id","description":"The primary key of viewer","schema":{"$ref":"#/components/schemas/viewerId"},"required":true}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/viewer"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}},"patch":{"summary":"Patch viewer settings","description":"Patch the settings for a specific viewer","tags":["Viewer information & management"],"parameters":[{"in":"path","name":"id","description":"The primary key of viewer","schema":{"$ref":"#/components/schemas/viewerId"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/name"},"liveview":{"oneOf":[{"$ref":"#/components/schemas/liveviewId"},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/viewer"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}}},"/v1/viewers":{"get":{"summary":"Get all viewers","description":"Get detailed information about all viewers","tags":["Viewer information & management"],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/viewer"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}}},"/v1/liveviews/{id}":{"get":{"summary":"Get live view details","description":"Get detailed information about a specific live view","tags":["Live view management"],"parameters":[{"in":"path","name":"id","description":"The primary key of liveview","schema":{"$ref":"#/components/schemas/liveviewId"},"required":true}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/liveview"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}},"patch":{"summary":"Patch live view configuration","description":"Patch the configuration about a specific live view","tags":["Live view management"],"parameters":[{"in":"path","name":"id","description":"The primary key of liveview","schema":{"$ref":"#/components/schemas/liveviewId"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/liveview"}],"additionalProperties":false}}}},"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/liveview"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}}},"/v1/liveviews":{"get":{"summary":"Get all live views","description":"Get detailed information about all live views","tags":["Live view management"],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/liveview"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}},"post":{"summary":"Create live view","description":"Create a new live view","tags":["Live view management"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/liveview"}],"additionalProperties":false}}}},"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/liveview"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}}},"/v1/subscribe/devices":{"get":{"summary":"Get update messages about devices","description":"A WebSocket subscription which broadcasts all changes happening to Protect-managed hardware devices","tags":["WebSocket updates"],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/deviceAdd"},{"$ref":"#/components/schemas/deviceUpdate"},{"$ref":"#/components/schemas/deviceRemove"}],"discriminator":{"propertyName":"type","mapping":{"add":"#/components/schemas/deviceAdd","update":"#/components/schemas/deviceUpdate","remove":"#/components/schemas/deviceRemove"}},"description":"A device which was created, updated or deleted"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}}},"/v1/subscribe/events":{"get":{"summary":"Get Protect event messages","description":"A WebSocket subscription that broadcasts Protect events","tags":["WebSocket updates"],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/eventAdd"},{"$ref":"#/components/schemas/eventUpdate"}],"discriminator":{"propertyName":"type","mapping":{"add":"#/components/schemas/eventAdd","update":"#/components/schemas/eventUpdate"}},"description":"An event that was created or updated"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}}},"/v1/cameras/{id}/ptz/patrol/start/{slot}":{"post":{"summary":"Start a camera PTZ patrol","description":"Start a camera PTZ patrol","tags":["Camera PTZ control & management"],"parameters":[{"in":"path","name":"id","description":"The primary key of camera","schema":{"$ref":"#/components/schemas/cameraId"},"required":true},{"in":"path","name":"slot","description":"The slot number (0-4) of the patrol that is currently running, or null if no patrol is running","schema":{"$ref":"#/components/schemas/activePatrolSlotString"},"required":true}],"responses":{"204":{"description":"The camera PTZ patrol was started successfully."},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}}},"/v1/cameras/{id}/ptz/patrol/stop":{"post":{"summary":"Stop active camera PTZ patrol","description":"Stop active camera PTZ patrol","tags":["Camera PTZ control & management"],"parameters":[{"in":"path","name":"id","description":"The primary key of camera","schema":{"$ref":"#/components/schemas/cameraId"},"required":true}],"responses":{"204":{"description":"The camera PTZ patrol was stopped successfully."},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}}},"/v1/cameras/{id}/ptz/goto/{slot}":{"post":{"summary":"Move PTZ camera to preset","description":"Adjust the PTZ camera position to a specified preset","tags":["Camera PTZ control & management"],"parameters":[{"in":"path","name":"id","description":"The primary key of camera","schema":{"$ref":"#/components/schemas/cameraId"},"required":true},{"in":"path","name":"slot","description":"The slot number (0-4) of the preset to move the camera to","schema":{"type":"string","description":"The slot number (0-4) of the preset to move the camera to","examples":["-1","0","2","8","9"]},"required":true}],"responses":{"204":{"description":"The PTZ camera was moved to the given preset successfully."},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}}},"/v1/alarm-manager/webhook/{id}":{"post":{"summary":"Send a webhook to the alarm manager","description":"Send a webhook to the alarm manager to trigger configured alarms","tags":["Alarm manager integration"],"parameters":[{"in":"path","name":"id","description":"User defined string used to trigger only specific alarms. Alarm should be configured with the same ID to be triggered.","schema":{"$ref":"#/components/schemas/alarmTriggerId"},"required":true}],"responses":{"204":{"description":"Webhook was sent to alarm manager successfully"},"400":{"description":"Bad request response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/idRequiredError"}}}}}}},"/v1/lights/{id}":{"get":{"summary":"Get light details","description":"Get detailed information about a specific light","tags":["Light information & management"],"parameters":[{"in":"path","name":"id","description":"The primary key of light","schema":{"$ref":"#/components/schemas/lightId"},"required":true}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/light"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}},"patch":{"summary":"Patch light settings","description":"Patch the settings for a specific light","tags":["Light information & management"],"parameters":[{"in":"path","name":"id","description":"The primary key of light","schema":{"$ref":"#/components/schemas/lightId"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/name"},"isLightForceEnabled":{"$ref":"#/components/schemas/isLightForceEnabled"},"lightModeSettings":{"$ref":"#/components/schemas/lightModeSettings"},"lightDeviceSettings":{"$ref":"#/components/schemas/lightDeviceSettings"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/light"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}}},"/v1/lights":{"get":{"summary":"Get all lights","description":"Get detailed information about all lights","tags":["Light information & management"],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/light"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}}},"/v1/cameras/{id}":{"get":{"summary":"Get camera details","description":"Get detailed information about a specific camera","tags":["Camera information & management"],"parameters":[{"in":"path","name":"id","description":"The primary key of camera","schema":{"$ref":"#/components/schemas/cameraId"},"required":true}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/camera"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}},"patch":{"summary":"Patch camera settings","description":"Patch the settings for a specific camera","tags":["Camera information & management"],"parameters":[{"in":"path","name":"id","description":"The primary key of camera","schema":{"$ref":"#/components/schemas/cameraId"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the camera"},"osdSettings":{"type":"object","properties":{"isNameEnabled":{"$ref":"#/components/schemas/osdIsNameEnabled"},"isDateEnabled":{"$ref":"#/components/schemas/osdIsDateEnabled"},"isLogoEnabled":{"$ref":"#/components/schemas/osdIsLogoEnabled"},"isDebugEnabled":{"$ref":"#/components/schemas/osdIsDebugEnabled"},"overlayLocation":{"$ref":"#/components/schemas/osdOverlayLocation"}},"additionalProperties":false,"description":"On Screen Display settings.","title":"osdSettings"},"ledSettings":{"type":"object","properties":{"isEnabled":{"$ref":"#/components/schemas/ledIsEnabled"},"welcomeLed":{"$ref":"#/components/schemas/ledWelcomeLed"},"floodLed":{"$ref":"#/components/schemas/ledFloodLed"}},"additionalProperties":false,"description":"LED settings.","title":"ledSettings"},"lcdMessage":{"$ref":"#/components/schemas/lcdMessage","description":"Message that's set on the LCD screen (for doorbells and/or other devices with LCD screens). To upload image assets for the LCD screen, use the `/files/{fileType}` endpoint."},"micVolume":{"allOf":[{"$ref":"#/components/schemas/micVolume"}],"minimum":1},"videoMode":{"$ref":"#/components/schemas/videoMode"},"hdrType":{"allOf":[{"$ref":"#/components/schemas/hdrType"}],"description":"High Dynamic Range (HDR) mode setting.","enum":["auto","on","off"],"x-enum-descriptions":["Recommended, the system automatically adjusts the HDR level.","Forces HDR to be always enabled as the highest level.","Disables HDR completely."],"x-enum-varnames":["auto","on","off"]},"smartDetectSettings":{"type":"object","properties":{"objectTypes":{"$ref":"#/components/schemas/objectTypes"},"audioTypes":{"$ref":"#/components/schemas/audioTypes"}},"additionalProperties":false,"description":"Smart detection settings for the camera.","title":"smartDetectSettings"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/camera"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}}},"/v1/cameras":{"get":{"summary":"Get all cameras","description":"Get detailed information about all cameras","tags":["Camera information & management"],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/camera"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}}},"/v1/cameras/{id}/rtsps-stream":{"post":{"summary":"Create RTSPS streams for camera","description":"Returns RTSPS stream URLs for specified quality levels","tags":["Camera information & management"],"parameters":[{"in":"path","name":"id","description":"The primary key of camera","schema":{"$ref":"#/components/schemas/cameraId"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"qualities":{"$ref":"#/components/schemas/createdQualities"}},"required":["qualities"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createdRtspsStreams"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}},"delete":{"summary":"Delete camera RTSPS stream","description":"Remove the RTSPS stream for a specified camera","tags":["Camera information & management"],"parameters":[{"in":"path","name":"id","description":"The primary key of camera","schema":{"$ref":"#/components/schemas/cameraId"},"required":true},{"in":"query","name":"qualities","description":"The array of quality levels for the RTSPS streams to be removed.","schema":{"$ref":"#/components/schemas/removedQualities"},"required":true}],"responses":{"204":{"description":"RTSPS stream successfully removed"},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}},"get":{"summary":"Get RTSPS streams for camera","description":"Returns existing RTSPS stream URLs for camera","tags":["Camera information & management"],"parameters":[{"in":"path","name":"id","description":"The primary key of camera","schema":{"$ref":"#/components/schemas/cameraId"},"required":true}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/existingRtspsStreams"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}}},"/v1/cameras/{id}/snapshot":{"get":{"summary":"Get camera snapshot","description":"Get a snapshot image from a specific camera","tags":["Camera information & management"],"parameters":[{"in":"path","name":"id","description":"The primary key of camera","schema":{"$ref":"#/components/schemas/cameraId"},"required":true},{"in":"query","name":"highQuality","description":"Whether to force 1080P or higher resolution snapshot","schema":{"$ref":"#/components/schemas/forceHighQuality"}}],"responses":{"200":{"description":"Camera snapshot","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}}},"/v1/cameras/{id}/disable-mic-permanently":{"post":{"summary":"Permanently disable camera microphone","description":"Disable the microphone for a specific camera. This action cannot be undone unless the camera is reset.","tags":["Camera information & management"],"parameters":[{"in":"path","name":"id","description":"The primary key of camera","schema":{"$ref":"#/components/schemas/cameraId"},"required":true}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/camera"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}}},"/v1/cameras/{id}/talkback-session":{"post":{"summary":"Create talkback session for camera","description":"Returns the talkback stream URL and audio configuration for a specific camera","tags":["Camera information & management"],"parameters":[{"in":"path","name":"id","description":"The primary key of camera","schema":{"$ref":"#/components/schemas/cameraId"},"required":true}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/talkbackSession"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}}},"/v1/sensors/{id}":{"get":{"summary":"Get sensor details","description":"Get detailed information about a specific sensor","tags":["Sensor information & management"],"parameters":[{"in":"path","name":"id","description":"The primary key of sensor","schema":{"$ref":"#/components/schemas/sensorId"},"required":true}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sensor"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}},"patch":{"summary":"Patch sensor settings","description":"Patch the settings for a specific sensor","tags":["Sensor information & management"],"parameters":[{"in":"path","name":"id","description":"The primary key of sensor","schema":{"$ref":"#/components/schemas/sensorId"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/name"},"lightSettings":{"allOf":[{"$ref":"#/components/schemas/lightSettings"}],"additionalProperties":false},"humiditySettings":{"allOf":[{"$ref":"#/components/schemas/humiditySettings"}],"additionalProperties":false},"temperatureSettings":{"allOf":[{"$ref":"#/components/schemas/temperatureSettings"}],"additionalProperties":false},"motionSettings":{"allOf":[{"$ref":"#/components/schemas/motionSettings"}],"additionalProperties":false},"alarmSettings":{"allOf":[{"$ref":"#/components/schemas/alarmSettings"}],"additionalProperties":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/sensor"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}}},"/v1/sensors":{"get":{"summary":"Get all sensors","description":"Get detailed information about all sensors","tags":["Sensor information & management"],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/sensor"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}}},"/v1/nvrs":{"get":{"summary":"Get NVR details","description":"Get detailed information about the NVR","tags":["NVR information & management"],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/nvr"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}}},"/v1/files/{fileType}":{"post":{"summary":"Upload device asset file","description":"Upload a new device asset file","tags":["Device asset file management"],"parameters":[{"in":"path","name":"fileType","description":"Device asset file type","schema":{"$ref":"#/components/schemas/assetFileType"},"required":true}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"string","format":"binary","description":"A binary file with one of these MIME types: image/gif, image/jpeg, image/png, audio/mpeg, audio/mp4, audio/wave, audio/x-caf}"}}}},"responses":{"200":{"description":"Processed and persisted device asset","content":{"application/json":{"schema":{"$ref":"#/components/schemas/fileSchema"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}},"get":{"summary":"Get device asset files","description":"Get a list of all device asset files","tags":["Device asset file management"],"parameters":[{"in":"path","name":"fileType","description":"Device asset file type","schema":{"$ref":"#/components/schemas/assetFileType"},"required":true}],"responses":{"200":{"description":"Device asset list","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/fileSchema"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}}},"/v1/chimes/{id}":{"get":{"summary":"Get chime details","description":"Get detailed information about a specific chime","tags":["Chime information & management"],"parameters":[{"in":"path","name":"id","description":"The primary key of chime","schema":{"$ref":"#/components/schemas/chimeId"},"required":true}],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/chime"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}},"patch":{"summary":"Patch chime settings","description":"Patch the settings for a specific chime","tags":["Chime information & management"],"parameters":[{"in":"path","name":"id","description":"The primary key of chime","schema":{"$ref":"#/components/schemas/chimeId"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the chime"},"cameraIds":{"type":"array","items":{"$ref":"#/components/schemas/cameraId"},"description":"The list of (doorbell-only) cameras which this chime is paired to."},"ringSettings":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/ringSettings"}],"additionalProperties":false},"description":"List of custom ringtone settings for (doorbell-only) cameras paired to this chime."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/chime"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}}},"/v1/chimes":{"get":{"summary":"Get all chimes","description":"Get detailed information about all chimes","tags":["Chime information & management"],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/chime"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}}}}}}},"components":{"schemas":{"protectVersion":{"type":"string","description":"Protect application version","examples":["1.0.0"],"title":"protectVersion"},"genericError":{"type":"object","properties":{"error":{"type":"string","description":"Error message","examples":["Unexpected API error occurred"]},"name":{"type":"string","description":"Name of the error","examples":["API_ERROR"]},"cause":{"type":"object","additionalProperties":{},"description":"An optional nested cause for the parent error","examples":[{"error":"Unexpected functionality error","name":"UNKNOWN_ERROR"}]}},"required":["error","name"],"title":"genericError"},"viewerId":{"type":"string","description":"The primary key of viewer","examples":["66d025b301ebc903e80003ea","672094f900e26303e800062a"],"title":"viewerId"},"viewer":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/viewerId"},"modelKey":{"$ref":"#/components/schemas/viewerModelKey"},"state":{"$ref":"#/components/schemas/deviceState"},"name":{"oneOf":[{"$ref":"#/components/schemas/name"},{"type":"null"}]},"mac":{"$ref":"#/components/schemas/mac"},"liveview":{"oneOf":[{"$ref":"#/components/schemas/liveviewId"},{"type":"null"}]},"streamLimit":{"$ref":"#/components/schemas/streamLimit"}},"required":["id","modelKey","state","name","mac","liveview","streamLimit"],"title":"viewer"},"viewerModelKey":{"type":"string","const":"viewer","description":"The model key of the viewer","title":"viewerModelKey"},"deviceState":{"type":"string","enum":["CONNECTED","CONNECTING","DISCONNECTED"],"description":"Connection state of the device.","examples":["CONNECTED","CONNECTING","DISCONNECTED"],"title":"deviceState"},"name":{"type":"string","description":"The name of the model","title":"name"},"mac":{"type":"string","description":"The MAC address of the device","title":"mac"},"liveviewId":{"type":"string","description":"The primary key of liveview","examples":["66d025b301ebc903e80003ea","672094f900e26303e800062a"],"title":"liveviewId"},"streamLimit":{"type":"number","description":"Count of maximum supported parallel live streams.","title":"streamLimit"},"liveview":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/liveviewId"},"modelKey":{"$ref":"#/components/schemas/liveviewModelKey"},"name":{"type":"string","description":"The name of this live view."},"isDefault":{"type":"boolean","description":"Whether this live view is the default one for all viewers."},"isGlobal":{"type":"boolean","description":"Whether this live view is global and available system-wide to all users"},"owner":{"$ref":"#/components/schemas/userId"},"layout":{"type":"number","minimum":1,"maximum":26,"description":"The number of slots this live view contains. Which as a consequence also affects the layout of the live view."},"slots":{"type":"array","items":{"type":"object","properties":{"cameras":{"type":"array","items":{"$ref":"#/components/schemas/cameraId"}},"cycleMode":{"type":"string","enum":["motion","time"],"description":"Whether to switch to next camera in slot based on motion events or a strict time interval"},"cycleInterval":{"type":"number","description":"How long should each camera stream be shown for in seconds until we cycle to the next camera"}},"required":["cameras","cycleMode","cycleInterval"],"description":"Which cameras will be visible in a given slot and how will they be cycled through"},"description":"List of cameras visible in each given slot. And cycling settings for each slot if it has multiple cameras listed."}},"required":["id","modelKey","name","isDefault","isGlobal","owner","layout","slots"],"title":"liveview"},"liveviewModelKey":{"type":"string","const":"liveview","description":"The model key of the liveview","title":"liveviewModelKey"},"userId":{"type":"string","description":"The primary key of user","examples":["66d025b301ebc903e80003ea","672094f900e26303e800062a"],"title":"userId"},"cameraId":{"type":"string","description":"The primary key of camera","examples":["66d025b301ebc903e80003ea","672094f900e26303e800062a"],"title":"cameraId"},"deviceAdd":{"type":"object","properties":{"type":{"type":"string","const":"add"},"item":{"$ref":"#/components/schemas/device"}},"required":["type","item"],"title":"deviceAdd"},"device":{"oneOf":[{"$ref":"#/components/schemas/nvr"},{"$ref":"#/components/schemas/camera"},{"$ref":"#/components/schemas/chime"},{"$ref":"#/components/schemas/light"},{"$ref":"#/components/schemas/viewer"},{"$ref":"#/components/schemas/speaker"},{"$ref":"#/components/schemas/bridge"},{"$ref":"#/components/schemas/sensor"},{"$ref":"#/components/schemas/aiProcessor"},{"$ref":"#/components/schemas/aiPort"},{"$ref":"#/components/schemas/linkStation"}],"discriminator":{"propertyName":"modelKey","mapping":{"nvr":"#/components/schemas/nvr","camera":"#/components/schemas/camera","chime":"#/components/schemas/chime","light":"#/components/schemas/light","viewer":"#/components/schemas/viewer","speaker":"#/components/schemas/speaker","bridge":"#/components/schemas/bridge","sensor":"#/components/schemas/sensor","aiprocessor":"#/components/schemas/aiProcessor","aiport":"#/components/schemas/aiPort","linkstation":"#/components/schemas/linkStation"}}},"nvr":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/nvrId"},"modelKey":{"$ref":"#/components/schemas/nvrModelKey"},"name":{"oneOf":[{"$ref":"#/components/schemas/name"},{"type":"null"}]},"doorbellSettings":{"$ref":"#/components/schemas/doorbellSettings"}},"required":["id","modelKey","name","doorbellSettings"],"title":"nvr"},"nvrId":{"type":"string","description":"The primary key of nvr","examples":["66d025b301ebc903e80003ea","672094f900e26303e800062a"],"title":"nvrId"},"nvrModelKey":{"type":"string","const":"nvr","description":"The model key of the nvr","title":"nvrModelKey"},"doorbellSettings":{"type":"object","properties":{"defaultMessageText":{"type":"string"},"defaultMessageResetTimeoutMs":{"type":"number"},"customMessages":{"type":"array","items":{"type":"string"}},"customImages":{"type":"array","items":{"type":"object","properties":{"preview":{"type":"string"},"sprite":{"type":"string"}},"required":["preview","sprite"]}}},"title":"doorbellSettings"},"camera":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/cameraId"},"modelKey":{"$ref":"#/components/schemas/cameraModelKey"},"state":{"$ref":"#/components/schemas/deviceState"},"name":{"oneOf":[{"$ref":"#/components/schemas/name"},{"type":"null"}]},"mac":{"$ref":"#/components/schemas/mac"},"isMicEnabled":{"$ref":"#/components/schemas/isMicEnabled"},"osdSettings":{"$ref":"#/components/schemas/osdSettings"},"ledSettings":{"$ref":"#/components/schemas/ledSettings"},"lcdMessage":{"$ref":"#/components/schemas/lcdMessageUnion"},"micVolume":{"$ref":"#/components/schemas/micVolume"},"activePatrolSlot":{"oneOf":[{"$ref":"#/components/schemas/activePatrolSlot"},{"type":"null"}]},"videoMode":{"$ref":"#/components/schemas/videoMode"},"hdrType":{"$ref":"#/components/schemas/hdrType"},"featureFlags":{"$ref":"#/components/schemas/cameraFeatureFlags"},"smartDetectSettings":{"$ref":"#/components/schemas/smartDetectSettings"}},"required":["id","modelKey","state","name","mac","isMicEnabled","osdSettings","ledSettings","lcdMessage","micVolume","activePatrolSlot","videoMode","hdrType","featureFlags","smartDetectSettings"],"title":"camera"},"cameraModelKey":{"type":"string","const":"camera","description":"The model key of the camera","title":"cameraModelKey"},"isMicEnabled":{"type":"boolean","description":"Whether or not the microphone on camera is enabled","title":"isMicEnabled"},"osdSettings":{"type":"object","properties":{"isNameEnabled":{"$ref":"#/components/schemas/osdIsNameEnabled"},"isDateEnabled":{"$ref":"#/components/schemas/osdIsDateEnabled"},"isLogoEnabled":{"$ref":"#/components/schemas/osdIsLogoEnabled"},"isDebugEnabled":{"$ref":"#/components/schemas/osdIsDebugEnabled"},"overlayLocation":{"$ref":"#/components/schemas/osdOverlayLocation"}},"required":["isNameEnabled","isDateEnabled","isLogoEnabled","isDebugEnabled","overlayLocation"],"description":"On Screen Display settings.","title":"osdSettings"},"osdIsNameEnabled":{"type":"boolean","description":"Whether to show the name in the OSD.","title":"osdIsNameEnabled"},"osdIsDateEnabled":{"type":"boolean","description":"Whether to show the date in the OSD.","title":"osdIsDateEnabled"},"osdIsLogoEnabled":{"type":"boolean","description":"Whether to show the logo in the bottom right corner.","title":"osdIsLogoEnabled"},"osdIsDebugEnabled":{"type":"boolean","description":"Whether debug info is enabled.","title":"osdIsDebugEnabled"},"osdOverlayLocation":{"type":"string","enum":["topLeft","topMiddle","topRight","bottomLeft","bottomMiddle","bottomRight"],"description":"The location of the overlay on the screen.","title":"osdOverlayLocation"},"ledSettings":{"type":"object","properties":{"isEnabled":{"$ref":"#/components/schemas/ledIsEnabled"},"welcomeLed":{"$ref":"#/components/schemas/ledWelcomeLed"},"floodLed":{"$ref":"#/components/schemas/ledFloodLed"}},"required":["isEnabled","welcomeLed","floodLed"],"description":"LED settings.","title":"ledSettings"},"ledIsEnabled":{"type":"boolean","description":"Indicates whether the status LED is enabled.","title":"ledIsEnabled"},"ledWelcomeLed":{"type":"boolean","description":"Indicates whether the welcome LED is enabled.","title":"ledWelcomeLed"},"ledFloodLed":{"type":"boolean","description":"Indicates whether the flood LED is enabled.","title":"ledFloodLed"},"lcdMessageUnion":{"type":"object","properties":{"type":{"type":"string","enum":["LEAVE_PACKAGE_AT_DOOR","DO_NOT_DISTURB","CUSTOM_MESSAGE","IMAGE"]},"resetAt":{"type":["number","null"],"description":"UNIX timestamp when doorbell message should be removed (if not set then `nvr.doorbellSettings.defaultMessageResetTimeoutMs` is used, if set to `null` then interpreted as \"forever\")"},"text":{"type":"string"}},"title":"lcdMessageUnion"},"micVolume":{"type":"number","minimum":0,"maximum":100,"description":"Mic volume: a number from 0-100.","title":"micVolume"},"activePatrolSlot":{"type":"number","title":"activePatrolSlot","description":"The slot number (0-4) of the patrol that is currently running, or null if no patrol is running","examples":[0,1,2,3,4]},"videoMode":{"type":"string","enum":["default","highFps","sport","slowShutter","lprReflex","lprNoneReflex"],"description":"Current video mode of the camera","title":"videoMode"},"hdrType":{"type":"string","enum":["auto","on","off"],"description":"High Dynamic Range (HDR) mode setting.","title":"videoMode"},"cameraFeatureFlags":{"type":"object","properties":{"supportFullHdSnapshot":{"type":"boolean","description":"Whether camera support full HD or higher resolution snapshot"},"hasHdr":{"type":"boolean","description":"Whether the camera supports High Dynamic Range mode"},"smartDetectTypes":{"type":"array","items":{"type":"string","enum":["person","vehicle","package","licensePlate","face","animal"]},"description":"What smart detection object types do the camera support."},"smartDetectAudioTypes":{"type":"array","items":{"type":"string","enum":["alrmSmoke","alrmCmonx","alrmSiren","alrmBabyCry","alrmSpeak","alrmBark","alrmBurglar","alrmCarHorn","alrmGlassBreak"]},"description":"What smart detection audio types do the camera support."},"videoModes":{"type":"array","items":{"type":"string","enum":["default","highFps","homekit","sport","slowShutter","lprReflex","lprNoneReflex"]},"description":"A list of supported video modes by the camera"},"hasMic":{"type":"boolean","description":"Whether the camera has a microphone"},"hasLedStatus":{"type":"boolean","description":"Whether the camera has LED status"},"hasSpeaker":{"type":"boolean","description":"Whether the camera has a speaker to support talkback"}},"required":["supportFullHdSnapshot","hasHdr","smartDetectTypes","smartDetectAudioTypes","videoModes","hasMic","hasLedStatus","hasSpeaker"],"title":"cameraFeatureFlags"},"smartDetectSettings":{"type":"object","properties":{"objectTypes":{"$ref":"#/components/schemas/objectTypes"},"audioTypes":{"$ref":"#/components/schemas/audioTypes"}},"required":["objectTypes","audioTypes"],"description":"Smart detection settings for the camera.","title":"smartDetectSettings"},"objectTypes":{"type":"array","items":{"type":"string","enum":["person","vehicle","package","licensePlate","face","animal"]},"title":"objectTypes"},"audioTypes":{"type":"array","items":{"type":"string","enum":["alrmSmoke","alrmCmonx","alrmSiren","alrmBabyCry","alrmSpeak","alrmBark","alrmBurglar","alrmCarHorn","alrmGlassBreak"]},"title":"objectTypes"},"chime":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/chimeId"},"modelKey":{"$ref":"#/components/schemas/chimeModelKey"},"state":{"$ref":"#/components/schemas/deviceState"},"name":{"oneOf":[{"$ref":"#/components/schemas/name"},{"type":"null"}]},"mac":{"$ref":"#/components/schemas/mac"},"cameraIds":{"type":"array","items":{"$ref":"#/components/schemas/cameraId"},"description":"The list of (doorbell-only) cameras which this chime is paired to."},"ringSettings":{"type":"array","items":{"$ref":"#/components/schemas/ringSettings"},"description":"List of custom ringtone settings for (doorbell-only) cameras paired to this chime."}},"required":["id","modelKey","state","name","mac","cameraIds","ringSettings"],"title":"chime"},"chimeId":{"type":"string","description":"The primary key of chime","examples":["66d025b301ebc903e80003ea","672094f900e26303e800062a"],"title":"chimeId"},"chimeModelKey":{"type":"string","const":"chime","description":"The model key of the chime","title":"chimeModelKey"},"ringSettings":{"type":"object","properties":{"cameraId":{"type":"string","description":"Which paired (doorbell-only) camera do these settings refer to."},"repeatTimes":{"type":"number","minimum":1,"maximum":10,"description":"How many times should the ringtone be repeated"},"ringtoneId":{"type":"string","description":"The ID of the ringtone that should be played when the (doorbell-only) camera is rung."},"volume":{"type":"number","minimum":0,"maximum":100,"description":"How loud should the ringtone be played. 0 being silent and 100 the loudest."}},"required":["cameraId","repeatTimes","ringtoneId","volume"],"title":"ringSettings"},"light":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/lightId"},"modelKey":{"$ref":"#/components/schemas/lightModelKey"},"state":{"$ref":"#/components/schemas/deviceState"},"name":{"oneOf":[{"$ref":"#/components/schemas/name"},{"type":"null"}]},"mac":{"$ref":"#/components/schemas/mac"},"lightModeSettings":{"$ref":"#/components/schemas/lightModeSettings"},"lightDeviceSettings":{"$ref":"#/components/schemas/lightDeviceSettings"},"isDark":{"$ref":"#/components/schemas/isDark"},"isLightOn":{"$ref":"#/components/schemas/isLightOn"},"isLightForceEnabled":{"$ref":"#/components/schemas/isLightForceEnabled"},"lastMotion":{"$ref":"#/components/schemas/lastMotion"},"isPirMotionDetected":{"$ref":"#/components/schemas/isPirMotionDetected"},"camera":{"oneOf":[{"$ref":"#/components/schemas/cameraId"},{"type":"null"}],"description":"Which camera is configured to be paired to this light."}},"required":["id","modelKey","state","name","mac","lightModeSettings","lightDeviceSettings","isDark","isLightOn","isLightForceEnabled","lastMotion","isPirMotionDetected","camera"],"title":"light"},"lightId":{"type":"string","description":"The primary key of light","examples":["66d025b301ebc903e80003ea","672094f900e26303e800062a"],"title":"lightId"},"lightModelKey":{"type":"string","const":"light","description":"The model key of the light","title":"lightModelKey"},"lightModeSettings":{"type":"object","properties":{"mode":{"$ref":"#/components/schemas/lightMode"},"enableAt":{"$ref":"#/components/schemas/enableAt"}},"description":"Settings for when and how your light gets activated","title":"lightModeSettings"},"lightMode":{"anyOf":[{"type":"string","const":"always"},{"type":"string","const":"motion"},{"type":"string","const":"off"}],"description":"When will floodlight turn on.","title":"lightMode"},"enableAt":{"anyOf":[{"type":"string","const":"fulltime"},{"type":"string","const":"dark"}],"description":"At what time is the lighting mode relevant and acted upon (this has no effect when mode is off).","title":"enableAt"},"lightDeviceSettings":{"type":"object","properties":{"isIndicatorEnabled":{"type":"boolean","description":"Turn on/off floodlight status LED indicator."},"pirDuration":{"type":"number","minimum":0,"description":"How long the light stays on after a motion event in milliseconds."},"pirSensitivity":{"type":"number","minimum":0,"maximum":100,"description":"How sensitive is the PIR to motion (0-100)%."},"ledLevel":{"type":"number","minimum":1,"maximum":6,"description":"Brightness level of the main LED (1-6)."}},"description":"Hardware settings for light device.","title":"lightDeviceSettings"},"isDark":{"type":"boolean","description":"Whether the light is currently sensing that it's in a dark scene.","title":"isDark"},"isLightOn":{"type":"boolean","description":"Whether the light has its main LED currently enabled.","title":"isLightOn"},"isLightForceEnabled":{"type":"boolean","description":"Whether the light has its main LED currently force-enabled.","title":"isLightForceEnabled"},"lastMotion":{"type":["number","null"],"description":"Unix timestamp of the last time the PIR motion-detection was triggered.","title":"lastMotion"},"isPirMotionDetected":{"type":"boolean","description":"Whether the light PIR is currently detecting motion","title":"isPirMotionDetected"},"speaker":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/deviceId"},"modelKey":{"$ref":"#/components/schemas/speakerModelKey"},"state":{"$ref":"#/components/schemas/deviceState"},"name":{"oneOf":[{"$ref":"#/components/schemas/name"},{"type":"null"}]},"mac":{"$ref":"#/components/schemas/mac"}},"required":["id","modelKey","state","name","mac"],"title":"speaker"},"deviceId":{"type":"string","description":"The primary key of device","examples":["66d025b301ebc903e80003ea","672094f900e26303e800062a"],"title":"deviceId"},"speakerModelKey":{"type":"string","const":"speaker","description":"The model key of the speaker","title":"speakerModelKey"},"bridge":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/deviceId"},"modelKey":{"$ref":"#/components/schemas/bridgeModelKey"},"state":{"$ref":"#/components/schemas/deviceState"},"name":{"oneOf":[{"$ref":"#/components/schemas/name"},{"type":"null"}]},"mac":{"$ref":"#/components/schemas/mac"}},"required":["id","modelKey","state","name","mac"],"title":"bridge"},"bridgeModelKey":{"type":"string","const":"bridge","description":"The model key of the bridge","title":"bridgeModelKey"},"sensor":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/sensorId"},"modelKey":{"$ref":"#/components/schemas/sensorModelKey"},"state":{"$ref":"#/components/schemas/deviceState"},"name":{"oneOf":[{"$ref":"#/components/schemas/name"},{"type":"null"}]},"mac":{"$ref":"#/components/schemas/mac"},"mountType":{"$ref":"#/components/schemas/sensorMountType"},"batteryStatus":{"$ref":"#/components/schemas/batteryStatus"},"stats":{"$ref":"#/components/schemas/sensorStats"},"lightSettings":{"$ref":"#/components/schemas/lightSettings"},"humiditySettings":{"$ref":"#/components/schemas/humiditySettings"},"temperatureSettings":{"$ref":"#/components/schemas/temperatureSettings"},"isOpened":{"$ref":"#/components/schemas/sensorIsOpened"},"openStatusChangedAt":{"$ref":"#/components/schemas/sensorOpenStatusChangedAt"},"isMotionDetected":{"$ref":"#/components/schemas/sensorIsMotionDetected"},"motionDetectedAt":{"$ref":"#/components/schemas/sensorMotionDetectedAt"},"motionSettings":{"$ref":"#/components/schemas/motionSettings"},"alarmTriggeredAt":{"$ref":"#/components/schemas/sensorAlarmTriggeredAt"},"alarmSettings":{"$ref":"#/components/schemas/alarmSettings"},"leakDetectedAt":{"$ref":"#/components/schemas/sensorLeakDetectedAt"},"externalLeakDetectedAt":{"$ref":"#/components/schemas/sensorExternalLeakDetectedAt"},"leakSettings":{"$ref":"#/components/schemas/leakSettings"},"tamperingDetectedAt":{"$ref":"#/components/schemas/tamperingDetectedAt"}},"required":["id","modelKey","state","name","mac","mountType","batteryStatus","stats","lightSettings","humiditySettings","temperatureSettings","isOpened","openStatusChangedAt","isMotionDetected","motionDetectedAt","motionSettings","alarmTriggeredAt","alarmSettings","leakDetectedAt","externalLeakDetectedAt","leakSettings","tamperingDetectedAt"],"title":"sensor"},"sensorId":{"type":"string","description":"The primary key of sensor","examples":["66d025b301ebc903e80003ea","672094f900e26303e800062a"],"title":"sensorId"},"sensorModelKey":{"type":"string","const":"sensor","description":"The model key of the sensor","title":"sensorModelKey"},"sensorMountType":{"type":"string","enum":["door","window","garage","leak","none"],"description":"Mounting type of the sensor.","examples":["garage"],"title":"sensorMountType"},"batteryStatus":{"type":"object","properties":{"percentage":{"type":["number","null"],"description":"Battery charge level from 0 to 100 (%)."},"isLow":{"type":"boolean","description":"Low battery charge level flag."}},"description":"[DEPRECATED] Use wirelessConnectionState.batteryStatus instead. Battery status.","title":"batteryStatus"},"sensorStats":{"type":"object","properties":{"light":{"type":"object","properties":{"value":{"oneOf":[{"$ref":"#/components/schemas/sensorValue"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/sensorStatus"}},"description":"Ambient light value (Lux)."},"humidity":{"type":"object","properties":{"value":{"oneOf":[{"$ref":"#/components/schemas/sensorValue"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/sensorStatus"}},"description":"Ambient light value (Lux)."},"temperature":{"type":"object","properties":{"value":{"oneOf":[{"$ref":"#/components/schemas/sensorValue"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/sensorStatus"}},"description":"Ambient light value (Lux)."}},"description":"Sensor statistics.","title":"sensorStats"},"sensorValue":{"type":"number","description":"Decimal value of the metric measured by the sensor","title":"sensorValue"},"sensorStatus":{"type":"string","enum":["neutral","low","safe","high","unknown"],"description":"What range does the measured metric fall into","title":"sensorStatus","examples":["high"]},"lightSettings":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Enable ambient light sensor."},"margin":{"type":"number","description":"Ambient light threshold detection hysteresis margin (Lux). Read-only value decided by sensor implementation."},"lowThreshold":{"type":["number","null"],"minimum":1,"maximum":503192,"description":"Ambient light interrupt threshold low level from 1 to 503192 (Lux)."},"highThreshold":{"type":["number","null"],"description":"Ambient light interrupt threshold high level from 1 to 503192 (Lux)."}},"description":"Ambient light sensor settings.","title":"lightSettings"},"humiditySettings":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Enable relative humidity sensor."},"margin":{"type":"number","description":"Humidity threshold detection hysteresis margin (%). Read-only value decided by sensor implementation."},"lowThreshold":{"type":["number","null"],"minimum":1,"maximum":99,"description":"Humidity low level threshold from 1 to 99 (%)."},"highThreshold":{"type":["number","null"],"description":"Humidity high level threshold from 1 to 99 (%)."}},"description":"Relative humidity sensor settings.","title":"humiditySettings"},"temperatureSettings":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Enable temperature sensor."},"margin":{"type":"number","description":"Temperature threshold detection hysteresis margin (C). Read-only value decided by sensor implementation."},"lowThreshold":{"type":["number","null"],"minimum":-39,"maximum":124,"description":"Temperature low level threshold from -39 to 124 (C)."},"highThreshold":{"type":["number","null"],"description":"Temperature high level threshold from -39 to 124 (C)."}},"description":"Temperature sensor settings.","title":"temperatureSettings"},"sensorIsOpened":{"type":"boolean","description":"Whether the door/window/garage is opened.","title":"sensorIsOpened"},"sensorOpenStatusChangedAt":{"type":["number","null"],"description":"Unix timestamp when the door/window/garage was last opened or closed, nullable.","title":"sensorOpenStatusChangedAt"},"sensorIsMotionDetected":{"type":"boolean","description":"Whether sensor is currently detecting the motion.","title":"sensorIsMotionDetected"},"sensorMotionDetectedAt":{"type":["number","null"],"description":"Unix timestamp when the last motion was detected.","title":"sensorMotionDetectedAt"},"motionSettings":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Enable motion sensor."},"sensitivity":{"type":"number","minimum":0,"maximum":100,"description":"Motion sensitivity (0-100)."}},"description":"Motion sensor settings.","title":"motionSettings"},"sensorAlarmTriggeredAt":{"type":["number","null"],"description":"Unix timestamp when the smoke or carbon monoxide alarm was triggered, nullable.","title":"sensorAlarmTriggeredAt"},"alarmSettings":{"type":"object","properties":{"isEnabled":{"type":"boolean","description":"Enable smoke and carbon monoxide alarm sensor."}},"description":"Smoke and carbon monoxide alarm sensor settings.","title":"alarmSettings"},"sensorLeakDetectedAt":{"type":["number","null"],"description":"Unix timestamp when the sensor detected a water leak, nullable.","title":"sensorLeakDetectedAt"},"sensorExternalLeakDetectedAt":{"type":["number","null"],"description":"Unix timestamp when the sensor detected an external water leak, nullable.","title":"sensorExternalLeakDetectedAt"},"leakSettings":{"type":"object","properties":{"isInternalEnabled":{"type":"boolean","description":"Enable internal water leak detection."},"isExternalEnabled":{"type":"boolean","description":"Enable external water leak detection."}},"description":"Leak sensor settings.","title":"leakSettings"},"tamperingDetectedAt":{"type":["number","null"],"description":"Unix timestamp when the sensor detected tampering, nullable.","title":"tamperingDetectedAt"},"aiProcessor":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/deviceId"},"modelKey":{"$ref":"#/components/schemas/aiprocessorModelKey"},"state":{"$ref":"#/components/schemas/deviceState"},"name":{"oneOf":[{"$ref":"#/components/schemas/name"},{"type":"null"}]},"mac":{"$ref":"#/components/schemas/mac"}},"required":["id","modelKey","state","name","mac"],"title":"aiProcessor"},"aiprocessorModelKey":{"type":"string","const":"aiprocessor","description":"The model key of the aiprocessor","title":"aiprocessorModelKey"},"aiPort":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/deviceId"},"modelKey":{"$ref":"#/components/schemas/aiportModelKey"},"state":{"$ref":"#/components/schemas/deviceState"},"name":{"oneOf":[{"$ref":"#/components/schemas/name"},{"type":"null"}]},"mac":{"$ref":"#/components/schemas/mac"}},"required":["id","modelKey","state","name","mac"],"title":"aiPort"},"aiportModelKey":{"type":"string","const":"aiport","description":"The model key of the aiport","title":"aiportModelKey"},"linkStation":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/deviceId"},"modelKey":{"$ref":"#/components/schemas/linkstationModelKey"},"state":{"$ref":"#/components/schemas/deviceState"},"name":{"oneOf":[{"$ref":"#/components/schemas/name"},{"type":"null"}]},"mac":{"$ref":"#/components/schemas/mac"}},"required":["id","modelKey","state","name","mac"],"title":"linkStation"},"linkstationModelKey":{"type":"string","const":"linkstation","description":"The model key of the linkstation","title":"linkstationModelKey"},"deviceUpdate":{"type":"object","properties":{"type":{"type":"string","const":"update"},"item":{"$ref":"#/components/schemas/devicePartialWithReference"}},"required":["type","item"],"title":"deviceUpdate"},"devicePartialWithReference":{"oneOf":[{"$ref":"#/components/schemas/nvrPartialWithReference"},{"$ref":"#/components/schemas/cameraPartialWithReference"},{"$ref":"#/components/schemas/chimePartialWithReference"},{"$ref":"#/components/schemas/lightPartialWithReference"},{"$ref":"#/components/schemas/viewerPartialWithReference"},{"$ref":"#/components/schemas/speakerPartialWithReference"},{"$ref":"#/components/schemas/bridgePartialWithReference"},{"$ref":"#/components/schemas/sensorPartialWithReference"},{"$ref":"#/components/schemas/aiProcessorPartialWithReference"},{"$ref":"#/components/schemas/aiPortPartialWithReference"},{"$ref":"#/components/schemas/linkStationPartialWithReference"}],"discriminator":{"propertyName":"modelKey","mapping":{"nvr":"#/components/schemas/nvrPartialWithReference","camera":"#/components/schemas/cameraPartialWithReference","chime":"#/components/schemas/chimePartialWithReference","light":"#/components/schemas/lightPartialWithReference","viewer":"#/components/schemas/viewerPartialWithReference","speaker":"#/components/schemas/speakerPartialWithReference","bridge":"#/components/schemas/bridgePartialWithReference","sensor":"#/components/schemas/sensorPartialWithReference","aiprocessor":"#/components/schemas/aiProcessorPartialWithReference","aiport":"#/components/schemas/aiPortPartialWithReference","linkstation":"#/components/schemas/linkStationPartialWithReference"}}},"nvrPartialWithReference":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/nvrId"},"modelKey":{"$ref":"#/components/schemas/nvrModelKey"},"name":{"oneOf":[{"$ref":"#/components/schemas/name"},{"type":"null"}]},"doorbellSettings":{"$ref":"#/components/schemas/doorbellSettings"}},"required":["id","modelKey"],"title":"nvrPartialWithReference"},"cameraPartialWithReference":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/cameraId"},"modelKey":{"$ref":"#/components/schemas/cameraModelKey"},"state":{"$ref":"#/components/schemas/deviceState"},"name":{"oneOf":[{"$ref":"#/components/schemas/name"},{"type":"null"}]},"mac":{"$ref":"#/components/schemas/mac"},"isMicEnabled":{"$ref":"#/components/schemas/isMicEnabled"},"osdSettings":{"$ref":"#/components/schemas/osdSettings"},"ledSettings":{"$ref":"#/components/schemas/ledSettings"},"lcdMessage":{"$ref":"#/components/schemas/lcdMessageUnion"},"micVolume":{"$ref":"#/components/schemas/micVolume"},"activePatrolSlot":{"oneOf":[{"$ref":"#/components/schemas/activePatrolSlot"},{"type":"null"}]},"videoMode":{"$ref":"#/components/schemas/videoMode"},"hdrType":{"$ref":"#/components/schemas/hdrType"},"featureFlags":{"$ref":"#/components/schemas/cameraFeatureFlags"},"smartDetectSettings":{"$ref":"#/components/schemas/smartDetectSettings"}},"required":["id","modelKey"],"title":"cameraPartialWithReference"},"chimePartialWithReference":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/chimeId"},"modelKey":{"$ref":"#/components/schemas/chimeModelKey"},"state":{"$ref":"#/components/schemas/deviceState"},"name":{"oneOf":[{"$ref":"#/components/schemas/name"},{"type":"null"}]},"mac":{"$ref":"#/components/schemas/mac"},"cameraIds":{"type":"array","items":{"$ref":"#/components/schemas/cameraId"},"description":"The list of (doorbell-only) cameras which this chime is paired to."},"ringSettings":{"type":"array","items":{"$ref":"#/components/schemas/ringSettings"},"description":"List of custom ringtone settings for (doorbell-only) cameras paired to this chime."}},"required":["id","modelKey"],"title":"chimePartialWithReference"},"lightPartialWithReference":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/lightId"},"modelKey":{"$ref":"#/components/schemas/lightModelKey"},"state":{"$ref":"#/components/schemas/deviceState"},"name":{"oneOf":[{"$ref":"#/components/schemas/name"},{"type":"null"}]},"mac":{"$ref":"#/components/schemas/mac"},"lightModeSettings":{"$ref":"#/components/schemas/lightModeSettings"},"lightDeviceSettings":{"$ref":"#/components/schemas/lightDeviceSettings"},"isDark":{"$ref":"#/components/schemas/isDark"},"isLightOn":{"$ref":"#/components/schemas/isLightOn"},"isLightForceEnabled":{"$ref":"#/components/schemas/isLightForceEnabled"},"lastMotion":{"$ref":"#/components/schemas/lastMotion"},"isPirMotionDetected":{"$ref":"#/components/schemas/isPirMotionDetected"},"camera":{"oneOf":[{"$ref":"#/components/schemas/cameraId"},{"type":"null"}],"description":"Which camera is configured to be paired to this light."}},"required":["id","modelKey"],"title":"lightPartialWithReference"},"viewerPartialWithReference":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/viewerId"},"modelKey":{"$ref":"#/components/schemas/viewerModelKey"},"state":{"$ref":"#/components/schemas/deviceState"},"name":{"oneOf":[{"$ref":"#/components/schemas/name"},{"type":"null"}]},"mac":{"$ref":"#/components/schemas/mac"},"liveview":{"oneOf":[{"$ref":"#/components/schemas/liveviewId"},{"type":"null"}]},"streamLimit":{"$ref":"#/components/schemas/streamLimit"}},"required":["id","modelKey"],"title":"viewerPartialWithReference"},"speakerPartialWithReference":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/deviceId"},"modelKey":{"$ref":"#/components/schemas/speakerModelKey"},"state":{"$ref":"#/components/schemas/deviceState"},"name":{"oneOf":[{"$ref":"#/components/schemas/name"},{"type":"null"}]},"mac":{"$ref":"#/components/schemas/mac"}},"required":["id","modelKey"],"title":"speakerPartialWithReference"},"bridgePartialWithReference":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/deviceId"},"modelKey":{"$ref":"#/components/schemas/bridgeModelKey"},"state":{"$ref":"#/components/schemas/deviceState"},"name":{"oneOf":[{"$ref":"#/components/schemas/name"},{"type":"null"}]},"mac":{"$ref":"#/components/schemas/mac"}},"required":["id","modelKey"],"title":"bridgePartialWithReference"},"sensorPartialWithReference":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/sensorId"},"modelKey":{"$ref":"#/components/schemas/sensorModelKey"},"state":{"$ref":"#/components/schemas/deviceState"},"name":{"oneOf":[{"$ref":"#/components/schemas/name"},{"type":"null"}]},"mac":{"$ref":"#/components/schemas/mac"},"mountType":{"$ref":"#/components/schemas/sensorMountType"},"batteryStatus":{"$ref":"#/components/schemas/batteryStatus"},"stats":{"$ref":"#/components/schemas/sensorStats"},"lightSettings":{"$ref":"#/components/schemas/lightSettings"},"humiditySettings":{"$ref":"#/components/schemas/humiditySettings"},"temperatureSettings":{"$ref":"#/components/schemas/temperatureSettings"},"isOpened":{"$ref":"#/components/schemas/sensorIsOpened"},"openStatusChangedAt":{"$ref":"#/components/schemas/sensorOpenStatusChangedAt"},"isMotionDetected":{"$ref":"#/components/schemas/sensorIsMotionDetected"},"motionDetectedAt":{"$ref":"#/components/schemas/sensorMotionDetectedAt"},"motionSettings":{"$ref":"#/components/schemas/motionSettings"},"alarmTriggeredAt":{"$ref":"#/components/schemas/sensorAlarmTriggeredAt"},"alarmSettings":{"$ref":"#/components/schemas/alarmSettings"},"leakDetectedAt":{"$ref":"#/components/schemas/sensorLeakDetectedAt"},"externalLeakDetectedAt":{"$ref":"#/components/schemas/sensorExternalLeakDetectedAt"},"leakSettings":{"$ref":"#/components/schemas/leakSettings"},"tamperingDetectedAt":{"$ref":"#/components/schemas/tamperingDetectedAt"}},"required":["id","modelKey"],"title":"sensorPartialWithReference"},"aiProcessorPartialWithReference":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/deviceId"},"modelKey":{"$ref":"#/components/schemas/aiprocessorModelKey"},"state":{"$ref":"#/components/schemas/deviceState"},"name":{"oneOf":[{"$ref":"#/components/schemas/name"},{"type":"null"}]},"mac":{"$ref":"#/components/schemas/mac"}},"required":["id","modelKey"],"title":"aiProcessorPartialWithReference"},"aiPortPartialWithReference":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/deviceId"},"modelKey":{"$ref":"#/components/schemas/aiportModelKey"},"state":{"$ref":"#/components/schemas/deviceState"},"name":{"oneOf":[{"$ref":"#/components/schemas/name"},{"type":"null"}]},"mac":{"$ref":"#/components/schemas/mac"}},"required":["id","modelKey"],"title":"aiPortPartialWithReference"},"linkStationPartialWithReference":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/deviceId"},"modelKey":{"$ref":"#/components/schemas/linkstationModelKey"},"state":{"$ref":"#/components/schemas/deviceState"},"name":{"oneOf":[{"$ref":"#/components/schemas/name"},{"type":"null"}]},"mac":{"$ref":"#/components/schemas/mac"}},"required":["id","modelKey"],"title":"linkStationPartialWithReference"},"deviceRemove":{"type":"object","properties":{"type":{"type":"string","const":"remove"},"item":{"$ref":"#/components/schemas/deviceReference"}},"required":["type","item"],"title":"deviceRemove"},"deviceReference":{"oneOf":[{"$ref":"#/components/schemas/nvrReference"},{"$ref":"#/components/schemas/cameraReference"},{"$ref":"#/components/schemas/chimeReference"},{"$ref":"#/components/schemas/lightReference"},{"$ref":"#/components/schemas/viewerReference"},{"$ref":"#/components/schemas/speakerReference"},{"$ref":"#/components/schemas/bridgeReference"},{"$ref":"#/components/schemas/sensorReference"},{"$ref":"#/components/schemas/aiProcessorReference"},{"$ref":"#/components/schemas/aiPortReference"},{"$ref":"#/components/schemas/linkStationReference"}],"discriminator":{"propertyName":"modelKey","mapping":{"nvr":"#/components/schemas/nvrReference","camera":"#/components/schemas/cameraReference","chime":"#/components/schemas/chimeReference","light":"#/components/schemas/lightReference","viewer":"#/components/schemas/viewerReference","speaker":"#/components/schemas/speakerReference","bridge":"#/components/schemas/bridgeReference","sensor":"#/components/schemas/sensorReference","aiprocessor":"#/components/schemas/aiProcessorReference","aiport":"#/components/schemas/aiPortReference","linkstation":"#/components/schemas/linkStationReference"}}},"nvrReference":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/nvrId"},"modelKey":{"$ref":"#/components/schemas/nvrModelKey"}},"required":["id","modelKey"],"title":"nvrReference"},"cameraReference":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/cameraId"},"modelKey":{"$ref":"#/components/schemas/cameraModelKey"}},"required":["id","modelKey"],"title":"cameraReference"},"chimeReference":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/chimeId"},"modelKey":{"$ref":"#/components/schemas/chimeModelKey"}},"required":["id","modelKey"],"title":"chimeReference"},"lightReference":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/lightId"},"modelKey":{"$ref":"#/components/schemas/lightModelKey"}},"required":["id","modelKey"],"title":"lightReference"},"viewerReference":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/viewerId"},"modelKey":{"$ref":"#/components/schemas/viewerModelKey"}},"required":["id","modelKey"],"title":"viewerReference"},"speakerReference":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/deviceId"},"modelKey":{"$ref":"#/components/schemas/speakerModelKey"}},"required":["id","modelKey"],"title":"speakerReference"},"bridgeReference":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/deviceId"},"modelKey":{"$ref":"#/components/schemas/bridgeModelKey"}},"required":["id","modelKey"],"title":"bridgeReference"},"sensorReference":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/sensorId"},"modelKey":{"$ref":"#/components/schemas/sensorModelKey"}},"required":["id","modelKey"],"title":"sensorReference"},"aiProcessorReference":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/deviceId"},"modelKey":{"$ref":"#/components/schemas/aiprocessorModelKey"}},"required":["id","modelKey"],"title":"aiProcessorReference"},"aiPortReference":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/deviceId"},"modelKey":{"$ref":"#/components/schemas/aiportModelKey"}},"required":["id","modelKey"],"title":"aiPortReference"},"linkStationReference":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/deviceId"},"modelKey":{"$ref":"#/components/schemas/linkstationModelKey"}},"required":["id","modelKey"],"title":"linkStationReference"},"eventAdd":{"type":"object","properties":{"type":{"type":"string","const":"add"},"item":{"$ref":"#/components/schemas/event"}},"required":["type","item"],"title":"eventAdd"},"event":{"oneOf":[{"$ref":"#/components/schemas/ringEvent"},{"$ref":"#/components/schemas/sensorExtremeValueEvent"},{"$ref":"#/components/schemas/sensorWaterLeakEvent"},{"$ref":"#/components/schemas/sensorTamperEvent"},{"$ref":"#/components/schemas/sensorBatteryLowEvent"},{"$ref":"#/components/schemas/sensorAlarmEvent"},{"$ref":"#/components/schemas/sensorOpenEvent"},{"$ref":"#/components/schemas/sensorClosedEvent"},{"$ref":"#/components/schemas/sensorSmokeTestEvent"},{"$ref":"#/components/schemas/sensorMotionEvent"},{"$ref":"#/components/schemas/lightMotionEvent"},{"$ref":"#/components/schemas/cameraMotionEvent"},{"$ref":"#/components/schemas/cameraSmartDetectAudioEvent"},{"$ref":"#/components/schemas/cameraSmartDetectZoneEvent"},{"$ref":"#/components/schemas/cameraSmartDetectLineEvent"},{"$ref":"#/components/schemas/cameraSmartDetectLoiterEvent"}],"discriminator":{"propertyName":"type","mapping":{"ring":"#/components/schemas/ringEvent","sensorExtremeValues":"#/components/schemas/sensorExtremeValueEvent","sensorWaterLeak":"#/components/schemas/sensorWaterLeakEvent","sensorTamper":"#/components/schemas/sensorTamperEvent","sensorBatteryLow":"#/components/schemas/sensorBatteryLowEvent","sensorAlarm":"#/components/schemas/sensorAlarmEvent","sensorOpened":"#/components/schemas/sensorOpenEvent","sensorClosed":"#/components/schemas/sensorClosedEvent","sensorSmokeTest":"#/components/schemas/sensorSmokeTestEvent","sensorMotion":"#/components/schemas/sensorMotionEvent","lightMotion":"#/components/schemas/lightMotionEvent","motion":"#/components/schemas/cameraMotionEvent","smartAudioDetect":"#/components/schemas/cameraSmartDetectAudioEvent","smartDetectZone":"#/components/schemas/cameraSmartDetectZoneEvent","smartDetectLine":"#/components/schemas/cameraSmartDetectLineEvent","smartDetectLoiterZone":"#/components/schemas/cameraSmartDetectLoiterEvent"}}},"ringEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/eventId"},"modelKey":{"$ref":"#/components/schemas/eventModelKey"},"type":{"type":"string","const":"ring"},"start":{"type":"number","exclusiveMinimum":0,"description":"Unix timestamp of the start time of the event.","examples":[1445408038748,1741267544209]},"end":{"type":["number","null"],"description":"Unix timestamp of the end time of the event.","examples":[1445408048748,1741267554209]},"device":{"$ref":"#/components/schemas/deviceId"}},"required":["id","modelKey","type","start","device"],"description":"A device ring button has been pressed","title":"ringEvent"},"eventId":{"type":"string","description":"The primary key of event","examples":["66d025b301ebc903e80003ea","672094f900e26303e800062a"],"title":"eventId"},"eventModelKey":{"type":"string","const":"event","description":"The model key of the event","title":"eventModelKey"},"sensorExtremeValueEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/eventId"},"modelKey":{"$ref":"#/components/schemas/eventModelKey"},"type":{"type":"string","const":"sensorExtremeValues"},"start":{"type":"number","exclusiveMinimum":0,"description":"Unix timestamp of the start time of the event.","examples":[1445408038748,1741267544209]},"end":{"type":["number","null"],"description":"Unix timestamp of the end time of the event.","examples":[1445408048748,1741267554209]},"device":{"$ref":"#/components/schemas/deviceId"},"metadata":{"type":"object","properties":{"sensorType":{"type":"object","properties":{"text":{"type":"string","enum":["temperature","light","humidity","aqi","vape","tvoc","pm1p0","pm2p5","pm4p0","pm10p0","nox","co2","voc"]}},"required":["text"],"description":"Name of the metric measured by the sensor","examples":[{"text":"temperature"}]},"sensorValue":{"type":"object","properties":{"text":{"$ref":"#/components/schemas/sensorValue"}},"required":["text"]},"status":{"type":"object","properties":{"text":{"$ref":"#/components/schemas/sensorStatus"}},"required":["text"]}},"required":["sensorType","sensorValue","status"]}},"required":["id","modelKey","type","start","device","metadata"],"description":"The value of a metric measured by a sensor has gone in or out of range","title":"sensorExtremeValueEvent"},"sensorWaterLeakEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/eventId"},"modelKey":{"$ref":"#/components/schemas/eventModelKey"},"type":{"type":"string","const":"sensorWaterLeak"},"start":{"type":"number","exclusiveMinimum":0,"description":"Unix timestamp of the start time of the event.","examples":[1445408038748,1741267544209]},"end":{"type":["number","null"],"description":"Unix timestamp of the end time of the event.","examples":[1445408048748,1741267554209]},"device":{"$ref":"#/components/schemas/deviceId"},"metadata":{"type":"object","properties":{"sensorMountType":{"type":"object","properties":{"text":{"$ref":"#/components/schemas/sensorMountType"}},"required":["text"]}},"required":["sensorMountType"]}},"required":["id","modelKey","type","start","device","metadata"],"description":"Water leak in the given mount point has started or ended","title":"sensorWaterLeakEvent"},"sensorTamperEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/eventId"},"modelKey":{"$ref":"#/components/schemas/eventModelKey"},"type":{"type":"string","const":"sensorTamper"},"start":{"type":"number","exclusiveMinimum":0,"description":"Unix timestamp of the start time of the event.","examples":[1445408038748,1741267544209]},"end":{"type":["number","null"],"description":"Unix timestamp of the end time of the event.","examples":[1445408048748,1741267554209]},"device":{"$ref":"#/components/schemas/deviceId"}},"required":["id","modelKey","type","start","device"],"description":"Sensor has started or finished being tampered with","title":"sensorTamperEvent"},"sensorBatteryLowEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/eventId"},"modelKey":{"$ref":"#/components/schemas/eventModelKey"},"type":{"type":"string","const":"sensorBatteryLow"},"start":{"type":"number","exclusiveMinimum":0,"description":"Unix timestamp of the start time of the event.","examples":[1445408038748,1741267544209]},"end":{"type":["number","null"],"description":"Unix timestamp of the end time of the event.","examples":[1445408048748,1741267554209]},"device":{"$ref":"#/components/schemas/deviceId"},"metadata":{"type":"object","properties":{"sensorBatteryPercentage":{"type":"object","properties":{"number":{"type":"number"}},"required":["number"],"description":"Decimal value of the available sensor battery percentage","examples":[{"number":95}]}},"required":["sensorBatteryPercentage"]}},"required":["id","modelKey","type","start","device","metadata"],"description":"Sensor battery level is getting low","title":"sensorBatteryLowEvent"},"sensorAlarmEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/eventId"},"modelKey":{"$ref":"#/components/schemas/eventModelKey"},"type":{"type":"string","const":"sensorAlarm"},"start":{"type":"number","exclusiveMinimum":0,"description":"Unix timestamp of the start time of the event.","examples":[1445408038748,1741267544209]},"end":{"type":["number","null"],"description":"Unix timestamp of the end time of the event.","examples":[1445408048748,1741267554209]},"device":{"$ref":"#/components/schemas/deviceId"},"metadata":{"type":"object","properties":{"alarmType":{"type":"object","properties":{"text":{"type":"string","enum":["smoke","CO","glassBreak","sensorButtonPress","tamper","short","cut"]}},"required":["text"],"description":"A type of sensor alarm","examples":[{"text":"CO"}]}},"required":["alarmType"]}},"required":["id","modelKey","type","start","device","metadata"],"description":"Sensor has started or finished enduring an alarming state","title":"sensorAlarmEvent"},"sensorOpenEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/eventId"},"modelKey":{"$ref":"#/components/schemas/eventModelKey"},"type":{"type":"string","const":"sensorOpened"},"start":{"type":"number","exclusiveMinimum":0,"description":"Unix timestamp of the start time of the event.","examples":[1445408038748,1741267544209]},"end":{"type":["number","null"],"description":"Unix timestamp of the end time of the event.","examples":[1445408048748,1741267554209]},"device":{"$ref":"#/components/schemas/deviceId"},"metadata":{"type":"object","properties":{"sensorMountType":{"type":"object","properties":{"text":{"$ref":"#/components/schemas/sensorMountType"}},"required":["text"]}},"required":["sensorMountType"]}},"required":["id","modelKey","type","start","device","metadata"],"description":"Sensor in a given mount type has entered an open state","title":"sensorOpenEvent"},"sensorClosedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/eventId"},"modelKey":{"$ref":"#/components/schemas/eventModelKey"},"type":{"type":"string","const":"sensorClosed"},"start":{"type":"number","exclusiveMinimum":0,"description":"Unix timestamp of the start time of the event.","examples":[1445408038748,1741267544209]},"end":{"type":["number","null"],"description":"Unix timestamp of the end time of the event.","examples":[1445408048748,1741267554209]},"device":{"$ref":"#/components/schemas/deviceId"},"metadata":{"type":"object","properties":{"sensorMountType":{"type":"object","properties":{"text":{"$ref":"#/components/schemas/sensorMountType"}},"required":["text"]}},"required":["sensorMountType"]}},"required":["id","modelKey","type","start","device","metadata"],"description":"Sensor in a given mount type has entered a closed state","title":"sensorClosedEvent"},"sensorSmokeTestEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/eventId"},"modelKey":{"$ref":"#/components/schemas/eventModelKey"},"type":{"type":"string","const":"sensorSmokeTest"},"start":{"type":"number","exclusiveMinimum":0,"description":"Unix timestamp of the start time of the event.","examples":[1445408038748,1741267544209]},"end":{"type":["number","null"],"description":"Unix timestamp of the end time of the event.","examples":[1445408048748,1741267554209]},"device":{"$ref":"#/components/schemas/deviceId"}},"required":["id","modelKey","type","start","device"],"description":"Smoke detector test has been initiated","title":"sensorSmokeTestEvent"},"sensorMotionEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/eventId"},"modelKey":{"$ref":"#/components/schemas/eventModelKey"},"type":{"type":"string","const":"sensorMotion"},"start":{"type":"number","exclusiveMinimum":0,"description":"Unix timestamp of the start time of the event.","examples":[1445408038748,1741267544209]},"end":{"type":["number","null"],"description":"Unix timestamp of the end time of the event.","examples":[1445408048748,1741267554209]},"device":{"$ref":"#/components/schemas/deviceId"}},"required":["id","modelKey","type","start","device"],"description":"Sensor has started or finished detecting motion","title":"sensorMotionEvent"},"lightMotionEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/eventId"},"modelKey":{"$ref":"#/components/schemas/eventModelKey"},"type":{"type":"string","const":"lightMotion"},"start":{"type":"number","exclusiveMinimum":0,"description":"Unix timestamp of the start time of the event.","examples":[1445408038748,1741267544209]},"device":{"$ref":"#/components/schemas/deviceId"}},"required":["id","modelKey","type","start","device"],"description":"Floodlight has encountered motion","title":"lightMotionEvent"},"cameraMotionEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/eventId"},"modelKey":{"$ref":"#/components/schemas/eventModelKey"},"type":{"type":"string","const":"motion"},"start":{"type":"number","exclusiveMinimum":0,"description":"Unix timestamp of the start time of the event.","examples":[1445408038748,1741267544209]},"end":{"type":["number","null"],"description":"Unix timestamp of the end time of the event.","examples":[1445408048748,1741267554209]},"device":{"$ref":"#/components/schemas/deviceId"}},"required":["id","modelKey","type","start","device"],"description":"Camera has started or finished detecting motion","title":"cameraMotionEvent"},"cameraSmartDetectAudioEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/eventId"},"modelKey":{"$ref":"#/components/schemas/eventModelKey"},"type":{"type":"string","const":"smartAudioDetect"},"start":{"type":"number","exclusiveMinimum":0,"description":"Unix timestamp of the start time of the event.","examples":[1445408038748,1741267544209]},"end":{"type":["number","null"],"description":"Unix timestamp of the end time of the event.","examples":[1445408048748,1741267554209]},"device":{"$ref":"#/components/schemas/deviceId"},"smartDetectTypes":{"type":["array","null"],"items":{"type":"string","enum":["alrmSmoke","alrmCmonx","alrmSiren","alrmBabyCry","alrmSpeak","alrmBark","alrmBurglar","alrmCarHorn","alrmGlassBreak"],"description":"A type of smart detection based on the audio feed"}}},"required":["id","modelKey","type","start","device","smartDetectTypes"],"description":"Camera has started or finished a smart audio-based detection","title":"cameraSmartDetectAudioEvent"},"cameraSmartDetectZoneEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/eventId"},"modelKey":{"$ref":"#/components/schemas/eventModelKey"},"type":{"type":"string","const":"smartDetectZone"},"start":{"type":"number","exclusiveMinimum":0,"description":"Unix timestamp of the start time of the event.","examples":[1445408038748,1741267544209]},"end":{"type":["number","null"],"description":"Unix timestamp of the end time of the event.","examples":[1445408048748,1741267554209]},"device":{"$ref":"#/components/schemas/deviceId"},"smartDetectTypes":{"type":["array","null"],"items":{"type":"string","enum":["person","vehicle","package","licensePlate","face","animal"],"description":"A type of smart detection based on the video feed"}}},"required":["id","modelKey","type","start","device","smartDetectTypes"],"description":"Camera has started or finished a smart video-based zone detection","title":"cameraSmartDetectZoneEvent"},"cameraSmartDetectLineEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/eventId"},"modelKey":{"$ref":"#/components/schemas/eventModelKey"},"type":{"type":"string","const":"smartDetectLine"},"start":{"type":"number","exclusiveMinimum":0,"description":"Unix timestamp of the start time of the event.","examples":[1445408038748,1741267544209]},"end":{"type":["number","null"],"description":"Unix timestamp of the end time of the event.","examples":[1445408048748,1741267554209]},"device":{"$ref":"#/components/schemas/deviceId"},"smartDetectTypes":{"type":["array","null"],"items":{"type":"string","enum":["person","vehicle","package","licensePlate","face","animal"],"description":"A type of smart detection based on the video feed"}}},"required":["id","modelKey","type","start","device","smartDetectTypes"],"description":"Camera has started or finished a smart video-based line detection","title":"cameraSmartDetectLineEvent"},"cameraSmartDetectLoiterEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/eventId"},"modelKey":{"$ref":"#/components/schemas/eventModelKey"},"type":{"type":"string","const":"smartDetectLoiterZone"},"start":{"type":"number","exclusiveMinimum":0,"description":"Unix timestamp of the start time of the event.","examples":[1445408038748,1741267544209]},"end":{"type":["number","null"],"description":"Unix timestamp of the end time of the event.","examples":[1445408048748,1741267554209]},"device":{"$ref":"#/components/schemas/deviceId"},"smartDetectTypes":{"type":["array","null"],"items":{"type":"string","enum":["person","vehicle","package","licensePlate","face","animal"],"description":"A type of smart detection based on the video feed"}}},"required":["id","modelKey","type","start","device","smartDetectTypes"],"description":"Camera has started or finished a smart video-based loiter detection","title":"cameraSmartDetectLoiterEvent"},"eventUpdate":{"type":"object","properties":{"type":{"type":"string","const":"update"},"item":{"$ref":"#/components/schemas/event"}},"required":["type","item"],"title":"eventUpdate"},"activePatrolSlotString":{"type":"string","title":"activePatrolSlotString","description":"The slot number (0-4) of the patrol that is currently running, or null if no patrol is running","examples":["0","1","2","3","4"]},"alarmTriggerId":{"type":"string","description":"User defined string used to trigger only specific alarms. Alarm should be configured with the same ID to be triggered.","examples":["AnyRandomString"],"title":"alarmTriggerId"},"idRequiredError":{"type":"object","properties":{"error":{"type":"string","description":"Error message","examples":["'id' is required"]},"name":{"type":"string","description":"Name of the error","examples":["BAD_REQUEST"]},"cause":{"type":"object","additionalProperties":{},"description":"An optional nested cause for the parent error","examples":[{"error":"Unexpected functionality error","name":"UNKNOWN_ERROR"}]}},"required":["error","name"],"title":"idRequiredError"},"lcdMessage":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"DO_NOT_DISTURB"},"resetAt":{"type":["number","null"],"description":"UNIX timestamp when doorbell message should be removed (if not set then `nvr.doorbellSettings.defaultMessageResetTimeoutMs` is used, if set to `null` then interpreted as \"forever\")"}},"required":["type"],"description":"Show a pre-defined \"do not disturb\" message on the doorbell"},{"type":"object","properties":{"type":{"type":"string","const":"LEAVE_PACKAGE_AT_DOOR"},"resetAt":{"type":["number","null"],"description":"UNIX timestamp when doorbell message should be removed (if not set then `nvr.doorbellSettings.defaultMessageResetTimeoutMs` is used, if set to `null` then interpreted as \"forever\")"}},"required":["type"],"description":"Show a pre-defined \"leave package at door\" message on the doorbell"},{"type":"object","properties":{"type":{"type":"string","const":"CUSTOM_MESSAGE"},"resetAt":{"type":["number","null"],"description":"UNIX timestamp when doorbell message should be removed (if not set then `nvr.doorbellSettings.defaultMessageResetTimeoutMs` is used, if set to `null` then interpreted as \"forever\")"},"text":{"type":"string","description":"The custom text message to show on the doorbell","examples":["Hello world!"]}},"required":["type","text"],"description":"Show a custom text message on the doorbell"},{"type":"object","properties":{"type":{"type":"string","const":"IMAGE"},"resetAt":{"type":["number","null"],"description":"UNIX timestamp when doorbell message should be removed (if not set then `nvr.doorbellSettings.defaultMessageResetTimeoutMs` is used, if set to `null` then interpreted as \"forever\")"},"text":{"type":"string","description":"The ID of the custom image to show on the doorbell","examples":["34225b30-fe6a-11af-1690-29424bd911c2.png"]}},"required":["type","text"],"description":"Show a custom image on the doorbell"}],"title":"lcdMessage"},"createdQualities":{"type":"array","items":{"$ref":"#/components/schemas/channelQuality"},"minItems":1,"description":"Array of quality levels of RTSPS streams","examples":[["high","medium"]],"title":"createdQualities"},"channelQuality":{"type":"string","enum":["high","medium","low","package"],"title":"channelQuality"},"createdRtspsStreams":{"type":"object","properties":{"high":{"type":"string","format":"uri"},"medium":{"type":"string","format":"uri"},"low":{"type":"string","format":"uri"},"package":{"type":"string","format":"uri"}},"additionalProperties":false,"description":"The RTSPS stream URLs for the camera","examples":[{"high":"rtsps://192.168.1.1:7441/5nPr7RCmueGTKMP7?enableSrtp","medium":"rtsps://192.168.1.1:7441/AbUgnDb5IqIEMidk?enableSrtp"}],"title":"createdRtspsStreams"},"removedQualities":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/channelQuality"},"minItems":1},{"$ref":"#/components/schemas/channelQuality"}],"description":"The array of quality levels for the RTSPS streams to be removed.","examples":[["high","medium"]],"title":"removedQualities"},"existingRtspsStreams":{"type":"object","properties":{"high":{"type":["string","null"],"format":"uri"},"medium":{"type":["string","null"],"format":"uri"},"low":{"type":["string","null"],"format":"uri"},"package":{"type":["string","null"],"format":"uri"}},"additionalProperties":false,"description":"The RTSPS stream URLs for the camera","examples":[{"high":"rtsps://192.168.1.1:7441/5nPr7RCmueGTKMP7?enableSrtp","medium":"rtsps://192.168.1.1:7441/AbUgnDb5IqIEMidk?enableSrtp","low":null,"package":null}],"title":"existingRtspsStreams"},"forceHighQuality":{"type":"string","enum":["true","false"],"default":"false","description":"Whether to force 1080P or higher resolution snapshot","title":"forceHighQuality"},"talkbackSession":{"type":"object","properties":{"url":{"$ref":"#/components/schemas/talkbackStreamUrl"},"codec":{"$ref":"#/components/schemas/talkbackStreamCodec"},"samplingRate":{"$ref":"#/components/schemas/talkbackStreamSamplingRate"},"bitsPerSample":{"$ref":"#/components/schemas/talkbackStreamBitsPerSample"}},"required":["url","codec","samplingRate","bitsPerSample"],"description":"Talkback session information","examples":[{"url":"rtp://192.168.1.123:7004","codec":"opus","samplingRate":24000,"bitsPerSample":16}],"title":"talkbackSession"},"talkbackStreamUrl":{"type":"string","format":"uri","description":"Talkback stream URL","examples":["rtp://192.168.1.123:7004"],"title":"talkbackStreamUrl"},"talkbackStreamCodec":{"type":"string","description":"Audio format to use.","examples":["opus"],"title":"talkbackStreamCodec"},"talkbackStreamSamplingRate":{"type":"integer","exclusiveMinimum":0,"description":"Sampling Rate.","examples":[24000],"title":"talkbackStreamSamplingRate"},"talkbackStreamBitsPerSample":{"type":"integer","exclusiveMinimum":0,"description":"Bits per sample.","examples":[16],"title":"talkbackStreamBitsPerSample"},"assetFileType":{"type":"string","enum":["animations"],"description":"Device asset file type","title":"assetFileType"},"fileSchema":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/fileName"},"type":{"$ref":"#/components/schemas/assetFileType"},"originalName":{"$ref":"#/components/schemas/fileOriginalName"},"path":{"$ref":"#/components/schemas/filePath"}},"required":["name","type","path"],"title":"fileSchema"},"fileName":{"type":"string","description":"Unique ID for the asset file","title":"fileName"},"fileOriginalName":{"type":"string","description":"Original filename of the uploaded file","title":"fileOriginalName"},"filePath":{"type":"string","description":"Path to the file on the filesystem","title":"filePath"}}}}
