hyperion-project / hyperion.ng

The successor to Hyperion aka Hyperion Next Generation
https://hyperion-project.org/
MIT License
3.02k stars 375 forks source link

Unable to initialize ws281x library. on Raspberry 4 #775

Closed khauser closed 4 years ago

khauser commented 4 years ago

Bug report

I can't get my ws2812B strip running:

pi@raspberrypi:~/hyperion/build $ bin/hyperiond
[hyperiond LEDDEVICE] <INFO> LedDevice 'ws281x' found.
[hyperiond LEDDEVICE] <DEBUG> <LedDeviceWS281x.cpp:60:init()> ws281x strip type : 1050624
[hyperiond ComponentRegister] <DEBUG> <ComponentRegister.cpp:36:setNewComponentState()> Smoothing: enabled
[hyperiond LEDDEVICE] <ERROR> Device disabled, device 'ws281x' signals error: 'Unable to initialize ws281x library.'

Steps to reproduce

I just installed via wget -qO- https://raw.githubusercontent.com/hyperion-project/hyperion.ng/master/bin/compile.sh | sh. Then I started in the build folder: sudo bin/hyperiond (so not like #641)

With https://github.com/jgarff/rpi_ws281x I had working examples.

What is expected?

LEDs shine all the time

What is actually happening?

No LED is shining and there's an error

System

Hyperion Server:

Hyperion Server OS:

Zenairo commented 4 years ago

Manually update your ws281x, the important part is this file here: https://github.com/jgarff/rpi_ws281x/blob/master/rpihw.c There is a RPi4 v1.1 and v1.2, you likely have the v1.2 like I did.

tpmodding commented 4 years ago

did it worked? could you solve your problem?

kevinlekiller commented 4 years ago

Same here, tried what @Zenairo wrote and still get [hyperiond LEDDEVICE] <ERROR> Device disabled, device 'ws281x' signals error: 'Unable to initialize ws281x library.' on Pi 4b 4GB v1.2

The old hyperion works fine with the same settings on the same pi.

Hyperion.ng:

kevin@kevin-pi4:~ $ sudo ./hyperion.ng/build/bin/hyperiond -v
[hyperiond MAIN] <INFO> Set user data path to '/root/.hyperion'
[hyperiond EFFECTFILES] <INFO> 39 effects loaded from directory :/effects/
[hyperiond EFFECTFILES] <INFO> 22 effect schemas loaded from directory :/effects/schema/
[hyperiond EFFECTFILES] <INFO> 0 effects loaded from directory /root/.hyperion/custom-effects
[hyperiond DAEMON] <INFO> set screen capture device to 'dispmanx'
[hyperiond DISPMANXGRABBER] <INFO> Display opened with resolution: 3840x2160
[hyperiond DAEMON] <INFO> DISPMANX frame grabber created
[hyperiond V4L2:auto] <INFO> Signal threshold set to: {12, 12, 12}
[hyperiond V4L2:auto] <INFO> Signal detection is now disabled
[hyperiond V4L2:auto] <INFO> Signal detection area set to: 0.250000,0.250000 x 0.750000,0.750000
[hyperiond JSONSERVER] <INFO> Started on port 19444
[hyperiond FLATBUFSERVER] <INFO> Started on port 19400
[hyperiond PROTOSERVER] <INFO> Started on port 19445
[hyperiond LEDDEVICE] <INFO> LedDevice 'ws281x' found.
[hyperiond LEDDEVICE] <ERROR> Device disabled, device 'ws281x' signals error: 'Unable to initialize ws281x library.'
[hyperiond FLATBUFCONNECTION] <INFO> Connecting to Hyperion: 127.0.0.1:19401
[hyperiond EFFECTENGINE] <INFO> Run effect "Rainbow swirl fast" on channel 0
[hyperiond HYPERION] <INFO> Initial foreground effect 'Rainbow swirl fast' started
[hyperiond EFFECTENGINE] <INFO> Run effect "Warm mood blobs" on channel 254
[hyperiond HYPERION] <INFO> Inital background effect 'Warm mood blobs' started
[hyperiond HYPERION] <INFO> Hyperion instance 'First LED Hardware instance' has been started
[hyperiond WEBSERVER] <INFO> Started on port 8090 name 'Hyperion Webserver'
[hyperiond WEBSERVER] <INFO> Started on port 8092 name 'Hyperion Webserver'
kevin@kevin-pi4:~ $ ./hyperion.ng/build/bin/hyperiond --version
Hyperion Ambilight Deamon (1468)
        Version   : 2.0.0-alpha.6 (master (GitHub-4d429a27/08de6b78-1590779969))
        Build Time: Jun  7 2020 12:36:34

