New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hyperion - Pi 2 Compatibility #251

Closed
B3nihana opened this Issue Feb 2, 2015 · 49 comments

Comments

Projects
None yet
@B3nihana

B3nihana commented Feb 2, 2015

Is there any problem we should expect when running Hyperion on a Pi 2 board?

@bladel

This comment has been minimized.

bladel commented Feb 3, 2015

Tested it, installed normaly on openelec 5.0.1, but couldn't connect to ws2801:

"Failed to open device('/dev/spidev0.0')"
@gixxpunk

This comment has been minimized.

gixxpunk commented Feb 4, 2015

@bladel, did you enable the correct device tree overlay in config.txt? ->

device_tree_overlay=overlays/enable-spi-overlay.dtb

You should also check if you have the corresponding dtb-file. ->

/flash/overlays/enable-spi-overlay.dtb

@tvdzwan
It would be nice (even if the current binary works) if you could recompile hyperion for Pi2, as this should give a nice speed bump due to ARMv7 and eventually NEON optimizations.

@gixxpunk

This comment has been minimized.

gixxpunk commented Feb 4, 2015

@tvdzwan
hyperion is running fine on Pi2 (lightberry). Got mine in the afternoon.
CPU load is about 2% on one of the four cores. ;)

http://pastebin.com/xzhccL4p

@bladel

This comment has been minimized.

bladel commented Feb 4, 2015

Thanks! It's now working fine on my RPi2 with WS2801 over spi.
Found the enable-spi-overlay.dtb here:
https://dl.dropboxusercontent.com/u/3669512/temp/enable-spi-overlay.dtb

@gixxpunk

This comment has been minimized.

gixxpunk commented Feb 4, 2015

Welcome! You could also use the nightly builds by Milhouse. They have alot of overlays (including SPI) already included.

http://forum.kodi.tv/showthread.php?tid=211501

@ndonkersloot

This comment has been minimized.

ndonkersloot commented Feb 7, 2015

I can't get it to work on my RPi 2 with Openelec 5.01. I've placed the 'enable-spi-overlay.dtb' in the '/flash/overlays' folder en added 'device_tree_overlay=overlays/enable-spi-overlay.dtb' into my config.txt.

Hyperion installed without errors and configuration files were taken from a working RPi B installation. I used pin 25 as Ground, pin 23 as SPI_CLK and pin 19 as SPI_MOSI. These are the same pins I use on my RPi B.

What am I missing here?

Edit:

Sure after hours of troubleshooting I think im done and post this post. Minutes later it starts working. Using the configuration as described above. Think I had a loose wire in the configuration or something..

@ntim

This comment has been minimized.

Contributor

ntim commented Feb 7, 2015

Works perfectly with OSMC Alpha4 and Philips Hue. Compiled from source according to the CompileHowTo. For automatic start at system boot create a systemd service:

/etc/systemd/system/multi-user.target.wants/hyperion.service

[Unit]
Description = hyperion
After = mediacenter.service

[Service]
User = osmc
Group = osmc
Type = simple
ExecStart= /usr/bin/hyperiond /etc/hyperion.config.json
Restart = always
RestartSec = 1

[Install]
WantedBy = multi-user.target
@mad-des

This comment has been minimized.

mad-des commented Feb 9, 2015

hi !
just a n00b question... got the overlay.dbt but do not know wich config file i should adjust ... ???

thanks in advance .

mad-des

@mad-des

This comment has been minimized.

mad-des commented Feb 9, 2015

got it ...

@Zappatron

This comment has been minimized.

Zappatron commented Feb 10, 2015

FYI Changes need to be made to the code for WS2812B LEDs as it stands right now (new memory addresses), I've created a branch you can compile for the Pi2 but please note that it will then only work on the Pi2

https://github.com/Zappatron/hyperion/tree/pi2_ws2812b

EDIT: there is an issue with this still as discussed at the end of this thread: #6

@ndonkersloot

This comment has been minimized.

ndonkersloot commented Feb 15, 2015

I've reinstalled openelec and made it work with the following line in the config file:

dtparam=spi=on

This way there is no need for a seperate overlay file :).

@mpslade

This comment has been minimized.

mpslade commented Feb 15, 2015

Hi to all of you ,
I sadely have a little problem with my system and I dont know if you can help me.

