homebridge-hcsr501-sensor-script

1.0.1 • Public • Published

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"
    }
]
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

Package Sidebar

Install

npm i homebridge-hcsr501-sensor-script

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

82 kB

Total Files

8

Last publish

Collaborators

  • rtalleu