homebridge-gpio-sensor-door
Version:
Raspberry Pi GPIO Doorsensor plugin for Homebridge forked from homebridge-gpio-garagedoor-d
37 lines (27 loc) • 1.1 kB
Markdown
[](https://www.raspberrypi.org) GPIO based Door plugin for [Homebridge](https://github.com/nfarina/homebridge)
1. Install homebridge using: npm install -g homebridge
2. Install this plugin using: npm install -g homebridge-gpio-sensor-door
3. Update your configuration file. See sample config.json snippet below.
Configuration sample:
```
"accessories": [
{
"accessory": "GPIODoor",
"name": "Main Door",
"doorSwitchPin": 23,
"doorSensorPin": 24,
"isNCSensor": false,
"doorOpensInSeconds": 4
}
]
```
Fields:
* "accessory": Must always be "GPIODoor" (required)
* "name": Can be anything (required)
* "doorSwitchPin": GPIO pin that is used to trigger the garage door switch (required)
* "doorSensorPin": GPIO pin that is used to detect if the state of the garage door (required)
* "isNCSensor": Specifies whether the door sensor is a Normally Closed (NC) type or Normally Open (NO) type (optional, default false NO)
* "doorOpensInSeconds": Number of seconds for the garage door to open completely (required)