Control of WS2813 LED strips

774 views
Skip to first unread message

Techdoctor

unread,
Jul 2, 2020, 11:53:27 AM7/2/20
to Loxone English
The WS2813 is essentially a WS2812 but with the advantage that if one LED chip dies the rest behind it carry on working.
I have been thinking for a few years now how to control a strip of these via Loxone. 
So far I have thought about using an Arduino board and then getting Loxone to control the arduino board via relays to several input pins to call up pre-programmed modes. Not the most elegant solution or the cheapest.

So has anyone done something similar or any ideas on how to do it.


The reason for the idea is that I like the fact that I can directly control each LED so if I have a strip in the ceiling I can control which bit of it is on and what colour.

David Wallis

unread,
Jul 2, 2020, 1:02:58 PM7/2/20
to Techdoctor, Loxone English

Interestingly I was just playing with a DMX Library to see if something could be done for blind control or a bit more cost effective dmx relay boards maybe take a look at this for the ws2812

 

https://github.com/mathertel/DMXSerial/blob/master/examples/DmxSerialNeoPixels/DmxSerialNeoPixels.ino

 

David

--
You received this message because you are subscribed to the Google Groups "Loxone English" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loxone-englis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/loxone-english/5da6f124-8ab6-4101-b79e-963b33877f0ao%40googlegroups.com.

 

Joth

unread,
Jul 2, 2020, 1:03:43 PM7/2/20
to Loxone English
To distill the question down to how to efficiently communicate from Loxone miniserver to the Arduino, this should be fairly easy to do via a UDP virtual output.  I recently coded this setup to control "Teckin" LED bulbs direct from the Loxone but a similar approach would certainly work for this.
I'm running ESPHome on the ESP8266 in the Teckin lightbulb, mostly because it's an incredibly easy to use development environment and I'm reasonably familiar with Home Assistant (with which it integrates very well), but the basic code to receive over UDP should be fairly portable. That said ESPhome has WS2813 driver built in so I was looking to go this path too when I inevitably do get involved in addressable LEDs - https://esphome.io/components/light/fastled.html

Rob_in

unread,
Jul 3, 2020, 3:02:00 AM7/3/20
to Loxone English
On Thursday, 2 July 2020 19:03:43 UTC+2, Joth wrote:
To distill the question down to how to efficiently communicate from Loxone miniserver to the Arduino, this should be fairly easy to do via a UDP virtual output.  I recently coded this setup to control "Teckin" LED bulbs direct from the Loxone but a similar approach would certainly work for this.

Sadly Arduinos are rubbish (OK, just slow) when it comes to IP communication.

If you have a DMX, Modbus, RS232, etc. module then bit-bashing that input into the Arduino should work.

Use such an interface to send a 'mood' code to the Arduino that could then perform pre-programmed orchestration of the WS2813 LEDs based on said mood. Problem with this is if you want to change animations or other details of each 'mood' the Arduino would need reprogramming.

TBH, a Raspberry Pi is so cheap (relatively) that I'd be tempted to just use one of those to do the WS2813 control. That way you can use proper (sorry, quick) IP comms from Loxone and can login any time you like to reprogram it. A Pi can also do much more than this of course so there's the advantage of using it for other stuff at the same time.

Robin

Jonathan Dixon

unread,
Jul 3, 2020, 11:29:54 AM7/3/20
to Rob_in, Loxone English
On Fri, 3 Jul 2020 at 08:02, Rob_in <rain...@gmail.com> wrote:
On Thursday, 2 July 2020 19:03:43 UTC+2, Joth wrote:
To distill the question down to how to efficiently communicate from Loxone miniserver to the Arduino, this should be fairly easy to do via a UDP virtual output.  I recently coded this setup to control "Teckin" LED bulbs direct from the Loxone but a similar approach would certainly work for this.

Sadly Arduinos are rubbish (OK, just slow) when it comes to IP communication.

Ah, good heads up. I have little experience of Arduino per-se and honestly get confused as the word is variously re-appropriated for a specific dev board, and hardware expansion platform, and a software platform. But specifically on the point of using an ESP8266 I've found the IP comms robust and very fast. ESPHome uses protocol buffers over TCP which is splendid, it'd be lovely to talk Protobufs directly from Loxone too, but a simple text command over UDP is working great for me.

 
If you have a DMX, Modbus, RS232, etc. module then bit-bashing that input into the Arduino should work.

Use such an interface to send a 'mood' code to the Arduino that could then perform pre-programmed orchestration of the WS2813 LEDs based on said mood. Problem with this is if you want to change animations or other details of each 'mood' the Arduino would need reprogramming.

TBH, a Raspberry Pi is so cheap (relatively) that I'd be tempted to just use one of those to do the WS2813 control. That way you can use proper (sorry, quick) IP comms from Loxone and can login any time you like to reprogram it. A Pi can also do much more than this of course so there's the advantage of using it for other stuff at the same time.

Robin

--
You received this message because you are subscribed to a topic in the Google Groups "Loxone English" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/loxone-english/4bgkCB79lbo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to loxone-englis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/loxone-english/7dbe341f-5095-403d-90de-49c0381dd8d8o%40googlegroups.com.

Techdoctor

unread,
Jul 4, 2020, 9:10:19 AM7/4/20
to Loxone English
I might have a look at the ESPHome as I believe I can use the Arduino IDE to program it. 

I have also seen a DMX to SPI controller which then uses an SD card to store patterns, then you just send the relevant DMX command to access the correct file number to change the pattern. 
So my next question is would this controller simply connect directly to the Loxone DMX module.




Techdoctor

unread,
Oct 14, 2020, 11:30:34 AM10/14/20
to Loxone English
Just seen this, Pixelblaze so might give this a go, saves reinventing the wheel. 

Rob_in

unread,
Oct 15, 2020, 2:52:27 AM10/15/20
to Loxone English
There's plenty of control options - that's for sure.

I discovered 3W RGBW NeoPixels the other day. They also come in silly bright up to 20W from what I can tell (probably many more in the future). Many shapes and configurations are becoming available.

Just need someone to package something approaching 6W into an MR16 form factor with a 24V power + 5v data connections and they should be go-to lighting solution. Either that or create a cheap matrix you can just suspend from and cover any ceiling to create infinite lighting zones.

I have been toying with the possibility to 3D print some kind of low profile chandelier in a star/snoflake/etc. shape that will clip into an MR16 fitting and have neopixels all over it's surface. Might look cool... although TBH very happy with our lighting and have many other things to play with before this happens ;)

Robin

Techdoctor

unread,
Dec 9, 2020, 8:59:34 AM12/9/20
to Loxone English
My PixelBlaze V2 has arrived.
Now just trying to work out how to communicate using Websockets from Loxone to the PixelBlaze. I want to be able to change patterns from within Loxone. 
I can find some information from Loxone on their Spanish site but can't find the same information on the English site. While I do speak Spanish, its going to take me longer to read the technical Spanish than it is to read the English version.  I have also found some hidden Loxone documents using Goolge, the document is called Communicating with the Miniserver  this is using Config 10.0. Also on the Spanish version of the KB it lists 6 documents under the API and only 2 documents under the English version.
Does any one have any good examples of websocket control, I am going to print out the Spanish page and translate the important bits and see if I can understand whats going on. 
I just wish Loxone would give more examples rather than the yes it can be done type response.  The Spanish page is https://www.loxone.com/eses/kb/control-remoto-logica-de-comunicacion/
But so far I am very impressed with the PixelBlaze, its tiny doesn't use an app, just a webpage to communicate with, so is compatible with any device that's has a browser. And you can program it on the fly if you want.

SteveJ

unread,
Dec 9, 2020, 9:34:48 AM12/9/20
to Loxone English
There is a V11 version of the communicating with the min server document in english here:  https://www.loxone.com/dede/wp-content/uploads/sites/2/2020/10/11-00_Communicating-with-the-Miniserver-2.pdf

If you are rolling your own code, I'd suggest something like the lox communicator library ( https://github.com/Loxone/lxcommunicator ) to handle the websocket authentication.  Essentially once you are authenticated, the mini server will send out updates to all Loxone controls set to show up in the GUI on a websocket - your code can listen to this and act accordingly.  I've done rudimentary experiments in reading info and setting the mode and temps for my IRCV2s via websockets, which I eventually got to work, but i've not really played beyond that.

