1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

RPi + LibreELEC RPI 4 Unable to initialize ws281x library.

Discussion in 'Software Support' started by Astina, 5 August 2019.

  1. Astina

    Astina New Member

    Messages:
    9
    Hardware:
    RPi2
    Hello the community,

    I have a config of hyperion who run fine on this setup:
    Rpi2
    Libreelec Leia last update
    Config of hyperion with last hypercon

    Now I want to change hardware to Rpi 4 4go

    I've made the install of Leia then hyperion with last update (the same for rpi2)

    I've made the copy of the json files to the folders.

    But when I try to start hyperion with hypercon, I get the error:
    Unable to initialize ws281x library.

    Someone can help me please?

    Sorry for my bad English....
     
  2. Paulchen-Panther

    Paulchen-Panther Active Member Developer

    Messages:
    404
    Hardware:
    RPi1/Zero, RPi3, 32/64bit, +Arduino
    Have you disabled analog audio ?
     
  3. Astina

    Astina New Member

    Messages:
    9
    Hardware:
    RPi2
    Hello,

    into the settings of libreelec the audio output is set on HDMI

    Do I need to make some other stuff?

    THX for replying :)

    Edit 1: maybe add line to config.txt?
    Edit 2: I've try to add "disable_audio_dither=1" in config.txt without effect...
     
    Last edited: 6 August 2019
  4. Aladar

    Aladar New Member

    Messages:
    5
    Hardware:
    RPi2, RPi3
    I have same problem. I upgraded RPI3 to RPI 4 and hyperion doesn't work.
     
  5. Astina

    Astina New Member

    Messages:
    9
    Hardware:
    RPi2
    I'm continuing my research....

    In hyperion.config.json, I've change "type" : "ws281x" into "type" : "ws2812spi"

    Now I've not anymore the problem with library

    I've also enable "allow remote control by programs on other systems" cause I had kodicheck error who's ok for now....

    Even if I've no more error messages, nothing works....
     
  6. Paulchen-Panther

    Paulchen-Panther Active Member Developer

    Messages:
    404
    Hardware:
    RPi1/Zero, RPi3, 32/64bit, +Arduino
    @Astina Could you please replace your hyperiond via ssh with this modified version. I extended the error message with the error code. This allow us to search for the specific error in the library. Thanks man.

    edit: i think the location of the binary is '/storage/hyperion/bin/'
     
  7. Astina

    Astina New Member

    Messages:
    9
    Hardware:
    RPi2
    Ok I've made de transfert then reboot.

    First led on red nothing else.

    On hypercon, the result is:
    ssh out: killall hyperiond 2>/dev/null
    ssh out: /storage/.config/autostart.sh > /dev/null 2>&1 &
    ssh out: cat /storage/logfiles/hyperion.log
    ssh in: /storage/hyperion/bin/hyperiond: error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory
     
    • Like Like x 1
  8. Paulchen-Panther

    Paulchen-Panther Active Member Developer

    Messages:
    404
    Hardware:
    RPi1/Zero, RPi3, 32/64bit, +Arduino
    @Astina Thanks for the feedback. I forgot that I compiled it under Buster (Python 3). Will now compile it under Stretch (Python 2.7).
     
    Last edited: 7 August 2019
  9. Aladar

    Aladar New Member

    Messages:
    5
    Hardware:
    RPi2, RPi3
  10. Paulchen-Panther

    Paulchen-Panther Active Member Developer

    Messages:
    404
    Hardware:
    RPi1/Zero, RPi3, 32/64bit, +Arduino
    Last edited: 7 August 2019
    • Like Like x 1
  11. Astina

    Astina New Member

    Messages:
    9
    Hardware:
    RPi2
    @Paulchen-Panther

    the first file don't work here is the log:

    ssh out: /storage/.config/autostart.sh > /dev/null 2>&1 &
    ssh out: cat /storage/logfiles/hyperion.log
    ssh in: Hyperion Ambilight Deamon (592)
    ssh in: Version : astina (GitHub-94404f6/8739c56-1565190225
    ssh in: Build Time: Aug 7 2019 15:13:19
    ssh in: INFO: Selected configuration file: /storage/.config/hyperion.config.json
    ssh in: HYPERION INFO: ColorTransform 'default' => [0; 220]
    ssh in: HYPERION INFO: ColorCorrection 'default' => [0; 220]
    ssh in: HYPERION INFO: ColorAdjustment 'default' => [0; 220]
    ssh in: LEDDEVICE INFO: configuration:
    ssh in: {
    ssh in: "colorOrder" : "rgb",
    ssh in: "dmanum" : 5,
    ssh in: "freq" : 800000,
    ssh in: "gpio" : 12,
    ssh in: "leds" : 221,
    ssh in: "name" : "MyHyperionConfig",
    ssh in: "pwmchannel" : 0,
    ssh in: "type" : "ws281x"
    ssh in: }
    ssh in: whiteAlgorithm ::
    ssh in: Unable to initialize ws281x library. Error code: -3
    ssh in: terminate called after throwing an instance of 'int'
    ssh in: Aborted

    The second file made the rainbow swirl @ boot, I can use android app with colorwheel and Effect but no light during playing video, here is the log:

    ssh out: /storage/.config/autostart.sh > /dev/null 2>&1 &
    ssh out: cat /storage/logfiles/hyperion.log
    ssh in: Hyperion Ambilight Deamon (620)
    ssh in: Version : astina (GitHub-94404f6/8739c56-1565190225
    ssh in: Build Time: Aug 7 2019 15:19:56
    ssh in: INFO: Selected configuration file: /storage/.config/hyperion.config.json
    ssh in: HYPERION INFO: ColorTransform 'default' => [0; 220]
    ssh in: HYPERION INFO: ColorCorrection 'default' => [0; 220]
    ssh in: HYPERION INFO: ColorAdjustment 'default' => [0; 220]
    ssh in: LEDDEVICE INFO: configuration:
    ssh in: {
    ssh in: "colorOrder" : "rgb",
    ssh in: "dmanum" : 5,
    ssh in: "freq" : 800000,
    ssh in: "gpio" : 12,
    ssh in: "leds" : 221,
    ssh in: "name" : "MyHyperionConfig",
    ssh in: "pwmchannel" : 0,
    ssh in: "type" : "ws281x"
    ssh in: }
    ssh in: whiteAlgorithm ::
    ssh in: INFO: Creating linear smoothing
    ssh in: HYPERION (CS) INFO: Created linear-smoothing(interval_ms=33;settlingTime_ms=200;updateDelay=0
    ssh in: EFFECTENGINE INFO: 27 effects loaded from directory /storage/hyperion/effects
    ssh in: EFFECTENGINE INFO: Initializing Python interpreter
    ssh in: INFO: Hyperion started and initialised
    ssh in: INFO: Boot sequence 'Rainbow swirl' EFFECTENGINE INFO: run effect Rainbow swirl on channel 0
    ssh in: BLACKBORDER INFO: threshold set to 0 (0)
    ssh in: BLACKBORDER INFO: mode:default
    ssh in: started
    ssh in: INFO: Kodi checker created and started
    ssh in: INFO: Json server created and started on port 19444
    ssh in: INFO: Proto server created and started on port 19445
    ssh in: FRAMEBUFFERGRABBER INFO: opened with resolution: [email protected]
    ssh in: BLACKBORDER INFO: threshold set to 0 (0)
    ssh in: BLACKBORDER INFO: mode:default
    ssh in: INFO: Framebuffer grabber created and started
    ssh in: KODICHECK INFO: Kodi Connected
    ssh in: KODICHECK INFO: switching to VIDEO mode
    ssh in: BORDER SWITCH REQUIRED!!
    ssh in: CURRENT BORDER TYPE: unknown=0 hor.size=0 vert.size=0
     
  12. Paulchen-Panther

    Paulchen-Panther Active Member Developer

    Messages:
    404
    Hardware:
    RPi1/Zero, RPi3, 32/64bit, +Arduino
    Config please!
     
  13. Astina

    Astina New Member

    Messages:
    9
    Hardware:
    RPi2
    the hyperion.json, or hardware config?

    Hardware:

    RPI4 4Go
    Led WS2812B
    External ac for led

    json
     
    Last edited: 8 August 2019
  14. Paulchen-Panther

    Paulchen-Panther Active Member Developer

    Messages:
    404
    Hardware:
    RPi1/Zero, RPi3, 32/64bit, +Arduino
    If I had the problem, I would first test whether Hyperion receives the image data from Kodi. For this I would put the device type on "file" and the device output to "storage/output.txt". After that I would start hyperion and wait at least until the boot effect stops. In your case at least 5 seconds. Then stop hyperion and look into the storage/output.txt. If there are only zeros written after the boot effect, it is up to the image transfer from Kodi to Hyperion. If not it is a config problem.
     
  15. Astina

    Astina New Member

    Messages:
    9
    Hardware:
    RPi2
    Thx for continuing to help me !!!

    Then, I don't know if I'm doing well...

    Into Hypecon / hardware / type : Test (file)

    Into Hypecon / hardware / Filename : /storage/output.txt

    Into Hypecon / SSH : connect - stop - start wait 10s then stop

    Nothing is created (no output.txt via scp)

    I've created a file output.txt with 0777 permition, retry the test but noting is writen inside...

    EDIT:
    I've edited the files json and made the test!
     

    Attached Files:

    Last edited: 8 August 2019
  16. Paulchen-Panther

    Paulchen-Panther Active Member Developer

    Messages:
    404
    Hardware:
    RPi1/Zero, RPi3, 32/64bit, +Arduino
    how is the ssh output of hypercon when you start hyperion with hardware Test (file)?
     
  17. Astina

    Astina New Member

    Messages:
    9
    Hardware:
    RPi2
    like this:
     
  18. Paulchen-Panther

    Paulchen-Panther Active Member Developer

    Messages:
    404
    Hardware:
    RPi1/Zero, RPi3, 32/64bit, +Arduino
    I wonder why the framebuffer grabber is being used instead of DispmanX. Maybe something went wrong when compiling. I'll get you a new hyperiond right now. One moment please.
     
    • Like Like x 2
  19. Paulchen-Panther

    Paulchen-Panther Active Member Developer

    Messages:
    404
    Hardware:
    RPi1/Zero, RPi3, 32/64bit, +Arduino
    Yes, something went wrong when compiling.
    I have manually specified the switches now.

    Before:

    dispmanx_missing.png

    Now:

    corrected.png



    The new binary: hyperiond
     
    • Like Like x 1
  20. Astina

    Astina New Member

    Messages:
    9
    Hardware:
    RPi2
    You are amazing!

    It works perfectly

    Thx a lot

    Edit: I will mark as solved after a few test
     
    Last edited: 8 August 2019
    • Like Like x 1