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

BUG: LED count settings of less than 6 causes flickering of LEDs #132

Closed Civlo85 closed 2 years ago

Civlo85 commented 3 years ago

I have only 2 LEDs of a WS2812B Strip. If I configure the count to 2 LEDs, the LEDs are flickering when a fade in or out effect is going on. When I test the colors of the LEDs in the GUI, it works, but the effects does not. I have to go up to at least 6 LEDs, then the flickering stops and I have "normal behavior".

cp2004 commented 3 years ago

There is a bug report template, please fill it in.

Most important is the plugin_ws281x_led_status_debug.log with debug logging enabled.

Civlo85 commented 3 years ago

Sorry for that.

Description of the bug

I have only 2 LEDs of a WS2812B Strip. If I configure the count to 2 LEDs, the LEDs are flickering when a fade in or out effect is going on. When I test the colors of the LEDs in the GUI, it works, but the effects does not. I have to go up to at least 6 LEDs, then the flickering stops and I have "normal behavior".

Steps to reproduce

  1. Go to 'OctoPrint Settings -> Plugins / WS281x LED Status -> LED Strip Settings'
  2. Change 'Number of LEDs' to '2' and 'Close' and 'Save'
  3. See flickering of LEDs

What did you expect to happen

I expect not flockering LEDs. When I change the Settings to a LED Number greater or equals 6, then the LEDs behave like I expect -> Not flickering.

Logs and screenshots

Attached: octoprint.log plugin_ws281x_led_status_debug.log

Version of plugin and OctoPrint

WS281x LED Status (0.7.2) OctoPrint Version 1.5.3

cp2004 commented 3 years ago

Apologies for not getting back to you faster on this one - I have to develop plugins in cycles and this one has been at the bottom of the list. I'm hoping to get a chance to properly dig into this one next week.

Until then, confirmation that this is a really weird issue, I just setup the development LEDs and I have some really strange effects here, when LEDs are less than 6. Stepping through the debugger shows no issues... So it may take a while to dig into this one and figure out exactly what is wrong here. Either way I'm not looking forward to it 🙂

cp2004 commented 3 years ago

This seems like it may be an upstream bug of the dependency - not fun on any level...

edit and a bug of the Python wrapper? I am lost, this may not get fixed by me... Will try and report it upstream, but I am not counting on it working.

cp2004 commented 3 years ago

A fix/workaround has been implemented for 0.8.0, by tricking the underlying library into thinking it is using 6 LEDs, but only pushing effects to the number configured.

cp2004 commented 2 years ago

0.8.0 has been released (finally...!)