jaroschek / home-assistant-myuplink

Custom Home Assistant integration for devices and sensors in myUplink account.
39 stars 8 forks source link

Update version to 1.2.0 #65

Closed jaroschek closed 4 months ago

jaroschek commented 5 months ago

The version 1.2.0 is currently planned to provide the following new features:

There is one thing to mention, that I'm still not quite sure, if these features would be worth.

In issue https://github.com/jaroschek/home-assistant-myuplink/issues/15 we observed, that the API would timeout from time to time. The solution to this problem was to reduce the number of requests to the API.

The new features for version 1.2.0 do now require additional requests:

As the update coordinator is currently configured to poll every 60s this could cause problems with the request limitations of the API (see https://dev.myuplink.com/intro Rate Limiting and Client Abuse):

The myUplink API is rate limited. All requests reaching the myUplink API is counted and when the limit has been reached the following requests will get an error message with the HTTP status code 429 in return. The current limit for public API clients is one request every 4th second with occasional bursts allowed. These limits can be be adjusted at any time without notice if deemed necessary.

If an application or client is found abusing the API in any way, myUpTech AB has the right to block it until the client owner has solved the issues highlighted by myUplink.

(The API implementation already contains throttling, to only allow 1 request every 5s. This leads to a limit of 12 requests every 60s.)

But there could be a simple solution: As observed with my integration, the values/states of the parameters points are only updated every 5 minutes. But the integration is polling the API every minute (60s). As this seems unnecessary frequent, the polling interval could be increased to 300s (5 minutes).

siggeb commented 5 months ago

Since I just tried your alpha release, let me put this here. It seems that I am notified that an update is available, but for my heat pump, there is actually no new firmware available.

For CTC (which are also using myUplink) the firmware releases are here: https://software.ctc.se/ Not sure where you are getting the input from, but it would obviously be great to get notified also for CTC firmware updates =)

image

image

jaroschek commented 5 months ago

Thanks for feedback to this feature. As I can see from your screenshot, there is no latest version available from the API.

I'm using the api endpoint /v2/devices/{deviceId}/firmware-info to check for available firmware updates. So there is no manufacturer specific solution.

This endpoint should at least provide information about the current installed firmware and the latest available firmware. But it seems, these value can also be empty as in your case. So I will fix the comparison of firmware strings to exclude empty values.