Home Connect Direct Binding – Alpha Version Available for Testing
Hi everyone,
I’m excited to share the first alpha version of my new Home Connect Direct binding. This binding is designed to connect to your Home Connect devices locally, which means you can interact with them without relying on the internet once they’re set up. This differs from the existing Home Connect binding, as it removes the need for a continuous internet connection—potentially enhancing both privacy and reliability.
I’ve successfully tested it with a range of devices, including a dishwasher, Cookit, washer, and coffee maker. Everything worked smoothly in my setup, but now I’d love to hear from you! Please give it a try and share your experiences. Your feedback will help me refine the binding and push it closer to a stable release.
Additionally, the binding comes with a dedicated web UI that allows you to download logs. If you’re comfortable doing so, please send me your logs via private message. These logs will help me support even more Home Connect devices over time.
If anyone is interested in contributing to the codebase, I’d be thrilled to collaborate.
Currently I’m running on a modified version of hcpy connected through mqtt to openhab.it works but it is a lot of work creating all the thing channels and it is not that stable.
Anyway, I just installed the binding and was able to download the profiles for my 3 devices. My devices are on a different (iot) subnet so discovery does not work (this is expected). So I created the 3 things with the home appliance ID and connection type listed on the profiles page and the IP address listed in my dhcp server.
The only problem is that the 3 devices stay offline in both openhab and the dedicated web ui. All I see is posts to /ei/initialValues (v2)
Any idea why my devices stay offline? Restarting the binding does not help and I’m able to ping the devices from OH.
I’m running OH 4.3.2 on a x64 Ubuntu 24.04.1 LTS box.
first of all a big thank you for your new binding.
I installed it. Console worked and I was able to download the profiles.
When trying to autodiscover the appliances I get this log messages:
2024-12-15 07:52:39.670 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.NoSuchMethodError: ‘java.lang.Object java.util.List.getFirst()’
at org.openhab.binding.homeconnectdirect.internal.discovery.HomeConnectDirectMDNSDiscoveryParticipant.createResult(HomeConnectDirectMDNSDiscoveryParticipant.java:116) ~[?:?]
at org.openhab.core.config.discovery.mdns.internal.MDNSDiscoveryService.createDiscoveryResult(MDNSDiscoveryService.java:222) ~[?:?]
at org.openhab.core.config.discovery.mdns.internal.MDNSDiscoveryService.scan(MDNSDiscoveryService.java:164) ~[?:?]
at org.openhab.core.config.discovery.mdns.internal.MDNSDiscoveryService.lambda$0(MDNSDiscoveryService.java:138) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
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:1136) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
at java.lang.Thread.run(Thread.java:840) [?:?]
I’ve then tried to manually add a dishwasher. When saving the thing the log file shows the the appliance come online for a very short while and then returns to offline state:
024-12-15 07:53:14.760 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘homeconnectdirect:dishwasher:e9c832699e’ changed from OFFLINE to ONLINE
2024-12-15 07:53:14.763 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘homeconnectdirect:dishwasher:e9c832699e’ changed from ONLINE to OFFLINE
If there is anything I can contribute - let me know.
Really cool that you already got a first version.
I was curious to try and got stuck after creating the things (“TLS connection not supported…” although AES is selected).
I’ll send you the logs
I think the websocket connection is working. Only something is going wrong in the communication process. I have a suspicion. Can you please send me the log via direct message. Thank you very much.
I think I have found the problem. Thank you very much for your help. I used a Java 21 method that is not yet available in Java 17. I have completely downgraded my project to Java 17 so that this doesn’t happen to me again.
Works perfectly for my washer, dishwasher and coffecmachine. In addition it gives me much more channels compared with the standard homeconnect binding. Specially for my dishwasher.
Many thanks for all your efforts. I tried to connect the Washing machine, but failed so far.
I’m getting error (COMMUNICATION_ERROR): Illegal key size after entering the SingleID Key in the addon settings. Any idea what I did wrong?
My dryer and washer are online now! But my dishwasher (which is a bit older) is still showing offline. In the error logs I see a 404 error:
2024-12-15 14:33:06.967 [DEBUG] [ocket.AbstractWebSocketClientService] - Connecting to ws://10.0.2.196:80/homeconnect (homeconnectdirect:dishwasher:f89074166f).
2024-12-15 14:33:07.378 [DEBUG] [handler.BaseHomeConnectDirectHandler] - WebSocket error: Failed to upgrade to websocket: Unexpected HTTP Response Status Code: 404 Not Found (thingUID=homeconnectdirect:dishwasher:f89074166f)
I’m not 100% sure if this binding is the reason. But the signs point very strongly in the direction.
After a while, the amount of threads in waiting state are increasing a lot. If I check the running threads with “ps -T -p 31”, I get a lot of “HttpClient” threads. If the amount of threads hits the upper system limit, openhab is not able to start new threads anymore and I get a lot of OutOfMemoryError: java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached
Maybe a hint is a different poweroff behavior of my washer. If my dishwasher (SIEMENS) and my coffee machine (SIEMENS) are switched off, they are still reachable via their IP. But if my washer (BOSCH) is switched off, he is not reachable via IP. Seams he is “really” switched off. In the administration webui I can also see the state message “no route to host”.
for now, I temporary uninstalled the binding, just to check if the memory leak is gone.
— additionals —
first time I observed this behavior was with openhab 4.2.3, after I installed this binding
second time I got this behavior was during the night. In the evening, I upgraded to openhab 4.3
third time I got this behavior was today, 2 hours after I restarted openhab. Still running 4.3
— update 16.12. 18:52 @jb4711 —
the thread count is stable since 11am until now (7pm). So it looks like it is this binding.
I just added my Dishwasher today. Auto Scan didn’t find the machine unfortunately, but I added it manually.
The Thing status directly changed to ONLINE
Its great to see the progress phases as well. This information was never available before.
Just wondering why the Dishwasher wasn’t found with Scan? Anything I can test?
Still no idea why the Dryer and Washing maschine are still OFFLINE with the error
I think this is why my OH instance became unstable / unresponsive after ~24h. After upgrading OH to 4.3 all appliances are offline so for now I uninstalled the binding.
my actual testing status is: two generic devices (oven and hotplates) are online. The washing machine and dryer remain offline. I sent you the log in a PM.
really great to get local access to those devices. many thanks!
I have the problem, that the thing status gives me the following error: TLS connection is not supported on the current system configuration (Linux aarch64).
When I look it up in the Appliance Profiles it gives me connection TLS, but I cannot activate it because it seems on aarch64 (rp5) to be unsupported.
@tsmit Did you add the Things manually? The schema URL in the xml is not important. I don’t use it, it comes directly from BSH. Can you send me the description xml? Is the Washer online in the Home Connect app? Maybe there are machines where the WebSocket is not accessible via port 80 and the path homeconnect. We’ll find out.
@Larsen Thank you for sending the logs. What is the connection type AES or TLS? Is something displayed in the openHAB log. Would it be possible for you to set the log level to debug? You can do it via the UI in the binding settings or in the console via log:set debug org.openhab.binding.homeconnectdirect.
@CappuccinoCake This is the expected behavior. I still need to add native libs to the project somehow to make it work. It’s not that easy to compile Consrypt. But it’s on my list.
@olialb Strange that your dishwasher is DISABLED. Can you try to enable it via UI. The binding does not actually set this status. Regarding the stove and oven, these only have a few channels. I am trying to expand it. Could you please send me the logs of the devices.
@stefan13 Could you please send me the log or the profile description?
@holger_hees Thank you very much. I had forgotten to destroy the WebSocketClient instead of just stopping it. I was able to recreate the problem and fix it.