Camera
Observable camera state, media streams, and individually advertised actions.
https://hometruth.ai/schemas/camera · Camera
Instances
- Gate cameraRTSP camera · Grounds
- Entry cameraRTSP camera · Grounds
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://hometruth.ai/schemas/camera",
"title": "Camera",
"description": "A camera component's observable state, media streams, and supported actions.",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"state": {
"type": "object",
"additionalProperties": false,
"properties": {
"availability": {
"enum": [
"online",
"offline",
"degraded",
"unknown"
]
},
"observedAt": {
"type": "string",
"format": "date-time"
},
"streamAvailable": {
"type": "boolean"
},
"snapshotAvailable": {
"type": "boolean"
},
"privacyEnabled": {
"type": "boolean"
},
"panDegrees": {
"type": "number",
"minimum": -360,
"maximum": 360
},
"tiltDegrees": {
"type": "number",
"minimum": -180,
"maximum": 180
},
"zoomPercent": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"microphoneEnabled": {
"type": "boolean"
},
"speakerEnabled": {
"type": "boolean"
},
"recording": {
"type": "boolean"
}
},
"required": [
"availability"
]
},
"streams": {
"type": "array",
"maxItems": 20,
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z][a-z0-9._-]*$",
"maxLength": 100
},
"role": {
"enum": [
"main",
"sub",
"analysis"
]
},
"availability": {
"enum": [
"online",
"offline",
"degraded",
"unknown"
]
},
"uri": {
"type": "string",
"format": "uri",
"maxLength": 4096
},
"mediaTypes": {
"type": "array",
"minItems": 1,
"maxItems": 20,
"uniqueItems": true,
"items": {
"type": "string",
"pattern": "^[a-z0-9.+-]+/[a-z0-9.+-]+$",
"maxLength": 100
}
},
"width": {
"type": "integer",
"minimum": 1,
"maximum": 32768
},
"height": {
"type": "integer",
"minimum": 1,
"maximum": 32768
},
"frameRate": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000
},
"videoCodec": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"audioCodec": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"required": [
"id",
"availability",
"mediaTypes"
]
}
},
"actions": {
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"properties": {
"snapshot": {
"type": "object",
"additionalProperties": false,
"properties": {
"mediaTypes": {
"type": "array",
"minItems": 1,
"maxItems": 20,
"uniqueItems": true,
"items": {
"type": "string",
"pattern": "^image/[a-z0-9.+-]+$",
"maxLength": 100
}
}
}
},
"pan": {
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"properties": {
"left": {
"type": "object",
"additionalProperties": false,
"properties": {
"minLeaseMs": {
"type": "integer",
"minimum": 100,
"maximum": 60000
},
"maxLeaseMs": {
"type": "integer",
"minimum": 100,
"maximum": 60000
},
"defaultSpeedPercent": {
"type": "integer",
"minimum": 1,
"maximum": 100
}
}
},
"right": {
"type": "object",
"additionalProperties": false,
"properties": {
"minLeaseMs": {
"type": "integer",
"minimum": 100,
"maximum": 60000
},
"maxLeaseMs": {
"type": "integer",
"minimum": 100,
"maximum": 60000
},
"defaultSpeedPercent": {
"type": "integer",
"minimum": 1,
"maximum": 100
}
}
},
"home": {
"type": "object",
"additionalProperties": false,
"properties": {}
}
}
},
"tilt": {
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"properties": {
"up": {
"type": "object",
"additionalProperties": false,
"properties": {
"minLeaseMs": {
"type": "integer",
"minimum": 100,
"maximum": 60000
},
"maxLeaseMs": {
"type": "integer",
"minimum": 100,
"maximum": 60000
},
"defaultSpeedPercent": {
"type": "integer",
"minimum": 1,
"maximum": 100
}
}
},
"down": {
"type": "object",
"additionalProperties": false,
"properties": {
"minLeaseMs": {
"type": "integer",
"minimum": 100,
"maximum": 60000
},
"maxLeaseMs": {
"type": "integer",
"minimum": 100,
"maximum": 60000
},
"defaultSpeedPercent": {
"type": "integer",
"minimum": 1,
"maximum": 100
}
}
},
"home": {
"type": "object",
"additionalProperties": false,
"properties": {}
}
}
},
"stopMovement": {
"type": "object",
"additionalProperties": false,
"properties": {}
},
"zoom": {
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"properties": {
"in": {
"type": "object",
"additionalProperties": false,
"properties": {}
},
"out": {
"type": "object",
"additionalProperties": false,
"properties": {}
},
"set": {
"type": "object",
"additionalProperties": false,
"properties": {
"minimumPercent": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"maximumPercent": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"stepPercent": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 100
}
},
"required": [
"minimumPercent",
"maximumPercent"
]
}
}
},
"setPrivacy": {
"type": "object",
"additionalProperties": false,
"properties": {}
},
"talk": {
"type": "object",
"additionalProperties": false,
"properties": {
"mediaTypes": {
"type": "array",
"minItems": 1,
"maxItems": 20,
"uniqueItems": true,
"items": {
"type": "string",
"pattern": "^audio/[a-z0-9.+-]+$",
"maxLength": 100
}
}
}
}
}
}
},
"required": [
"id",
"state"
]
}