1.0.1 • Published 4 years ago

homebridge-hcsr501-sensor-script v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

homebridge-hcsr501-sensor-script

Homebridge pluging for execute custom scripts when hc-sr501 motion sensor on a Raspberry Pi is trigger.

alt text

Installation

Run the following command

npm install -g --unsafe-perm homebridge-hcsr501-sensor-script

Note: 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"
    }
]
NameValueRequiredNotes
accessoryHCSR501-scriptyesMust be set to "HCSR501-script"
name(custom)yesName of accessory that will appear in HomeKit app
pinId(custom)yesThe pin you connected the motion sensor
start(custom)yesLocation of script to execute the start action
stop(custom)yesLocation of script to execute the stop action
manufacturer(custom)optionalThe text of manufacturer
model(custom)optionalThe text of model
serial(custom)optionalThe text of serial