From other posts here, I believe the using another product to sit at the end of Loxone's websocket and broker connections with other systems might be a cleaner way to go - something like ioBroker or NodeRed.

Steve

Techdoctor

unread,
Dec 9, 2020, 4:15:35 PM12/9/20
to Loxone English
Many thanks for the info, and I guess we all know what I will be doing this weekend :)

Techdoctor

unread,
Dec 17, 2020, 8:03:56 AM12/17/20
to Loxone English
Family and other stuff got in the way of trying anything.  But did manage a clock on a 24 neo pixel ring. :)
So I think this is going to have to wait until after Christmas. 

vampiris

unread,
Dec 17, 2020, 5:44:16 PM12/17/20
to Loxone English
Months ago I had posted a question about a problem I had with a Wemos D1 Mini acting as an RGB controller. Since I found the Shelly RGBW2 controller my problem was solved, but as I was searching on the internet I found many videos about the addressable LED strips. I watched some videos and then I found this guy: https://www.youtube.com/watch?v=2X_0Oe24vkA. Since I am electrician and most of my programming skills are based on industrial PLCs, I am searching for solutions that doesn't need any skills on Arduino programming etc. This guy is selling the controller, since you have the electronic skills you can make one of your own, and then you can flash on them a software called WLED. The good news is that WLED can be controlled by HTTP commands (https://github.com/Aircoookie/WLED/wiki/HTTP-request-API) and it also has predefined effects and paletts (https://github.com/Aircoookie/WLED/wiki/List-of-effects-and-palettes) , and maybe the integration with Loxone will be more easy.

Techdoctor

unread,
Jan 10, 2021, 7:46:39 AM1/10/21
to Loxone English
Having failed to communicate directly with the Pixel Blaze controller using Loxone, I did think about using the Pico C script but I don't think that will work. 
But it looks like someone has come up with a possible solution. Its called Firestorm It will run on a Raspberry Pi. My laptop is dual boot Linux and windows so might have a play and see if its the way to go. 
Will report back when I have some news.


Techdoctor

unread,
Jan 13, 2021, 10:49:58 AM1/13/21
to Loxone English
Getting Firestorm to work on my laptop was a major pain in the what not. Had to force it to install a later version of nodejs as it defaulted to an older version during the installation, then had to remove the apache2 server  from my system, so that may at some point prove to be a bad idea. But at the moment its not complaining. After all that Firestorm is now up and running.
And after a late night last night with no success. Tried again this afternoon and I can now using a browser on my main PC send commands to the laptop running Firestorm to change the pattern on the PixelBlaze. Just can't seem to do it through Loxone though, I think its more of a syntax thing, but need a break now.
So here is the command to change the current pattern to blink fade. This is an HTTP get command.

The IP address is my laptop, the ids number is the number of the PixelBlaze, each PB has a unique id number, so through Firestorm you can control multiple PBs 
Thats about as far as I have got.
I did contact the developer, and he is going to look into, for a future update, an HTTP api for the new V3 board which is coming out in Feb (I have already ordered one).

Techdoctor

unread,
Jan 13, 2021, 4:30:40 PM1/13/21
to Loxone English
Yeah got it working.
Using the Loxone virtual outputs.
So you set up a Virtual output with the ip address of the computer firestorm is running on so in my case this is http://192.168.1.101:3000
So once you have done this you then create a virtual output command for each pattern or command you wish to send.
So I have a pattern called White
So in the virtual command where is says command for on you enter
/command?command=%7B%22programName%22%3A+%22White%22%7D&ids=3601529
Set HTTP Method for ON to POST and leave everything else as is or blank.
Now you need to set up a virtual input to trigger the virtual command. Set this to push button join this to the virtual command. And that its.
So far I have only done two commands but at least it works.  

Gert Stalpaert

unread,
Oct 25, 2021, 11:23:23 AM10/25/21
to Loxone English
This looks like a great way to work with WS2813 LED strips managed by Loxone!
Not tested yet, but I hope to do this within a few months.

Reply all
Reply to author
Forward
0 new messages