Skip to content

p9813 Device

Erik Baauw edited this page Oct 7, 2022 · 3 revisions

p9813 Device

A p9813 device exposes a chain of P9813 LED controllers, like the Grove Chainable LED v2. These devices use two GPIO pins: one for the clock signal and one for the data signal. These devices can be chained, by connecting the output signals of the previous controller to the input signals of the next. The LED(s) connected to different controllers can be controlled independently, but the LEDs connected to the same controller are controlled collectively. Homebridge RPi configures the GPIOs for output. Note that the actual state of the LEDs cannot be obtained. Homebridge RPi does not monitor the GPIO pins to see whether any other application is controlling the LED.

The device is exposed as a separate HomeKit accessory, with a Lightbulb service per P9813 controller. Through this service, the LEDs brightness and colour can be controlled from HomeKit. HomeKit simply shows the latest state set through Homebridge RPi. Any change made to the LEDs through another application will not be reflected in HomeKit.

The p9813 device uses the following config.json keys:

key type default Description
name string The name for the device in HomeKit.
gpioClock integer The GPIO pin for the clock signal.
gpioData integer The GPIO pin for the data signal.
nLeds integer 1 The number of LED controllers in the chain.