ebaauw / homebridge-rpi

Homebridge plugin for Raspberry Pi.
Apache License 2.0
311 stars 19 forks source link

Support P9813 chainable LEDs. #148

Closed ebaauw closed 2 years ago

ebaauw commented 2 years ago

See Discord.

P9813 looks very similar to the Blinkt!, but uses a slightly different encoding of the LED target state. See https://github.com/topics/p9813.

ebaauw commented 2 years ago

Received the two Grove Chainable LED v2 devices I ordered. The RGB LEDs are based on the P9813, with four input connectors, Ground, VCC, Data In, Clock In; and four output connectors to chain the next LED. The card that came with the devices mentioned that they could be driven by either 3.3V or 5V, so I connected VCC to 3.3V, Clock In to GPIO 10, Data In to GPIO 11, and, of course, Ground to ground. Then I connected the second LED's inputs to the first LED's outputs, and configured a device in Homebridge RPi:

{
  "device": "blinkt",
  "name": "P9813",
  "gpioClock": 10,
  "gpioData": 11,
  "nLeds": 2
},

Indeed, as reported on Discord, Homebridge RPi controls the colour, but neither brightness nor on/off control works. As I hoped, the each LED can be controlled independently.

ebaauw commented 2 years ago

Support in beta v1.6.0-0, please let me know if that works for you. See Wiki.

ebaauw commented 2 years ago

Released v1.6.0.