Comments (3)
It's a tricky one...
Due to the API rate limits it is necessary to rely entirely on the event stream... so when the event stream is terminated there is a window where events may be lost and the state of the appliances can start to differ from what the plugin has cached. Hence, it is best to try and re-establish the event stream as quickly as possible to minimise potential issues. I therefore don't want to introduce any delays before trying to reconnect (other than where unavoidable due to the rate limits).
It is also an aspect of the API that has shown quite a few problems previously, some of them very intermittent and hard to reproduce. For this reason I am also reluctant to reduce the amount of information that is logged. Without logs of each connection attempt and its outcome I wouldn't have been able to diagnose and workaround some of the previous failure mechanisms.
I could possibly add a delay before retrying for this one specific error message. It probably won't ever be triggered again after today's outage, so that doesn't really seem worth it.
The only other idea I currently have is to implement a new log filtering mechanism, between the raw log messages and the Homebridge log facility. This would need to keep a history of recent log entries, identify duplicates of recent entries, and have rules for how frequently duplicates should be written to the log. However, it would take a reasonable amount of effort to do something worthwhile, and the danger is that it would make routine logs more difficult to analyse and interpret. Again, for something that is probably a one-off event it doesn't seem worth the effort.
from homebridge-homeconnect.
Checking my own server's log it looks more like this (because I run with debug enabled for my own plugins):
Oct 21 17:00:34 i7pc homebridge[30342]: [10/21/2020, 17:00:34] [HomeConnect] Starting events stream for all appliances
Oct 21 17:00:34 i7pc homebridge[30342]: [10/21/2020, 17:00:34] [HomeConnect] Home Connect request #61992: STREAM https://api.home-connect.com/api/homeappliances/events
Oct 21 17:00:34 i7pc homebridge[30342]: [10/21/2020, 17:00:34] [HomeConnect] [Oven] Events may have been missed; treating appliance as disconnected
Oct 21 17:00:34 i7pc homebridge[30342]: [10/21/2020, 17:00:34] [HomeConnect] [Induction Hob] Events may have been missed; treating appliance as disconnected
Oct 21 17:00:34 i7pc homebridge[30342]: [10/21/2020, 17:00:34] [HomeConnect] [Dishwasher] Events may have been missed; treating appliance as disconnected
Oct 21 17:00:34 i7pc homebridge[30342]: [10/21/2020, 17:00:34] [HomeConnect] Home Connect request #61992: Service Temporarily Unavailable +102ms
Oct 21 17:00:34 i7pc homebridge[30342]: [10/21/2020, 17:00:34] [HomeConnect] Terminated events stream for all appliances: Home Connect API error: Service Temporarily Unavailable
Oct 21 17:00:34 i7pc homebridge[30342]: [10/21/2020, 17:00:34] [HomeConnect] [Oven] Event STOP (0 items)
Oct 21 17:00:34 i7pc homebridge[30342]: [10/21/2020, 17:00:34] [HomeConnect] [Induction Hob] Event STOP (0 items)
Oct 21 17:00:34 i7pc homebridge[30342]: [10/21/2020, 17:00:34] [HomeConnect] [Dishwasher] Event STOP (0 items)
Oct 21 17:00:34 i7pc homebridge[30342]: [10/21/2020, 17:00:34] [HomeConnect] Starting events stream for all appliances
Oct 21 17:00:34 i7pc homebridge[30342]: [10/21/2020, 17:00:34] [HomeConnect] Home Connect request #61993: STREAM https://api.home-connect.com/api/homeappliances/events
Oct 21 17:00:34 i7pc homebridge[30342]: [10/21/2020, 17:00:34] [HomeConnect] [Oven] Events may have been missed; treating appliance as disconnected
Oct 21 17:00:34 i7pc homebridge[30342]: [10/21/2020, 17:00:34] [HomeConnect] [Induction Hob] Events may have been missed; treating appliance as disconnected
Oct 21 17:00:34 i7pc homebridge[30342]: [10/21/2020, 17:00:34] [HomeConnect] [Dishwasher] Events may have been missed; treating appliance as disconnected
Oct 21 17:00:34 i7pc homebridge[30342]: [10/21/2020, 17:00:34] [HomeConnect] Home Connect request #61993: Service Temporarily Unavailable +105ms
Oct 21 17:00:34 i7pc homebridge[30342]: [10/21/2020, 17:00:34] [HomeConnect] Terminated events stream for all appliances: Home Connect API error: Service Temporarily Unavailable
Oct 21 17:00:34 i7pc homebridge[30342]: [10/21/2020, 17:00:34] [HomeConnect] [Oven] Event STOP (0 items)
Oct 21 17:00:34 i7pc homebridge[30342]: [10/21/2020, 17:00:34] [HomeConnect] [Induction Hob] Event STOP (0 items)
Oct 21 17:00:34 i7pc homebridge[30342]: [10/21/2020, 17:00:34] [HomeConnect] [Dishwasher] Event STOP (0 items)
For log message filtering to be useful in this case it wouldn't just need to check for an exact match in recent log messages, but it would need to be some form of fuzzy match due to the inclusion of the API request numbers and timings. Even less worth the effort...
from homebridge-homeconnect.
It looks like the API has been fine for the last hour.
Unless outages with this failure mode become a regular issue I am not going to do anything to reduce logging, so am closing this issue for now.
from homebridge-homeconnect.
Related Issues (20)
- HomeConnect API unexpected values (CM936GCB1/C5) HOT 2
- Plugin does not support HOOBS / Node 16 (duplicate) HOT 2
- Bosch Dryer WQB245B40/01 and Bosch Washer WGB244A40/09 HOT 2
- HomeConnect API unexpected values (WG56B2A1GB/11 and WQ46B2C9GB/01) HOT 2
- 0.42.1. CompileError: WebAssembly.compile(): Compiling function #66 failed: Wasm SIMD unsupported @+5368 (older version works!) HOT 7
- HomeConnect API unexpected values (CM936GCB1/C5) HOT 2
- HomeConnect API unexpected values (WAV28M43/07) HOT 2
- HomeConnect API unexpected values (WG56B2A9NL/11) HOT 2
- HomeConnect API unexpected values (WT47XM40/01) HOT 2
- I keep getting blocked out from the API HOT 9
- Warning message and accessories not showing HOT 2
- HomeConnect API unexpected values or mismatched types HOT 4
- Disappearing program options (WTX87KH9IT/01) HOT 13
- HomeConnect API unexpected values (WTX87KH9IT/01) HOT 1
- Home Connect API forbidden from Russia HOT 1
- Home Connect API Error: ERROR: Error: getaddrinfo ENOTFOUND api.home-connect.com HOT 2
- HomeConnect API unexpected values (SMS6HMI03Z/15) HOT 2
- HomeConnect API unexpected values (HN678G4S6/82) HOT 2
- HomeConnect API unexpected values (CM936GCB1/C5) HOT 2
- HomeConnect API unexpected values (HN678G4S6/B9) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebridge-homeconnect.