Led Strips Controlled with OpenHAB2

I’m still relatively knew with openHAB but am getting used to it. The next project I want to do is put controllable LED lights behind the TV’s as well as some accent lights. I think the Philips Hue accent lights and LED strips are very expensive.

I’ve been looking at a couple of ways to do this and seemed to be at a delima as to which route I should go.

Option1:

The first option is to try something like this:
http://randomnerdtutorials.com/10-diy-wifi-rgb-led-mood-light-with-esp8266-step-by-step/

If I buy all the parts I’m missing, its going to be around $55 but with a lot left over to do more lights. I have a coding background but a little less confident on the wiring part. Doesn’t seem too hard and I’ve done a little in the past. It would give me an opportunity to learn. From my understanding this method is paired with MQTT.

Option2:

I also found this:

It goes with the exact lights I have. I found a thread somewhere where someone used this with openHAB2 but I can’t seem to relocate it now.

I’m not sure which route I should take. I’m thinking option 1 would give the most control? My plan is to setup scenes with these and have them match my Hue bulbs as close as possible. I’m just wondering what others have used. Thanks.

Another solution to think about:

https://hyperion-project.org/wiki/Introduction

1 Like

Another solution could be a zWave RGB(w) Controller an compatible stripes :slight_smile:
I use it for ambient lighting and main lighting in the halls.

I’m using this H801 RGBWW LED controller reprogrammed with the Sonoff-Tasmota firmware. In addition to the dimmer/controller, I use a 5m warm white LED strip and a 6 amp, 12 volt power supply. I used this setup in our kitchen for under cabinet lighting. We have been very pleased with it.

2 Likes

@scottk - Could you give me some examples of your items for this combination?

How do you select a colour in OH?

Looking for inspiration :slight_smile:

I’ve seen people get this to work with the Wifi LED Binding. Figured I’d give it a try since I already had the lights and a power supply.

1 Like

Paul,

I’m not using the H801 RGBWW with an RGBWW LED strip, so I don’t have any items/rules that use color.

Since I have four separate warm white LED strips that are controlled by two H801 WiFi LED controllers, I chose to use each of the two white channels on two controllers to control my four LED strips. Two of the segments are on one side of the kitchen, which get their power from a conveniently located outlet in a cabinet above the cooking hob exhaust hood. The other two LED segments are on the other side of the kitchen and get their power from an outlet behind the refrigerator.

// Groups:
Group                   gLts       "Lights"                     <light>

Group:Dimmer:MAX        gSSDms     "Automatic Sunset Dimmers"   <light>
Group:Switch:OR(ON,OFF) gSSSws     "Automatic Sunset Switches"  <light>

Group                   gKT        "Kitchen"                    <pan>
Group:Dimmer:MAX        gKTDimmer  "Kitchen Cabinets [%.1f %%]" <pan> ["Lighting"]

// Kitchen Lights
Dimmer  OvenCabinets   "Oven Cabinets"         (gKT,gLts,gKTDimmer,gSSDms)  ["Lighting"]  { mqtt=">[karns:cmd/wifi-dmr01/Dimmer:command:*:default],<[karns:stat/wifi-dmr01/RESULT:state:JSONPATH($.Dimmer)]" }
Dimmer  FridgeCabinets "Refrigerator Cabinets" (gKT,gLts,gKTDimmer,gSSDms)  ["Lighting"]  { mqtt=">[karns:cmd/wifi-dmr02/Dimmer:command:*:default],<[karns:stat/wifi-dmr02/RESULT:state:JSONPATH($.Dimmer)]" }

Note that I made some slight modifications to the Sonoff-Tasmota sourcecode, the SUB_PREFIX #define was “cmnd”, I changed it to “cmd”. This also required changing occurrences of the string “cmnd” in webserver.ino to “cmd”. I also changed the PROJECT #define from “sonoff” to “wifi-dmr”.

The following two snippets were copied from the console of one of the LED dimmers:

