Homebridge plugin for controlling LEDs or LED-strips over homekit.
From my research on npm and GitHub about homebridge led controllers I couldn't find any single one simply converting the homekit interface to PWM signals.
It uses:
- homebridge (GitHub-link) for the homekit interface
- pigpio (GitHub-link) js interface for PWM signaling
- colorsys to convert between hsv and rgb colourspace
- David Ordnung has covered all the hardware side (there's an english translation on his site)
I was heavily inspired by homebridge-fake-rgb for the code structure.
Please refer to the npm or GitHub pages for things to do in advance (e.g. install pigpio daemon). Maybe set up [pigpio] beforehand.
Install as you would any other npm package(not set up yet)
In the config change the pins to your corresponding ones. There is a gamma value inside the index.js that corrects for the difference between homekit colour display and the actual colour. You can set individual values for rgb-gamma with a manual edit but at least for my strips I found 2.8 to be a good fit.
There is some basic printing to the homebridge log from any function. This just prints the most important values changed in the function.
- add working npm link