ZLL – tl;dr

This page contains all relevant info on the custom, Hue compatible, Light Link firmware for the JN5168.

Currently up to 5 (monochrome) lights per JN5168 are supported, this is limited by the amount of PWM ports available. I am thinking about driving the leds through a separate PWM driver like this one. For this I need to figure out how to communicate with this driver. The use of an external driver would open up the possibility of multiple RGB, RGBW and Color Temperature lights. Theoretically the limit is 240 endpoints per JN5168, although available memory on the JN5168 will not allow this. With 5 lights I have seen no performance issues whatsoever, so there certainly is room to increase this number..

I will publish the sources once I figure out the external PWM.

I am in no way an expert on the matter so please do not take any of the information on this site for fact. Building your own lights is not something I would recommend, electricity is dangerous, and it gets people killed. So please, think and be careful!

For those still interested, these are the steps I took to build my own lights.

  1. Got me a JN5186 module
  2. Connected the hardware
  3. Downloaded a flash tool and a binary
  4. Flashed the JN5168 module
  5. Hue App -> Add lights -> Search
  6. Reset JN5168
  7. Enjoyed my lights 😉


Any JN5168 module will probably do. My experience is with the JN5168-001-M00 module. All info on this page is based on this model.


  • Endpoint 1 => PWM : timer_00/PWM  – DIO10 – PIN 16
  • Endpoint 2 => PWM : timer_01/PWM1 – DIO11 – PIN 19
  • Endpoint 3 => PWM : timer_02/PWM2 – DIO12 – PIN 20
  • Endpoint 4 => PWM : timer_03/PWM3 – DIO13 – PIN 21
  • Endpoint 5 => PWM : timer_04/PWM4 – DIO17 – PIN 26


Multi Endpoint Dimmable Lights


RGB (single) endpoint

This endpoint uses an inverted PWM signal, which means, it only works with a common anode LED, or a driver that requires an inverted signal.

Red : timer_01/PWM1 – DIO11 – PIN 19

Green : timer_02/PWM2 – DIO12 – PIN 20

Blue : timer_03/PWM3 – DIO13 – PIN 21


Both will work, I use the command line tool.

  • Command line, registration required: here
  • Gui, no registration required: here

Erasing and Flashing

Put the JN5168 in programming mode by connecting SPIMISO (3) to ground while powering the module.

It’s a good idea to clear the eeprom before flashing it with a new binary.


JN51xxProgrammer.exe -s COM3 --eraseeeprom=full

Flash binary:

JN51xxProgrammer.exe -s COM3 -f binary.bin



  1. thanks for your amazing work!

    i just installed your rgb firmware flawlessly on my MeshBees via UartsBee v5 – working out of the box!

    but one other question, are you able to also act as a switch/sensor for the hue network? i.E. make some extra buttons as light switches/dimmer/color changer and include sensors like brightness, humidity etc?

    If you are not able to read interrupts on the IO pins, maybe make it a simple router which gets commands via i2c or spi from an arduino and sends them as “switch” inputs to the hue bridge?

    thank you!

    best regards

    1. What you want is all possible, I’ve been experimenting with I2C and it works just fine. Check out the NXP demo project, this contains an example controller and should get you started.

Leave a Reply

Your email address will not be published. Required fields are marked *