13:24:07 RSLT: Receive topic cmd/wifi-dmr01/Dimmer, data size 1, data 0
13:24:07 RSLT: DataCb Group 0, Index 1, Type DIMMER, Data 0 (0)
13:24:07 MQTT: stat/wifi-dmr01/RESULT = {"POWER":"OFF"}
13:24:07 MQTT: stat/wifi-dmr01/POWER = OFF
13:24:07 MQTT: stat/wifi-dmr01/RESULT = {"POWER":"OFF", "Dimmer":0, "Color":"0000"}

10:26:31 RSLT: Receive topic cmd/wifi-dmr01/Dimmer, data size 3, data 100
10:26:31 RSLT: DataCb Group 0, Index 1, Type DIMMER, Data 100 (100)
10:26:31 MQTT: stat/wifi-dmr01/RESULT = {"POWER":"ON"}
10:26:31 MQTT: stat/wifi-dmr01/POWER = ON
10:26:31 MQTT: stat/wifi-dmr01/RESULT = {"POWER":"ON", "Dimmer":100, "Color":"FFFF"}
2 Likes

How would you connect that WiFi controller from Amazon? I am really new to this. I have a WiFi binding but it won’t show up and I don’t know what ip address it has.

Thanks

There are a few ways to find out its IP address. For example, your wireless router’s web interface, under DHCP, should show the active leases or clients in a way that ought to help with this - you will recognize most of the entires, so look for hosts that might be the LED controller.

Another alternative would be to use nmap for host discovery on your local area network, which is convenient from the linux command line.

Picking up on the WiFi functionality, I’m looking for a solution to send commands to something like this…
https://www.instyleled.co.uk/wifi-receiver/

It would be great to be able to send commands from OpenHAB to initiate effects, and particularly colour-chasing effects!

Would anyone advise if this can be achieved?

I think those lights are only infrared controlled, I bought some a few days ago thinking they would work, but havent got round to trying them yet

here is my thread for this ( OPTION 2) setup - works pretty well with OH and ALEXA ( and Magic Home App )

A LED strip and a $2 ESP01 is all you need. you will need to reuse tx or rx pins for the third GPIO This would be the cheapest route if you are familiar with microcontrollers.

Or if you prefer less tinkering but still save money:
ESP01 + this

2 Likes

that is a very interesting link, Not sure what the L375 chip does.
Use might be a bit limited as it is meant for a lipo battery. and may be only suitable for a limited number of neopixels
The ESP-01 is indeed very suitable for Neopixel projects,
The ESP01 plus this board would also make a Wemos a good competitor… but yes you’ d still have to add a connector.
Anyway, tnx for the link, lots of interesting stuff at ali

Hi, Did you or anyone try out the inStyle wifi adapter? I have that adapter and inStyle receivers but so far I have not got it to work with openhab. It works using Easylighting ap. I tried the Wifi LED binding and all the protocols but no luck.

Hi all

In case anyone finds this topic because they are looking for ways to control multiple LED pixels (or other fixtures), I thought I’d put a link to a topic I have just created which offers a way to control some lighting control software called Jinx!

Is it an ESP inside the controller?

Yes it is, as I mentioned, it runs Sonoff-Tasmota firmware.

“reprogrammed with the Sonoff-Tasmota firmware. In addition to the dimmer/controller

Sorry - just to confirm.

You had a re flashed controller.
An external DC power supply to provide the power for the LEDs.
Did you use another device?

I did not understand how that controller connects to the LEDs
I guess you only need to use “W” and not “R/G/B”

Did you take a photo of the inside of the controller? Did it already have a programming header or was there a way to flash the TASMOTA bin over the air?

Thanks.

I only have an external DC power supply for each of the H801s I have, no other devices.

I simply treat all channels provided by the H801 as independent channels, i.e., I connect each LED strip to a channel (R, G, B, CW or WW, it doesn’t matter) and set the “color” so all channels are set to the same level.

Here is a useful page with pictures from the Sonoff-Tasmota wiki:

There are through holes provided for a programming header. I soldered a header into the provided holes and performed the initial programming via that header. After the initial programming with Sonoff-Tasmota firmware, the device can be programmed OTA.