1.0.1 • Published 6 years ago
homebridge-hcsr501-sensor-script v1.0.1
homebridge-hcsr501-sensor-script
Homebridge pluging for execute custom scripts when hc-sr501 motion sensor on a Raspberry Pi is trigger.

Installation
Run the following command
npm install -g --unsafe-perm homebridge-hcsr501-sensor-scriptNote: depending on your platform you might need to run npm install -g with root privileges.
See the Homebridge documentation for more information.
Configuration
Update your Homebridge config.json file. See config-sample.json for a complete example.
"accessories" : [
{
"accessory": "HCSR501-script",
"name": "Motion Sensor",
"pinId": 24,
"start": "~/start.sh",
"stop": "~/stop.sh"
}
]| Name | Value | Required | Notes |
|---|---|---|---|
| accessory | HCSR501-script | yes | Must be set to "HCSR501-script" |
| name | (custom) | yes | Name of accessory that will appear in HomeKit app |
| pinId | (custom) | yes | The pin you connected the motion sensor |
| start | (custom) | yes | Location of script to execute the start action |
| stop | (custom) | yes | Location of script to execute the stop action |
| manufacturer | (custom) | optional | The text of manufacturer |
| model | (custom) | optional | The text of model |
| serial | (custom) | optional | The text of serial |