https://github.com/apexad/homebridge-sensor-cmd
Homebridge plugin that creates a contact sensor with state determined by a command-line/shell command in only 25 lines of code"
https://github.com/apexad/homebridge-sensor-cmd
Last synced: about 2 months ago
JSON representation
Homebridge plugin that creates a contact sensor with state determined by a command-line/shell command in only 25 lines of code"
- Host: GitHub
- URL: https://github.com/apexad/homebridge-sensor-cmd
- Owner: apexad
- License: mit
- Created: 2020-12-04T04:54:37.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-02-02T04:24:14.000Z (over 3 years ago)
- Last Synced: 2024-10-14T06:19:51.226Z (9 months ago)
- Language: TypeScript
- Size: 23.4 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# homebridge-sensor-cmd
[](https://github.com/apexad/homebridge-sensor-cmd/blob/master/LICENSE)
[](https://www.npmjs.com/package/homebridge-sensor-cmd)
[](https://www.npmjs.com/package/homebridge-sensor-cmd)
[](https://www.paypal.me/apexadm)[Homebridge](https://github.com/homebridge/homebridge) plugin that is a proof of concept to create something functional in a ridiculously small amount of code (50 lines to be exaxt, also this README is just 25 lines).
It impliments a Contact/Motion/Occupancy Sensor that is triggered via the output of a command line/shell script.
The script simply needs to return a `1` or `0`## Configuration
This easiest way to use this plugin is to use [homebridge-config-ui-x](https://www.npmjs.com/package/homebridge-config-ui-x).
To configure, add to the `accessories` section of Homebridge's `config.json` after installing the plugin.**Config:**
```json
{
"accessory": "SensorCmd",
"name": "",
"type": "",
"command": ""
}
```