I've installed OpenELEC 5.0.1 (Custom build) with stk1160 support for RPi2 image file from lightberry on my raspberry pi 2 ,
plugged my lights (100 leds ws2801) with a ambiPi.tv kit from http://www.hackerspaceshop.com/ambipi-tv.html to convert 3.3v spi to 5v,
and run the raspberry.

The openelec OS runs fine, but my only the 5 first of my 100 leds flash randomly when hyperion is set on (instead of a nice rainbow swirl) and stays on a blueish or red color (looks random really).
I've tried to change the hyperion.config.json :
-if i change the number of leds to 100 -> 10-12 first leds flashes randomly and with 50->5 first leds flash randomly.
-if i change the rate I've got a similar reaction than changing the led numbers (flashes randomly with different number of leds)
The configuration is normally :
"device" :
{
"name" : "MyPi",
"type" : "ws2801",
"output" : "/dev/spidev0.0",
"rate" : 1000000,
"colorOrder" : "rgb"
},

I conclude that the problem probably do not come from the config file.

Looking in forums :
-some poeple had same issue – it’s to do with voltage setting in firmware for spi

" Use popcornmix file and instructions from this then reboot
#136 "

And sadly this solution did not work either.

Tried by removing the AmbiPi kit and nothing changes again...

All my lights work well on a adalight system with arduino.
So now,,I am lost in where this problem could come from...

Do you have any tips to solve my problem please?

@mansp

This comment has been minimized.

mansp commented Feb 18, 2015

Hi

I've been using hyperion for my old RPi B and everything worked fine, however with the new Pi2 I get the flickering behaviour, The colours follows the picture on screen but every now and then I get random flickering. I can set a colour in the app and get a solid light. I am using xbian(kodi 14.2 BETA1) and kernel 3.18.7+. I'm thinking this might be something to do with the new kernel needed for the Pi? since everything else should be the same?
Thanks for advice!

M

@kiwisol

This comment has been minimized.

kiwisol commented Feb 19, 2015

Seems Hyperion is working perfectly fine on the Pi 2 with OpenELEC 5.0.3 with as WS2801 strip. Just don't forget to add 'dtparam=spi=on' to the config.txt and you're off! Copied configuration from my old B and having no issues at all.

@mansp

This comment has been minimized.

mansp commented Feb 19, 2015

Yeah well I also have the same WS2801 and SPI is on, so I do get the normal behaviour except for some random leds lighting up in random colours every now and then. I read somewhere that it might have to do with the newer kernels and the spi handling. But since I dont know anything about that I cannot comment on it =/. Will get back if I find the thread I read.

M

@Hackmodford

This comment has been minimized.

Hackmodford commented Feb 20, 2015

Are there any performance gains when using the Pi 2?

@mpslade

This comment has been minimized.

mpslade commented Feb 21, 2015

My problem was solved !
After looking on a oscilloscope,
the ^problem was easely found;It was as stupid as changing cable connexions.
The Ambi PI gives the output in this order : - D C +
And my leds are : - C D +
I had the clock on data and data on clock -_-'...

@mansp

This comment has been minimized.

mansp commented Feb 22, 2015

This thread I found raspberrypi/linux#653 Which talks about spi handling and different kernels acting differently. The following link also states that it has been confirmed to be some gpio handling issue that may lie @Hyperion, http://forum.xbian.org/thread-2442-post-25548.html#pid25548 . Anyone with insight that know more?

M

@adn77

This comment has been minimized.

adn77 commented Feb 24, 2015

I cannot confirm hyperion to be working on my RasPi2 using Openelec 5.0.3.
I see the /dev/spidev0.* when I add the following line to /flash/config.txt

    dtparam=spi=on

For the sake of completeness I add

    dtoverlay=overlays/enable-spi-overlay.dtb

Does one still have to load the regmap module?

    modprobe regmap-spi

I tried to see some clock on SPICLK with my scope, but there isn't anything to see...

Is there any way to debug hyperion's way accessing the SPI device?

@CSMR-DB

This comment has been minimized.

CSMR-DB commented Feb 24, 2015

Did you remember to change the effects path in HyperCon? I have a RPi 2 running Openelec 5 & Hyperion and it is working.

@adn77

This comment has been minimized.

adn77 commented Feb 24, 2015

Sure did, the same setup was working fine on a RasPi B rev.2.

Does anyone by chance have the Linux' Kernel spi_test.c file compiled for ARMv7? I am still not sure my SPI is initialized at all.

@dkruyt

This comment has been minimized.

dkruyt commented Feb 25, 2015

