homebridge-web-motion
v1.1.7
Published
Homebridge plugin for a web-based motion sensor
Downloads
4
Readme
homebridge-web-motion
Description
This homebridge plugin exposes web-based motion sensors to Apple's HomeKit. Using HTTP requests, you can update the plugin with real-time sensor information. The plugin achieves this by setting up a listen server which listens for changes in state from your devices and then feeds them real-time into HomeKit.
Installation
- Install homebridge
- Install this plugin:
npm install -g homebridge-web-motion
- Update your
config.json
Configuration
"platforms": [{
"platform": "WebMotion",
"sensors": [{
"name": "Hallway Sensor",
"id": "hall"
},
{
"name": "Bedroom Sensor",
"id": "bed"
}
]
}]
Core
| Key | Description | Default |
| --- | --- | --- |
| platform
| Must be WebMotion
| N/A |
| name
| Name to appear in the Home app | N/A |
| id
| ID to call on the listen server | N/A |
Optional fields
| Key | Description | Default |
| --- | --- | --- |
| autoReset
| Whether the sensor should automatically change the state back to 0
after being triggered | false
|
| autoResetDelay
| Time (in seconds) until the sensor will automatically reset (if enabled) | 5
|
Additional options
| Key | Description | Default |
| --- | --- | --- |
| port
| Port for your HTTP listener (only one listener per port) | 2000
|
| model
| Appears under the Model field for the accessory | plugin |
| serial
| Appears under the Serial field for the accessory | id |
| manufacturer
| Appears under the Manufacturer field for the accessory | author |
| firmware
| Appears under the Firmware field for the accessory | version |
API Interfacing
Your API should be able to:
- Update
motionDetected
when motion is detected by messaging the listen server (should notify0
after motion finishes unlessautoReset
is enabled):
/motionDetected?id=ID&value=INT_VALUE_0_TO_1
MotionDetected Key
| Number | Name |
| --- | --- |
| 0
| No motion detected |
| 1
| Motion detected |