[DIY] Amblight project/guide - Hyperion - WS2801/ WS2812B / APA102 (6 Viewers)

twosh

Member
October 17, 2010
4
8
Home Country
Finland Finland
Hi,

Just installed everything following your guide and it works great, except one thing. When MediaPortal is not showing video, I have "Turn the leds off" selected for all other options (menu, pictures etc). However, then Kodi from the rpi kicks in and the leds start showing the colors corresponding to the Kodi main menu with the scrolling RSS feed and everything. I have tried adding touch /var/lock/xbmc.disabled and touch /var/lock/kodi.disabled to the autostart.sh but Kodi seems to start anyway. Using latest OpenElec 5.0.8. How do I get Kodi disabled or at least ignored by Hyperion so that the leds stay off when not showing video in mp? MediaPortal version is 1.12.

Thanks!
 

Rick164

MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,006
    Home Country
    Netherlands Netherlands
    Hi,

    Thanks for reporting this issue, looked it over and it might be that they changed it in a certain version.
    Don't haveOpenElec 5.0.8 running at the moment but could you open the following file in the SSH session and check its contents for anything Kodi related:

    Code:
    nano -w /storage/.config/autostart.sh

    If there isn't anything Kodi related with the exception of the kodi.disabled line in that file add the following line to the end and make sure not to edit anything else:

    Code:
    systemctl stop kodi

    press F2 and select Save (Y) afterwards, now if you reboot OpenElec it should automatically stop the Kodi service.

    Example autostart.sh after changes:

    Code:
    /storage/hyperion/bin/hyperiond.sh /storage/.config/hyperion.config.json </dev/null >/dev/null 2>&1 &
    systemctl stop kodi

    If this works properly will update the Kodi / XBMC portion of the guide with it :)

    In your Hyperion config there's probably a XBMC setting added by accident, if you created it with the HyperCon tool you can untick any XBMC options there.
    Otherwise can send me the Hyperion config and will disable it for you.
     
    Last edited:

    twosh

    Member
    October 17, 2010
    4
    8
    Home Country
    Finland Finland
    Great, thanks for the very fast reply! I've checked out the autostart.sh earlier and I know that the only thing I have in it is the reference to the hyperiond.sh and config line. I'll try adding the line for stopping Kodi when I get home tonight. Really awsome guide otherwise! Whenn I followed it I stumbled a bit when I was going to install hperion after installing openelec. he link you have talks about raspbmc and uses commnds not found in openelec (v5 at least). I googled and found this short to-the-point guide that (for me at least) worked flawlessly. Might want to add it as well perhaps..?
     

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,006
    Home Country
    Netherlands Netherlands
    Will work that extra info into the guide :)

    / Update

    Changed Step 1 and Additional configuration chapters so that they are split up between the 2 guides, PDF added for the new guide in case the site ever goes down.
    Might create a new OpenElec install guide for that myself so that I don't have to link those (easier to read) but for now this should already be an improvement.

    New Credits chapter added which links to all the sites used for resources.

    Also updated the Kodi / Xbmc disable part as I tested that with OpenElec 4.0 and it worked the same as the old method, only need to confirm that with OpenElec 5.0 so let me know how it goes.
     
    Last edited:

    twosh

    Member
    October 17, 2010
    4
    8
    Home Country
    Finland Finland
    Hi @Rick164 ,
    I can confirm that
    Code:
    systemctl stop kodi
    indeed works with kodi 5.0! My rpi doesn't seem to boot up kodi any more. Now my lights stay off after the initial "rainbow swirl fast"-sequence until I start a video in MP and shuts of correctly when stopping it. Big thanks for all the help, the great guide and the awesome software! :)[DOUBLEPOST=1441727386][/DOUBLEPOST]One question; should the rpi be sending info to the arduino continously? I mean, even though there is no video playing and the last command from MP/atmolight is to "shut off leds"? Just wondering since my Arduino keeps on blinking (rapidly) at the same rate as when I know is receiving commands / sending commands.
     
    Last edited:

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,006
    Home Country
    Netherlands Netherlands
    indeed works with kodi 5.0! My rpi doesn't seem to boot up kodi any more. Now my lights stay off after the initial "rainbow swirl fast"-sequence until I start a video in MP and shuts of correctly when stopping it. Big thanks for all the help, the great guide and the awesome software! :)

    Awesome and thanks for reporting the error!

    One question; should the rpi be sending info to the arduino continously? I mean, even though there is no video playing and the last command from MP/atmolight is to "shut off leds"? Just wondering since my Arduino keeps on blinking (rapidly) at the same rate as when I know is receiving commands / sending commands.

    Noticed that as well, not sure why it does that but it must be something from Hyperion that is continuously polling the Arduino as we don't send any new commands when the lights are off.

    Also planning on updating the guide with some new hardware info, Adafruit has a new mini Arduino that has the same specifications as the Uno R3 but is much smaller and cheaper (excluding US shipping):

    https://www.adafruit.com/products/2590
    https://www.adafruit.com/products/2709 (case)

    Should arrive shortly and if it works it's gonna be added as an option besides the Uno R3 for people who want to keep the build as small as possible.
     
    Last edited:

    Hapo

    Portal Member
    August 26, 2015
    22
    2
    30
    Home Country
    Brazil Brazil
    So, i have tried with new Rpi Model B. I did with Raspbmc (Hyperion and Boblight) and also did with openelec 4.2.1 (hyperion) and none of them worked :(.

    I changed all LED to new strips (from the 5M i bought) and did all the soldering again and voltage was fine through all LED strip. But still did not work

    (When power on, there are 2 LEDS who light up any random color, but thats it, and they do light up without the Rpi)

    So, i am starting to think the problem is the LED strip itself, i have no ideia what to do. Do you have any ideias? (i still dont wanna buy an arduino only for testing, cause thats all ill do with it for a big price, isnt there any other way to test them?)

    Thanks
     

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,006
    Home Country
    Netherlands Netherlands
    If they light up at random colors it might be an issue with the ground connection or that the led strip are defective, the only way to otherwise test it is gonna be with an Arduino sadly as you need something that can send the specific data commands.
     

    Hapo

    Portal Member
    August 26, 2015
    22
    2
    30
    Home Country
    Brazil Brazil
    Is not like the keep changing colors while on. They just light up sometime as green, sometimes purple, sometimes white. Anyway, i just ordered an arduino uno 3. What should i do with it? Do you have any tutorial?
     

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,006
    Home Country
    Netherlands Netherlands
    Copied the tutorial we had and made some adjustments for testing the led strip:

    - First we have to wire everything to the Arduino like this:

    fetch.php


    - Install Arduino IDE:

    http://arduino.cc/en/main/software

    - Download FastLed library:

    https://github.com/FastLED/FastLED/archive/master.zip

    - Extract the master.zip to your Arduino Library folder:

    My Documents/Arduino/Libraries

    - Afterwards you should have this folder:

    My Documents/Arduino/Libraries/FastSPI

    - Now load up a sample sketch with the Arduino application, this example is for the WS2801 led type and uses data and clock pin from the above picture:

    https://gist.github.com/RickDB/ca59ff69ee857a5f5973

    Used 122 leds as I believe that was your total but if not can change that at the top of the sketch, RGB is the default color order but can change that as well if needed (sometimes those are different per chip/brand).

    - From the Arduino top menu select Tools - > Boards -> Arduino Uno

    - From the Arduino top menu select Tools - > Ports -> COM port of Arduino (typically the second one and never COM1)

    - From the Arduino top menu select Sketch -> Upload

    - If no errors popup your Arduino will blink shortly and the leds will rotate beween red / green / blue every 500ms.
     

    Users who are viewing this thread

    Top Bottom