sh00t2kill / petoneer_custom_component

A custom Home Assistant Component for WiFI enabled pet water fountains by petoneer
2 stars 0 forks source link

Error setting up entry Petoneer Revogi #24

Closed BambamNZ closed 8 months ago

BambamNZ commented 8 months ago

Hi

Thank you for the integration, been using it the last couple of weeks, after dealing with the not so smart app.

However earlier today it seems to have stopped working, only noticed after restarting HA for unrelated updates.

This is the log extract that seems to be of relation to the integration

2024-03-19 21:17:39.472 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Petoneer Revogi for revogi Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 504, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/revogi/init.py", line 44, in async_setup_entry await pet.auth(username, password) File "/config/custom_components/revogi/petoneer.py", line 86, in auth if (json_resp['data']['accessToken']):


KeyError: 'data'

Looking at the code, this seems to be the "auth token" that is expected back.

Opening a browser to: https://as.revogi.net/app/user/101 yeilds the following error message:  {"msg":"uc-service not online","code":"400"} 

This leads me to suspect there is a issue the provider, but wanted to confirm / highlight to you. 

Cheers
sh00t2kill commented 8 months ago

I don't actually have a working device any more, however I just re-enabled the integration and it connected fine.

Maybe a temporary glitch from the upstream provider?

If it's not working after a restart, can you please enable debug logging and send me the log?

BambamNZ commented 8 months ago

Indeed a problem with the provider, just retested

Got a better response from the API call : {"msg":"system error","code":400,"response":101}

Also restarting the gave me all the sensors back.