LED strips for dummies

I concur with @bakman2 on the approach. I've used three different MCUs but couldn't settle for the ESP8266 because in my case I needed more pins and Ethernet support is now prevalent in many flavors. Altitove power supplies (OEM sourced) are good but do your basic calcs (remember the wire diameter limits the amperage) so that you don't go over/under unnecessarily. Finally, you need a robust library unless you want to do all the coding on your own.

Kind regards.

1 Like

Not many people here recommending Hue. Given the OP's topic was LED strips for dummies, I'd have guessed that he wanted a simple solution, one that is quick, doesn't require bespoke code, hardware or rewiring and one that is easily upgraded or modified using standard components.

I've done a bit of work with LED strips and Node-RED. and I've done a lot of research. Firstly, kudos for having a wife that wants more automation. I have a constant battle with mine who hates any automation and thinks it's not "consistent" with our 300 year old house (ignoring the fact that electricity, carpets and central heating are not "consistent" either). So, everything has to be operated by ordinary wall switches and any switch, when pressed, has to, as its main function, do what it is intuitively obvious that switch should do if you press it. Phone apps are right out! (and I agree with her there).

So, my underlying automation system is openHAB (I would very strongly recommend it) and I use Node-RED as my rule engine (which is why I'm here). A lot of my lights use Z-wave and Fibaro controllers but in places I want colour-temperature control so I have integrated Hue into the setup. Plus for LED strips, frankly Hue is the easiest way to go.

I am not using Hue's LED strips. There are plenty of Friends of Hue controllers out there. I use these Zigbee LED controller and they work perfectly. They can control any 12-24V LED strips so you can source whatever you want in whatever style you want to fit whatever space you need. There are single colour, CCT and RGBWWCW controllers including ones with two IDs in a single unit. You need a Hue hub but they're not expensive and you open up a lot of other automation options for all the other lights in your house too just by adding Hue bulbs or lamps.

They are easily controllable from Node-RED using Foddy's excellent Huemagic nodes (massive thanks to Foddy for those).

One of the important things for me for the Wife-Approval-Factor is regular wall switches. You walk into a room, press a normal-looking switch that's just where you would expect to find it in a normal place on the wall and the lights come on!!! Woohoo! Hue falls down a bit here. I don't like their switches. A lot of people end up leaving their regular switches and adding extra stick-on Hue switches (yuk!) but then what happens if someone switches off the regular switch... nothing works! The Hue Tap is just plain ugly!

However, you can get nice Friends of Hue switches. So you can remove your conventional switches, hard-wire the lights to be permanently live (so they always work) and fit these switches over the top. They use Enocean energy harvesting so they don't need batteries (the unit inside is actually the same as in the Hue Tap) and you can actually stick them anywhere you need them, even where there is no electricity like next to the bed or where you'd really like a switch but there has never been one! They are standard Euro 55mm format so there are lots of design options.

If you want even more control, you can get the same switches with different inserts that use the Enocean protocol - you will need a separate Enocean dongle for your R-Pi for about 35 Euros. Node-RED has nodes for this too but I don't use them because openHAB handles Enocean. I have written a flow that identifies and handles single / double / triple clicks, press and hold, double/triple click and hold etc etc so you have countless control options to make the lights and the switches do almost anything.

So in summary.

  • Hue is easily controllable using Node-RED

  • Controllers, lights, switches etc are familiar to most people now so if you ever need to sell the house you can leave it all for the next people (my wife is also concerned that if I die - which I've only done once (story for another day) - then she needs to be able to operate / remove all the automation easily without breaking the whole house). The Node-RED control doesn't stop the regular Hue control apps from working.

  • You can control it from regular switches and not need to get your phone out, unlock it, find the app, and find the right screen just to switch your lights on!

  • Easily integrateable into Node-RED or other home automation for dimming, scenes, other functionality etc.

  • and it just works... so when you have vistors, they can turn the lights on and off without having to ask how.

I hope that helps

2 Likes

I agree. I use Gledopto 2ID RGB+CCT controllers, they came with laptop style power bricks and while their colour changing is not the fastest, they work fine. Hue hub connected to Node-Red and also a Hubitat Elevation (was Smartthings, but moving away from there right now).

If you have lots of short strips (10m being the typical maximum at roughly 6W/m) then you can use a single PSU and wire it to all the controllers just keeping an eye on the total max draw. The controllers accept both a standard jack as well as +/- terminals.

The strips on the other hand can be very fragile, especially where they may need cutting and joining. Be prepared to fiddle and solder. They can only be cut at 10cm intervals typically, so if you have odd spaces to use them in this is again something to be aware of.

1 Like

I've only used a Hue Hub to be able to use their dimmer switch (which at the time was the best I had found to control my LIFX lights). I remember the integration this way was not good at all as to catch the switch button presses the Hue Hub's REST API had to be constantly polled (with max 300ms interval or something like that). So button presses would register with a slight lag and sometimes not at all.

For easy to integrate Zigbee stuff I would rather recommend a Zigbee USB stick that's compatible with zigbee2mqtt (to run on a Raspberry Pi). No other Zigbee hub is needed then.

1 Like

We are cheapskates! Preferring low-cost over convenience :slight_smile:

Fair point. Though I don't think Bart is a dummy nor a novice :+1:

Keeps us on our toes. Makes sure that we deliver things that work for real people rather than just geeks like us. It has taken quite a while but even my wife is now wanting more LED lighting both inside and out. Though colour is still frowned upon.

Remembering of course that this is the Node-RED forum :wink:

And we are back to the cheapskates issue again and what puts me off using Zigbee. £26 for a single controller + the cost of a Zigbee bridge/adapter vs the £9 for a Wi-Fi controller. £60 for a 2m Hue LED strip vs £15-30 for a 5m RGBW strip.

They look OK, but holy moley batman, £60 for a double-gang wall switch!

This depends on the type of strip and the LED density. But certainly you should check the strip if a specific length is important to you. I nearly got caught out with that when doing the cooker lighting.

Fair point. Though I don't think Bart is a dummy nor a novice

Indeed - no offence meant. Until I retire though I don't have the time to be building bespoke hardware solutions. I can save a lot of hassle and it makes maintenance a lot easier.

Though colour is still frowned upon.

LOL My wife likes colour temperature control though. She can change the light above the dining room table to daylight white when she's using it to assemble quilts but purples or blues in a 300 year old house... not going to happen.

Remembering of course that this is the Node-RED forum

Of course - the two are not incompatible. I find Node-RED a much better rule engine for openHAB and I'm loving it to bits especially the JSONata functionality.

And we are back to the cheapskates issue again

Oh I agree! I'm not using Hue LEDs - too expensive and too inflexible. Those controllers will control any bog-standard 12 or 24V LED strips and they're only £26. Besides if your alternative is a dedicated R-Pi for each location plus its power supply plus another supply for the LEDs then you're racking up the cost anyway never mind the time. I'm prepared to pay for simplicity, compatibility and the Wife Approval Factor of a switch she recognises.

I can't imagine what DMX controllers cost though

holy moley batman, £60 for a double-gang wall switch!

Yeah! I winced at that. The Enocean inserts are about £30 from Farnell but Gira certainly know how to charge for the switch components! I would hope these come down as more people realise that you can control stuff like Hue using regular wall switches and without getting your phone out.

to catch the switch button presses the Hue Hub's REST API had to be constantly polled

You're dead right. I don't try to catch the Hue switch presses because exactly as you say, registering the event from the HUB is too slow. You can let the switch do its regular job direct with the Hub and control the light - that works immediately - and then you can apply further automation to the light or pick up the status of the light later. But don't try to put Node-RED between the switch press and the light action.

But the number of options you have with a Hue switch are limited anyway.

I tried a Zigbee dongle with the Friends of Hue switch but coudn't get them to pair (even though they should be able to in theory)

That's why I've moved over to the Enocean protocol. OpenHAB (or Node-RED itself with the Enocean node but I haven't tested this) reacts instantly to Enocean switch presses and communicates that instantly to Node-RED. So I do my processing and my logic for double clicks, double press then hold etc in Node-RED and then apply that to the light through HueMagic.

Going back to the OP's question it was just a suggestion that a lot of the middleware heavy-lifting for controlling LED strips from NodeRED, setting scenes etc can be taken up by Hue. How you then control Node-RED is a different question.

Nope, I could use a £3 ESP8266 or a £5 Pi Zero (or is it the £10 Pi0w?). More likely, I'd buy a £9 Wi-Fi controller that has an ESP8266 inside.

That's why I'd use a wi-fi controller so I only needed 1 power supply.

I get that you will save time your way at least once you've set up OpenHAB and linked up your Zigbee controller anyway. But for me, home automation has to be affordable, that's part of the challenge and I value the challenge more than the lighting :slight_smile:

I bought Hue ledstrips in my pre-node-red era, but i would go a cheaper route now :slight_smile: It works flawlessly though and can control it locally, it is a nice package but comes with a price.

Just wondering, what kind of powersupplies do/would you use ?

holy moley batman, £60 for a double-gang wall switch!

I have 433Mhz double/triple wall switches for €3 each, node-red to the rescue.

1 Like

@BartButenaers I think I already have exactly the set up you want working in my house. Multiple LED strips controllable via MQTT (in fact, I can control mine via HomeKit thanks to homebridge). @markost has it right, Tasmota is the way to go.

The beautiful part about Tasmota is that you can do quite a lot without any external interference at all. Some of the light strips are set up (using Tasmota rules) to 1) turn on at 10pm, daily; 2) turn off at sunrise, daily; 3) if there is a power outage, check if it's between 10pm-sunrise. if so, turn back on.

That is only the tip of the iceberg in terms of what's possible. You can rig it to respond to PIR sensors and more.

You don't have to build any of the hardware yourself. You can just re-flash Tasmota on to an existing, commercial LED strip. Tuya-convert makes this process even easier, as for many products you don't even have to do any soldering.

To install Tuya, I grabbed an old 32 MB SD card so I could create a fresh install of Raspbian on my Pi, and hardwired it (important) so that the onboard Wifi card could be used to talk to the LED strips. Once you have Tasmota installed on the LED strips, you can do OTA upgrades directly if you want (no need for the Tuya setup anymore). I would recommend sticking with the "tasmota-lite.bin" distribution as larger Tasmota files seemed to overwhelm the processor in my experience and there was a huge amount of lag.

These light strips are compatible with the Tuya OTA process I've mentioned (as are many others). You can find a longer list here - though note, some may require soldering - and just search for similar products (relabeled) on Amazon or elsewhere online. A lot of these products are made by one manufacturer and resold to multiple others.

For anyone else interested, Tasmota can be flashed on to MANY other kinds of devices, not just LED strips. Wall switches, outlet plugs, and more. I have a few converted outlet plugs that allow me to monitor power consumption and send me alerts if things have been on too long or notify me when the dishwasher is done, for example.

3 Likes

