home_assistant_adax icon indicating copy to clipboard operation
home_assistant_adax copied to clipboard

Move to local rather than cloud API ?

Open ianfretwell opened this issue 3 years ago • 3 comments

Hi,

I believe the integration is currently using the cloud to perform actions against the devices. Is there any plan to move to the local API that's documented here? As that would seem to be more in-line with the HA ethos of 'local control'

https://adax.no/wi-fi/api-development/#local

Apologies if this is already the case (but having to create an account makes me think I'm probably right).

Regards, Ian

ianfretwell avatar Jan 19 '22 09:01 ianfretwell

You can find the local integration here: https://github.com/Danielhiversen/home_assistant_adax_local

Mace404 avatar Jan 24 '22 13:01 Mace404

Thats great thanks.

How do I get that to appear in HACS though - when I search for 'adax' the one we're commenting on now is the only one that shows up ?

Scratch that I've done it. Still can't make it work though - all HA shows when I try to add the integration is the in-built (cloud) Adax integration. Do you actually have it working locally then ? If so I'm gonna guess that you set it up before the cloud integration was added to HA as an inbuilt integration?

ianfretwell avatar Jan 24 '22 14:01 ianfretwell

It appears this is all irrelevant as it looks like local access is going to be included as of 2022.2.x anyway. Which would be great except that after all this messing around trying to get local access working - I've now removed everything to go back to the inbuilt one and ... it won't connect when I add the API details in. Created a new API credential, same problem - won't connect. So completely frustrating when stuff like this happens.

Error message is:- Adax: Failed to login to retrieve token: 400 {"error": "invalid_grant"}

So, I think the configuration notes could be made a bit clearer on the fact that the "remote API credential" isn't the Account ID...working again now.

ianfretwell avatar Jan 24 '22 17:01 ianfretwell