EricHigdon / OctoPrint-RGB_status

Adds RGB LED support to OctoPrint with the ability to choose effects based on the current status of your printer
33 stars 12 forks source link

LEDs won't turn on. #8

Closed marrobHD closed 5 years ago

marrobHD commented 5 years ago

My WS2812B, WS2812 and WS2811 LEDs won't turn on.

EricHigdon commented 5 years ago

@marrodHD can you share your octoprint.log? That should give me some insight into the cause of the issue.

marrobHD commented 5 years ago

There I have pasted the log: https://jpst.it/1DwHR

EricHigdon commented 5 years ago

2019-03-10 17:57:14,555 - octoprint.plugins.rgb_status - ERROR - ws2811_init failed with code -11 (Selected GPIO not possible)

Seems relevant. What do you have the LED Pin setting set to?

marrobHD commented 5 years ago

GPIO 13

marrobHD commented 5 years ago

That are my settings: Screenshot_8

EricHigdon commented 5 years ago

@marrobHD Try setting LED channel to 1 and restarting

marrobHD commented 5 years ago

I have that before it won't work. Now the LEDs won't work like before.

EricHigdon commented 5 years ago

Are you running OctoPrint as root? And is there a reason you don’t want to use pin 10?

marrobHD commented 5 years ago

I have installed octoprint on the sdcard directly. I have used the octoprint image.

marrobHD commented 5 years ago

I think that it is root right? I can use pin 10.

EricHigdon commented 5 years ago

OctoPrint does not run as root by default, and it is not recommended that you do so. If you have no other reason to use a different pin, I highly suggest sticking to 10.

marrobHD commented 5 years ago

How can I run octoprint as root. How can I change that in the image that at boot octoprint automatically boot with root. Why then do not the LEDs work on the other?

marrobHD commented 5 years ago

EricHigdon commented 5 years ago

@marrobHD You probably shouldn't try to run OctoPrint as root (see here).

In the image you attached, 13 would be the 4th pin from the bottom in the left column as we are looking at the BCM number.

I highly suggest switching to pin 10 since you wouldn't need to run as root. If pin 10 isn't working, make sure that you add the pi user to the gpio group, and enable SPI (see here).

You also may need to change your buffer size and core frequency (see here).

If it still isn't working after following those steps, please share your octoprint.log again after rebooting.

I'm working on adding a wizard to walk new users through this stuff since it can be complicated.

marrobHD commented 5 years ago

MOSI is pin 10 right?

EricHigdon commented 5 years ago

@marrobHD Yes.

cryoplay commented 5 years ago

Hello there.

I have the same Problem. Hocked up my Strip to Pin 10. Nothing Happens. Process turns on without a Problem but i had no light.

https://justpaste.it/6wnmc

EricHigdon commented 5 years ago

@cryoplay From your log, it looks like everything is actually working on the software side. Do you have your LEDs attached to pin 10 and the ground pin on the pi?

marrobHD commented 5 years ago

It's not working

cryoplay commented 5 years ago

Hi Eric.

My Problem is gone. I forgot to hook the Strip to the ground of the Pi. Sry. im really dump.

Now all is working perfectly.

EricHigdon commented 5 years ago

@marrobHD can you share your OctoPrint.log again?

marrobHD commented 5 years ago

Here is my log: https://jpst.it/1DHLe

EricHigdon commented 5 years ago

@marrobHD It still says the "Selected GPIO not possible" are you sure you changed it to pin 10 in the settings and restarted?

marrobHD commented 5 years ago

Yes http://prntscr.com/mwy5qv

EricHigdon commented 5 years ago

Is the spidev device visible on your machine? Check using: ls /dev/spidev0.*

marrobHD commented 5 years ago

It is now working. I had to remove PSU control...