homebridge-teleruptor
v0.0.12
Published
Raspberry Pi plugin for homebridge to enable teleruptor
Readme
Homebridge Teleruptor
Controls channel relays with a Raspberry Pi using HomeKit and creates behaviour of a push button to control lights.
Hardware
The hardware used.
- Raspberry Pi 3 Model B+
- Multi channel relay board connected to GPIO pins
- opto-couplers used to detect on/off state of lights
The raspberry pi can then control the state of the lights. Normal push buttons are still usable.
Installation
- Install homebridge using:
sudo npm install --unsafe-perm -g homebridge - Install this plugin using:
sudo npm install -g --unsafe-perm homebridge-teleruptot - Update your configuration file. See
config-sample.jsonin this repository for a sample.
Sample Configuration
{ "bridge": { "name": "TeleruptorServer", "username": "CC:22:3D:E3:CE:FD", "port": 51826, "pin": "031-45-158" },
"description": "Teleruptor",
"accessories": [ { "accessory": "Teleruptor", "name": "Teleruptor-1", "pin": 7, "inputpin": 12, "invert": false, "default_state": false, "duration_ms": 100 }, { "accessory": "Teleruptor", "name": "Teleruptor-2", "pin": 11, "inputpin": 14, "invert": false, "default_state": false, "duration_ms": 100 } ],
"platforms": [] }
Accessory Configuration Options
Name | Meaning
---------------- | ------------------------------------------------
accessory | Accessory type. Teleruptor (REQUIRED)
name | Default name for the accessory. (REQUIRED)
pin | Which pin number to use for this accessory. (REQUIRED)
inputpin | Which pin number to use for reading status of the light. (REQUIRED)
invert | If true, output on pin is LOW for ON, and HIGH for OFF. (Default: false)
default_state | State to set on start of homebridge. true for ON, false for OFF. (Default: false/OFF)
duration_ms | Length of the Pulse that is given in milliseconds (Default: 20)
