home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
HTPC Projects
Hardware
Ambient Lighting System
[DIY] User Showcases
[DIY] Amblight project/guide - Hyperion - WS2801/ WS2812B / APA102
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Rick164" data-source="post: 1111633" data-attributes="member: 17766"><p><span style="font-size: 18px"><strong>Introduction</strong></span></p><p></p><p>Over time there have been many Windows alternatives to Atmowin and under Linux there is Bobilight however there is now another good all in one alternative that is networked like boblight but also works with Windows/Linux and is called <strong>Hyperion</strong>.</p><p>Windows and Linux support is supplied by their respected plugins (AtmoLight in our case) however the Raspberry Pi can't run the Kodi plugin for it (yet)</p><p></p><p>Hyperion also allows for video capture methods so that you can use it for every HDMI input source be it a console or set top box.</p><p></p><p>AtmoLight now supports Hyperion as well so <u>no video capture hardware is required</u> for that setup as it sends your video image directly to Hyperion over network.</p><p></p><p>It does require some Linux / Raspberry Pi knowledge like connecting via SSH (Putty) but other than that it's easy to understand.</p><p></p><p><span style="font-size: 22px"><strong>Features</strong></span></p><p>- Ambilight for every HDMI source!</p><p>- Cross platform</p><p>- Android app to control LEDS</p><p>- Fast and accurate color measurements</p><p>- Tons of configuration options</p><p>- Supports Arduino (Adalight) to allow for broad use of led chips</p><p></p><p><span style="font-size: 22px"><strong>Requirements</strong></span></p><p></p><p><u><strong>For basic setup</strong></u></p><p></p><p>- Raspberry Pi B+ (other models will probably work just as fine)</p><p></p><p>[ATTACH=full]167859[/ATTACH]</p><p></p><p>- Leds - WS2801 is the most common however recommend the WS2812B ones as they offer more leds per meter and is a bit better.</p><p>For WS2811/12 support you do need extra hardware and there is more info in the chapter “Additional configuration”.</p><p></p><p>[ATTACH=full]167860[/ATTACH]</p><p></p><p>- 5V 5A power supply or higher</p><p></p><p>[ATTACH=full]167861[/ATTACH]</p><p></p><p><u>5V 7A was used to make the videos and drives 218 leds just fine.</u></p><p></p><p>- Optionally:</p><p></p><p>Rails to attach to TV, used one sided curved plastic rails to allow for adjusting the direction.</p><p>One sided sticky Velcro to attach leds and rails, get the good ones and apply alcohol on contact points to allows for best adhesion</p><p></p><p></p><p><u><strong>For video capture setup</strong></u></p><p></p><p>Recommend following this guide which describes all the components and how to use them:</p><p></p><p><a href="https://forum.team-mediaportal.com/attachments/how-to-build-an-ambilight-for-every-hdmi-input-source-techtalk-%E2%80%93-christian-moser-pdf.157962/" target="_blank">https://forum.team-mediaportal.com/attachments/how-to-build-an-ambilight-for-every-hdmi-input-source-techtalk-–-christian-moser-pdf.157962/</a></p><p></p><p>However recommend to use a different USB Video Grabber as this is known to work better:</p><p></p><p>EasyCap Video USB Grabber Fushicai UT007</p><p></p><p>That one for now is only supported on all recent versions of OpenElec, been using it for some time now and works without issues.</p><p></p><p>Some shops might not list it correctly so be careful, got mine here:</p><p></p><p><a href="http://www.insaneware.de/epages/61714203.sf/de_DE/?ObjectPath=/Shops/61714203/Products/usbgrab" target="_blank">http://www.insaneware.de/epages/61714203.sf/de_DE/?ObjectPath=/Shops/61714203/Products/usbgrab</a></p><p></p><p></p><p><span style="font-size: 18px"><span style="color: #ff0000"><strong>* IMPORTANT *</strong></span></span></p><p></p><p>When video capture is turned on you are limited to 50/60hz due to technical restrictions, a solution for this is to add a remote controlled power brick (KaKu for the dutch users) and put the HDMI->Composite converter in that.</p><p>Make sure you get an powered HDMI->Composite converter and not the passive one that is powered by the HDMI signal !</p><p></p><p>So if you want to use video capture just toggle it on via remote and leave it off when needing 24p playback.</p><p></p><p><strong><span style="font-size: 22px">Connection scheme</span></strong></p><p></p><p>The linked tutorials will have connection schemes as well however this will give you a general overview on how everything is connected for each solution.</p><p></p><p><u>Non-video capture solution WS2801 with Raspberry Pi only</u></p><p></p><p>LED data pins -> Raspberry Pi connectors</p><p>LED power pins -> 5v adapter-> <u><strong>only</strong></u> GND connected to Raspberry Pi as well (see tutorial)</p><p>Raspberry Pi -> network / power connection</p><p></p><p><u>Non-video capture solution WS2801 / WS2812 with Raspberry Pi and Arduino</u></p><p></p><p>LED data pins -> Arduino</p><p>LED power pins -> 5v adapter -> <u><strong>only</strong></u> GND connected to Arduino as well (see tutorial)</p><p>Arduino -> USB cable -> Raspberry Pi</p><p>Raspberry Pi -> network / power connection</p><p></p><p></p><p><u>Video capture solution WS2801 / WS2812 with Raspberry Pi and Arduino</u></p><p></p><p>LED data pins -> Arduino</p><p>LED power pins -> 5v adapter -> <u><strong>only</strong></u> GND connected to Arduino as well (see tutorial)</p><p>Arduino -> USB cable -> Raspberry Pi</p><p>Raspberry Pi -> USB connection to video capture stick</p><p>Raspberry Pi -> network / power connection</p><p></p><p></p><p>With all solutions there's no physical connection to your PC required as the Hyperion is either getting commands via your local network (TCP commands) and/or via video capture thru HDMI.</p><p></p><p><strong><span style="font-size: 22px">Initial setup</span></strong></p><p></p><p><span style="font-size: 15px"><strong><u>OpenElec 4.2 is the preferred Raspberry Pi distro for this guide.</u></strong></span></p><p><span style="font-size: 15px"><strong><u>OpenElec 5.0 release works as well but doesn't have any additional benefit for the Hyperion setup.</u></strong></span></p><p></p><p><span style="font-size: 15px"><strong>Step 1</strong></span></p><p></p><p>If you instead want to use other leds like WS2811/12 check the “Additional configuration” chapter and skip to Step 2 after completing the steps from that chapter.</p><p></p><p>First you need to make sure your LEDS are connected,could write an entirely new guide but there’s already a good one here:</p><p></p><p><a href="https://forum.team-mediaportal.com/attachments/how-to-build-your-own-ambilight-tv-with-raspberry-pi-and-xbmc-techtalk-%E2%80%93-christian-moser-pdf.157961/" target="_blank">https://forum.team-mediaportal.com/attachments/how-to-build-your-own-ambilight-tv-with-raspberry-pi-and-xbmc-techtalk-–-christian-moser-pdf.157961/</a></p><p></p><p>Skip the <strong>Software installation</strong> step 1-3 there as that is for Rasbmc and follow this short guide instead:</p><p></p><p><a href="http://raspberry-at-home.com/hyperion-on-openelec-it-works" target="_blank">http://raspberry-at-home.com/hyperion-on-openelec-it-works</a></p><p></p><p>or from the official guide:</p><p></p><p><a href="https://github.com/tvdzwan/hyperion/wiki/Installation-on-RPi-with-OpenELEC" target="_blank">https://github.com/tvdzwan/hyperion/wiki/Installation-on-RPi-with-OpenELEC</a></p><p></p><p>Create a Hyperion configuration if you haven't already by following these instructions:</p><p></p><p><a href="https://github.com/tvdzwan/hyperion/wiki/configuration" target="_blank">https://github.com/tvdzwan/hyperion/wiki/configuration</a></p><p></p><p><span style="font-size: 15px"><strong>Step 2</strong></span></p><p></p><p>If you don’t need the video capture solution skip to Step 3, otherwise best to follow this guide:</p><p></p><p><a href="https://forum.team-mediaportal.com/attachments/how-to-build-an-ambilight-for-every-hdmi-input-source-techtalk-%E2%80%93-christian-moser-pdf.157962/" target="_blank">https://forum.team-mediaportal.com/attachments/how-to-build-an-ambilight-for-every-hdmi-input-source-techtalk-–-christian-moser-pdf.157962/</a></p><p></p><p>Remember to get the EasyCap Video USB Grabber Fushicai UT007 and not the one mentioned there.</p><p></p><p><strong><span style="font-size: 15px">Step 3</span></strong></p><p></p><p><strong>Option 1 </strong>- Hostname setup (easier)</p><p></p><p>In AtmoLight 1.15 we added the ability to use the hostname or mDNS hostname of your Raspberry Pi device, the mDNS hostname means that locally your machine can always be reached without having to setup any static IP address or any router config.</p><p>On Windows it requires you to have Apple Bonjour installed:</p><p></p><p><a href="http://support.apple.com/kb/DL999" target="_blank">http://support.apple.com/kb/DL999</a></p><p></p><p><u><em>Make sure to disable any Apple software update junk during install as you don't need that if you're only using Bonjour, prevents you from getting update notifications which can be annoying on HTPC machines.</em></u></p><p></p><p>Your mDNS hostname is always formatted with your device hostname like this:</p><p></p><p><hostname>.local</p><p></p><p>For instance your mDNS hostname by default on OpenElec is called "Openelec.local" as its hostname is OpenElec, once the IP for the hostname changes AtmoLight will automatically resolve the new one.</p><p>See the below setup screenshot for an example AtmoLight config.</p><p></p><p><strong>Option 2</strong> - Static IP setup</p><p></p><p>Make sure you give your raspberry Pi a static IP address, the easiest way is to do it in the OpenElec XBMC interface (you can remove XBMC later on):</p><p></p><p><a href="http://wiki.openelec.tv/index.php/OpenELEC_Configuration_Addon#tab=Network" target="_blank">http://wiki.openelec.tv/index.php/OpenELEC_Configuration_Addon#tab=Network</a></p><p></p><p><strong><span style="font-size: 15px">Step 4</span></strong></p><p></p><p>Now that you’ve finished installing Hyperion and tested it to make sure it works you can install the latest version of AtmoLight plugin for Mediaportal:</p><p></p><p><u><strong>Install AtmoLight via Mediaportal Extension Manager (1.14.0.0 and up supports Hyperion)</strong></u></p><p></p><p>Afterwards start the Mediaportal Configuration application and setup Atmolight, select AtmoLight and press Config</p><p></p><p>[ATTACH=full]167862[/ATTACH]</p><p></p><p>Check Hyperion and open the Hyperion Tab</p><p></p><p>[ATTACH=full]167865[/ATTACH]</p><p></p><p>Change the IP address or hostname to match the one of your Raspberry Pi</p><p></p><p>[ATTACH=full]167864[/ATTACH]</p><p></p><p>Press save and when you start some media in Mediaportal your lights should turn on.</p><p></p><p><span style="font-size: 18px"><strong>Additional configuration</strong></span></p><p></p><p><span style="font-size: 12px"><strong><u>Only needed if you aren't using WS2801 leds</u></strong></span></p><p></p><p>By default only WS2801 (and few other older ones) are supported when you want to directly connect your leds to the Raspberry Pi.</p><p>However there’s a solution for that by using an Arduino as a go between, only connection needed between Raspberry Pi and Arduino is a USB cable.</p><p></p><p>You will need an Arduino Uno R3 or better (<u><strong>anything capable of > 115200 baud rate</strong></u>) and connect your leds to it, personally prefer the WS2812B leds but you can use all leds supported by the FastLed library:</p><p></p><p>• Adafruit's Neopixel - aka the WS2812B (also WS2811/WS2812, also supported in lo-speed mode) - a 3 wire addressable led chipset</p><p>• TM1809/4 - 3 wire chipset, cheaply available on aliexpress.com</p><p>• TM1803 - 3 wire chipset, sold by radio shack</p><p>• UCS1903 - another 3 wire led chipset, cheap</p><p>• GW6205 - another 3 wire led chipset</p><p>• LPD8806 - SPI based chpiset, very high speed</p><p>• WS2801 - SPI based chipset, cheap and widely available</p><p>• SM16716 - SPI based chipset</p><p>• APA102 - SPI based chipset</p><p>• P9813 - aka Cool Neon's Total Control Lighting</p><p>• DMX - send rgb data out over DMX using arduino DMX libraries</p><p>• SmartMatrix panels - needs the SmartMatrix library - <a href="https://github.com/pixelmatix/SmartMatrix" target="_blank">https://github.com/pixelmatix/SmartMatrix</a></p><p></p><p>Complete overview: <a href="https://github.com/FastLED/FastLED#supported-led-chipsets" target="_blank">https://github.com/FastLED/FastLED#supported-led-chipsets</a></p><p></p><p>There are a lot of guides out there but you can use this one to get started:</p><p></p><p><a href="http://www.tweaking4all.com/hardware/arduino/arduino-ws2812-led/" target="_blank">http://www.tweaking4all.com/hardware/arduino/arduino-ws2812-led/</a></p><p></p><p>Skip all the Arduino sketches there as we will need our own to make it work with Hyperion.</p><p></p><p>After you have connected your LEDS using that guide, you will need to follow these steps:</p><p></p><p>- Install Arduino IDE:</p><p></p><p><a href="http://arduino.cc/en/main/software" target="_blank">http://arduino.cc/en/main/software</a></p><p></p><p>- Download FastLed library:</p><p></p><p><a href="https://github.com/FastLED/FastLED/archive/master.zip" target="_blank">https://github.com/FastLED/FastLED/archive/master.zip</a></p><p></p><p>Extract FastSPI to your Arduino Library folder:</p><p></p><p>My Documents/Arduino/Libraries</p><p></p><p>- Import this sketch into Arduino IDE and change the settings to match your setup (led type / channels / color order etc..):</p><p></p><p><a href="http://pastebin.com/zhQCRFhd" target="_blank">http://pastebin.com/zhQCRFhd</a></p><p></p><p><span style="color: #ff0000">- In some cases it might be needed to increase the serial buffer size in the Arduino program files , if you experience any issues later on like flickering or non-responsive leds follow these steps:</span></p><p><span style="color: #ff0000"></span></p><p><span style="color: #ff0000"><a href="http://www.hobbytronics.co.uk/arduino-serial-buffer-size" target="_blank">http://www.hobbytronics.co.uk/arduino-serial-buffer-size</a></span></p><p></p><p>- Upload to your Arduino device and check to make sure they show color during first startup.</p><p>- Now for the tricky part, we need to do a few steps to make sure the baud rate is high enough to accommodate the data being send from the Raspberry Pi to your Arduino</p><p>- First we need to increase the default baud rate on your Raspberry:</p><p></p><p>- Connect your Raspberry Pi to a display and enable SSH:</p><p></p><p><a href="http://www.htpcbeginner.com/ssh-into-raspberry-pi-for-remote-administration/" target="_blank">http://www.htpcbeginner.com/ssh-into-raspberry-pi-for-remote-administration/</a></p><p></p><p>- Don't be scared of XBMC/Kodi, we don't need it once finished <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite2" alt=";)" title="Wink ;)" loading="lazy" data-shortname=";)" /></p><p>- SSH to your Raspberry Pi machine using the default login information:</p><p></p><p>[code]</p><p>Login: root</p><p>Password: openelec</p><p>[/code]</p><p></p><p>- Mount the boot partition read/write:</p><p></p><p>[CODE=WinBatch]mount -o remount,rw /flash[/CODE]</p><p></p><p>- Open boot config:</p><p></p><p>[CODE=WinBatch]nano -w /flash/config.txt[/CODE]</p><p></p><p>Add the following line at the end and be careful not to adjust anything else:</p><p></p><p>[CODE=WinBatch]#Increase UART speed</p><p>init_uart_clock=14745600[/CODE]</p><p></p><p>Press F2 to save and reboot your Raspberry.</p><p></p><p>- Now install Hyperion using this guide:</p><p></p><p><a href="http://raspberry-at-home.com/hyperion-on-openelec-it-works" target="_blank">http://raspberry-at-home.com/hyperion-on-openelec-it-works</a></p><p></p><p>or from the official guide:</p><p></p><p><a href="https://github.com/tvdzwan/hyperion/wiki/Installation-on-RPi-with-OpenELEC" target="_blank">https://github.com/tvdzwan/hyperion/wiki/Installation-on-RPi-with-OpenELEC</a></p><p></p><p>- Create an basis Hyperion config by following step 4 in the <strong>Software installation </strong>chapter here:</p><p></p><p><a href="https://forum.team-mediaportal.com/attachments/how-to-build-your-own-ambilight-tv-with-raspberry-pi-and-xbmc-techtalk-%E2%80%93-christian-moser-pdf.157961/" target="_blank">https://forum.team-mediaportal.com/attachments/how-to-build-your-own-ambilight-tv-with-raspberry-pi-and-xbmc-techtalk-–-christian-moser-pdf.157961/</a></p><p></p><p>or from the official guide:</p><p></p><p><a href="https://github.com/tvdzwan/hyperion/wiki/configuration" target="_blank">https://github.com/tvdzwan/hyperion/wiki/configuration</a></p><p></p><p>- Now that we have setup your Raspberry correctly we need to do the same in your Hyperion configuration file, you can open this file with your favorite editor:</p><p></p><p>\\openelec\Configfiles\hyperion.config.json</p><p>Or:</p><p>\\<Raspberry IP address>\Configfiles\hyperion.config.json</p><p></p><p>[ATTACH=full]169572[/ATTACH]</p><p></p><p>Change the following lines in hyperion.config.json so that it looks like this:</p><p></p><p>[CODE=WinBatch]"name" : "MyPi",</p><p>"type" : "adalight",</p><p>"output" : "/dev/ttyACM0",</p><p>"rate" : 460800,</p><p>"colorOrder" : "grb"[/CODE]</p><p></p><p></p><p>- Your colorOrder might differ so best to change that if needed (grb was default for WS2812B).</p><p>- / dev/ttyACM0 was the default for mine but if it isn’t working double check by connecting via SSH and running the command:</p><p></p><p>[CODE=WinBatch]lsusb[/CODE]</p><p></p><p>this will list all usb connected devices, your Arduino should be listed there.</p><p>If so run the following command:</p><p></p><p>[CODE=WinBatch]ls /dev[/CODE]</p><p></p><p>this will list all devices on your Raspberry, it will list /dev/tty devices and one of those should be your Arduino.</p><p></p><p>- Optionally you can disable XBMC completely, for KODI (Openelec 5.0 and up) this is slightly differently so added both examples below.</p><p></p><p>Connect via SSH to your Raspberry Pi and execute the following command:</p><p></p><p>[code]nano -w /storage/.config/autostart.sh[/code]</p><p></p><p><strong>XBMC - OpenElec 4.0</strong></p><p></p><p>Add the follow line to the end:</p><p></p><p>[code]systemctl stop xbmc[/code]</p><p></p><p><strong>KODI - OpenElec 5.0 and up</strong></p><p></p><p>Add the follow line to the end:</p><p></p><p>[code]systemctl stop kodi[/code]</p><p></p><p>press F2 and select press Y to save afterwards, now if you reboot OpenElec it should automatically stop the XBMC / Kodi service.</p><p></p><p>- Now connect your Arduino to your Raspberry and restart Hyperion if needed</p><p>- You can now use your LEDS with Hyperion!</p><p></p><p><strong>For troubleshooting there are some pointers at the bottom of this post, buffer size issue seems common but fixable.</strong></p><p></p><p><span style="font-size: 18px"><strong>Credits</strong></span></p><p><span style="font-size: 18px"></span></p><p><span style="font-size: 12px"><strong>Hyperion: </strong><a href="https://github.com/tvdzwan/hyperion" target="_blank">https://github.com/tvdzwan/hyperion</a></span></p><p><span style="font-size: 12px"><strong>LED / DIY guide</strong>: <a href="http://www.tweaking4all.com" target="_blank">http://www.tweaking4all.com</a></span></p><p><span style="font-size: 12px"><strong>Hyperion / live capture guide</strong>: <a href="http://techtalk.christian-moser.ch" target="_blank">http://techtalk.christian-moser.ch</a></span></p><p><span style="font-size: 12px"><strong>Arduino buffer size fix</strong> : <a href="http://www.hobbytronics.co.uk" target="_blank">http://www.hobbytronics.co.uk</a></span></p><p><span style="font-size: 12px"><strong>OpenElec instructions: </strong><a href="http://raspberry-at-home.com" target="_blank">http://raspberry-at-home.com</a></span></p><p></p><p><strong><span style="font-size: 18px">Extras</span></strong></p><p></p><p><u><strong>Shopping list (Dutch users) for the non-video capture solution in combination with WS2812B</strong></u></p><p></p><p><strong> LEDS - 60 per meter - Including resistor and power connector</strong></p><p><a href="http://www.kiwi-electronics.nl/digitale-rgb-ledstrip-ws2812b-60-led-1m?search=Digitale%20RGB%20Ledstrip%20WS2812B" target="_blank">http://www.kiwi-electroni...0RGB%20Ledstrip%20WS2812B</a></p><p></p><p><strong>Arduino</strong></p><p><a href="http://www.kiwi-electronics.nl/arduino-uno-rev3-atmega328?search=Arduino%20Uno%20Rev3" target="_blank">http://www.kiwi-electroni...arch=Arduino%20Uno%20Rev3</a></p><p></p><p><strong>Raspberry Pi</strong></p><p><a href="http://www.kiwi-electronics.nl/raspberry-pi-model-b-plus-512mb?search=raspberry" target="_blank">http://www.kiwi-electroni...us-512mb?search=raspberry</a></p><p></p><p><strong> Power supply</strong></p><p><a href="http://www.kiwi-electronics.nl/Power-Adapter-5V-7A-DC-35-Watt-100-240-AC-EU-kabel?search=5v" target="_blank">http://www.kiwi-electroni...240-AC-EU-kabel?search=5v</a></p><p></p><p><strong> Cables to connect corners</strong></p><p><a href="http://www.kiwi-electronics.nl/3-weg-jst-sm-female-connector-met-kabel?search=JST-SM-3PF-BK" target="_blank">http://www.kiwi-electroni...abel?search=JST-SM-3PF-BK</a></p><p><a href="http://www.kiwi-electronics.nl/3-weg-jst-sm-male-connector-met-kabel?search=JST-SM-3PM-BK" target="_blank">http://www.kiwi-electroni...abel?search=JST-SM-3PM-BK</a></p><p></p><p><strong>Extra Cables</strong></p><p>- Arduino cables for connection from led strips to Arduino</p><p>- USB cable Arduino to Raspberry Pi</p><p>- Cable tray 10x15mm - 1 meter (Gamma) for installing leds onto</p><p></p><p><strong><span style="font-size: 18px">Tips & Troubleshooting</span></strong></p><p></p><p><span style="font-size: 18px"><span style="font-size: 12px">- When soldering WS2811/12 leds be careful as to not damage the closest leds, using a low powered soldering iron is recommended.</span></span></p><p></p><p><span style="font-size: 18px"><span style="font-size: 12px">- When using WS2811/12 leds make sure to add an resistor between the led data line and rPI data connector, optionally you can add an 1000uF capacitor between the 5V led line and the 5V power supply.</span></span></p><p></p><p><span style="font-size: 18px"><span style="font-size: 12px">- When debugging Hyperion you can also use the Android app to control the lights, this allows for easy calibration and color testing.</span></span></p><p></p><p><span style="font-size: 18px"><span style="font-size: 12px">- When testing configuration changes in AtmoLight you can <strong>temporarily</strong> enable the "Live reconnect" option in its AtmoLight configuration.</span></span></p><p><span style="font-size: 18px"><span style="font-size: 12px">You can then restart Hyperion and see the changes apply directly to adjust where needed.</span></span></p><p></p><p><span style="font-size: 12px">- It's recommended to have both your Mediaportal machine and the Raspberry Pi on a cabled network, WiFi might work as well but considering it can be unpredictable when it comes to throughput and lag you might not get the best results.</span></p><p></p><p><span style="font-size: 12px">- If your HDMI to component converter still remains powered even when the remote controlled power brick is turned off you most likely suffer from some interference nearby (or ghosts..), in this case use an dedicated plug box for all your video capture devices (including rPI) as that solved it in my case.</span></p><p></p><p><span style="font-size: 12px">- Depending on the led count you might experience power loss issues somewhere along the strip (i.e. some leds near the end not going full white), an easy fix for this is to wire the power at both the beginning and end of the led strip so that it can "reach" every led.</span></p><p><span style="font-size: 12px">Also could be related to underpowered power supply but when using >200 WS2812B @ 5V 7A led this fixed it</span></p><p></p><p><span style="font-size: 12px">- In some cases it might be needed to increase the serial buffer size in the Arduino program files , if you experience any issues like flickering or non-responsive leds with WS2811 / WS2812 follow these steps:</span></p><p><span style="font-size: 12px"></span></p><p><span style="font-size: 12px"><a href="http://www.hobbytronics.co.uk/arduino-serial-buffer-size" target="_blank">http://www.hobbytronics.co.uk/arduino-serial-buffer-size</a></span></p><p></p><p><span style="font-size: 12px"><strong>* Tested with Arduino 1.0.6 *</strong></span></p><p></p><p><span style="font-size: 12px">- Problems with flickering? </span></p><p><span style="font-size: 12px">Try lower the smoothing frequency and lower the framegrabber frequency in your Hyperion configuration.</span></p><p><span style="font-size: 12px"></span></p><p></p><p><span style="font-size: 18px"><span style="font-size: 12px"><span style="font-size: 15px"><strong>// In case any of the linked guides are down there are PDF files attached to this post.</strong></span></span></span></p><p><span style="font-size: 18px"><span style="font-size: 12px"><span style="font-size: 15px"><strong>// Also included a few sample Hyperion configs for inspiration, the WS2812B configuration was used in the videos.</strong></span></span></span></p></blockquote><p></p>
[QUOTE="Rick164, post: 1111633, member: 17766"] [SIZE=5][B]Introduction[/B][/SIZE] Over time there have been many Windows alternatives to Atmowin and under Linux there is Bobilight however there is now another good all in one alternative that is networked like boblight but also works with Windows/Linux and is called [B]Hyperion[/B]. Windows and Linux support is supplied by their respected plugins (AtmoLight in our case) however the Raspberry Pi can't run the Kodi plugin for it (yet) Hyperion also allows for video capture methods so that you can use it for every HDMI input source be it a console or set top box. AtmoLight now supports Hyperion as well so [U]no video capture hardware is required[/U] for that setup as it sends your video image directly to Hyperion over network. It does require some Linux / Raspberry Pi knowledge like connecting via SSH (Putty) but other than that it's easy to understand. [SIZE=6][B]Features[/B][/SIZE] - Ambilight for every HDMI source! - Cross platform - Android app to control LEDS - Fast and accurate color measurements - Tons of configuration options - Supports Arduino (Adalight) to allow for broad use of led chips [SIZE=6][B]Requirements[/B][/SIZE] [U][B]For basic setup[/B][/U] - Raspberry Pi B+ (other models will probably work just as fine) [ATTACH=full]167859[/ATTACH] - Leds - WS2801 is the most common however recommend the WS2812B ones as they offer more leds per meter and is a bit better. For WS2811/12 support you do need extra hardware and there is more info in the chapter “Additional configuration”. [ATTACH=full]167860[/ATTACH] - 5V 5A power supply or higher [ATTACH=full]167861[/ATTACH] [U]5V 7A was used to make the videos and drives 218 leds just fine.[/U] - Optionally: Rails to attach to TV, used one sided curved plastic rails to allow for adjusting the direction. One sided sticky Velcro to attach leds and rails, get the good ones and apply alcohol on contact points to allows for best adhesion [U][B]For video capture setup[/B][/U] Recommend following this guide which describes all the components and how to use them: [URL]https://forum.team-mediaportal.com/attachments/how-to-build-an-ambilight-for-every-hdmi-input-source-techtalk-%E2%80%93-christian-moser-pdf.157962/[/URL] However recommend to use a different USB Video Grabber as this is known to work better: EasyCap Video USB Grabber Fushicai UT007 That one for now is only supported on all recent versions of OpenElec, been using it for some time now and works without issues. Some shops might not list it correctly so be careful, got mine here: [URL]http://www.insaneware.de/epages/61714203.sf/de_DE/?ObjectPath=/Shops/61714203/Products/usbgrab[/URL] [SIZE=5][COLOR=#ff0000][B]* IMPORTANT *[/B][/COLOR][/SIZE] When video capture is turned on you are limited to 50/60hz due to technical restrictions, a solution for this is to add a remote controlled power brick (KaKu for the dutch users) and put the HDMI->Composite converter in that. Make sure you get an powered HDMI->Composite converter and not the passive one that is powered by the HDMI signal ! So if you want to use video capture just toggle it on via remote and leave it off when needing 24p playback. [B][SIZE=6]Connection scheme[/SIZE][/B] The linked tutorials will have connection schemes as well however this will give you a general overview on how everything is connected for each solution. [U]Non-video capture solution WS2801 with Raspberry Pi only[/U] LED data pins -> Raspberry Pi connectors LED power pins -> 5v adapter-> [U][B]only[/B][/U] GND connected to Raspberry Pi as well (see tutorial) Raspberry Pi -> network / power connection [U]Non-video capture solution WS2801 / WS2812 with Raspberry Pi and Arduino[/U] LED data pins -> Arduino LED power pins -> 5v adapter -> [U][B]only[/B][/U] GND connected to Arduino as well (see tutorial) Arduino -> USB cable -> Raspberry Pi Raspberry Pi -> network / power connection [U]Video capture solution WS2801 / WS2812 with Raspberry Pi and Arduino[/U] LED data pins -> Arduino LED power pins -> 5v adapter -> [U][B]only[/B][/U] GND connected to Arduino as well (see tutorial) Arduino -> USB cable -> Raspberry Pi Raspberry Pi -> USB connection to video capture stick Raspberry Pi -> network / power connection With all solutions there's no physical connection to your PC required as the Hyperion is either getting commands via your local network (TCP commands) and/or via video capture thru HDMI. [B][SIZE=6]Initial setup[/SIZE][/B] [SIZE=4][B][U]OpenElec 4.2 is the preferred Raspberry Pi distro for this guide.[/U][/B] [B][U]OpenElec 5.0 release works as well but doesn't have any additional benefit for the Hyperion setup.[/U][/B][/SIZE] [SIZE=4][B]Step 1[/B][/SIZE] If you instead want to use other leds like WS2811/12 check the “Additional configuration” chapter and skip to Step 2 after completing the steps from that chapter. First you need to make sure your LEDS are connected,could write an entirely new guide but there’s already a good one here: [URL]https://forum.team-mediaportal.com/attachments/how-to-build-your-own-ambilight-tv-with-raspberry-pi-and-xbmc-techtalk-%E2%80%93-christian-moser-pdf.157961/[/URL] Skip the [B]Software installation[/B] step 1-3 there as that is for Rasbmc and follow this short guide instead: [URL]http://raspberry-at-home.com/hyperion-on-openelec-it-works[/URL] or from the official guide: [URL]https://github.com/tvdzwan/hyperion/wiki/Installation-on-RPi-with-OpenELEC[/URL] Create a Hyperion configuration if you haven't already by following these instructions: [URL]https://github.com/tvdzwan/hyperion/wiki/configuration[/URL] [SIZE=4][B]Step 2[/B][/SIZE] If you don’t need the video capture solution skip to Step 3, otherwise best to follow this guide: [URL]https://forum.team-mediaportal.com/attachments/how-to-build-an-ambilight-for-every-hdmi-input-source-techtalk-%E2%80%93-christian-moser-pdf.157962/[/URL] Remember to get the EasyCap Video USB Grabber Fushicai UT007 and not the one mentioned there. [B][SIZE=4]Step 3[/SIZE][/B] [B]Option 1 [/B]- Hostname setup (easier) In AtmoLight 1.15 we added the ability to use the hostname or mDNS hostname of your Raspberry Pi device, the mDNS hostname means that locally your machine can always be reached without having to setup any static IP address or any router config. On Windows it requires you to have Apple Bonjour installed: [URL]http://support.apple.com/kb/DL999[/URL] [U][I]Make sure to disable any Apple software update junk during install as you don't need that if you're only using Bonjour, prevents you from getting update notifications which can be annoying on HTPC machines.[/I][/U] Your mDNS hostname is always formatted with your device hostname like this: <hostname>.local For instance your mDNS hostname by default on OpenElec is called "Openelec.local" as its hostname is OpenElec, once the IP for the hostname changes AtmoLight will automatically resolve the new one. See the below setup screenshot for an example AtmoLight config. [B]Option 2[/B] - Static IP setup Make sure you give your raspberry Pi a static IP address, the easiest way is to do it in the OpenElec XBMC interface (you can remove XBMC later on): [URL]http://wiki.openelec.tv/index.php/OpenELEC_Configuration_Addon#tab=Network[/URL] [B][SIZE=4]Step 4[/SIZE][/B] Now that you’ve finished installing Hyperion and tested it to make sure it works you can install the latest version of AtmoLight plugin for Mediaportal: [U][B]Install AtmoLight via Mediaportal Extension Manager (1.14.0.0 and up supports Hyperion)[/B][/U] Afterwards start the Mediaportal Configuration application and setup Atmolight, select AtmoLight and press Config [ATTACH=full]167862[/ATTACH] Check Hyperion and open the Hyperion Tab [ATTACH=full]167865[/ATTACH] Change the IP address or hostname to match the one of your Raspberry Pi [ATTACH=full]167864[/ATTACH] Press save and when you start some media in Mediaportal your lights should turn on. [SIZE=5][B]Additional configuration[/B][/SIZE] [SIZE=3][B][U]Only needed if you aren't using WS2801 leds[/U][/B][/SIZE] By default only WS2801 (and few other older ones) are supported when you want to directly connect your leds to the Raspberry Pi. However there’s a solution for that by using an Arduino as a go between, only connection needed between Raspberry Pi and Arduino is a USB cable. You will need an Arduino Uno R3 or better ([U][B]anything capable of > 115200 baud rate[/B][/U]) and connect your leds to it, personally prefer the WS2812B leds but you can use all leds supported by the FastLed library: • Adafruit's Neopixel - aka the WS2812B (also WS2811/WS2812, also supported in lo-speed mode) - a 3 wire addressable led chipset • TM1809/4 - 3 wire chipset, cheaply available on aliexpress.com • TM1803 - 3 wire chipset, sold by radio shack • UCS1903 - another 3 wire led chipset, cheap • GW6205 - another 3 wire led chipset • LPD8806 - SPI based chpiset, very high speed • WS2801 - SPI based chipset, cheap and widely available • SM16716 - SPI based chipset • APA102 - SPI based chipset • P9813 - aka Cool Neon's Total Control Lighting • DMX - send rgb data out over DMX using arduino DMX libraries • SmartMatrix panels - needs the SmartMatrix library - [URL]https://github.com/pixelmatix/SmartMatrix[/URL] Complete overview: [URL]https://github.com/FastLED/FastLED#supported-led-chipsets[/URL] There are a lot of guides out there but you can use this one to get started: [URL]http://www.tweaking4all.com/hardware/arduino/arduino-ws2812-led/[/URL] Skip all the Arduino sketches there as we will need our own to make it work with Hyperion. After you have connected your LEDS using that guide, you will need to follow these steps: - Install Arduino IDE: [URL]http://arduino.cc/en/main/software[/URL] - Download FastLed library: [URL]https://github.com/FastLED/FastLED/archive/master.zip[/URL] Extract FastSPI to your Arduino Library folder: My Documents/Arduino/Libraries - Import this sketch into Arduino IDE and change the settings to match your setup (led type / channels / color order etc..): [URL]http://pastebin.com/zhQCRFhd[/URL] [COLOR=#ff0000]- In some cases it might be needed to increase the serial buffer size in the Arduino program files , if you experience any issues later on like flickering or non-responsive leds follow these steps: [URL]http://www.hobbytronics.co.uk/arduino-serial-buffer-size[/URL][/COLOR] - Upload to your Arduino device and check to make sure they show color during first startup. - Now for the tricky part, we need to do a few steps to make sure the baud rate is high enough to accommodate the data being send from the Raspberry Pi to your Arduino - First we need to increase the default baud rate on your Raspberry: - Connect your Raspberry Pi to a display and enable SSH: [URL]http://www.htpcbeginner.com/ssh-into-raspberry-pi-for-remote-administration/[/URL] - Don't be scared of XBMC/Kodi, we don't need it once finished ;) - SSH to your Raspberry Pi machine using the default login information: [code] Login: root Password: openelec [/code] - Mount the boot partition read/write: [CODE=WinBatch]mount -o remount,rw /flash[/CODE] - Open boot config: [CODE=WinBatch]nano -w /flash/config.txt[/CODE] Add the following line at the end and be careful not to adjust anything else: [CODE=WinBatch]#Increase UART speed init_uart_clock=14745600[/CODE] Press F2 to save and reboot your Raspberry. - Now install Hyperion using this guide: [URL]http://raspberry-at-home.com/hyperion-on-openelec-it-works[/URL] or from the official guide: [URL]https://github.com/tvdzwan/hyperion/wiki/Installation-on-RPi-with-OpenELEC[/URL] - Create an basis Hyperion config by following step 4 in the [B]Software installation [/B]chapter here: [URL]https://forum.team-mediaportal.com/attachments/how-to-build-your-own-ambilight-tv-with-raspberry-pi-and-xbmc-techtalk-%E2%80%93-christian-moser-pdf.157961/[/URL] or from the official guide: [URL]https://github.com/tvdzwan/hyperion/wiki/configuration[/URL] - Now that we have setup your Raspberry correctly we need to do the same in your Hyperion configuration file, you can open this file with your favorite editor: \\openelec\Configfiles\hyperion.config.json Or: \\<Raspberry IP address>\Configfiles\hyperion.config.json [ATTACH=full]169572[/ATTACH] Change the following lines in hyperion.config.json so that it looks like this: [CODE=WinBatch]"name" : "MyPi", "type" : "adalight", "output" : "/dev/ttyACM0", "rate" : 460800, "colorOrder" : "grb"[/CODE] - Your colorOrder might differ so best to change that if needed (grb was default for WS2812B). - / dev/ttyACM0 was the default for mine but if it isn’t working double check by connecting via SSH and running the command: [CODE=WinBatch]lsusb[/CODE] this will list all usb connected devices, your Arduino should be listed there. If so run the following command: [CODE=WinBatch]ls /dev[/CODE] this will list all devices on your Raspberry, it will list /dev/tty devices and one of those should be your Arduino. - Optionally you can disable XBMC completely, for KODI (Openelec 5.0 and up) this is slightly differently so added both examples below. Connect via SSH to your Raspberry Pi and execute the following command: [code]nano -w /storage/.config/autostart.sh[/code] [B]XBMC - OpenElec 4.0[/B] Add the follow line to the end: [code]systemctl stop xbmc[/code] [B]KODI - OpenElec 5.0 and up[/B] Add the follow line to the end: [code]systemctl stop kodi[/code] press F2 and select press Y to save afterwards, now if you reboot OpenElec it should automatically stop the XBMC / Kodi service. - Now connect your Arduino to your Raspberry and restart Hyperion if needed - You can now use your LEDS with Hyperion! [B]For troubleshooting there are some pointers at the bottom of this post, buffer size issue seems common but fixable.[/B] [SIZE=5][B]Credits[/B] [/SIZE] [SIZE=3][B]Hyperion: [/B][URL]https://github.com/tvdzwan/hyperion[/URL] [B]LED / DIY guide[/B]: [URL]http://www.tweaking4all.com[/URL] [B]Hyperion / live capture guide[/B]: [URL]http://techtalk.christian-moser.ch[/URL] [B]Arduino buffer size fix[/B] : [URL]http://www.hobbytronics.co.uk[/URL] [B]OpenElec instructions: [/B][URL]http://raspberry-at-home.com[/URL][/SIZE] [B][SIZE=5]Extras[/SIZE][/B] [U][B]Shopping list (Dutch users) for the non-video capture solution in combination with WS2812B[/B][/U] [B] LEDS - 60 per meter - Including resistor and power connector[/B] [URL='http://www.kiwi-electronics.nl/digitale-rgb-ledstrip-ws2812b-60-led-1m?search=Digitale%20RGB%20Ledstrip%20WS2812B']http://www.kiwi-electroni...0RGB%20Ledstrip%20WS2812B[/URL] [B]Arduino[/B] [URL='http://www.kiwi-electronics.nl/arduino-uno-rev3-atmega328?search=Arduino%20Uno%20Rev3']http://www.kiwi-electroni...arch=Arduino%20Uno%20Rev3[/URL] [B]Raspberry Pi[/B] [URL='http://www.kiwi-electronics.nl/raspberry-pi-model-b-plus-512mb?search=raspberry']http://www.kiwi-electroni...us-512mb?search=raspberry[/URL] [B] Power supply[/B] [URL='http://www.kiwi-electronics.nl/Power-Adapter-5V-7A-DC-35-Watt-100-240-AC-EU-kabel?search=5v']http://www.kiwi-electroni...240-AC-EU-kabel?search=5v[/URL] [B] Cables to connect corners[/B] [URL='http://www.kiwi-electronics.nl/3-weg-jst-sm-female-connector-met-kabel?search=JST-SM-3PF-BK']http://www.kiwi-electroni...abel?search=JST-SM-3PF-BK[/URL] [URL='http://www.kiwi-electronics.nl/3-weg-jst-sm-male-connector-met-kabel?search=JST-SM-3PM-BK']http://www.kiwi-electroni...abel?search=JST-SM-3PM-BK[/URL] [B]Extra Cables[/B] - Arduino cables for connection from led strips to Arduino - USB cable Arduino to Raspberry Pi - Cable tray 10x15mm - 1 meter (Gamma) for installing leds onto [B][SIZE=5]Tips & Troubleshooting[/SIZE][/B] [SIZE=5][SIZE=3]- When soldering WS2811/12 leds be careful as to not damage the closest leds, using a low powered soldering iron is recommended.[/SIZE][/SIZE] [SIZE=5][SIZE=3]- When using WS2811/12 leds make sure to add an resistor between the led data line and rPI data connector, optionally you can add an 1000uF capacitor between the 5V led line and the 5V power supply.[/SIZE][/SIZE] [SIZE=5][SIZE=3]- When debugging Hyperion you can also use the Android app to control the lights, this allows for easy calibration and color testing.[/SIZE][/SIZE] [SIZE=5][SIZE=3]- When testing configuration changes in AtmoLight you can [B]temporarily[/B] enable the "Live reconnect" option in its AtmoLight configuration.[/SIZE][/SIZE] [SIZE=5][SIZE=3]You can then restart Hyperion and see the changes apply directly to adjust where needed.[/SIZE][/SIZE] [SIZE=3]- It's recommended to have both your Mediaportal machine and the Raspberry Pi on a cabled network, WiFi might work as well but considering it can be unpredictable when it comes to throughput and lag you might not get the best results.[/SIZE] [SIZE=3]- If your HDMI to component converter still remains powered even when the remote controlled power brick is turned off you most likely suffer from some interference nearby (or ghosts..), in this case use an dedicated plug box for all your video capture devices (including rPI) as that solved it in my case.[/SIZE] [SIZE=3]- Depending on the led count you might experience power loss issues somewhere along the strip (i.e. some leds near the end not going full white), an easy fix for this is to wire the power at both the beginning and end of the led strip so that it can "reach" every led. Also could be related to underpowered power supply but when using >200 WS2812B @ 5V 7A led this fixed it[/SIZE] [SIZE=3]- In some cases it might be needed to increase the serial buffer size in the Arduino program files , if you experience any issues like flickering or non-responsive leds with WS2811 / WS2812 follow these steps: [URL]http://www.hobbytronics.co.uk/arduino-serial-buffer-size[/URL][/SIZE] [SIZE=3][B]* Tested with Arduino 1.0.6 *[/B][/SIZE] [SIZE=3]- Problems with flickering? Try lower the smoothing frequency and lower the framegrabber frequency in your Hyperion configuration. [/SIZE] [SIZE=5][SIZE=3][SIZE=4][B]// In case any of the linked guides are down there are PDF files attached to this post.[/B][/SIZE][/SIZE][/SIZE] [SIZE=5][SIZE=3][SIZE=4][B]// Also included a few sample Hyperion configs for inspiration, the WS2812B configuration was used in the videos.[/B][/SIZE][/SIZE][/SIZE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
HTPC Projects
Hardware
Ambient Lighting System
[DIY] User Showcases
[DIY] Amblight project/guide - Hyperion - WS2801/ WS2812B / APA102
Contact us
RSS
Top
Bottom