Hmm good point. One of the requirements is indeed that it should also work with a simple button, and optionally via the dashboard. At the time being that was our agreement: it should even work when the dashboard is down for some reason. Thanks for reminding me about that in time!

Interesting. I had never heard from enocean before ...

I'm considering to sell here in change for a large tower of raspberry computers :shushing_face:

Also interesting... So you don't have to program anything, since you can control it via mqtt messages?

Last week I had in the evening a long video call with a colleague of mine, since I hadn't seen him a long time due to Corona. He is using DMX to control his LED strips in his house and is very pleased with the result. I will try to explain it a bit, since it is a wired approach (compared to the large amounts of wireless technologies discussed above)...

If I understood his entire setup correctly, it looks like this:

  • When your power supplies are in the same room as your Raspberry (and if you have the ability to install wires towards your LED strips), it makes sense to put - next to the power cable - a second (2-wire) DMX cable. I mean instead of using a mix of a single wire together with a wireless link...
  • I have ordered this usb to dmx converter (14 euro) for an experiment, since that is adviced on the readme page of the node-red-contrib-udmx node. Note that my collegue uses another converter with the node-red-contrib-ola node. So not sure if mine is going to work...
  • He is very satisfied from this DMX controller (model D4-P for 13,8 euro). A series of these controllers can be chained with a single DMX wire, and a termination resistor needs to be put at the end of the chain... A single DMX controller can control 1 RGBW strip or 4 single color LED strips.

Since I'm the "cable guy" I like this setup, but my colleague doesn't use it in some cases:

  • In locations where it is not possible to install wires from the Raspberry to the LED strip (i.e. there is only a shorter wire from the LED strip to a power source).
  • For light bulbs (e.g. at the ceiling) where no cables are available.
  • For addressable LED strips. Because each LED needs to have 3 addresses (RGB), which means that the 1024 DMX addresses (of a single world) would become a bottleneck.

