RPi2 Ambilight project (advice needed)

hi,
please help me out with what i need to buy in order to have ambilight-alike working setup.

on an old thread i’ve seen this:

  • 50PCS WS2801 RGB Full Color 12mm Pixels digital Addressable LED String DC 5V
  • EU 5V 8A Power supply AC to DC Adapter for WS2811 WS2801 HL8806 LED String Light

is it correct or i need smth else or smth additional to this items?

kind regards

Or you could go with a complete kit like http://lightberry.eu or http://lightpack.tv/

less DYI and support

my understanding is those options are

  • more expensive then if bought separately and DYI
  • less LEDS for more money

or am i wrong?

sure but you get support but if you want to do it all on your own

http://www.instructables.com/id/Build-your-own-Ambilight-clone-with-the-Raspberry-/

then that should get you started with what you need and what you want to get for me it was the push of a button at lightberry way less hassle then soldering etc :blush:

1 Like

A lot of people are actually enjoying to build stuff on their own.
I am one of them and as it sounds you are, too. There is not much that can go wrong here. Just follow the instructions precisely and you should be good to go.

Post a buildlog here if you like and feel free to ask questions.

Edit: The mentioned hardware is OK.
You can even power the Raspberry with it too.

You have 50 RGB leds. One needs about 3x20mA. So it is like 60mAx50LEDs=3000mA or 3A for the LEDs all on at full brightness.

I use a 2A supply for the LEDs only and never ran into problems as all white is kind of the worst case.

1 Like

thanks for reply!

on another forum i’ve got this warning:

Pay attention specifically to the issues about 3.3v vs 5v on the GPIO data line (note this is completely separate from the voltage on the power supply that you bought).

do you know what’s all this about?

I guess they want to warn you to be careful not to connect the 5V line of the powersupply to one of the gpio pins of the raspberry. That could potentially kill it.
be sure to only connect it to the led strip.

The datalines of the ledstrip should not be connected to the 5v of the supply.
If you want to be sure, measure all pins with only the powersupply connected to the ledstrip. The datalines should have no voltage.

Then connect them to the corresponding pins on the raspberry.

It could be that you need a common ground for the raspberry and the ledstrip though.

so after another readings of the net, i decided to go with these parts: PiBob

already ordered, can’t wait to start things up :slight_smile:

I run the WS2801 (the same as your link) with RPi2 + OSMC + Hyperion. I loved the lights and hyperion, so I bought more strips WS2812b and I’ve run them up the stairs (be warned you’ll want to put them everywhere).

I really enjoyed the DIY aspect and it wasn’t too complicated getting it running.

The only thing I’d recommend if your using this (and you use your TV remote to control OSMC) is to add a button to the OSMC config for turning the lights on/off.
I use “XBMC.System.Exec(”/home/osmc/hyperion_toggle_black.sh")" in my remote.xml and the script forces the lights black or deletes the priority.

Let me know if you’d like a copy of the script and best of luck with your project.

1 Like

having a turning the lights on/off is pretty nice idea!

i would be thankful if you could share the script, of course.
p.s. yes, i use my TV remote to control OSMC (and sometimes it’s a real PITA) :smiley:

1 Like

This thread here may be of interest @grey

1 Like

No Problem,

cat /home/osmc/hyperion_toggle_black.sh

#!/bin/bash
priority=222

hyper_check=hyperion-remote -l | grep -i "\"priority\" : $priority"
echo $hyper_check
if [ -z “$hyper_check” ]
then
hyperion-remote -p $priority -c black
else
hyperion-remote -p $priority -x
fi
exit 0

cat /home/osmc/.kodi/userdata/keymaps/remote.xml

< keymap>
< global>
< remote>
< skipminus>back< /skipminus>
< skipplus>ContextMenu< /skipplus>
< pause>XBMC.ActivateWindow(Home)< /pause>
< /remote>
< /global>
< home>
< remote>
< skipminus>XBMC.ActivateWindow(VideoLibrary,TvShowTitles)< /skipminus>
< skipplus>XBMC.ActivateWindow(VideoLibrary,addons://sources/video/)< /skipplus>
< reverse>XBMC.ActivateWindow(VideoLibrary,MovieTitles)< /reverse>
< pause>XBMC.System.Exec(“/home/osmc/hyperion_toggle_black.sh”)< /pause>
< /remote>
< /home>
< FullScreenVideo>
< remote>
< select>select< /select>
< pause>pause< /pause>
< stop>stop< /stop>
< reverse>aspectratio< /reverse>
< skipminus>Info< /skipminus>
< skipplus>VolumeDown< /skipplus>
< forward>VolumeUp< /forward>
< /remote>
< /FullScreenVideo>
< /keymap>

I’ve had to add a space after each < to display on the forum. This works with my LG TV, and yeah remotes can be a PITA :smile:

The script just add/removes a new black priority 222 which is above the OSMC/Hyperion stuff (1000 I think), but below anything sent from the phone app (50/100 again from memory).

Almost forgot, this only works while your on the home screen, I have limited keys so I use pause elsewhere to take me back home

Hope it’s of some use.

1 Like

strange, i pressed PAUSE button and LEDS turned off. but i can’t make them turn on again :smiley:

weird. I’d start with checking whether it’s the remote or the script.

just run ./hyperion_toggle_black.sh each it’s it’s run it should be on/off. from memory hyperion_control -l should show you the current priorities so I’d run that before toggle and after, you should see the xbmc priority 1000 (again from memory) and when you toggle a new priority 222 appear and disappear again when next run but 1000 should always be there.

I can check my output and priorities if it’s any help, not near it at the moment though.

okay, so if i toggle there is, indeed, a new 222 priority (so i have both 222 and 1000 now), BUT when i toggle again - 222 isn’t going anywhere - so i do continue to have both: 222 and 1000.

UPDATE: okay, my fault. there was some spaces in the script, when i copied it from here. removed those- now if i toggle it from putty it’s working nicely.
now my remote does not want to execute script. in debug - i see it is executed - but with no effect.

any thoughts?

Great that you got the spaces sorted. I didn’t notice any issues on that when I pasted it, just the xml bit.
It’s sounds strange though that the remote now wont work but is executing it.
2 things I would try to work out what’s happening.

  1. reboot (you never know, it often solves things).

  2. put in a new line near the top of the script

    echo date >> /tmp/hyperion_toggle.log
    To see if the script as actually running (I haven’t tested this, but it should be correct).
    At least then you should know if the script is running or not when it’s being executed.
    You can always add 2 more echos inside the if/else such as “echo off” / “echo on” and you’ll get a better idea of what it’s doing.

Hopefully that gives something to start from.

I just noticed the script is missing some ` on the line:
hyper_check=hyperion-remote -l | grep -i ““priority” : $priority”

These are important for the if to know whether priority 222 is there or not and are possibly what’s broken it.
In the following replace both BH9 with a ` (It’s not a single quote, it’s under the escape key on my keyboard, leans back slightly)

hyper_check=BH9hyperion-remote -l | grep -i "\"priority\" : $priority"BH9

For some reason having 2 of them get’s dropped when I put them here (and yet it worked on the echo I did above :unamused: )

1 Like

it worked!

THANKS!