-
-
Notifications
You must be signed in to change notification settings - Fork 19
contact Device
Erik Baauw edited this page Sep 25, 2022
·
10 revisions
A contact
device exposes a contact sensor connected to a GPIO pin.
Homebridge RPi configures the GPIO pin for input.
By default, Homebridge RPi configures the internal pull-up resister for the GPIO pin.
Homebridge RPi configures pigpiod
to send real-time notifications when the GPIO state changes.
Homebridge RPi debounces the input signal.
The device is exposed as a separate HomeKit accessory, with a Contact Sensor service. Through this service, you can monitor the contact sensor state in HomeKit, or even configure HomeKit push notifications. The accessory mimics an Eve Door & Window, exposing a History service, so Eve shows the history of the contact sensor state.
The contact
device uses the following config.json keys:
key | type | Description |
---|---|---|
name |
string | The name for the device in HomeKit. |
gpio |
integer | The GPIO pin. |
pull |
string | The configuration of the internal pull-up/pull-down resistor for the GPIO pin: off , down , or up (default). |
reversed |
boolean | The device state is reversed, i.e. report the contact detected when the GPIO pin is high instead of on low. |
debounceTimeout |
integer | Time in ms to ignore state changes after initial change. Default 20ms. |