homebridge-http-motion-sensor
Version:
Homebridge plugin for a remote motion sensor based on http
130 lines (129 loc) • 5.2 kB
JSON
{
"pluginAlias": "HttpMotionSensorPlatform",
"pluginType": "platform",
"singular": false,
"schema": {
"type": "object",
"properties": {
"name": {
"title": "Platform Name",
"type": "string",
"default": "HTTP Motion Sensor Platform",
"required": true
},
"platform": {
"title": "Platform Type",
"type": "string",
"const": "HttpMotionSensorPlatform",
"required": true
},
"sensors": {
"title": "Motion Sensors",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"title": "Sensor Name",
"type": "string",
"placeholder": "e.g. Hallway Motion Sensor",
"required": true
},
"port": {
"title": "HTTP Port",
"type": "string",
"pattern": "^(?:[1-9][0-9]{3,4}|[1-6][0-9]{4})$",
"placeholder": "e.g. 18089",
"required": true,
"description": "Port number between 1024 and 65535"
},
"model": {
"title": "Model",
"type": "string",
"placeholder": "e.g. ESP8266 Motion Sensor"
},
"serial": {
"title": "Serial Number",
"type": "string",
"placeholder": "e.g. E642011E3ECB"
},
"bind_ip": {
"title": "Bind IP Address",
"type": "string",
"placeholder": "0.0.0.0",
"format": "ipv4"
},
"repeater": {
"title": "Repeater Endpoints",
"type": "array",
"items": {
"type": "object",
"properties": {
"host": {
"title": "Host",
"type": "string",
"placeholder": "192.168.1.100",
"required": true
},
"port": {
"title": "Port",
"type": "string",
"pattern": "^(?:[1-9]|[1-9][0-9]{1,3}|[1-6][0-9]{4})$",
"placeholder": "80",
"required": true,
"description": "Port number between 1 and 65535"
},
"path": {
"title": "Path",
"type": "string",
"placeholder": "/api/trigger",
"required": true
},
"auth": {
"title": "Authorization Header",
"type": "string",
"placeholder": "Bearer token123"
}
}
}
}
}
}
}
}
},
"form": null,
"display": null,
"layout": [
{
"type": "flex",
"flex-flow": "row wrap",
"items": ["name"]
},
{
"key": "sensors",
"type": "array",
"title": "Motion Sensors",
"description": "Configure one or more HTTP motion sensors",
"items": [
"sensors[].name",
"sensors[].port",
"sensors[].model",
"sensors[].serial",
"sensors[].bind_ip",
{
"key": "sensors[].repeater",
"type": "array",
"title": "Repeater Endpoints",
"description": "Optional: Make additional HTTP requests when motion is detected",
"items": [
"sensors[].repeater[].host",
"sensors[].repeater[].port",
"sensors[].repeater[].path",
"sensors[].repeater[].auth"
]
}
]
}
]
}