Home Connect binding

Hi, does anyone know why this error appearing in the log? Also all the home connect devices stopped working.

2022-04-14 06:26:25.419 [WARN ] [lient.HomeConnectEventSourceListener] - More than 10 active event monitoring channels was reached. Further event monitoring requests are blocked. haId=BOSCH-HRG8769C6-***
2022-04-14 06:26:25.579 [WARN ] [lient.HomeConnectEventSourceListener] - More than 10 active event monitoring channels was reached. Further event monitoring requests are blocked. haId=SIEMENS-LF91BUV50-***
2022-04-14 06:26:26.295 [WARN ] [lient.HomeConnectEventSourceListener] - More than 10 active event monitoring channels was reached. Further event monitoring requests are blocked. haId=SIEMENS-KA92DHB31-***
2022-04-14 06:26:26.666 [WARN ] [lient.HomeConnectEventSourceListener] - More than 10 active event monitoring channels was reached. Further event monitoring requests are blocked. haId=BOSCH-CTL836EC6-***

Hi @goldie

unfortunately you can connect only 10 devices at the same time.
The Home Connect system changed the need to have a separat monitoring channel (SSE) last year. Now one connection is enough. Unfortunately the binding doesn’t support the new mode yet.

Greetings,
JB

Hi,

is there anyone else having trouble to log in with single-key? I receive

HTTP ERROR 500 Could not fetch token!

Cheers
Chris

Hello,

I have the same problem. I tried to create a new Home Connect account. My only option was to create a SingleKey ID (the old way is not available anymore). Unfortunately the SingleKey ID does not seem to work with the binding …

Cheers

FDW

@Fdewaele , did you make a developer account as described on de given information ?

Just got a new dishwasser with home connect support. I followed the instructions of de binding and it works. I also had to use the singlekey ID for the home connect account

Hi @chr1s ,Fdewaele ,

just switchted to SingleKey ID and it worked. Do you still have the problem?

Greetings,
JB

I’ve got a new oven (HB478G0B6) added this to my already working home connect binding(for the washing machine). But the only information I get is Power_State and Cavity_Temperature, all the other channels are NULL of UNDEF. Tried starting some different programs, but don’t get any information. Anything I can do to test?

Hi,
im working on openHAB and Home Connect Appliances as part of my thesis - and I’m fairly new to this. In our laboratory there is a fridge freezer with cameras.
I’ve talked to Home Connect and they granted me the images scopes.

My question: is there a way to access these pictures in openHAB? I’m using version 3.2.0 version for both openHAB and the binding.

Greetings
Max

Hi Max,
I’m afraid there is no way to access the images. You would have to adjust the binding code (add the new auth scopes and add the channels to fetch the image).

Greetings,
Jonas

Hello @jb4711,

I think I found a bug in your Binding:

In the last weeks I had problems with my internet connection from time to time. However, I have to investigate this further…
I then noticed that I no longer received any messages from my washing machine during the next wash cycle. In the /homeconnect console, the Thing was online, but the sse connection = 0! Restarting the Binding helped immediately and the sse connection was back. But I think the Thing should not be shown as online if the sser connection is down, right?

In the log then the following can be found:

Error when internet was down

2022-09-05 06:51:46.316 [WARN ] [internal.client.HomeConnectApiClient] - Failed to get home appliance! haId=SIEMENS-WM14VMG2-***, error=DNS timeout 15000 ms

2022-09-05 06:53:58.395 [INFO ] [control.internal.WebSocketConnection] - Web Socket error
org.eclipse.jetty.websocket.api.UpgradeException: 0 null
	at org.eclipse.jetty.websocket.client.WebSocketUpgradeRequest.onComplete(WebSocketUpgradeRequest.java:529) ~[?:?]
	at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:218) ~[?:?]
	at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:210) ~[?:?]
	at org.eclipse.jetty.client.HttpExchange.notifyFailureComplete(HttpExchange.java:276) ~[?:?]
	at org.eclipse.jetty.client.HttpExchange.abort(HttpExchange.java:247) ~[?:?]
	at org.eclipse.jetty.client.HttpConversation.abort(HttpConversation.java:164) ~[?:?]
	at org.eclipse.jetty.client.HttpRequest.abort(HttpRequest.java:819) ~[?:?]
	at org.eclipse.jetty.client.HttpDestination.abort(HttpDestination.java:502) ~[?:?]
	at org.eclipse.jetty.client.HttpDestination.failed(HttpDestination.java:252) ~[?:?]
	at org.eclipse.jetty.client.AbstractConnectionPool$FutureConnection.failed(AbstractConnectionPool.java:570) ~[?:?]
	at org.eclipse.jetty.client.HttpClient$1.failed(HttpClient.java:621) ~[?:?]
	at org.eclipse.jetty.util.SocketAddressResolver$Async.lambda$resolve$0(SocketAddressResolver.java:161) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: java.util.concurrent.TimeoutException: DNS timeout 15000 ms
	... 7 more

