Closed CreateYourAccount-username closed 10 months ago
I have the same problem with my integration - it was working fine, 2 days ago entities become unavailable and I get the same error (500).
I've tried to reproduce this. But I don't get this error. It looks for me like a server-side problem. Maybe you can try again. And if it still doesn't work ask Husqvarna, if they have an idea?
I've tried to reproduce this. But I don't get this error. It looks for me like a server-side problem. Maybe you can try again. And if it still doesn't work ask Husqvarna, if they have an idea?
Before I contact Husqvarna, can I just check something with you (or someone else if anyone else is reading)? My knowledge of APIs is extremely limited and have very basic knowledge of Python etc. But with help of the API section on the Husqvarna Developer website I managed to authenticate myself and get a token. With this token I can request a list of all my mowers --> GET /mowers. I do get a valid 200 response, but it is an empty list:
{ "data": [] }
I'm assuming this is where the fault comes from as it cannot select index 0 from an empty list. Could you show me what your (or another) valid GET /mowers result looks like?
(edit: Apologies I marked it as 'not planned' and then reopened. Not sure how to remove that. n00b on GitHub...)
Something like this: https://github.com/Thomas55555/husqvarna_automower/blob/8c72c1a7960c5e1f984d983f2229fa1128a6d70b/custom_components/husqvarna_automower/tests/const.py#L48
What is the automower connect app showing?
Something like this:
What is the automower connect app showing?
Thanks for that.
Connect app is working perfectly. I'll see if I can get an answer out of Husqvarna...
Got a reply from Husqvarna that put me on the right track. I had made a developer account with a different email address in the past. So I had 2 accounts. When I logged in recently, the browser these newer credentials were used so the email for Developer Account and Automower App did not match. Hence the empty list as the Developer Account had no mowers.
In summary, user error!
Prerequirements [✅] I have connected my mower(s) to the Automower Connect App [✅] I have connected my Husqvanra developers account to the Authentication API [✅] I have connected my Husqvarna developers account to the Automower Connect API
Describe the bug On installing the integration I have no errors. Then when the install completes I have the Husqvarna Automower integration, but it does not create a device/entity.
When I click on CONFIGURE I get
ERROR: Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble
Expected behavior I expected the device to be created.
Screenshots
Additional context I have had this integration up and running in the past. But when I got the reauthenticate error months ago I could not fix it and deleted it. So currently I am trying to reinstall. I cannot find any entities left over from the previous install. I have removed the integration and rebooted a few times to no avail. Also when the integration was removed I made sure the credentials were deleted. Also made sure all files were deleted from custom_components dir. With the current install I also tried to remove the credentials and configure again to no avail. Curl check as described on Husqvarna Developer Portal works correctly.
Enabled debug logging with following result: