Skip to content
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

Unable to initialize ws281x library. on Raspberry 4 #775

Closed
1 task done
khauser opened this issue Apr 18, 2020 · 7 comments · Fixed by #820
Closed
1 task done

Unable to initialize ws281x library. on Raspberry 4 #775

khauser opened this issue Apr 18, 2020 · 7 comments · Fixed by #820
Labels
Bug WIP Work in Progress

Comments

@khauser
Copy link

khauser commented Apr 18, 2020

  • I confirm that this is an issue rather than a question.

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:

  • Distribution: Raspbian GNU/Linux 10 (buster)
  • Arch: arm
  • Kernel: linux (4.19.97-v7l+ (WS: 32))
  • Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36
@Zenairo
Copy link

Zenairo commented Apr 24, 2020

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 tpmodding added Bug needs investigation Further testing is required labels Jun 3, 2020
@tpmodding
Copy link
Collaborator

did it worked? could you solve your problem?

@kevinlekiller
Copy link

kevinlekiller commented Jun 7, 2020

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
Copy link
Collaborator

this PR should fix this problem
#820

@tpmodding tpmodding added WIP Work in Progress and removed needs investigation Further testing is required labels Jun 7, 2020
@Paulchen-Panther Paulchen-Panther linked a pull request Jun 8, 2020 that will close this issue
13 tasks
@Paulchen-Panther
Copy link
Member

Paulchen-Panther commented Jun 8, 2020

@khauser @kevinlekiller
Could you test this PR?
#820

@kevinlekiller
Copy link

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
Copy link
Author

khauser commented Jun 9, 2020

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

@khauser khauser closed this as completed Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug WIP Work in Progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants