Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/romaintalleu/homebridge-hcsr501-sensor-script
Execute custom scripts with hc-sr501 motion sensor
https://github.com/romaintalleu/homebridge-hcsr501-sensor-script
homebridge homebridge-hcsr501-script homebridge-hcsr501-sensor-script homebridge-plugin homekit
Last synced: 6 days ago
JSON representation
Execute custom scripts with hc-sr501 motion sensor
- Host: GitHub
- URL: https://github.com/romaintalleu/homebridge-hcsr501-sensor-script
- Owner: romaintalleu
- License: mit
- Created: 2019-12-01T09:08:10.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-02T20:15:16.000Z (about 5 years ago)
- Last Synced: 2025-01-17T00:37:24.710Z (14 days ago)
- Topics: homebridge, homebridge-hcsr501-script, homebridge-hcsr501-sensor-script, homebridge-plugin, homekit
- Language: JavaScript
- Size: 72.3 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# homebridge-hcsr501-sensor-script
[Homebridge](https://github.com/nfarina/homebridge) pluging for execute custom scripts when hc-sr501 motion sensor on a Raspberry Pi is trigger.
![alt text](images/hcsr501.jpeg "HCSR501 Motion Sensor & Raspberry Pi ZW")
## 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](https://github.com/nfarina/homebridge#readme) for more information.
## Configuration
Update your Homebridge `config.json` file. See [config-sample.json](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](https://www.apple.com/ios/home/) 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