Closed fightingforyou46 closed 1 year ago
Similar issue here. However I have no problems when I put Win10 to sleep: WLED disconnects and goes back to it's predefined setting.
The problem is with resuming Win10. The WLED led instance gets it's led output set to OFF and doesn't resume automatically. I have to go and turn it on each time.
State shown upon resume:
Here's the log from a sleep and resume:
2021-08-07T16:47:28.500Z [hyperiond HYPERION] (DEBUG) (PriorityMuxer.cpp:271:PriorityMuxer::setInputImage()) Priority 100 is now inactive
2021-08-07T16:47:28.974Z [hyperiond HYPERION] (DEBUG) (PriorityMuxer.cpp:374:PriorityMuxer::setCurrentTime()) Set visible priority to 255
2021-08-07T16:47:28.975Z [hyperiond HYPERION] (DEBUG) (Hyperion.cpp:559:Hyperion::handlePriorityChangedLedDevice()) priority[255], previousPriority[100]
2021-08-07T16:47:28.975Z [hyperiond HYPERION] (DEBUG) (Hyperion.cpp:562:Hyperion::handlePriorityChangedLedDevice()) No source left -> switch LED-Device off
2021-08-07T16:47:28.980Z [hyperiond LEDDEVICE] (DEBUG) (LedDeviceWled.cpp:237:LedDeviceWled::powerOff()) Restore synchronisation with other WLED devices
2021-08-07T16:47:28.980Z [hyperiond LEDDEVICE] (DEBUG) (ProviderRestApi.cpp:181:ProviderRestApi::put()) PUT: [http://192.168.66.12/json/state] [{"on":false,"live":false,"udpn":{"send":false,"recv":false}}]
2021-08-07T16:47:28.980Z [hyperiond LEDDEVICE] (DEBUG) (ProviderRestApi.cpp:231:ProviderRestApi::getResponse()) Reply.httpStatusCode [0]
2021-08-07T16:47:28.980Z [hyperiond LEDDEVICE] (ERROR) Device disabled, device 'wled' signals error: 'Power-off request failed with error: 'Network access is disabled.''
2021-08-07T16:47:28.981Z [hyperiond COMPONENTREG] (DEBUG) (ComponentRegister.cpp:36:ComponentRegister::setNewComponentState()) LED device: disabled
2021-08-07T16:47:31.034Z [hyperiond HYPERION] (DEBUG) (PriorityMuxer.cpp:271:PriorityMuxer::setInputImage()) Priority 100 is now active
2021-08-07T16:47:31.034Z [hyperiond HYPERION] (DEBUG) (PriorityMuxer.cpp:374:PriorityMuxer::setCurrentTime()) Set visible priority to 100
2021-08-07T16:47:31.034Z [hyperiond HYPERION] (DEBUG) (Hyperion.cpp:559:Hyperion::handlePriorityChangedLedDevice()) priority[100], previousPriority[255]
2021-08-07T16:47:31.034Z [hyperiond HYPERION] (DEBUG) (Hyperion.cpp:569:Hyperion::handlePriorityChangedLedDevice()) new source available -> switch LED-Device on
2021-08-07T16:47:36.558Z [hyperiond HYPERION] (DEBUG) (PriorityMuxer.cpp:271:PriorityMuxer::setInputImage()) Priority 100 is now inactive
2021-08-07T16:47:36.560Z [hyperiond HYPERION] (DEBUG) (PriorityMuxer.cpp:374:PriorityMuxer::setCurrentTime()) Set visible priority to 255
2021-08-07T16:47:36.560Z [hyperiond HYPERION] (DEBUG) (Hyperion.cpp:559:Hyperion::handlePriorityChangedLedDevice()) priority[255], previousPriority[100]
2021-08-07T16:47:36.560Z [hyperiond HYPERION] (DEBUG) (Hyperion.cpp:562:Hyperion::handlePriorityChangedLedDevice()) No source left -> switch LED-Device off
2021-08-07T16:47:36.726Z [hyperiond HYPERION] (DEBUG) (PriorityMuxer.cpp:271:PriorityMuxer::setInputImage()) Priority 100 is now active
2021-08-07T16:47:36.726Z [hyperiond HYPERION] (DEBUG) (PriorityMuxer.cpp:374:PriorityMuxer::setCurrentTime()) Set visible priority to 100
2021-08-07T16:47:36.726Z [hyperiond HYPERION] (DEBUG) (Hyperion.cpp:559:Hyperion::handlePriorityChangedLedDevice()) priority[100], previousPriority[255]
2021-08-07T16:47:36.727Z [hyperiond HYPERION] (DEBUG) (Hyperion.cpp:569:Hyperion::handlePriorityChangedLedDevice()) new source available -> switch LED-Device on
2021-08-07T16:47:43.985Z [hyperiond WEBSOCKET] (DEBUG) (WebSocketClient.cpp:30:WebSocketClient::WebSocketClient()) New connection from ::1
2021-08-07T16:47:43.985Z [hyperiond WEBSOCKET] (DEBUG) (JsonAPI.cpp:122:JsonAPI::handleInstanceSwitch()) Client '::1' switch to Hyperion instance 0
2021-08-07T16:47:44.167Z [hyperiond WEBSOCKET] (DEBUG) (JsonAPI.cpp:1058:JsonAPI::handleLoggingCommand()) log streaming activated for client ::1
Hyperion Server:
- Build: (HEAD detached at b1a4e95c) (Paulchen-Panther-975f969a/b1a4e95c-1626550299)
- Build time: Jul 17 2021 20:53:38
- Git Remote: https://github.com/hyperion-project/hyperion.ng
- Version: 2.0.0-alpha.10
- UI Lang: en (BrowserLang: fr-CA)
- UI Access: expert
- Avail Capt: v4l2,qt,dx
- Database: read/write
Hyperion Server OS:
- Distribution: Windows 10 Version 2009
- Architecture: x86_64
- Kernel: winnt (10.0.19042 (WS: 64))
- Qt Version: 5.15.0
- Python Version: 3.9.6
- Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36
Thanks
Same behaviour with turning the pc off.
Steps to reproduce:
Adalight - Arduino nano clone (two different ones, with slightly different program on them, both have the same issue)
The fix would be to send some "turn off" signal to the LEDs whenever Hyperion is closed (probably forcefully by windows?)
@FluffyDiscord
The fix would be to send some "turn off" signal to the LEDs whenever Hyperion is closed
That is already done and works on Unix. Seems Windows stops the processes differently and there we need to find a different way…
@Lord-Grey would you please point me in the source code, where you are currently catching the shutdown event on windows ? I seem to be blind
@FluffyDiscord There is no dedicated catching for a shutdown event that I am aware of. If hyperiond is stopped the aboutToQuit Signal cleans up the objects and in case of LEDs this triggers a proper close and switch off of the LED currently running. If you run on Unix in debug mode and stop Hyperion via ctrl-c or kill, you will see the order of events.
On CoreElec the SIGUSR events are used when the platform is suspended or resumed. Here the LEDs are switched off/on. If there is a similar event on Windows, we could leverage the same mechanism. The related code is here:
I am not an expert on this matter, but from what I understand, app could use winuser.h
module which has RegisterPowerSettingNotification
I would like to f*ck around and try it, if it's even the right thing, but it's pain in the *** to setup windows build.
@FluffyDiscord I know that setting up a Windows build takes some time (I did it with MSVC2019). Nevertheless, it might be worth, as you could support and contribute further leveraging the invest.... ;)
Bug report
Sleep win 10 PC not turn off and screencapture after wakeup back
Steps to reproduce
when I put win 10 to sleep,wled doesn't turn off,and when I wake up and login to win10, wled out doesn't screencapture automatically
What is expected?
Wled can turn off with sleep of win 10 and screencapture automaticly after wakeup
What is actually happening?
System
Hyperion Server:
Hyperion Server OS: