Migrating from Boblightd (using Arduino/USB and WS2812b strip)

  • I have a very simple setup running on OpenELEC 5.x using boblightd which is working fine so far. I'm using only two short WS2812b strips, containing only 30 LEDs in total (15 left and right of the screen, none at the top and bottom).



    But since Boblight doesn't work very well with newer releases of Open-/LibreELEC I want to switch to Hyperion, which also seems much more powerful anyway. :)


    The strips are connected to a Arduino Nano (ATmega 328) running a sketch I originally found on tweaking4all.com. I changed it to use the FastLED library instead, tweaked some more stuff and added the ability for the Arduino to go sleep mode if no data is received. The Arduino is connected to /dev/ttyUSB0.



    The sketch basically just waits for a certain prefix in the data stream (preceding the actual color data) and then forwards this data to the FastLED lib which lights up the actual LEDs.


    The boblightd.conf starts with:


    Now to my actual question:


    Which type of device should I choose? Adalight, AdalightAPA102, SEDU, RawHID (USB) - or something else?


    Is there a description somewhere how these protocols actually work or what the differences are (In other words: How to handle/interpret the data sent)? Basically I'd obviously prefer a solution which is very similar to the existing one. But I also don't mind changing some stuff in the sketch.

  • never seen this prefxies, i guess i dont need them if everything is running fine?


    The original Adalight sketch seems to extract the number of LEDs directly from the prefix sent by the host/server - I guess that's why there is a checksum.


    There are a number of sketches out there - most use static prefixes (hard coded in the sketch) others use the Adalight "approach" and add i.e. WS2812 support to it. I guess most of the time that's not really an issue because the number of LEDs doesn't has to be changed that often.


    I've changed my sketch now to calculate the prefix based to the number of LEDs given in the sketch itself. This way only the number of lights has to be set.


    I think printing the currently used prefix as a Hyperion debug message is a good idea. :)


    I'm currently fine tuning the whole setup on my OpenELEC box.
    If you like I can also post my updated sketch and the Python script I used to generate the prefix list later (maybe some days - want to test it first).

  • I updated the sketch I'm currently using.


    Please keep in mind, that I only tested this with my own setup. To use it, at least the number of LEDs has to be adjusted. Also maybe the color order (which can be configured in Hyperion anyway). Also you maybe want to comment out the sleep mode and intro animation stuff if you don't want that.


    Although this works perfectly fine for me, I'm currently also testing a Pro Micro (Atmega32U4) which has an integrated USB-interface and should be significantly faster (bandwidth) than the Arduino Mega/Uno/Nano/Pro Mini.


    I also attached the Python script I used to create the prefixes.


    Usage is pretty simple:


    If no argument is given you have to enter the number of LEDs and it will give you the corresponding prefix.


    If started with i.e. "--list 500" - it will list all 500 prefixes for 1-500 LEDs.


  • I am trying to follow the same steps, since I also want to move from Boblight to Hyperion.


    I am using an Arduino with 4 simple led strips (whole led strip=same color. Bottom/left/top/right). Each led-strip is connected to 3 pins of the Arduino. So in my Boblight I have configured which led-strip is connected to which pins of the Arduino. Here is my problem: I cannot find out where to configure this part in Hyperion. I would expect to define the pin-mapping to the Arduino somewhere.


    Does anyone know how to do this?

  • I am trying to follow the same steps, since I also want to move from Boblight to Hyperion.


    I am using an Arduino with 4 simple led strips (whole led strip=same color. Bottom/left/top/right). Each led-strip is connected to 3 pins of the Arduino. So in my Boblight I have configured which led-strip is connected to which pins of the Arduino. Here is my problem: I cannot find out where to configure this part in Hyperion. I would expect to define the pin-mapping to the Arduino somewhere.


    Does anyone know how to do this?


    Solved it. In case anyone wants to know, I modified my arduino-sketch to wait for the prefix as described in above posts. Boblight does this differently from Adalight. I am using 4 led strips and hard-coded the prefix that I got from this post.
    I also needed to manually set the delaAyAfterConnect=2000 for Hyperion. For some reason the Hypercon-configtool keeps setting it to 0.



Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!