core: The Sure Petcare integration randomly becomes unavailable
The problem
The Sure Petcare integration randomly becomes unavailable, and therefore I can’t unlock/lock my cat flap anymore.
At that time, the app seems also slow. I’m not sure if that’s related though as the app is always slow and sluggish. It does work via the app, but HA still shows Unavailable.
E.g. 11 minutes ago it became unavailable:
I could log in via the website fine, which I believe uses the same API, see further more for details.
After ~23 minutes the problem has been resolved this time, but it is going to happen again I’m sure.
Our network is very stable and I don’t have any other networking issues. No other issues in HA.
What version of Home Assistant Core has the issue?
core-2023.8.0
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
surepatcare
Link to integration documentation on our website
https://www.home-assistant.io/integrations/surepetcare
Diagnostics information
home-assistant_surepetcare_2023-08-04T06-43-16.215Z.log
Example YAML snippet
n/a
Anything in the logs that might be useful for us?
2023-08-04 18:15:28.145 ERROR (MainThread) [surepy.client] Can not load data from https://app.api.surehub.io/api/me/start
2023-08-04 18:15:28.153 ERROR (MainThread) [homeassistant.components.surepetcare] Error fetching surepetcare data: Unable to fetch data:
2023-08-04 18:31:11.144 ERROR (MainThread) [surepy.client] Can not load data from https://app.api.surehub.io/api/me/start
2023-08-04 18:31:11.146 DEBUG (MainThread) [homeassistant.components.surepetcare] Finished fetching surepetcare data in 60.003 seconds (success: False)
Additional information
I was able to log in to the website fine via https://www.surepetcare.io/account but at the same time HA threw above error in the logs about not being able to load the data from the API. It also called the same endpoint with a proper 200 result in the website:
I’ve also sent them an email to ask if they are aware of server issues.
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 16 (1 by maintainers)
Changing the user agent has no effect. I still got connection issues. Today at 15:18, 06:43 and 06:23 CEST. I analyzed the last 3 weeks (07.08. - 27.08.) and thats the result: 06:20 - 06:48 | 20x 07:10 - 08:00 | 5x 08:40 - 10:10 | 5x 13:00 - 15:00 | 4x 16:40 - 18:05 | 15x 21:20 - 22:30 | 5x Time in CEST (UTC +02:00).
It doesn’t look like the connection issues are random, rather than at regular times of the day. So I guess it’s a load issue on surepetcare side.
Does someone know the new path of the surepy/const.py to change the user agent? The one mentioned in this comment no longer exists … Edit: it just changed to python3.11 so I changed my user agent and I will see if it becomes still unavailable sometimes.
I have the same issues with the integration