I have trouble activating the WS281x-LED-Status Plugin on a Raspberry 4B. I only get the error message "code -13 (Unable to initialize SPI)')" in the debug log for the plugin.
The hardware is fine (it worked before a fresh Octoprint install). It also worked before as i mentioned.
What i checked:
Plugin OS Test is fine
SPI is activated (and the Octoprint User has the right permissions)
Wanted to try GPIO 20 but the plugin did not recognize this pin.
This is my working /boot/config.txt. You can compare if you have the same options enabled:
arm_64bit=0
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16
# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720
# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1
# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2
# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4
# uncomment for composite PAL
#sdtv_mode=2
#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800
# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
dtparam=spi=on
# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18
# Additional overlays and parameters are documented /boot/overlays/README
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
# Automatically load overlays for detected cameras
camera_auto_detect=1
# Automatically load overlays for detected DSI displays
display_auto_detect=1
# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2
# Disable compensation for displays with overscan
disable_overscan=1
[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1
[all]
[pi4]
# Run as fast as firmware / board allows
arm_boost=1
[all]
# enable raspicam
start_x=1
gpu_mem=128
core_freq_min=500
I am having the same issue, however, I do not want to run Octoprint as Root. From what I understand, even with a touchscreen on SPI GPIO10, it should be able to also communicate with the LED. BTW, during all this, I don't physically have my touchscreen connected. However I get: RuntimeError('ws2811_init failed with code -13 (Unable to initialize SPI)'.
Utilities show everything should be good to go.
When I SSH into the Pi using the 'pi' username, I cannot access the /dev/mem folder without prompt. strandtest.py works fine on GPIO18, however must run with SUDO. The octo software is under the home/pi folder, so, maybe I need to assign 'pi' access to the dev/mem folder? If this is impossible with a touchscreen, I may have to resort to having octoprint run as root. Any other ideas?
Oh shit, i wanted to followup.... After testing with strandtest, i came up with that the permissions on the GPIO device are still incorrect. After getting strandtest working as 'pi' the plugin worked flawlessy.
(You should also put these commands - without sudo - in the /etc/rc.local, so they are executed at every startup)
This should give 'pi' the correct permissions to access the gpio device (the device on my installation did not had user rights to access, there "User in gpio group" is insufficent).