skrollme / homebridge-eveatmo

Homebridge plugin which adds a Netatmo weatherstation as HomeKit device and tries to act like Elgato Eve Room/Weather
Apache License 2.0
69 stars 7 forks source link

History gaps #14

Closed r32er closed 6 years ago

r32er commented 6 years ago

Since I install the Homebridge new and Update Node and npm I had no problem with gaps and the plugin worked fine. But since few days I have the gaps again.

If the gaps in the log are missing then the entry: loading new data from API. When i restart the HB the it works again for a few hours. Apr 7 07:23:51 Homebridge homebridge[32340]: [2018-4-7 07:23:51] [eveatmo] Loading new data from API for: weatherstation Apr 7 07:36:46 Homebridge homebridge[32340]: [2018-4-7 07:36:46] [eveatmo] Loading new data from API for: weatherstation Apr 7 07:46:50 Homebridge homebridge[32340]: [2018-4-7 07:46:50] [eveatmo] Loading new data from API for: weatherstation Apr 7 07:46:50 Homebridge homebridge[32340]: [2018-4-7 07:46:50] [eveatmo] Loading new data from API for: weatherstation Apr 7 07:46:50 Homebridge homebridge[32340]: [2018-4-7 07:46:50] [eveatmo] Loading new data from API for: weatherstation Apr 7 08:05:37 Homebridge homebridge[32340]: [2018-4-7 08:05:37] [eveatmo] Loading new data from API for: weatherstation Apr 7 08:05:59 Homebridge systemd[1]: homebridge-eveatmo.service: Main process exited, code=exited, status=143/n/a Apr 7 08:05:59 Homebridge systemd[1]: homebridge-eveatmo.service: Unit entered failed state. Apr 7 08:05:59 Homebridge systemd[1]: homebridge-eveatmo.service: Failed with result 'exit-code'. Apr 7 08:06:04 Homebridge homebridge[15171]: [2018-4-7 08:06:04] Loaded plugin: homebridge-eveatmo Apr 7 08:06:04 Homebridge homebridge[15171]: [2018-4-7 08:06:04] Registering platform 'homebridge-eveatmo.eveatmo' Apr 7 08:06:12 Homebridge homebridge[15171]: [2018-4-7 08:06:12] [eveatmo] Initializing eveatmo platform... Apr 7 08:06:13 Homebridge homebridge[15171]: [2018-4-7 08:06:13] [eveatmo] Loading new data from API for: weatherstation Apr 7 08:06:14 Homebridge homebridge[15171]: [2018-4-7 08:06:14] [eveatmo] Initializing platform accessory 'Home Wohnzimmer'... Apr 7 08:06:14 Homebridge homebridge[15171]: [2018-4-7 08:06:14] [eveatmo] Initializing platform accessory 'Home Garten'... Apr 7 08:06:14 Homebridge homebridge[15171]: [2018-4-7 08:06:14] [eveatmo] Initializing platform accessory 'Home Badezimmer'... Apr 7 08:15:13 Homebridge homebridge[15171]: [2018-4-7 08:15:13] [eveatmo] Loading new data from API for: weatherstation Apr 7 08:24:13 Homebridge homebridge[15171]: [2018-4-7 08:24:13] [eveatmo] Loading new data from API for: weatherstation Apr 7 08:33:13 Homebridge homebridge[15171]: [2018-4-7 08:33:13] [eveatmo] Loading new data from API for: weatherstation Apr 7 08:42:13 Homebridge homebridge[15171]: [2018-4-7 08:42:13] [eveatmo] Loading new data from API for: weatherstation img_0177 img_0178

skrollme commented 6 years ago

Hello @r32er I'm facing the same situation as you. Almost no problems for a long time but then, from one day to another only gaps. I got everything back working by deleting the persistence-files of the history plugin and a homebridge restart. I'm not sure if this has something to do with the large history-size (>40k entries) I have chosen for the accessories. I will keep this in mind and keep you up to date on this.

r32er commented 6 years ago

Hey. For now it works fine to me.

I have reinstalled Homebridge complete with new node version and it works really good now !

skrollme commented 6 years ago

@r32er still everything fine with your setup? mine worked one week and then problems started to reappear. I had to delete the persistence-files and restart homebridge to get i back working. I'm not sure if it has something to do with using eve on an other device. Could this be a possible reason @simont77 ? Or maybe a to large persistence-size (currently 40k)

