Addressable Led's

I just picked this string up, without my wife’s permission and out of budget… She’s going to kill me.

I’m debating buying a set…have you made any progress with it?

I was reading this post about changing the range on sliders (Sliders range not working with iOS and Android) and now I’m wondering if you could have two sliders that are both say 1 - 150 and then you an select which leds change color. The DTH would still probably be messy but do-able and since you can’t dynamically change tiles you’d need a DTH for each LED count you have (30, 60,150, 300, etc). Pretty sure I could adapt the analog RGB and RGBW libraries I wrote to programmable/NeoPixels ([RELEASE] ST_Anything v2.8 - Arduino/ESP8266/ESP32 to ST via ThingShield, Ethernet, or WiFi) though. Maybe after the holidays…it would be nice to use a single ESP32 for every LED strip in a house since you only need one output each.

1 Like

I switched over to a Github project named McLighting that uses the WS2812fx library and offers three APIs; HTTP Rest, WebSockets, and MQTT as well as a nice web interface to manage colors and patterns.

I haven’t gotten any further with integrating it within SmartThings beyond the regular HTTP URI device handlers.

Some issues with the McLighting library: Random reboots happen. This may be related to the power supply, but it’s being looked into in the issue tracking. The other issue is that the WS2812fx library changed the way it handles speed adjustments and calculations and McLighting has not yet been updated to support the new settings in either the web UI or within the sketch. That is also “in progress” but they are looking for more help with it.

Well I picked up a little 1m / 60 LED WS2812 strip to do some testing. Using the NeoPixel library I get reboots on the ESP32. So I did some research and the same thing happens using FastLED and some other libraries…long story short to do the LED timing interrupts are disabled, the LED are updated, then interrupts are re-enabled. The ESP32 sees this as a watchdog timeout, panics, and reboots. You can kinda get around it by updating in small batches but its a PITA.

I need to test on a ESP8266 and see if it has the same issues. Super unfortunate.

I have regular reboots with my ESP8266 on the McLighting sketch, so if you’re thinking it’s going to be pretty much par for the course it probably will be.

Is the timing a circuitry related issue? Adding a RTC to the unit and reading from it wouldn’t work?

From everything I read, and this is my limited understanding of whats going on, the NeoPixel library (and apparently the FastLED one) disables interrupts when doing what it needs to do because the timing is critical on WS2812 programmable LED’s. With the ESP32 there is a watch for a certain interrupt to detect a fault so since they are disabled it freaks out thinking somethings wrong and warm reboots itself. And there doesn’t appear to be a way to stop it.

People however had have much better luck on the 8266 with the NeoPixel library so I might have someone try what I’ve programmed into ST_Anything so far and see if it does work on a 8266. Or maybe I’ll just order one for $9…

1 Like

I have a couple of 8266 units laying around I can test on. The one in the front windows is still hooked up. It randomly reboots itself, even when the lights are in an Off mode.

The default setting I put in place is for the lights to be off whenever power is applied.
I can test this evening if you are so inclined.

@vseven - when you say what you have programmed in ST_Anything do you mean for the RGB that you have as I don’t see anything in the current git that would support the single data wire the WS2812 use.

The only thing officially in ST_Anything is for analog RGB LEDs. It works great! :slight_smile: But they usually require a little more on the hardware side (a MOSFET per color). I tried, and failed, to get programmable LEDs working. It seems to be a timing issue that I cannot overcome. The way the programmable LEDs libraries work, at least with the neopixel library, is they disable interrupts on the controller and then send all their data. The problem with this is then sometimes the controller doesn’t see its own timing interrupts, panics, and reboots. I tried to integrate the fast LED libraries in because allegedly they have extra code to overcome that but I couldn’t get their library to work.

Two other board members also try the neopixel code on different esp8266 controllers and both had different results. One was able to set the colors up to around 50 some pixels and one couldn’t make them display at all. The results using the exact same code were random based on different controllers which doesn’t make a lot of sense to me either.

So to recap the neopixel library I got to integrate just fine and works with a very limited subset of LEDs. The more LEDs you try to control the better chance of it rebooting though. The FastLED Library, which works on its own just fine, I could not get to work with ST_Anything.

I’m sure there is a solution but currently I don’t have the time to keep messing with it.

Old thread, but just in case it’s still useful.

I had similar issues with the esp8266 and ws2812 lights - mainly with the esp8266 rebooting from time to time. My setup was similar (actually using - not integrated with smartthings yet, that’s why I came here searching ) -

This fixed it - (at the top of the sketch) -

Hope it helps someone… I was getting very frequent reboots before this… our valentines day decorations (lit-up heart) ran for over a week without crashing with this modification.



I’m not 100% sure that line will work with the McLighting project as it’s based on the ws2812fx library. I’ll toss it at the top of the sketch and give it a try though. I believe ws2812fx has some FASTLED stuff in it.

Thanks for posting it! I’ll let you know how it works out for me.

I used Arduino for WS2815 LED ,WS2815 LED has the same library with WS2813 LED,they are both addressable led,just different of the voltage,I can send to you if you need.

I had a try with
Device handler can be found there:

Hi, does your device handler still work?

I’m having trouble getting it to chooch.

If it helps I just got programmable LED’s to work with ST_Anything, can control one strip with a ESP8266 or up to 8 separate strips independantly with a single ESP32. Plus it works in the new app.

I managed to get Vahur’s device handler working. But I’d love to hear your approach please.

Using ST_Anything, got all the stuff merged into it. IF you want animations and stuff you’ll have to stick to a project like this one since I only did color control in the ST_Anything version (since you can use the controller for other things also).

It did not work with new Smartthings (problems with setColor). Converted to use HSV colors, now should work…