OpenEPaperLink / Home_Assistant_Integration

Home assistant Integration for the OpenEPaperLink project
https://openepaperlink.de
Apache License 2.0
159 stars 35 forks source link

Preventing the 04:00 scheduled reboot generating errors in log? #188

Closed quack3d closed 2 weeks ago

quack3d commented 4 weeks ago

The AP has built in code to reboot every night at 04:00. Is it possible to stop the errors stemming from that from appearing in the log?

I could always filter it out with logger: in configuration.yaml but that would block a potential "real" error that's not 04:00 at night.

Logger: custom_components.open_epaper_link.hub
Kilde: custom_components/open_epaper_link/hub.py:187
integrasjon: OpenEPaperLink ([dokumentasjon](https://github.com/jonasniesner/open_epaper_link_homeassistant), [problemer](https://github.com/jonasniesner/open_epaper_link_homeassistant/issues))
Førs oppstått: 04:00:07 (1 hendelser)
Sist logget: 04:00:07

Websocket connection lost to url=ws://10.0.0.222/ws (close_status_code=None, close_msg=None), trying to reconnect every 30 seconds
Logger: custom_components.open_epaper_link.hub
Kilde: custom_components/open_epaper_link/hub.py:207
integrasjon: OpenEPaperLink ([dokumentasjon](https://github.com/jonasniesner/open_epaper_link_homeassistant), [problemer](https://github.com/jonasniesner/open_epaper_link_homeassistant/issues))
Førs oppstått: 04:00:07 (1 hendelser)
Sist logget: 04:00:07

open_epaper_link WebSocketApp crashed, reconnecting in 30 seconds
jurasjo commented 4 weeks ago

I have been wondering why it shows those messages, now it is clear. I think, because of that it also skips job/automatons if those are scheduled at this time. Now it is clear why I have been observing problems around that particular time.

Looks like this reboot functionality might have something to do with that. Maybe it should be optional or configurable, so it can be set at a time, when there is no planned job.

g4bri3lDev commented 3 weeks ago

Looks like this reboot functionality might have something to do with that. Maybe it should be optional or configurable, so it can be set at a time, when there is no planned job.

Maybe you can open an issue about this in the Main Repo?

jonasniesner commented 3 weeks ago

The reboot is(maybe was) needed for stability. One way to prevent error message is to listen to the reboot message on the website. The AP announces that it will reboot a few seconds before actually rebooting.

jurasjo commented 3 weeks ago

Ok, I have created an issue here: https://github.com/OpenEPaperLink/OpenEPaperLink/issues/386

g4bri3lDev commented 2 weeks ago

The reboot is now optional https://github.com/OpenEPaperLink/OpenEPaperLink/issues/386 so I'm closing this issue

jurasjo commented 2 weeks ago

Yes it is but if one set it up as enabled then we still have those:

2024-11-06 03:56:07.565 WARNING (Thread-2 (connection_thread)) [custom_components.open_epaper_link.hub] Websocket connection lost to url=ws://192.168.13.12/ws (close_status_code=None, close_msg=None), trying to reconnect every 30 seconds
2024-11-06 03:56:07.567 ERROR (Thread-2 (connection_thread)) [custom_components.open_epaper_link.hub] open_epaper_link WebSocketApp crashed, reconnecting in 30 seconds

So it is not fixed?

g4bri3lDev commented 2 weeks ago

Which version are you on?

jurasjo commented 2 weeks ago

Version 0.5.0.8

g4bri3lDev commented 2 weeks ago

Ah. The web socket connection logic was improved from 1.0.0.0_dev onwards, currently the latest version is 1.0.0.4_dev which must be manually selected in HACS because it is still a pre release

jurasjo commented 2 weeks ago

So do you consider newest 1.0.0.4_dev version stable enough in order to give it a try? It looks like you advice to remove the old one and install from scratch.

g4bri3lDev commented 2 weeks ago

Yes, i haven't heard of any breaking changes happening yet. The Reinstall recommendation is just so any errors/bugs from the previous version do not potentially carry over because so much has changed internally

jurasjo commented 2 weeks ago

Ok, I have updated and changed automations to use a device_id. Will see how it goes. Thanks

jurasjo commented 2 weeks ago

So, on the newest 1.0.0.4_dev version, the error message is different: This error originated from a custom integration.

Logger: custom_components.open_epaper_link.hub
Source: custom_components/open_epaper_link/hub.py:213
integration: OpenEPaperLink (documentation, issues)
First occurred: 03:56:08 (1 occurrences)
Last logged: 03:56:08

WebSocket connection error: 404, message='Invalid response status', url='ws://192.168.13.12/ws'