r32er commented 6 years ago

It works good over weeks. Since a few days a have gaps and the last 2 days no history. I come back home today and I restart the Homebridge. I think then it will work again

simont77 commented 6 years ago

It’s now several months that I have fakegato in two different plugins with 3 iOS devices, and I haven’t seen such problems. However I’m using the default history length

r32er commented 6 years ago

Hm. Even with Homebridge restart I have no history.

skrollme commented 6 years ago

ok, I will try to reduce the history length and publish an update today. I will also check if the gaps could be caused by the "disableTimer" setting for fakegato in homebridge-eveatmo.

simont77 commented 6 years ago

Also, I’m using the internal fakegato timer

palasinio commented 6 years ago

Hi,

I have gaps in history, too. I'll post a log, when I'm home again at weekend. In my case eveatmo stops polling weather data after the first connection failure and won't ever try again after ttl set intervall until restarting homebridge. It then only updates, when starting Home app.

skrollme commented 6 years ago

I just released an update (0.3.6) which reverts to the default fakegato-timer-handling and the default history-size. Please give it a try and let me know if this solves the gaps.

palasinio commented 6 years ago

Hi @skrollme, at this moment I have 0.3.5 running and had no failure of the internet connection since my last post and therefore no gap or error in my log. Remember: In my case retrieving weatherdata stopped after the first fail of getting data from Netatmo. Hope, I can reproduce this on weekend.

skrollme commented 6 years ago

Last night there was a connection-problem with the netatmo api and from that moment on I got some problem with the data-polling. No history gaps, but only because homebridge-eveatmo now uses the internal timer from fakegato which fills up the gaps.

I decided to look into the netatmo connection library and eventually fork it to offer another exception-handling.

I will keep you updated here.

palasinio commented 6 years ago

Hi,

today I had a network outage. Once eveatmo isnt't getting data, its not trying anymore. At 15:29:36 I opened the Home app. After restart everything is okay. Interesting: With version 0.3.6 I have no longer a history gap, but a straight line repeating the last value from 2018-6-1 20:01:50.

Log: [2018-6-1 18:09:50] [eveatmo platform] Loading new data from API for: weatherstation [2018-6-1 18:25:50] [eveatmo platform] Loading new data from API for: weatherstation [2018-6-1 18:41:50] [eveatmo platform] Loading new data from API for: weatherstation [2018-6-1 18:57:50] [eveatmo platform] Loading new data from API for: weatherstation [2018-6-1 19:13:50] [eveatmo platform] Loading new data from API for: weatherstation [2018-6-1 19:29:50] [eveatmo platform] Loading new data from API for: weatherstation [2018-6-1 19:45:50] [eveatmo platform] Loading new data from API for: weatherstation [2018-6-1 20:01:50] [eveatmo platform] Loading new data from API for: weatherstation [2018-6-1 20:04:03] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: No response [2018-6-1 20:32:03] [eveatmo platform] WARN - Netatmo: Error: Authenticate refresh error: No response [2018-6-2 05:46:10] [ZWayServer] ERROR: Request failed! Error code ECONNREFUSED. Check the URL in config.json and ensure that the URL can be reached from this system! [2018-6-2 05:46:12] [ZWayServer] ERROR: Request failed! Error code ECONNREFUSED. Check the URL in config.json and ensure that the URL can be reached from this system! [2018-6-2 05:46:14] [ZWayServer] ERROR: Request failed! Error code ECONNREFUSED. Check the URL in config.json and ensure that the URL can be reached from this system! [2018-6-2 05:48:07] [ZWayServer] ERROR: Request failed! Error code ECONNREFUSED. Check the URL in config.json and ensure that the URL can be reached from this system! [2018-6-2 05:48:09] [ZWayServer] ERROR: Request failed! Error code ECONNREFUSED. Check the URL in config.json and ensure that the URL can be reached from this system! [2018-6-2 05:48:11] [ZWayServer] ERROR: Request failed! Error code ECONNREFUSED. Check the URL in config.json and ensure that the URL can be reached from this system! [2018-6-2 05:48:43] [ZWayServer] ERROR: Request failed! Error code ECONNREFUSED. Check the URL in config.json and ensure that the URL can be reached from this system! [2018-6-2 05:48:45] [ZWayServer] ERROR: Request failed! Error code ECONNREFUSED. Check the URL in config.json and ensure that the URL can be reached from this system! [2018-6-2 05:48:47] [ZWayServer] ERROR: Request failed! Error code ECONNREFUSED. Check the URL in config.json and ensure that the URL can be reached from this system! [2018-6-2 20:06:25] [ZWayServer] ERROR: Request failed! Error code ECONNREFUSED. Check the URL in config.json and ensure that the URL can be reached from this system! [2018-6-2 20:06:27] [ZWayServer] ERROR: Request failed! Error code ECONNREFUSED. Check the URL in config.json and ensure that the URL can be reached from this system! [2018-6-2 20:06:29] [ZWayServer] ERROR: Request failed! Error code ECONNREFUSED. Check the URL in config.json and ensure that the URL can be reached from this system! [2018-6-2 20:09:32] [ZWayServer] ERROR: Request failed! Error code ECONNREFUSED. Check the URL in config.json and ensure that the URL can be reached from this system! [2018-6-2 20:09:34] [ZWayServer] ERROR: Request failed! Error code ECONNREFUSED. Check the URL in config.json and ensure that the URL can be reached from this system! [2018-6-2 20:10:27] [ZWayServer] ERROR: Request failed! Error code ECONNREFUSED. Check the URL in config.json and ensure that the URL can be reached from this system! [2018-6-2 20:10:29] [ZWayServer] ERROR: Request failed! Error code ECONNREFUSED. Check the URL in config.json and ensure that the URL can be reached from this system! [2018-6-2 20:13:28] [ZWayServer] ERROR: Request failed! Error code ECONNREFUSED. Check the URL in config.json and ensure that the URL can be reached from this system! [2018-6-2 20:13:30] [ZWayServer] ERROR: Request failed! Error code ECONNREFUSED. Check the URL in config.json and ensure that the URL can be reached from this system! [2018-6-3 15:28:41] [eveatmo platform] Loading new data from API for: weatherstation [2018-6-3 15:28:42] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Invalid access token [2018-6-3 15:29:36] [eveatmo platform] Loading new data from API for: weatherstation [2018-6-3 15:29:36] [eveatmo platform] Loading new data from API for: weatherstation [2018-6-3 15:29:36] [eveatmo platform] Loading new data from API for: weatherstation [2018-6-3 15:29:36] [eveatmo platform] Loading new data from API for: weatherstation [2018-6-3 15:29:36] [eveatmo platform] Loading new data from API for: weatherstation [2018-6-3 15:29:36] [eveatmo platform] Loading new data from API for: weatherstation [2018-6-3 15:29:36] [eveatmo platform] Loading new data from API for: weatherstation [2018-6-3 15:29:36] [eveatmo platform] Loading new data from API for: weatherstation [2018-6-3 15:29:36] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Invalid access token [2018-6-3 15:29:36] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Invalid access token [2018-6-3 15:29:36] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Invalid access token [2018-6-3 15:29:36] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Invalid access token [2018-6-3 15:29:36] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Invalid access token [2018-6-3 15:29:36] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Invalid access token [2018-6-3 15:29:36] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Invalid access token [2018-6-3 15:29:37] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Invalid access token [2018-6-3 15:29:37] [eveatmo platform] WARN - Netatmo: Error: getStationsDataError error: Invalid access token

regards,

Chris.

skrollme commented 6 years ago

FYI: I'm currently testing with a slightly altered netatmo-library and waiting for Netatmo API-problems to see how it behaves

palasinio commented 6 years ago

Sounds good..

skrollme commented 6 years ago

The new release is out now. No changes in the underlying netatmo-lib, but a modified polling in homebridge-eveatmo (should have seen this before -.-) Please update, test and let me know how this works

palasinio commented 6 years ago

THX! I‘ve installed it and now we‘ll see :)

palasinio commented 6 years ago

Hi, I just want to inform you that v0.3.7 survived three network outages today and is still polling weatherdata in the defined interval. Good work, THX!

skrollme commented 6 years ago

Great. For me the plugin works for a few weeks without gaps as well. So I can finally close this :D Thanks for all your help