Can confirm that Hyperion on RPi2 and OpenElec 5.03 is running fine with Adalight via USB.

@CurlyMoo

This comment has been minimized.

CurlyMoo commented Feb 25, 2015

Can confirm that Hyperion on RPi2 and OpenElec 5.03 is running fine with Adalight via USB.

That's because you're not using the SPI / GPIO pins.

@ndonkersloot

This comment has been minimized.

ndonkersloot commented Feb 25, 2015

It's running perfectly fine on a Raspberry Pi 2 with OpenElec 5.03 via GPIO. Just make sure you add the line 'dtparam=spi=on' in config.txt and verify that it's wired correctly.

No problems at all.

@mad-des

This comment has been minimized.

mad-des commented Feb 25, 2015

hyperion is working now on my pi2, but I have only lights on during playing videos. on my pi b+ there were also lights on at the 'home' screen and f.e. watching images. I'm using the same hyperion.json like on my pi b+.
any ideas?

@mad-des

This comment has been minimized.

mad-des commented Feb 25, 2015

found the 'fault', in the hyperion.json it was disabled. however, on th pi b+, all lights were on...

@hahusu

This comment has been minimized.

hahusu commented Feb 25, 2015

After switching hyperion from b+ to 2 i guess i killed the needed gpio pins....can i switch them somehow in hyperion?

I think else it worked well... has no other problem except the killed ports

@adn77

This comment has been minimized.

adn77 commented Feb 27, 2015

Sorry for messing up this issue tracker...

Looking more closely on the differences between RasPi Rev.B and RasPi 2 I finally did notice that the connectors have been altered since Rev. B+ (I feel totally stupid now)

The SPI GPIOs remain at the same position, but you have to start counting at PIN #1.

Yes, it is working now!

@mansp

This comment has been minimized.

mansp commented Mar 3, 2015

For you that are using Openelec with GPIO, which linux kernel are you using?

@Fabvuil

This comment has been minimized.

Fabvuil commented Mar 19, 2015

Hi.

My Rpi2 Openelec SD + USB boot works perfectly. Nevertheless, Hyperion don't works anymore ...
I precise Hyperion was working perfectly when my Rpi2 was SD only boot.
I tried to do a fresh instal of the last version of Openelec with SD + USB boot and then to install Hyperion but it still don't work.
I didn't found any post about this ...

Does anybody has an idea ?

Thank you in advance.

@elaiel

This comment has been minimized.

elaiel commented Apr 22, 2015

I have the same issue as Fabvuil. Hyperion is not working on OpenElec with a raspberry pi 2 with a ws2801 strip.
I'm using OpenElec (5.08) on a Raspberry Pi2. I added dtparam=spi=on to the config.txt which creates the devices correctly (/dev/spidev0.0 and /dev/spidev0.1). I tried various combination of adding the overlay dtoverlay=overlays/enable-spi-overlay.dtb ([https://github.com//issues/136 ]). I used booth entries in config.txt or just one of each – no difference.
Next I did numerous installs of Hyperion - and it seems to work fine - but the lights are off. When I start Hyperion manually it seems to capture, but no lights on.
I also added the ambiPi.tv kit from Hackerspace - no difference. I switched the wiring, then I exchanged all wires - still no difference.
I tested on 3 Raspberry Pi 2 using 2 different LED strips (which are working fine) – still nothing.

And for some reason it worked with OpenElec (5.03) – which kind of drives me nuts.

After an automated firmware update and the automated upgrade to 5.08 it stopped working. And my gut-feeling is, that SPI is still not activated correctly even with the device enabled and an overlay available.

