cp2004 / OctoPrint-WS281x_LED_Status

Add some RGB LEDs to your printer for a quick status update!
https://plugins.octoprint.org/plugins/ws281x_led_status
GNU Affero General Public License v3.0
112 stars 27 forks source link

OctoDash - UCTronics UC-640 - WS281x Status (SPI?) compatibility #178

Closed TyropeDeMotorChope closed 2 years ago

TyropeDeMotorChope commented 2 years ago

Describe your problem

I used this guide to install OctoDash on a raspberry pi 4b, and had it running. I installed ws281x led status and went through the configs, and now screen doesn't work and I can't even connect to the Pi over SSH... that is, unless I take the screen off the pin headers. If I have the screen plugged in currently, the pi is a brick with a backlight.

Because the screen I am using takes over the gpio 10 pin, I am forced to use gpio 20. I have added what I think I should in the config file, which I've attached.

Please confirm the following

Log files

config.txt

octoprint.log

plugin_ws281x_led_status_debug.log

cp2004 commented 2 years ago

What GPIO pin have you set in the settings of the plugin?

cp2004 commented 2 years ago

When I try and set GPIO 20, I get a different error to the one you are getting from the log file, about the GPIO number not being allowed.

TyropeDeMotorChope commented 2 years ago

I definitely didn't even get to changing it there before I ran into problems. I have now, and the LEDs and Screen still both don't work. config.txt octoprint.log plugin_ws281x_led_status_debug.log

Here's the files after changing it to 20 in the plugin settings.

cp2004 commented 2 years ago

So I confirmed late yesterday (for me) that GPIO 20 is not possible to use with the underlying library, as it's reporting in your log file as well as my tests that it won't work. So unless you can use GPIO 10 it will not be possible to use this plugin by the looks of it. I might be able to play around with patching the library to support it, but it is not my skillset to try and figure out.

I don't know how your screen works or why it would stop working, but in this case I would recommend undoing all the changes the plugin does to allow WS281x LEDs to be controlled, by removing the new dtoverlay and core_freq_min lines added, and optionally the increase in the SPI buffer in /boot/cmdline.txt. There are no other permanent changes made to the configuration files.

TyropeDeMotorChope commented 2 years ago

I found through this, that you can't use two SPI devices at once and the screen is SPI. Do you know if there is a PWM or PCM solution to NeoPixels with either OctoPrint or a MoonRaker setup?

cp2004 commented 2 years ago

You can use PWM (GPIO 18) through this plugin/the library you linked, but it requires running as root, which is not recommended for a web server generally, and requires the --iknowwhatimdoing flag to acknowledge the security risk when you run OctoPrint.

cp2004 commented 2 years ago

Hopefully all your questions were answered - if there's anything else you want to know about the plugin, please ask away! I'll close this for now but it can always be reopened.