Introduction: How to Set Up OSMC With Hyperion on Raspberry Pi With WS2812b Led Strip

Picture of How to Set Up OSMC With Hyperion on Raspberry Pi With WS2812b Led Strip

Sometimes i english very well, sometimes no...

First things first. This is my first instructable and english isn't my native language, so please, don't be too hard on me. This will be not about how to build the frame, that's easy. It's about installing OSMC on RPi and mainly how to get Hyperion working . And pics, i've made lots of notes on them. Follow those and you'll be fine.

For starters, what is OSMC, Hyperion, etc.

"OSMC (Open Source Media Center) is a free and open source media player based on Linux and founded in 2014 that lets you play back media from your local network, attached storage and the Internet. OSMC is the leading media center in terms of feature set and community and is based on the Kodi project."

That's what their web says. Basicaly it's an succesor of XBMC.

I'm using Raspberry Pi ver.B for it, which is a small ARM based computer. It has not enough power to render websites, because it has no accelerated graphic. But it can render full hd movies, because of hardware video decoding. You can read more here.

Hyperion is an Abilight clone, similar to Boblight. It captures colors on tthe edge of picture and projects it on wall behind tv. You can see that on my pics.

Step 1: Gathering Stuff - What Do You Need?

Picture of Gathering Stuff - What Do You Need?

So let's buy some stuff:

Raspberry Pi - i'm using model B and B+,i also have RasPi 2, but there are some known issues, so i stick with this older ones (and less powerfull), until they found solutions for those problems

SD Card - i recommend 16GB class 10. The faster the better. System speed depends on how fast it can read/write on that card,because RasPi has no own storrage, the OS and all data is on that card. Here's a list: http://elinux.org/RPi_SD_cards I'm using SanDisk and Kingston cards.

WS2812b led strip - this is a led strip with independently addressable led chips. Mine has one chip for every 16mm of strip. This is a digitaly controlled led strip, DON'T USE analog ones, it wont work. Use this specific type and everything will be easy. Those are similar to mine, look for WS2812b: http://www.ebay.com/sch/sis.html?_nkw=5V+WS2812B+...

5V Power Suply - i had a spare industrial 5V 20A (type S-100F-5), i think 5A would be enought. It's stable and that's what we need, since we are going to use it as RasPi power suply as well.

Logic Level Converter - we could make one, but they are cheap.We need 5V logic signal to controll the led strip, but RasPi has only 3,3V output on GPIO and we don't want to damage it. http://www.ebay.com/sch/sis.html?_nkw=2PCS+IIC+I2...

