Addressable Led's

I think you guys may be thinking about this two complex…

I’ve not had a play with addressable LEDs yet, but have been watching many videos…

If you use the ESP8266/NodeMCU to control the lights, and store the sequences there for complex actions…

You’d then setup a http access, and associate different programs to different actions… Not sure if ST anything can do this, but I expect so? (I ordered my first NodeMCU yesterday)

The smart app then would only need to hit a URL and you could then have 1 URL to pass variables to control the whole strip…

The advantage of the ST_Anything framework , other then being easily customizable if you know what you’re doing, is there is no SmartApp to deal with; It’s just a composite device handler (which allows a parent to create child devices). What your proposing is to create a new SmartApp to push HTTP requests which is completely possible but you’re going to have to write both the SmartApp and Device Handler from scratch. Then you have to build the program on whatever device you are using to accept the requests and do something with it. Personally that seems way more complicated.

Sounds good, will be sure to check it out when it turns up, I don’t really understand how the two interact, but if ST anything takes care of the communication then that’s fine, you’d then just need the sketch to pick up the different inputs to trigger different lighting effects and variables

Look at the RGB or RGBW code I posted and you’ll see how I’m doing “analog” RGB/RGBW strips, sending a RGB or RGBW hex code from ST down to the controller which then takes it and sets the output pins accordingly to the color value. Same idea could be used for addressable although again there isn’t a good way to set the range of leds to address other then the dual slider idea I posted above.

I’ve had lots of ideas on how to do it, programming wise, but since I don’t own any I haven’t attempted it.

Ahh I see what you mean with the slider, what I was thinking is that you control the lights normally as you mention below for uniform colours, but then for effects you just add in extra buttons in the DTH to trigger specific scenes such as fade or police sirens for example, you’d just need a way to differentiate if a colour or a scene is then being passed.

Similar to what they are doing here with non addressable:

The main issue getting ST to try to emulate those and handle each bulb individually is you can’t just leave ST in a loop, it’ll exit after 20 seconds run time. But I do like the slider approach to at least set ranges of bulbs!

thank you all for this info. I been busy with holidays, work and school. i bought a ESP8266 Nodemcu, arduino r3, and alitove WS2813 RGB String. I need to read up on all that you all have posted…

If you got a ESP8266 I don’t think you’ll need the Arduino at all.

I Agree. How do I connect the ESP8266 to ST?

I would start by juat getting the example NeoPixel stuff working stand alone on the ESP8266. Oncr its working then you can start looking at ST_Anything but like i said there isnt a library for programmable LEDs…yet. Depending on your programming skill level you can create one but otherwise i planned on foguring it out after the holidays.

1 Like

The WS2812FX library is capable of 53 discreet effects, and more are being added all the time.
This could be adapted to work within the ST_Anything code base by someone with some skills.

Then you can just make calls to the various effects with child devices…

1 Like

If anyone wants to mail me a set of NeoPixels or other WS2812 / WS2813 LED’s I’ll totally try to get it working on ST_Anything. :slight_smile:

1 Like

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.