Rules for RGB LED control

I have converted a RGB LED floodlight from eBay to include a ESP8266 so that it can accept MQTT commands, also I have made a circuit to do the same thing with RGB LED strips.

I can control these using the colour picker widget but I would like to be able to automatically control them too.

For example, When the doorbell sounds (MQTT button press) the LED lights will flash between red and blue for 5 seconds. Or maybe have one floodlight set up to show the temperature outside, Deep blue = very cold deep red = very hot and all the colours inbetween.

I am sure this is possible, but I haven’t been able to find any examples online.

Hi Paul,

have you considered implementing those actions directly to the esp8266 and simply trigger them from openhab?
This would keep the openhab rules as simple as possible.

Maybe try this:

  1. Start OpenHAB in debug mode
  2. Use colorpicker in UI to change color
  3. watch debug output for the command which is sent to your strip. This is the command which you should use in your rules.

Hi Marc,

Thanks for your reply.

I have thought about that, but i would like to keep all my ESP8266 nodes with a simple and very similar code on each one.

Thanks kyb,

Ill try that.