Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 8 hours 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 (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-02-02T04:24:14.000Z (almost 3 years ago)
- Last Synced: 2024-10-14T06:19:51.226Z (about 1 month 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
[![mit license](https://badgen.net/badge/license/MIT/red)](https://github.com/apexad/homebridge-sensor-cmd/blob/master/LICENSE)
[![npm](https://badgen.net/npm/v/homebridge-sensor-cmd)](https://www.npmjs.com/package/homebridge-sensor-cmd)
[![npm](https://badgen.net/npm/dt/homebridge-sensor-cmd)](https://www.npmjs.com/package/homebridge-sensor-cmd)
[![donate](https://badgen.net/badge/donate/paypal/91BE09)](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": ""
}
```