And: 300Ohm resistor, USB micro B male connector (scavenged mine out of an cable i din't needed), wires, soldering tools.

As i wrote, this is not about the frame, but i will write down some advices, measurements, etc.

And finaly, software:
SD Formater https://www.sdcard.org/downloads/formatter_4/
OSMC Installer https://osmc.tv/download/windows/
PuTTY https://osmc.tv/download/windows/
WinSCP https://winscp.net/eng/download.php
HyperCon https://github.com/tvdzwan/hyperion/wiki/configura...

Step 2: Installing OSMC on SD Card

Picture of Installing OSMC on SD Card

If you have OSMC installed, you can skip this and the next part. But clean start is better.

For sure let's start with formating our SD card with SD Formater. Once done start OSMC installer.
If you cicle throu images you can see every step of installation with notes. First part is on PC, once done, instert the card into RasPi then we go thru the rest of installation of OSMC.More info on pics.

EDIT 29.11.2015: OSMC update 2015.11-1 does not work with Hyperion properly. Instal 2015.10-1 instead.

EDIT 10.12.2015: There is spidev0.0 missing in 2015.11. Will be fixed in next update.

Step 3: Installation on RasPi

Picture of Installation on RasPi

Plug the card into RasPi, power it up and follow the steps. It's simple, you wont need this part if you can read. But just to be sure look at those pictures i've added. You can controll RasPi wit keyboard, or with TVs remote if it supports Anynet+.

Step 4: Wiring

Picture of Wiring

We are going to do the wiring after installation of OSMC because you can do that with phone charger or original RasPi PSU (Power Suply Unit). But sure, you can do the wiring and frame, then the installation of OSMC.

WARNING! BE SURE YOUR CHOSEN PSU IS STABLE AT 5V EXACTLY, NOT MORE, SO YOU AVOID DAMAGE TO YOUR RASPI.

As i wrote before, my is an industrial 5V 20A PSU. That's way more as i needed.

Look on the pictures for wiring details. But remember to keep the wires from RasPi to LED strip short. I had them about 20cm and they caused leds to flicker.

Tip for the frame:
I calculated the frame so it hides behind the tv and the leds bend on those cuting marks in the corners. Whole frame is made of aluminium, screwed together and mounted on those screw holes for wall mounting.

Step 5: Time to Install Hyperion

We need to install PuTTY on Windows. It's a way to remote access terminal on OSMC. We need to know RasPis IP address, name and password. You can find it in OSMCs.system info

Start PuTTY. In host name put the IP address an press OPEN. You can also save the connection for future use.

Now enter these commands into PuTTYs terminal:

We need to update and upgrade the system:

sudo apt-get update
sudo apt-get upgrade

Now install the neded libraries:

sudo apt-get install libqtcore4 libqtgui4 libqt4-network libusb-1.0-0 ca-certificates  

Deployment of Hyperion:

wget -N https://raw.github.com/tvdzwan/hyperion/master/bin/install_hyperion.sh
sudo sh ./install_hyperion.sh

Does Hyperion run already?

sudo /etc/init.d/hyperion status

If everything goes well you should get "running" status.

Acces rights to Hyperions config folder neeet to be changed, so we can upload our config file into it.

sudo chmod +x /opt/hyperion/config

It wont work without correct config file, so let's learn how to create one in next step.

Step 6: Hyperion Configuration Tool

Picture of Hyperion Configuration Tool

For our purspose we use HyperCon.jar, not the SSH version. It responds faster to changes done and we dont need the LED remote controll and grabber settings. It's slightly outdated, theres no WS2812b setting, so we need to alter the config manualy after upload to RasPi. Also try different settings for frame grabbers interval and smoothing.

Everything neded is noted on pictures, just some info on those two:

Interval - determines how often grabber updates color that is then send to leds.

Smoothing - smoothes the transition between colours of leds. I think this time should be shorter than interval.

After you are done press Create button and save the config somewhere where you can find it.

Step 7: Almost There

Now install WinSCP and open it. Create new place with SFPT protocol. Host will be RasPis IP address, same as for PuTTY. Same login and password as well. Save the connnection, so you dont need to do this again. Connect and find Hyperions config in /opt/hyperion/config/. Replace original with your hyperion.conf.json file. If there's a permission problem, run the chmod command again. Open it on RasPi in WinSCP and replace this:

"device" :
    {
        "name"       : "MyPi",
        "type"       : "adalight",
        "output"     : "/dev/spidev0.0",
        "rate"       : 250000,
        "colorOrder" : "rgb"
    },

with this to change led controll from SPI to dirrect GPIO controll:

"device" :
    {
        "name"       : "MyPi",
        "type"       : "ws2812b",
        "colorOrder" : "rgb"
    },

It's at begin of the file, so you wont need to search for it. Let's see if we done everything right. Enter this command to PuTTY, we need to restart Hyperion service so he loads new config file:

sudo /etc/init.d/hyperion restart

On PuTTY you should see hyperion running status - OK, and led should do whatever you have set as bootsequence.
In my case rainbowswirl. If not, somethings wrong. Either hyperion is not running (status was not OK), or more likely is a bad config. Check it again.

Step 8: Bonus

Congrats, you've done it.

And as a bonus download and install Hyperion Free ap from Google Play, so you can controll the leds remote from your phone. Only thin you need is RasPis IP address, again.

I suggest setting static IP to RasPi. I've locked mine against its MAC address on router. Everytime i connect this specific RasPi i obtains same IP address and i dont have to replace it in all those apps.

I hope i didn't forget something...

Le FIN and enjoy movies with this wonderfull lightbar.

Comments

YaroslavK6 (author)2017-06-08

hi! is led and RasPi work fine from one power source?

BartD33 (author)2016-12-29

Thanks for the usefull guide, made it work thanks to this guide.

MaikM5 (author)2016-05-22

Hey,

got some problems with my logic level converter. All wiring is correct and software is installed, but when i try to start it, the led's not lit. I checked all voltages. LV is 3.3v and HV is 5v, but the LV-Signal on TXI is 2.7v and the HV-Signal on TXO is 9v. That doesn't sound normal for a 3.3v to 5v converter, but its the first time i work something like this, so i don't know whats a normal output signal...

Hardware:

http://www.amazon.de/Channel-Converter-Bi-Directio...

R-Pi 3

LED's: WS2812b with

My wiring is 3 parallel rows of LED's in series (current was to high for one parallel circuit).

redliono (author)MaikM52016-05-22

Hi, no need logic converter you can remove it, have it at the beginning and leds never work.

Install raspbian or open elec in your PI, avoid OSMC due to sounds problems see comments on second link.

Then install hyperion tuto here https://hyperion-project.org/wiki/Installation-on-...

And config like this here https://hyperion-project.org/wiki/3-Wire-PWM

You should be ok now, have fun!

MaikM5 (author)redliono2016-05-23

That was my first trial, but doesn't work. But today i changed the wiring back to the wiring from hyperion wiki, with a 100R resistor, but the led's get no data and lit random. I measured the voltage between GPIO 18 an GND and compare it to a datasheet for ws2812b led's and my voltage is too low.

Expected: blue 3.0-3.4, green 3.0-3.4 and red 2.0-2.2

Measured: blue 0.224, green 0.231 and red 0.224

Highest output voltage (white) is 0.28v.

Is it possible that my Raspberry has a defect?

e.ma.niak (author)MaikM52016-07-15

A little hint. PWM does not work, if HDMI is not pluged in on startup.

e.ma.niak (author)MaikM52016-07-11

Hi, i was bussy, now i'm back on it. I cant get it working since the 10-2015 update. after i upload the config Rpi freezes and i have to reinstal OSMC.

Anyway. The voltage seems not right, post a photo of wiring (it helps a lot), posibly with wiring diagram, so we can check it.

redliono (author)2016-04-16

Hi,

Just installed and try it but leds doesn't work.

Checked connections and all seems fine.

Im on a fresh install of OSCM and Hyperion, as i see here they are twice and i install for WS281X. Status is ok but when i test leds do nothing.

Maybe can you share your hyperion.config.json? And i wil test with it.

thank you

e.ma.niak (author)redliono2016-07-11

I'm sorry it took me so long to reply, i was kinda bussy moving to new home. Since 10-2015 update Hyperion does not work. Don't know why. They changed their wiki and now i'm lost. I try to get this pice of poop to work, with no succes... If you find out how to light this up, let me know.

Have a nice day and good luck with this.

cbabbman (author)e.ma.niak2016-07-14

everything you need to know is right here...

https://hyperion-project.org/

they have done a very nice job putting all the information you need together and they are very responsive to questions in the forum.

e.ma.niak (author)cbabbman2016-07-15

Exactly two day ago i was trying to get it work. Sourceforge was offline. But yesterday i got lucky and it works.

I did not use HyperCon for installation. Inserted this into terminal:

cd /tmp && wget -nv -N https://raw.github.com/hyperion-project/hyperion/... && chmod +x install_hyperion.sh && sudo sh ./install_hyperion.sh HyperConInstall ; rm install_hyperion.sh

Then created and uploaded config, now with HyperCon.

Reboot, done. Found out that one of my RPi2 has PWM busted...

cbabbman (author)2016-07-14

OSMC works far better than OpenElec, IMHO.

For the frame, I went a different route... I used these, cut to size for the left, right, top, bottom. (http://www.homedepot.com/p/Wiremold-CordMate-Chann... attached with wire tie squares and wire ties... The channel matches the width of the LED strip perfectly and I attach it to the flat side of the channel to the strip. The adhesive on each makes sure that the strip doesn't come lose from the channel. Because the round side of the channel is against the back of the TV, it allows you to change the angle of the LED's to what ever looks best instead of shining them directly at the wall. It also allows for variations in the way manufacturers make the backs of the TV's. Finally, I connect each section with these connectors (https://www.amazon.com/hkbayi-50Pair-50sets-Connec....

I have 3 TV's put together this way with WS2812b strips and they all work flawlessly and consistently.

Tru21 (author)2016-02-01

hi! nice setup. I am going to try it soon :)

one question thought - why 300ohm resistor is needed? isnt that why Your leds were flicking with longer cable?

e.ma.niak (author)Tru212016-02-21

I think the signal was too high or something. One could not recognize both states correctly. My gues. It runs better with it.

Tru21 (author)2016-02-01

oh, and one more question - is it possible to modify this setup so that a separate led PSU is used?

e.ma.niak (author)Tru212016-02-21

why not, just connect both grounds together (RPi and LEDs),

edwinkort (author)2015-11-24

too bad I can't do some of those things. you had me lost at the steps with the convert and resistors. would be nice if this can be bought ready-made.

e.ma.niak (author)edwinkort2015-11-24

It' not that hard. You can buy the level converter and then there's only couple of wires to solder. In fact, this is the most simplest Hyperion setup.

edwinkort (author)e.ma.niak2015-11-24

I know. but because of my handicap I can't do all those things.

Unirox (author)2015-11-14

nice intrucable ^^
and nice calendar u got there xD

e.ma.niak (author)Unirox2015-11-15

Thanks, you should see the other one. :D

seamster (author)2015-11-13

Hey, your english is just fine!

Thanks for sharing your first instructable, and welcome to the community! :)

e.ma.niak (author)seamster2015-11-14

Thank you.

About This Instructable

37,381views

51favorites

License:

Bio: Sometimes i english very well, sometimes ne.
More by e.ma.niak:How to set up OSMC with Hyperion on Raspberry Pi with WS2812b led strip
Add instructable to: