nimroddolev / akuvox

Home Assistant integration to add Akuvox SmartPlus door cameras, door open relay buttons and temporary keys
MIT License
17 stars 3 forks source link

Api is updated #10

Closed XOTAB1CH closed 1 year ago

XOTAB1CH commented 1 year ago

System Health details

Raspberry PI 4B + Argon One M2 SSD

Checklist

Describe the issue

There are new fields in the server list, passwd instead of auth_token, I replaced all auth_token fields with passwd and it worked

Reproduction steps

replace all fields "auth_token" to "passwd" in files

api.py config_flow.py entity.py translations/en.json

Debug logs

null

Diagnostics dump

No response

nimroddolev commented 1 year ago

Hi @XOTAB1CH thanks for opening this task. I don't see the new passwd field in any of the API responses, there must be a difference/s between our accounts and/or the API version we are using. To help pinpoint, could you please share the device you have the SmartPlus app installed on, as well as anything else which might be relevant?

XOTAB1CH commented 1 year ago

IOS 17.0.2, last version of app Check via mitmproxy https://gate.ecloud.akuvox.com:8600/servers_list when auth in app image

nimroddolev commented 1 year ago

Thanks for the quick reply. We're both on iOS and in the servers_list response we are both on api-version 6.6 but have different fields in the response JSON...strange. I will handle both options and push a bugfix release. I would appreciate it if you could please test the new version once available.

XOTAB1CH commented 1 year ago

Thanks

nimroddolev commented 1 year ago

Hi @XOTAB1CH, can you please apply the change in commit |https://github.com/nimroddolev/akuvox/commit/903c42c01e1f677966245c5f430cd4cfeeccabc7 and let me know if the issue is resolved for you?

XOTAB1CH commented 1 year ago

Not work, maybe field "auth_token" must be as optional in json, when i also changed user agent and x-cloud-lang and accept-language, and then its work, and replace all auth_token to passwd fields, my region Europe/UA

XOTAB1CH commented 1 year ago

home assistant didn't update the repository, added the field manually via file editor and everything worked

nimroddolev commented 1 year ago

Excellent. I have released a new version with the fix.