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
111 stars 26 forks source link

GPIO With 3.5" Touchscreen #68

Closed csteamengine closed 3 years ago

csteamengine commented 3 years ago

Hello, I recently setup an enclosure with LEDs using the Enclosure Plugin. I decided to add an OctoScreen interface to my enclosure so I didn't have to go to a computer to start/stop prints anymore. Anyways, with the addition of the touchscreen which doesn't use ALL of the GPIO pins, I had to switch the LEDs to pin 21, but in the end they are working.

I then came across this plugin and it seems much more robust, active, and feature-filled, but I can't get it to work with my current setup. I can confirm that the settings for strip type, pin, etc... are all correct and I have run the setup wizard completely. However, when I use the utilities to test the LED colors, nothing happens.

I know in the docs you mention that only pin 10 can be used, but as I have already proven it is possible to use pin 21 using a different plugin, is there any chance you could help me get your plugin working?

Any help you could give would be greatly appreciated!

Enclosure Plugin I'm Currently Using LEDs I'm Using

cp2004 commented 3 years ago

The way the enclosure plugin works is by using sudo to run an external script. With the way this plugin works to enable far better features is by controlling the LEDs directly from within OctoPrint, however this has the limitation of pin 10 since it is the only one that works without root access.

You can use the other pins, but you will have to run OctoPrint as root which is really not recommended (running a webserver that has root access is unsafe, make sure you don't get hacked 😉). It is technically supported in the plugin, see #63 and #64 for similar cases. I should probably update the docs to include this, since people keep asking...

If you open the plugin_ws281x_led_status.log you will probably find some problems reported about permission denied or something.

csteamengine commented 3 years ago

Thanks so much for the quick feedback! It is unfortunate that pin 10 is the only one that can be used, since I'd like to have your plugin AND a touchscreen, but I guess I'm getting greedy at this point 😆.

I seriously want to say good job on this plugin it is beautifully done, makes me miss my programming days! I run a YouTube channel called Modern Hobbyist and I'll definitely be making a video about this plugin!

Cheers!

cp2004 commented 3 years ago

Thanks for the feedback 🙂

Yes it is a trade off, LEDs vs. touchscreen. I have a plugin for WLED in the pipeline, that removes the GPIO need entirely and will connect to a WLED instance for wireless LED control. That will take a while though, as this one has done over the last few months. I look forward to watching the video 🙂