Debug when Thing ist online, but sse connection =0
Then there is no keep alive message!

2022-09-08 18:18:34.996 [DEBUG] [dler.AbstractHomeConnectThingHandler] - Offline monitor 1: Check if thing is ONLINE. thing=Siemens Waschmaschine (SIEMENS-WM14VMG2-***), haId=SIEMENS-WM14VMG2-***
2022-09-08 18:18:34.997 [DEBUG] [meconnect.internal.client.HttpHelper] - Current access token: ***
2022-09-08 18:18:35.166 [DEBUG] [internal.client.HomeConnectApiClient] - [SIEMENS-WM14VMG2-***] GET 200 https://api.home-connect.com/api/homeappliances/SIEMENS-WM14VMG2-***
> Authorization: Bearer ***
> Accept: application/vnd.bsh.sdk.v1+json
> User-Agent: Jetty/9.4.46.v20220331
> Host: api.home-connect.com
> Accept-Encoding: gzip

< access-control-allow-headers: Authorization,Content-Type,Accept,Cache-Control,Last-Event-ID,If-Modified-Since,X-Requested-With,X-Events-Facade,User-Agent
< x-frame-options: sameorigin
< x-vcap-request-id: b880d26e-2ba6-4971-4bb6-d1ff0b6fd614
< Connection: keep-alive
< Date: Thu, 08 Sep 2022 16:18:35 GMT
< access-control-allow-methods: GET,POST,OPTIONS,PUT,DELETE
< access-control-allow-origin: *
< access-control-allow-credentials: true
< x-content-type-options: nosniff
< x-xss-protection: 1; mode=block
< api-gateway-service: api-gateway
< referrer-policy: origin
< hc-env: EU-PRD
< Content-Length: 215
< Content-Type: application/vnd.bsh.sdk.v1+json
{
  "data": {
    "brand": "Siemens",
    "connected": false,
    "enumber": "WM14VMG2/04",
    "haId": "SIEMENS-WM14VMG2-***",
    "name": "Waschmaschine",
    "type": "Washer",
    "vib": "WM14VMG2"
  }
}

And would it be possible to include the following url in the sse connection?
If the washing machine is running, you get the actual process phase (IntermediateSpin, Washing, Rinsing…).

/api/homeappliances/SIEMENS-WM14VMG2-***/programs/active/options/LaundryCare.Common.Option.ProcessPhase

The log of the Binding restart is to long.
If you need it too, i have to cut it down first :wink:

1 Like

Could that be the reason for the access token expired problem? It’s possible that I hat the problem most seen, when I had problems with my internet connection.

Currently my connection is stable and the binding works also since some month without problems.

I dont thing so…
For me only the sse connection was lost, the periodically api call to “/api/homeappliances/SIEMENS-WM14VMG2-***” was always successful :frowning:
You can see this in the log.
So i think the token was ok.

I already opened this issue, I guess this is the same issue.

Yes, that sounds very much like my problem :slight_smile:
But the issue is already 1 year old??? I hope with my logs can help @jb4711 to fix this…

The binding already has a detection of the sse connection. In principle, the connection must be re-established only after a few minutes, right?

Hi, I still have the same problem, after few second the binding goes OFFLINE, I only have to reautenticathe but it is not the solution… thanks

Unfortunately, since around 1-2 weeks my bridge is always disconnecting after the authorization. It was working for several months very stable using OH 3.2 und a Raspberry PI. Therefore I just update to the latest 3.4 snapshot build, but that didn’t solve the problem. I’m still getting following error message in the logs


09:43:51.703 [WARN ] [ommon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.NoSuchMethodError: 'boolean org.openhab.core.auth.client.oauth2.AccessTokenResponse.isExpired(java.time.Instant, int)'
        at org.openhab.binding.homeconnect.internal.client.HttpHelper.getAuthorizationHeader(HttpHelper.java:101) ~[?:?]
        at org.openhab.binding.homeconnect.internal.client.HomeConnectApiClient.createRequest(HomeConnectApiClient.java:1035) ~[?:?]
        at org.openhab.binding.homeconnect.internal.client.HomeConnectApiClient.getHomeAppliances(HomeConnectApiClient.java:105) ~[?:?]
        at org.openhab.binding.homeconnect.internal.handler.HomeConnectBridgeHandler.lambda$0(HomeConnectBridgeHandler.java:143) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:829) [?:?]

Anyone had this before and knows a solution?

Hi Tobias,

looks like a breaking change in the new OH version. Can you switch back to OH 3.2

The core change was handled on the binding side by this PR:

Maybe the old saved token information have just to be removed when upgrading?

Good point.

@airbone42 can you try to delete /openhab/userdata/jsondb/StorageHandler.For.OAuthClientService.json.

  1. shut down OH
  2. delete file
  3. start OH
  4. reauthenticate Home Connect binding