In those circumstances a wireless technology needs to be used...
So I probably will end up with a mix of wired and wireless ...

This functionality already exists with Tasmota. There is already a button on the LED strips I mentioned.

So you don't have to program anything, since you can control it via mqtt messages?

Well, you can send configuration to Tasmota, but there is no firmware development if that's what you mean. It's very powerful, has a built-in web server, MQTT server, and more. So you have multiple options to control it. You can also send specific configuration commands (e.g., latitude, longitude for sunrise/sunset calculations, etc.).

I find this approach the absolute simplest and easiest. Everything will just "work" out of the box once you flash Tasmota software onto the device. All your parts are included for about $30 including somewhere between 10-20 ft of LED. If you want more, you can just buy more LED. I think the maximum range on a single run is around 150 ft (with splitters etc.), but it will depend on which one you purchase.

Once you understand how to flash Tasmota onto an LED strip, you can set up multiple strips in about 10-15 minutes each.

Here is a video demo. If you look closely you'll see the button where the electrical jack connects.

2 Likes

OK - not an LED strip ... but having mentioned Hue - here is a MQTT / HA DIY version...

1 Like

Haha, that is very clever. However, I'm not sure how long the LED's would last given that they have no heatsink.

Also, I would be very wary of wrapping a cheap Chinese USB power adapter in plastic and constraining it inside a lamp holder.

Nice idea though.

Well, the resulting fire will give you a nice and warm light. Not for long though.

3 Likes

Oh... that is so WRONG... Funny..... but so WRONG. LOL

Yes. But the esp plus code he uses could be used with a strip just fine.

1 Like

I just got one of those strip kits you linked, it just works, but now I want to flash Tasmota. Its far from obvious how to open up the controller to hook up the USB to serial adapter. I've done a few trivial things with Ardueno, but pretty much a virgin with ESP32.

Tasmotizer looks to be very easy to use.

It came with a 12V power supply, the WiFi controller says 5-28V does that mean a higher (or lower) voltage supply can be used?

I gather the Tuya-convert is a system for OTA flashing that doesn't need soldering or opening the controller, but since I have the USB to serial adapter and don't mind a bit of soldering, Tasmotizer is where I plan to start if I can figure out how to open the controller without breaking it!

Yes, Tasmotizer is fairly new, and much simpler than it was before.

Flashing the chip directly requires you to identify the 3.3/5V, GND, TX, and RX pins. A lot of times, the manufacturers do not label them directly on the chip making your job harder.

Just remember, that you have to hook up the TX on the USB to RX on the board, and vice versa. Then, connect power-to-power and ground-to-ground. Finally, you will have to connect GPI00 to GND (or, hold down a button works in some cases, if the board has one) in order to start the chip up in a mode where it will be flashable.

Here is a tutorial for a different device, covering the elements.

It came with a 12V power supply, the WiFi controller says 5-28V does that mean a higher (or lower) voltage supply can be used?

DO NOT - UNDER ANY CIRCUMSTANCES - USE THE USB TO SERIAL DEVICE WITH THE POWER SUPPLY CONNECTED! You can cause damage to your USB ports/computer, board, or both.

The Tuya convert software works in a completely different way. There is some kind of OTA firmware mechanism built-in to those devices, and (to my understanding), it configures the LED strip for you and then overrides the DNS, so the on-board software isn't aware isn't just grabbing firmware of your local server when it performs an update.

I used the Tuya convert software with those strips, not the direct flashing method.

I understand that the flashing needs to be powered by the USB adapter, my power question was about the controller in "normal use" if it really was as "flexible" in terms of power supply voltage to run it and the LED strips as the printing on the device suggests.

I'm still kind of stuck at getting it opened without breaking it. I've changed batteries in phones and tablets and it often seems like you are breaking it to get it open, but I had instructions about where to pry which helped a lot.

Edit: Follow-up.
Mine was a "snap fit" with four tabs on the side-corners and recesses in the top section. I just pried at the corners until one of the tabs popped out, then it was easy pop out the other three tabs.

3.3V, GND and TX RX are clearly labeled on the board . 3.3 and GND have wires soldered for the IR receiver for the remote, TX and RX appear to just be solder nubs waiting to be attached.

But there is no switch or any indication of what pin to pull "low" to when applying 3.3V power to put it in programming mode.

I may be stuck with using Tuya-convert OTA flashing.