mhwlng / fipha

Home Assistant integration with HWINFO, MQTT and optionally Logitech Flight Instrument Panel
https://community.home-assistant.io/t/home-assistant-integration-with-logitech-flight-instrument-panel-hwinfo-mqtt/443045
MIT License
27 stars 3 forks source link

fipha.exe does not awake from sleep #4

Closed Chuffnugget closed 1 year ago

Chuffnugget commented 1 year ago

Fipha.exe does not awake with the computer after putting the computer to sleep.

Other than this issue, the program works perfectly. Thanks for the time and effort you put into this.

Timeline

System Windows 11 22H2 Latest version of fipha.exe HWInfo Pro 7.64-5240

mhwlng commented 1 year ago

Are there any errors in the log file?

Is hwinfo still working after wake?

is fipha still running after wake?

if you restart fipha after wake, is it working again?

what kind of sleep are you using ? (e.g. complete power off, ram saved on disk or is ram still powered (laptop))

Chuffnugget commented 1 year ago

Hello, thanks for the quick reply.

There are no errors in the log file. Both HWInfo and fipha are still running after the computer wakes from sleep, and if I restart fipha, it starts working again.

I'm using sleep on a Desktop PC without a battery, so I assume this would mean that anything in RAM is temporarily stored in disk until awakened.

Thanks.

mhwlng commented 1 year ago

please try 0.0.1.6

this restart the application 10 seconds after waking up from sleep

Chuffnugget commented 1 year ago

Hello, I have just tried 0.0.1.6. It looks like it's almost there; I put my computer to sleep and wake it, it sends one or two messages as if it's working, but then all entities go unavailable. It looks like it works for a second or two when I wake up the computer but then dies for some reason.

Here's my log file, you can see that fipha is recognizing the sleep/wakes.

ERROR 2023-10-15 13:04:33,307 MoveNext - No Home Assistant Connection for Flight Instrument Panels
INFO  2023-10-15 13:04:33,320 MoveNext - fipha started
INFO  2023-10-15 13:04:33,357 MoveNext - HWInfo task started, polling interval 1000 ms
INFO  2023-10-15 13:04:33,385 MoveNext - HWINFO Sensors found, Writing all HWINFO Sensors to hwinfo.json
INFO  2023-10-15 13:04:33,405 MqttOnConnected - MQTT Client: Connected with result: Success
INFO  2023-10-15 13:04:46,753 MoveNext - Go To Sleep
ERROR 2023-10-15 13:05:14,366 <Connect>b__16_2 - MQTT Client: Connection lost with reason: NormalDisconnection.
INFO  2023-10-15 13:05:15,299 MqttOnConnected - MQTT Client: Connected with result: Success
INFO  2023-10-15 13:05:21,788 MoveNext - Wake Up

Thanks.

mhwlng commented 1 year ago

you should see in the logs after wake up that the software has been restarted after 10 seconds (without errors)

Chuffnugget commented 1 year ago

Hello, I made a quick video of what's happening.

https://www.youtube.com/watch?v=xy1VDllRPuU&ab_channel=Chuffnugget

It seems to work for a split second, but then goes back to unavailable, even after the 10-20 seconds.

Thanks, Ryan.

mhwlng commented 1 year ago

sorry that video doesn't help me

do you see that the application restarts 10 seconds after waking up? the log file should also show this

please leave the pc sleeping for at least one minute before powering back on

then WAIT until the application restarts itself, before checking

also don't run the application from a network share

mhwlng commented 1 year ago

I increased the wait from 10 sec to 20 sec before it restarts

please re-download the zip

https://github.com/mhwlng/fipha/releases/tag/0.0.1.6

Chuffnugget commented 1 year ago

That's got it, changing it to 20 seconds seems to have worked!

Thanks a lot for the support. If you have a PayPal link, feel free to send it as I'll gladly buy you a coffee/beer.