Home Connect binding

that’s the version I copied in addon folder

org.openhab.binding.homeconnect-3.1.0.202105061017-3.1.0-SNAPSHOT.jar

Just wondering about the version in the error message - 3.1.0.202105021543.
This was the previous version I used. But I just rebuilt the docker container and remove tmp and cache folder.

This is so cool. :wink: I just added my fourth device (coffee machine) and it works perfectly.
Would it be possible to read it‘s statistic? I‘d love to use information such as cups left till next descaling or cleaning for notifications.

Thanks again for this binding!!

Hi Jonas,

I still get below errors sometimes. Any idea?

Thanks
stefan


2021-05-28 15:31:25.633 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'homeconnect:Washer:36dd7e33ac:SIEMENS-WM16XMJ00P-68A40E508C67' changed from OFFLINE (COMMUNICATION_ERROR): Home Connect service is not reachable or a problem occurred! (Communication error! response code: 429, message: Too Many Requests, body: {
  "error": {
    "key": "429",
    "description": "The rate limit \"1000 calls in 1 day\" was reached. Requests are blocked during the remaining period of 64536 seconds."
  }
} (Tried at Fri May 28 15:27:25 CEST 2021)). to OFFLINE (COMMUNICATION_ERROR): Home Connect service is not reachable or a problem occurred! (Communication error! response code: 429, message: Too Many Requests, body: {
  "error": {
    "key": "429",
    "description": "The rate limit \"1000 calls in 1 day\" was reached. Requests are blocked during the remaining period of 64296 seconds."
  }
} (Tried at Fri May 28 15:31:25 CEST 2021)).

How many devices do you have ?

You could look to the special UI page “/home connect” and see what were your last requests run by the binding.

Only 2 devices. I already disabled the bridge for some hours to get rid of the error. Now it works again.
However I shared all logs the last time when the error happend.

I created one application per appliance to be on the save side. Since, I never had any rate limitation anymore.
I have 6 all in all and I didn’t see a limit on application number in the dev portal.

No need to send anything, you can analyze by yourself, you just need to look at the requests that were run by the binding during this hour.
Just open http://192.168.x.xx:8080/homeconnect and click on “API Requests”. You will find a table containing the last 50 requests run by the binding. This will help to understand what are the run requests and why you have so many.

That is a solution, maybe just a little excessive :slight_smile:
But maybe required when you have many appliances.

For only 2 appliances, I doubt it is necessary.

Good morning :smiley:

Actually, this is no longer necessary. The current binding version ensures that the limit is not exceeded. On the other hand, it is not bad to use multiple bridges.

Strange problem. Next time could you please see when the last SSE message was received. It would be important to compare this time stamp with the last successful Home Connect API access. You can find this information on in the binding interface (http(s)://ip:port/homeconnect).

On one of my test installations I had 429 errors from time to time. What I have found out so far is that if the access data expires after 24 hours, the binding gets a new access token and re-initializes itself.

  1. GET …/homeappliances/xyz ← works
  2. Create SSE connection ← doesn’t work
  3. re-initialize → start with 1.

The establishment of the SSE connection is rejected (status 401) because the new access token is apparently invalid. But that cannot actually be the case. Usually it works after 2-30 minutes. But if not, the process is repeated every 20 seconds and the daily limit (1000 requests) is reached and you get 429 errors.

I don’t know for sure, if you face the same problem like I described.

I have already sent a description of the error to the Home Connect developers. I’m still waiting for an answer.

What else could you try? You could try to check that your time is set correctly.

It just happen again - I got error 429 in API Request logs suddenly. However no log entries in SSE Event - this log is empty. Strange problem. Time seems to be correct.

If you want to help and give us a chance to fix something, please analyze the API requests that were frequently run before the 409 error. What kind of requests? For which device in particular? You can do that just by opening the special binding UI page.

I run a dryer and washing machine. I exported the API request on the HomeConnect API Console.
It contains the 200 and 429 messages. I can share with you the json file if this helps.

I would expect to see more requests before the one triggering the 429 to give a chance to find which ones are repeated often. And as you masked the end of your requests, so we even have no idea what are your request types ! Is there a sub-path in what you masked or not?

I shared with you the full api export in a personal mail.

Look at your JSON. very difficult to imagine what could happen with only 5 requests before the first one triggering the 429 ! What I can guess is that each of your 2 appliances are executing the same request called by the method refreshThingStatus.
Are you two appliances offline ?
I guess it could be the 2 offline monitoring threads that trigger that but I don’t understand at all why it is every 15 seconds.
In my case, it is every 30 seconds and I don’t understand why this frequency too.
Looking at the code, I see one scheduled every 4 minutes and one scheduled every 30 minutes.
Strange.

You are running a recent 3.1 version like 3.1M5 or a recent 3.1 snapshot ?

By the way, that is a paradox to have a lot more requests executed when the appliance is OFF than when it is ON.

I will try to understand why the frequency is 30 seconds in my case.
I am afraid that the OFFLINE monitoring thread(s) are rescheduled more than expected.

Today, I got the 429 error message, too and my api is blocked for 24h. I have only one appliance (Bosch washer).

Status: OFFLINE

**COMMUNICATION_ERROR**

Home Connect service is not reachable or a problem occurred! Retrying at Wed, 2 Jun 2021 16:30:46 +0200 (Communication error! response code: 429, message: Too Many Requests, body: { "error": { "key": "429", "description": "The rate limit \"1000 calls in 1 day\" was reached. Requests are blocked during the remaining period of 73083 seconds." } } (Tried at Wed Jun 02 16:28:46 CEST 2021)). bridge=Home Connect API

The washer once it completes program and is turned off appears offline in OH (that is when the HC binding is working).

I think we all encounter the same problem. We are working on it.

I made a mistake in what I said earlier. In my case, when the appliance is off, I see a new request every 30 minutes and not every 30 seconds as I previously said. So it is normal, this is the first offline moniroting thread which checks every 30 minutes if the appliance is still really offline.

Your problem is probably a bad handling when renewing the authorization every 24h.

I don’t think I encounter myself the problem you are many to encounter. Weird.

It was running 3.1.0M4 with homeconnect-3.1.0.202105061017-3.1.0-SNAPSHOT
However I installed 3.1M5 yesterday and use the binding included in this version now.

I’m can confirm your behavior - I see every 30min an API 200 event for both washing machine and dryer.
I just startet the washing machine and I can see now every 60sec a Notify Event. However the API request are still only every 30min - even when the machine is running.

You said, I have to check the JSON - but where can I do this? :woozy_face: