Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Off message not honored when the printer changes state if the fade effect is enabled for on/off #135

Closed
samwiseg0 opened this issue May 1, 2021 · 5 comments
Labels
confirmed bug Bug reproduced and needs to be fixed

Comments

@samwiseg0
Copy link
Contributor

samwiseg0 commented May 1, 2021

Description of the bug

I recently changed the wat my lights were being powered. They are now on their own power supply. Given that, I wanted to have them turn off when the printer is shutdown. I have another plugin issue the off @ command before shutting off the printer. This seems to be successful as the UI shows that the lights are powered off yet they still remain in an on state running the disconnect effect. I suspect this has to do with the fact that the printer goes into a disconnect state before the lights have had a chance to turn off or that effect is overriding the off command.

Edit: I had a thought that the fade effect was getting in the way. It seems this is the case. If I disable the fade effect for on/off the lights work correctly.

Steps to reproduce

  1. Issue a @WS_LIGHTSOFF command
  2. Power off the printer immediately after.
  3. Observe that the on/off toggle is showing as off in the UI.
  4. Observe that that lights remain on and continue to run the disconnected effect.

What did you expect to happen

I expect when asking the lights to power off that they remain in an off state even if the printer state changes.

Logs and screenshots

[2021-05-01 11:00:15,114] INFO: On message received, turning on LEDs to idle
[2021-05-01 11:00:23,797] INFO: Off message received, turning off LEDs (fade: True)
[2021-05-01 11:00:24,640] DEBUG: Changing effect to disconnected
[2021-05-01 11:00:40,632] INFO: On message received, turning on LEDs to disconnected
[2021-05-01 11:00:42,253] INFO: Off message received, turning off LEDs (fade: True)
[2021-05-01 11:00:58,639] DEBUG: Changing effect to idle
[2021-05-01 11:00:58,748] INFO: On message received, turning on LEDs to idle
[2021-05-01 11:01:09,772] INFO: Off message received, turning off LEDs (fade: True)
[2021-05-01 11:01:10,668] DEBUG: Changing effect to disconnected

octoprint-logs.zip

Version of plugin and OctoPrint

WS281x LED Status (0.7.2)
Octoprint 1.6.0

(If applicable) Browser version & browser error console

N/A

Additional context

N/A

@github-actions github-actions bot added the potential bug Bug reported but yet to be analysed label May 1, 2021
@samwiseg0 samwiseg0 changed the title [Bug] Off message not honored when the printer disconnects. [Bug] Off message not honored when the printer changes state if the fade effect is enabled for on/off May 1, 2021
@cp2004
Copy link
Owner

cp2004 commented May 2, 2021

Untested, but going by code analysis I think I have the problem fixed.

You should be able to switch to the 'Development' Release channel and find 0.7.3dev0, hopefully that works.

@cp2004 cp2004 added confirmed bug Bug reproduced and needs to be fixed and removed potential bug Bug reported but yet to be analysed labels May 2, 2021
@samwiseg0
Copy link
Contributor Author

Thanks for putting that out so fast but unfortunately that did not solve the problem.

@cp2004
Copy link
Owner

cp2004 commented May 3, 2021

I'll have to give it a proper look and test at some point then. Might take a while, there's a lot on the list

@samwiseg0
Copy link
Contributor Author

I'll have to give it a proper look and test at some point then. Might take a while, there's a lot on the list

No worries. I have a workaround. Disabling the on/off fade works.

@cp2004
Copy link
Owner

cp2004 commented Feb 4, 2022

I think this should be fixed with 0.8.0. I can't reproduce it anymore, following adjustments to the way some of this stuff was handled.

@cp2004 cp2004 closed this as completed Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed bug Bug reproduced and needs to be fixed
Projects
None yet
Development

No branches or pull requests

2 participants