Screenshot_20200607_130245

Hyperion (archived):

kevin@kevin-pi4:~ $ sudo ./hyperion/build/bin/hyperiond /etc/hyperion/hyperion.config.json 
Hyperion Ambilight Deamon (1441)
        Version   : master (GitHub-35947fe/9059f7f-1589901872
        Build Time: Jun  7 2020 11:53:43
INFO: Selected configuration file: /etc/hyperion/hyperion.config.json
LEDDEVICE INFO: configuration: 
{
        "colorOrder" : "grb",
        "dmanum" : 10,
        "gpio" : 18,
        "leds" : 218,
        "name" : "MyHyperionConfig",
        "type" : "ws281x"
}

whiteAlgorithm ::
INFO: Creating linear smoothing
HYPERION (CS) INFO: Created linear-smoothing(interval_ms=41;settlingTime_ms=600;updateDelay=0
EFFECTENGINE ERROR: no effects found, check your effect directories
EFFECTENGINE INFO: Initializing Python interpreter
INFO: Hyperion started and initialised
INFO: Json server created and started on port 19444
INFO: Proto server created and started on port 19445
QtHttpServer started on port 12288 "Qt Static HTTP File Server"
tpmodding commented 4 years ago

this PR should fix this problem https://github.com/hyperion-project/hyperion.ng/pull/820

Paulchen-Panther commented 4 years ago

@khauser @kevinlekiller Could you test this PR? https://github.com/hyperion-project/hyperion.ng/pull/820

kevinlekiller commented 4 years ago

No more error, thanks:

kevin@kevin-pi4:~ $ ./hyperion.ng/build/bin/hyperiond --version && sudo ./hyperion.ng/build/bin/hyperiond -v
Hyperion Ambilight Deamon (19458)
        Version   : 2.0.0-alpha.6 (reset (Paulchen-Panther-97b3bd11/a64bd179-1591549747))
        Build Time: Jun  8 2020 16:58:42
[hyperiond MAIN] <INFO> Set user data path to '/root/.hyperion'
[hyperiond EFFECTFILES] <INFO> 39 effects loaded from directory :/effects/
[hyperiond EFFECTFILES] <INFO> 22 effect schemas loaded from directory :/effects/schema/
[hyperiond EFFECTFILES] <INFO> 0 effects loaded from directory /root/.hyperion/custom-effects
[hyperiond DAEMON] <INFO> set screen capture device to 'dispmanx'
[hyperiond DAEMON] <ERROR> The dispmanx framegrabber can not be instantiated, because it has been left out from the build
[hyperiond V4L2:auto] <INFO> Signal threshold set to: {12, 12, 12}
[hyperiond V4L2:auto] <INFO> Signal detection is now disabled
[hyperiond V4L2:auto] <INFO> Signal detection area set to: 0.250000,0.250000 x 0.750000,0.750000
[hyperiond JSONSERVER] <INFO> Started on port 19444
[hyperiond FLATBUFSERVER] <INFO> Started on port 19400
[hyperiond PROTOSERVER] <INFO> Started on port 19445
[hyperiond LEDDEVICE] <INFO> LedDevice 'ws281x' found.
[hyperiond FLATBUFCONNECTION] <INFO> Connecting to Hyperion: 127.0.0.1:19401
[hyperiond EFFECTENGINE] <INFO> Run effect "Rainbow swirl fast" on channel 0
[hyperiond HYPERION] <INFO> Initial foreground effect 'Rainbow swirl fast' started
[hyperiond EFFECTENGINE] <INFO> Run effect "Warm mood blobs" on channel 254
[hyperiond HYPERION] <INFO> Inital background effect 'Warm mood blobs' started
[hyperiond HYPERION] <INFO> Hyperion instance 'First LED Hardware instance' has been started
[hyperiond WEBSERVER] <INFO> Started on port 8090 name 'Hyperion Webserver'
[hyperiond WEBSERVER] <INFO> Started on port 8092 name 'Hyperion Webserver'
khauser commented 4 years ago

I have now SK9822 in place, which also runs fine. Thanks for all of your great work!