Closed FunkeyMonkey closed 4 months ago
I have also been seeing this issue occasionally during the same time period. Generally, any error given by a server in the 5xx range means "I am broken" as opposed to "your request is bad" so the most likely explanation is that Bestway/gizwits is having server trouble/a bad deploy and there's nothing to be done to fix anything in this ha integration.
Edit: it is also possible that this client is holding onto stale IPs/isn't refreshing DNS often enough but a cursory dive through the code doesn't seem to indicate that as the problem. This also seems unlikely as the issue seems to have started unrelated to any changes to ha-bestway.
Hmm, I am now consistently seeing these 502 errors every few minutes. Since the requests do eventually go through, I suspect that the Bestway servers are just having a hard time. I tried using the first-party iOS app a few times in the past few days and I notice that the app will frequently swallow my inputs, but as a new owner of this spa/new user of the app I don't know if it's just always been this bad or if it's a new phenomenon.
I guess it's a good excuse/motivator for me to learn this codebase and improve the HTTP error handling.
I've been seeing these for a few weeks now. I thought I got around them by using Repeat Until building blocks in my Automations, and setting the Action against the Spa to continue on error. But this doesn't appear to be working either, the Automations don't complete properly when this error is received.
If receiving the errors cannot be circumvented, could their handling be improved in the integaration so that HA Automations don't break?
Closing this as there's not much we can do about 5xx
errors. The best bet would be a change of approach as described in #28, as that would allow us to communicate with the spa locally, but that's a fair chunk of work.
I don't think suppressing the errors is the right answer here, however if there's a recognised design pattern or some precedence for a different approach, I'm open to suggestions as part of a separate discussion.
There are several things we can do here, in order from least effort to most effort (hopefully I will find some time in the coming weeks to chip away at the list):
Version of the custom_component
Bestway device
Airjet V01 wifi model
Describe the bug
I've been getting these error logs for the last few days now
Logs