When I enable logging in the config.txt I get errors within gpioman (see below), which seems to be an older problem, that prevents Hyperion from working ([https://github.com//issues/136]) but the solution of adding the dt-blob.bin filde does not solve the issue.

Any other ideas, what I could try? Any input is welcome!
Thanks!

Here is the section from the log-file mentioned above:

001814.653: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined
003505.651: vchiq_core: vchiq_init_state: slot_zero = 0xee800000, is_master = 1
003509.445: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
003513.378: gpioman: gpioman_get_pin_num: pin LEDS_RUNNING not defined
003513.402: gpioman: gpioman_get_pin_num: pin LEDS_NAND_ACTIVITY not defined
003513.423: gpioman: gpioman_get_pin_num: pin LEDS_USB_ACTIVITY not defined
003513.444: gpioman: gpioman_get_pin_num: pin LEDS_FATAL_ERROR not defined
003513.466: gpioman: gpioman_get_pin_num: pin LEDS_APP_OK not defined
003513.488: gpioman: gpioman_get_pin_num: pin LEDS_APP_FAILED not defined
003513.507: gpioman: gpioman_get_pin_num: pin LEDS_HDCP_AUTH not defined
003513.529: gpioman: gpioman_get_pin_num: pin LEDS_HDCP_UNAUTH not defined
003513.551: gpioman: gpioman_get_pin_num: pin LEDS_HDMI_ON not defined
003513.573: gpioman: gpioman_get_pin_num: pin LEDS_DVI_ON not defined
003513.594: gpioman: gpioman_get_pin_num: pin LEDS_HDMI_HPD_UP not defined
003513.616: gpioman: gpioman_get_pin_num: pin LEDS_REMOTE_CONTROL not defined
003513.636: gpioman: gpioman_get_pin_num: pin LEDS_ARM_CONTROLLED not defined

@Yariv-h

This comment has been minimized.

Yariv-h commented Oct 16, 2015

Small problem:

using OpenELEC-RPi2.arm-5.0.8.img
added to the config file device_tree_overlay=overlays/enable-spi-overlay.dtb and the coresponding file to the overlays folder, restart the pi , and seems like the lets are working, but it is working over and over again witht the Rainbow swirl fast colors and not stoping, when i testing the commands from putty, it is working as well, show i do anytihng to make to for production to kodi?

what do i miss here?

@oguelich

This comment has been minimized.

oguelich commented Dec 30, 2015

Got an issue with following combination "RPi2 connected to Arduino Uno connected to WS2801"

I've installed Hyperion on Openelec (6.0.0) but the lights are flickering during startup only and aftwerards they switch off completely. But with the same configuration it works perfectly on my RPi1.

My hyperion.config.json is configured as following:

    "device" :
    {
            "name"       : "MyPi",
            "type"       : "WS2801",
            "output"     : "/dev/ttyACM0",
            "rate"       : 115200,
            "colorOrder" : "rgb"
    },

Hyperion is also running
XBMC:~ # ps -a | grep hyper
397 root 0:00 {hyperiond.sh} /bin/sh /storage/hyperion/bin/hyperiond.sh /storage/.config/hyperion.config.json
399 root 0:26 /storage/hyperion/bin/hyperiond /storage/.config/hyperion.config.json

Does anybody has an idea how this could be solved?

@jweaver100

This comment has been minimized.

jweaver100 commented Jan 2, 2016

I am trying to get Hyperion installed under OpenElec 6.0 and am so close, but /dev/spidev0.0 does not exist.

I get from this thread that I need to add dtparam=spi=on to the /flash/config.txt file. But under OpenElec its a read only file system.. So how do you make the change?

Is there an easy way to edit this file?

@oguelich

This comment has been minimized.

oguelich commented Jan 2, 2016

You need to remount the filesystem with following command

mount -o remount,rw flash/

@jweaver100

This comment has been minimized.

jweaver100 commented Jan 2, 2016

Awesome thanks.. Have now edited the config file.. Rebooted and the "/dev/spi*" entries appeared... And now Hyperion is working beautifully.. Thanks for that..

I did have a problem where I could send "tests" to the lights, but Kodi was not working, but then I realised that I had disabled the "frame grabber" section of the config, thinking this related to the USB frame-grabber project.

Once I un-commented the lines, Kodi worked fine.. But I am finding very little colour to the lights.. They tend to want to be 'white'.. And when I get a black scene "purple"... I guess I just need to play with the config a bit.

Would it be possible to ask a few questions.

  1. What does the frame grabber width/height parameters do.. It says "The width of the grabbed frames", but what does this actually mean.. I have a 55" TV with 120 lights, so would I need to change the default values from 64?
  2. Whats the best way to reduce the 'brightness' of the lights.. Do I just change the "valueGain" value? Or do I need to play around with the threashhold/black and white levels of each RGB colour?
  3. Using the Hyperion Configuration Tool (v1.0), is there a way to 'load' an existing config? From what I can see, if I create a config and then close the tool, I have no way to bring back the original settings, without doing it manually... So every time I want to make a change, I have to carefully configure the tool exactly the same as I did when I created the file.. Or just go 'command line' instead?

Jon

@jweaver100

This comment has been minimized.

jweaver100 commented Jan 3, 2016

Can anyone help with the above questions.. Ignore the 3rd question.. I realise now that the Config tool opens with the same settings as before.

But I am still struggling with the colour of the lights.. I have some single frame of colour that I can display on the TV.. If I show red, the LEDS are red.. Blue.. blue and so on.. And with full panels of colour the results are very good.

But when I play a movie, the lights are almost always near white.. I am not getting much colour.

What setting should I play with to get it to 'react' more to whats on the screen?

Jon

@evo1983

This comment has been minimized.

evo1983 commented Jan 23, 2016

Hi hope someone can help me here, I use rpi2 on osmc with ws2801, my leds are working, in that they power up, but they go random rainbow colours regardless as to whether I give then a red command or blue or green, I'm guessing it's hardware related because I have done a fresh install and all commands come back with no errors, iv resoldered all my joints so the only thing I can think is the psu, I currently use one from an old router which has worked for about 2 years so doubt it's a power issue but it's 5v @ 1.2 amp. Before I go buy a new one can anyone else think what the issue could be?

@evo1983

This comment has been minimized.

evo1983 commented Jan 25, 2016

Just to update on my Issues i now think it's the rpi that's the Issue, I tested my same set up using adalight and ardunio uno and It works fine.

@deennoo

This comment has been minimized.

deennoo commented Jan 26, 2016

Osmc is thé issue !

Finghting against during 3 days ans finally Côme back to Jessie + hyperion + Kofi all workd fine now

@Yariv-h

This comment has been minimized.

Yariv-h commented Jan 31, 2016

dose any one have a final conclusion ? which OS / settings / led type
should be used ?

On Tue, Jan 26, 2016 at 7:19 AM, deennoo notifications@github.com wrote:

Osmc is thé issue !

Finghting against during 3 days ans finally Côme back to Jessie + hyperion

  • Kofi all workd fine now


Reply to this email directly or view it on GitHub
#251 (comment).

Best regards,
Yariv Hashai | 5517127@gmail.com

@spotsltd

This comment has been minimized.

spotsltd commented Jan 31, 2016

@deennoo could you share the settings you used ? OS / Leds/ Settings?

@deennoo

This comment has been minimized.

deennoo commented Feb 1, 2016

sorry i'm not on jessy but wheezy :

Last wheezy image from : https://www.raspberrypi.org/downloads/

92 * ws2801led + 5v 10a power supply
rpi2b with is own power supply (just plug SCK + GND + SI wire)
Kodi 15.2 : http://kodi.wiki/view/HOW-TO:Install_Kodi_on_Raspberry_Pi#Raspbian

Frame are grabbe from Kodi and from a easycap v4l2 grabber

All software setup is done with hypercon.

@spotsltd

This comment has been minimized.

spotsltd commented Feb 1, 2016

@deennoo could you be more sepesific? which imge did you used from https://www.raspberrypi.org/downloads/ ? didnt you used openelec?

@deennoo

This comment has been minimized.

deennoo commented Feb 2, 2016

@spotsltd

I use raspbian wheezy one, i didn't get any succes with openelec or osmc and hyperion.

Openelec and osmc looks to got to much restriction for me, i prefere work on a "classic" image

On a PI2 kodi and hyperion run very well

@spotsltd

This comment has been minimized.

spotsltd commented Feb 2, 2016

@deennoo got it, Thanks! will check it out.

@spotsltd

This comment has been minimized.

spotsltd commented Feb 2, 2016

@Yariv-h

This comment has been minimized.

Yariv-h commented Feb 7, 2016

So, I had the same problem with openelec.
Now it is working perfectly.

Download openelec latest img, 6.0.1.
Burn it to SD card. Open the SD card from the pc, go to config.txt, enable the spi interface by adding into the file: dtparam=spi=on save the file and run it from kodi.

Enable ssh, use putty in order to open remote connection, in the terminal, write the following:
curl -L --output install_hyperion.sh --get https://raw.githubusercontent.com/tvdzwan/hyperion/master/bin/install_hyperion.sh
sh ./install_hyperion.sh

After that everything should work, all you got to do is change the configuration file as you like. Use smb to copy the file into the rp2.

I was thinking the the problem was with my openelec but as soon as I changed the DC adapter of the rp2, everything working just fine.

@tpmodding

This comment has been minimized.

Collaborator

tpmodding commented Mar 2, 2016

think we can close this now :)

@brindosch brindosch closed this Mar 8, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment