Apollon77 / ioBroker.daikin-cloud

ioBroker Adapter for Daikin-Cloud devices
MIT License
16 stars 6 forks source link

Remaining Rate limit as data point #220

Closed Volker88 closed 4 months ago

Volker88 commented 4 months ago

Currently the remaining rate limit is only visible in the debug log. Would be good to have this also as an data point so we could better see it and trigger actions like notification if it's getting close to 0 etc.

Apollon77 commented 4 months ago

Good Idea. I will add

gahujipo commented 4 months ago

By the way. It seems that the calculation of the retry seconds is not 100% correct (see first line). This would be 15 days. immagine

And is the polling interval warning always there? Because with an interval of 520 seconds i would have 167 requests per day.

Apollon77 commented 4 months ago

The value for "retry after "comes from Daikin. I will write them

167 means you only have 33 calls left to control your device and each "control" uses 2 calls (at least - 1x write, 1x read), so you have 16 control operations in 24h left ... is that sufficient for you really?

And honestly 500s vs 520s does not make too much difference.

But ok I change that to be an info log ... but ok I will adjust the limit here to 500

Volker88 commented 4 months ago

I just had a look at the logs and found that i have multiple different entries for "RemainingDay". Is this limit for each of my air contitioning units different or is there one limit for all together?

image

Apollon77 commented 4 months ago

Normally "all together", but I also do not know how they exactly calculate the limit ... could also be a moving window or such.

gahujipo commented 4 months ago

The value for "retry after "comes from Daikin. I will write them

167 means you only have 33 calls left to control your device and each "control" uses 2 calls (at least - 1x write, 1x read), so you have 16 control operations in 24h left ... is that sufficient for you really?

And honestly 500s vs 520s does not make too much difference.

But ok I change that to be an info log ... but ok I will adjust the limit here to 500

Of course you're absolutely right. I didn't realize that each control creates 2 requests: 1x write, 1x read. I'll go with a 900 intervall for the moment.

Apollon77 commented 4 months ago

please try 0.4.1 from GitHub

Apollon77 commented 4 months ago

@gahujipo Can you please send me your client id you received this very high number with? Daikin guys would like to look into it

gahujipo commented 4 months ago

dMb8hKfz09L8IYCY7tNXecby

Apollon77 commented 4 months ago

Thanks, I asked Daikin to check why it was that long