core: Adax integration dont work

The problem

It has worked fine for a long time, but this morning all the heaters were unavailable. in my log it says

Logger: adax Source: components/adax/climate.py:58 First occurred: 14.11.49 (3 occurrences) Last logged: 14.51.00

Adax: Failed to login to retrieve token: 400

maybe a API problem. i have tryed to delete the integration restart, then set it up again, with new API but it dit not helped

What version of Home Assistant Core has the issue?

core-2023.10.3

What was the last working version of Home Assistant Core?

core-2023.10.3

What type of installation are you running?

Home Assistant OS

Integration causing the issue

ADAX

Link to integration documentation on our website

https://www.home-assistant.io/integrations/adax

Diagnostics information

home-assistant_adax_2023-10-18T15-22-24.038Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: adax
Source: components/adax/climate.py:58
First occurred: 14.11.49 (3 occurrences)
Last logged: 14.51.00

Adax: Failed to login to retrieve token: 400

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Comments: 31 (2 by maintainers)

Most upvoted comments

@Danielhiversen sounds great to query for multiple devices at a time.

For what it’s worth, I sent Adax another mail, encouraging them to reassess their policy regarding rate limit & black listing, in the event they desire to come across as a modern IOT brand. And in case they want to protect themselves against excessive traffic, they could probably solve this better, and possibly get some advice for free from dev society. It’s annoying to see, they are almost there with a good API, but just not quiet. And now I better understand why I’ve always experienced the devices as being unresponsive, whether it’s via their own app/tibber/HA.

I can see that there are several errors reported in on this (All except 1 is related to stability of this integration)

Since the author of this Integration isn’t replying

Maybe we should get the source and develop a new integration that has better error handling and also give the power consumption of this devices

Seems that most errors on this module is related the lack of error handling so when Adax API gives an error this integration just dies

Possible fix if anyone wants to test: https://github.com/Danielhiversen/pyAdax/blob/c3cff9eaee225433b9de804b86af0f0acfc69dfb/adax/__init__.py

It is possible to fetch the state for all devices with one request, so it is better than I thought earlier. The risk of getting banned for 1 day is still high, so would not recommend depending on the Adax cloud API.

@wessa66 Great info, thanks.

twice or less in a minute

So that means if we want to change the temperature of two heaters. We have to send two requests, but wait 1 minute before we can ask for updated info. (To confirm that the temperature changed)

If we want to change the temperature of 3 heaters it will take more than one minute to send all 3 requests.

This makes the API pretty useless.

It makes it difficult to include energy data, since that requires another request.

I will try to improve it, but we would need to reduce the update rate a lot.

Adax should update the API documentation https://adax.no/en/wi-fi/api-development/

@Danielhiversen I agree to the above it makes the API rely useless, I think the best should be if you could reach out to Adax and ask what they are doing!?

I will send a new mail to them and ask them to update there API development guide as that is no relevant anymore (I will cc you on that with mail I found in you Git profile) /A

@Danielhiversen I have got this from Adax support I don´t know how tha API polling is created ,is this something we can control from HA or is this polling scheduled within the addon? I have eight Adax objects on a dashboard so how often are the API calls done?

My question to Adax and answer in Bold from Adax

1.do you mean one API call per 30 second, so twice in a minute? Adax answer= twice or less in a minute 2.how is the API calls counted, is it counted in total requests per account(logged in sessions) or per IP address or in conjunction?? Adax answer= all calls are counted 3.And how long is the API calls blocked after this error? Adax answer= until next day

/Anders

I agree with @TheDiverM

For what it’s worth, I asked ADAX if there were any general issues with their API starting about a month ago, and they responded rather quickly that all is working as normal. Thought I’d drop this here so we don’t overload them with the same question.

Same happened to me looks like the api went down again. Shame no one has managed to get tasmota on these heaters.