Home Elements Boards Recipes

P9813 Element

The P9813Element implements the protocol to control the P9813 LED driver chip also known as Groove chainable LED.

P9813 led controller board

There is a specific protocol required for this chip that packs 3 * 8 bits for red, green and blue into 4 bytes per pixel. Some information is sent twice in these 4 byes.

The 4 bytes per pixel are transferred in series over the data line in the interval defined by the clock line. There is no strict frequency required and implementation is not very complex to be implemented.

When using multiple chips chained up in a row every chip can drive a whole RGB LED strip.

Web UI for the P9813 Element

The Neo Element has a similar feature to chain RGB LEDs. However they are controlled by a different protocol. Both elements can be controlled by the same Web UI.

Element Configuration

The P9813 uses a proprietary protocol to transfer data from host to chip. The connectivity to the chip must be done using 2 pins:

clockPin - The clock signal

dataPin - The data signal

From the base element implementation the following properties are available for configuration:

title – Caption text for the element. Used by the element specific cards on the dash boards.

description – A line of text that gives a short description of the device used in the web UI.

room – The location of the device.

loglevel – This property holds the element specific log level. The default value is LOGGER_LEVEL_ERR == 1.

startup – This property can be used to start the element using a different initialization phase. Possible values are “sys”, “net”, “time”. See The Startup sequence.

Configuration Examples

"p9813": {
  "strip": {
    "clockPin": "D5",
    "dataPin": "D6",
  }
}

The color element can be used to control the color and brightness of the P9813 Element by creating a direct link using the elements property.

{
  "p9813": {
    "strip": {
      "clockPin": "D5",
      "dataPin": "D6"
    }
  },
  "color": {
    "l": {
      "loglevel": 2,
      "config": "RGB",
      "mode": "fix",
      "duration": "10",
      "value": "x203050",
      "brightness": "70",
      "elements": [
        "p9813/strip"
      ]
    }
  }
}

See also

Tags

Element Light