Home Connect binding

Hi,
finally the Home Connect developer site at https://developer.home-connect.com/ allows you to connect to real devices. I wrote a binding which allows you to add Home Connect connected devices.

Here you can see it in action:

It would be very cool if other Siemens or Bosch appliance owners could test my addon as well.

Code and documentation can be found at https://github.com/bruestel/org.openhab.binding.homeconnect/tree/2.5.x-next/bundles/org.openhab.binding.homeconnect

Current snapshot download

2021/06/15
3.0.x / 3.1.0
Download 3.0.x: org.openhab.binding.homeconnect-3.1.0.202106151528-for-3.0.2.jar
Download 3.1.0-SNAPSHOT: org.openhab.binding.homeconnect-3.1.0.202106151533-for-3.1.0-SNAPSHOT.jar

Change log:

  • Fix SSE reconnection problem

2021/05/06
2.5.x
Download 2.5.x: org.openhab.binding.homeconnect-2.5.9.202105060958.jar

Change log:

  • Catch empty timestamp (SSE) error

Old releases

2021/05/06
3.0.x / 3.1.0
Download 3.0.x: org.openhab.binding.homeconnect-3.1.0.202105061011-3.0.2.jar
Download 3.1.0-SNAPSHOT: org.openhab.binding.homeconnect-3.1.0.202105061017-3.1.0-SNAPSHOT.jar

Change log:

2021/04/02
Download (3.0.x | 3.1.x): org.openhab.binding.homeconnect-3.1.0.202104021321.jar

Change log:

2021/01/16
Download (2.5.x): org.openhab.binding.homeconnect-2.5.9.202101161426.jar
Download (3.x.x): org.openhab.binding.homeconnect-3.1.0.202101161431.jar

Change log:

  • refactoring due to 3.x migration (review process)

2020/11/18
Download: org.openhab.binding.homeconnect-2.5.9.202011180823.jar

Change log:

  • added functional light support (hood)
  • added ambient light support (dishwasher, hood)
  • improved API requests (only trigger channel update, if channel is linked to item)
  • some code preparations for 3.0 release

2020/11/08
Download: org.openhab.binding.homeconnect-2.5.9.202011081053.jar

Change log:

  • improved hood support

2020/11/01
Download: org.openhab.binding.homeconnect-2.5.9.202010291650.jar

Change log:

  • new binding UI
  • improved stability
  • added connection recovery mechanism in case of error
  • improved offline/online detection
  • applied code changes (to be accepted as official binding)
  • code cleanup
  • new SSE client
  • improved API calls to prevent hiding Home Connect rate limits

2020/09/19
Download: org.openhab.binding.homeconnect-2.5.9.202009191134.jar

Change log:

  • Added SSE monitor (restart on stale connection to Home Connect servers)

2020/01/11
Download: org.openhab.binding.homeconnect-2.5.1.202001111631.jar

Change log:

  • Fixed Option not supported problem on program start

2020/01/08
Download: org.openhab.binding.homeconnect-2.5.1.202001081852.jar

Change log:

  • rebased on 2.5.1 addon branch
  • adjusted documentation

2019/12/15
Download: org.openhab.binding.homeconnect-2.5.0.201912151401.jar
Change log:

  • increased log output
  • reset channels on device DISCONNECT event
  • increase update interval of oven cavity temperature update job to 90 seconds
  • updated documentation

2019/11/25
Download: org.openhab.binding.homeconnect-2.5.0.201911251721.jar

2019/11/17
Download: org.openhab.binding.homeconnect-2.5.0.201911171841.jar

2019/09/15
Download: org.openhab.binding.homeconnect-2.5.0.201909151211.jar

Thanks,
Jonas

37 Likes

Hey Jonas,

thank you very much for sharing your new binding :slight_smile:
I have just installed installed and configured it and everything works like a charm. Great job!

I’ll let you know if I run into any issues.

Thanks again,
Matt

Hey Jonas,
it’s great to see that someone is working on a home connect plugin.
I have a home connect siemens oven.
If you have implemented the oven, i will help to test your plugin.

Thanks,
Borcon

Hi Jonas,

first feedback… the binding works fine so far. But after a restart of openhab I get the following entries in the log:

2018-08-21 20:56:15.081 [WARN ] [handler.HomeConnectDishwasherHandler] - No API client available.
2018-08-21 20:56:15.082 [WARN ] [handler.HomeConnectDishwasherHandler] - No API client available.
2018-08-21 20:56:15.082 [WARN ] [handler.HomeConnectDishwasherHandler] - No API client available.
2018-08-21 20:56:15.082 [WARN ] [handler.HomeConnectDishwasherHandler] - No API client available.
2018-08-21 20:56:15.082 [WARN ] [handler.HomeConnectDishwasherHandler] - No API client available.
2018-08-21 20:56:15.083 [WARN ] [handler.HomeConnectDishwasherHandler] - No API client available.

2018-08-21 21:01:15.995 [WARN ] [okhttp3.OkHttpClient                ] - A connection to https://api.home-connect.com/ was leaked. Did you forget to close a response body? To see where this was allocated, set the OkHttpClient logger level to FINE: Logger.getLogger(OkHttpClient.class.getName()).setLevel(Level.FINE);

Regards,
Matt

Awesome! I have a bosch washing machine with home connect, would be awesome if you could add those too :slight_smile:

Will monitor this thread very closely.

Cheers

Hi Matt,

thanks for your feedback. I fixed both issues and will release a new version soon.

@borcon will start oven implementation next
@H311m4n will start washing machine afterwards

Thanks,
Jonas

Great, thanks Jonas!

Hi @mstehle, @borcon ,

I’ve just updated the addon. It supports now Home Connect ovens as well.

The simulators at the Home Connect developer site are great, but they don’t always behave like a real devices. @borcon I only have a dishwasher at home to test my plugin. Hope it works for you. I’m happy to here how it works for you.

Greetings,
Jonas

I have a Home connect fridge and could Test once it is supported

Cheers

Hi @jb4711,

I have just updated the binding but it does not work. I have also deleted and re-added the dishwasher thing (not the Home Connect API thing) but it did not help. I get the following warnings in the log:

2018-08-26 18:46:49.426 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-SX878D16PE] No handlers to update channel "dishwasher_power_state" found!
2018-08-26 18:46:49.427 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-SX878D16PE] No handlers to update channel "dishwasher_door_state" found!
2018-08-26 18:46:49.428 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-SX878D16PE] No handlers to update channel "dishwasher_operation_state" found!
2018-08-26 18:46:49.428 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-SX878D16PE] No handlers to update channel "dishwasher_remote_start_allowance_state" found!
2018-08-26 18:46:49.429 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-SX878D16PE] No handlers to update channel "dishwasher_remote_control_active_state" found!
2018-08-26 18:46:49.430 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-SX878D16PE] No handlers to update channel "dishwasher_active_program_state" found!
2018-08-26 18:46:49.430 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-SX878D16PE] No handlers to update channel "dishwasher_remaining_program_time_state" found!
2018-08-26 18:46:49.431 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-SX878D16PE] No handlers to update channel "dishwasher_program_progress_state" found!
2018-08-26 18:46:49.432 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-SX878D16PE] No handlers to update channel "dishwasher_power_state" found!
2018-08-26 18:46:49.433 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-SX878D16PE] No handlers to update channel "dishwasher_door_state" found!
2018-08-26 18:46:49.433 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-SX878D16PE] No handlers to update channel "dishwasher_operation_state" found!
2018-08-26 18:46:49.434 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-SX878D16PE] No handlers to update channel "dishwasher_remote_start_allowance_state" found!
2018-08-26 18:46:49.434 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-SX878D16PE] No handlers to update channel "dishwasher_remote_control_active_state" found!
2018-08-26 18:46:49.435 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-SX878D16PE] No handlers to update channel "dishwasher_active_program_state" found!
2018-08-26 18:46:49.435 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-SX878D16PE] No handlers to update channel "dishwasher_remaining_program_time_state" found!
2018-08-26 18:46:49.436 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-SX878D16PE] No handlers to update channel "dishwasher_program_progress_state" found!

Any ideas?

For now I am back to the first version you have posted.

Cheers,
Matt

I put it on my list.
Next is washing machine and afterwards I will add fridge.

Hi @mstehle,

could you please remove the old device and add it afterwards. dishwasher_remote_start_allowance_state is the name of the old channel. I’ve renamed all channels. Please also refresh your browser before adding the device again. I encountered a similar issue. The Browser is using the old channels names during creation. Or you could try using another browser.

Greetings,
Jonas

Hi @jb4711,

ok, it is working now, thanks. However, the log warnings seem to be a little misleading. I still got the following in the log:

2018-08-27 19:54:36.652 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-SX878D16PE] No handlers to update channel "selected_program_state" found!
2018-08-27 19:54:36.732 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-SX878D16PE] No handlers to update channel "selected_program_state" found!
2018-08-27 19:54:36.817 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-SX878D16PE] No handlers to update channel "remaining_program_time_state" found!
2018-08-27 19:54:36.817 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-SX878D16PE] No handlers to update channel "program_progress_state" found!
2018-08-27 19:54:36.901 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-SX878D16PE] No handlers to update channel "remaining_program_time_state" found!
2018-08-27 19:54:36.903 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-SX878D16PE] No handlers to update channel "program_progress_state" found!
2018-08-27 19:54:37.374 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-SX878D16PE] No handlers to update channel "selected_program_state" found!
2018-08-27 19:54:37.461 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-SX878D16PE] No handlers to update channel "remaining_program_time_state" found!
2018-08-27 19:54:37.462 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-SX878D16PE] No handlers to update channel "program_progress_state" found!

The channels are working however, but they only seem to get populated once the appliance is on and not in standby. Probably that is why those misleading log entries appear when the appliance is in standby?
I don’t remember seeing that in the first version.

Cheers,
Matt

Hi Jonas,

i have added my oven and get these warnings/errors:

2018-08-27 19:51:25.376 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-HN678G4S6-XXXXXXXXXXX] No handlers to update channel "remaining_program_time_state" found!
2018-08-27 19:51:25.380 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-HN678G4S6-XXXXXXXXXXX] No handlers to update channel "program_progress_state" found!
2018-08-27 19:51:25.385 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-HN678G4S6-XXXXXXXXXXX] No handlers to update channel "oven_current_cavity_temperature" found!
2018-08-27 19:51:25.390 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-HN678G4S6-XXXXXXXXXXX] No handlers to update channel "elapsed_program_time" found!
2018-08-27 19:51:26.214 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-HN678G4S6-XXXXXXXXXXX] No handlers to update channel "remaining_program_time_state" found!
2018-08-27 19:51:26.217 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-HN678G4S6-XXXXXXXXXXX] No handlers to update channel "program_progress_state" found!
2018-08-27 19:51:26.223 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-HN678G4S6-XXXXXXXXXXX] No handlers to update channel "oven_current_cavity_temperature" found!
2018-08-27 19:51:26.226 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-HN678G4S6-XXXXXXXXXXX] No handlers to update channel "elapsed_program_time" found!
2018-08-27 19:52:27.047 [.ItemChannelLinkAddedEvent] - Link 'homeconnect_Oven_SIEMENS_HN678G4S6_XXXXXXXXXXX_power_state-homeconnect:Oven:SIEMENS-HN678G4S6-XXXXXXXXXXX:power_state' has been added.
2018-08-27 19:52:27.134 [vent.ItemStateChangedEvent] - homeconnect_Oven_SIEMENS_HN678G4S6_XXXXXXXXXXX_power_state changed from NULL to OFF
2018-08-27 19:52:27.756 [.ItemChannelLinkAddedEvent] - Link 'homeconnect_Oven_SIEMENS_HN678G4S6_XXXXXXXXXXX_door_state-homeconnect:Oven:SIEMENS-HN678G4S6-XXXXXXXXXXX:door_state' has been added.
2018-08-27 19:52:27.870 [vent.ItemStateChangedEvent] - homeconnect_Oven_SIEMENS_HN678G4S6_XXXXXXXXXXX_door_state changed from NULL to CLOSED
2018-08-27 19:52:28.403 [.ItemChannelLinkAddedEvent] - Link 'homeconnect_Oven_SIEMENS_HN678G4S6_XXXXXXXXXXX_operation_state-homeconnect:Oven:SIEMENS-HN678G4S6-XXXXXXXXXXX:operation_state' has been added.
2018-08-27 19:52:28.503 [vent.ItemStateChangedEvent] - homeconnect_Oven_SIEMENS_HN678G4S6_XXXXXXXXXXX_operation_state changed from NULL to Inactive
2018-08-27 19:52:34.060 [.ItemChannelLinkAddedEvent] - Link 'homeconnect_Oven_SIEMENS_HN678G4S6_XXXXXXXXXXX_remote_start_allowance_state-homeconnect:Oven:SIEMENS-HN678G4S6-XXXXXXXXXXX:remote_start_allowance_state' has been added.
2018-08-27 19:52:34.229 [vent.ItemStateChangedEvent] - homeconnect_Oven_SIEMENS_HN678G4S6_XXXXXXXXXXX_remote_start_allowance_state changed from NULL to OFF
2018-08-27 19:52:35.333 [.ItemChannelLinkAddedEvent] - Link 'homeconnect_Oven_SIEMENS_HN678G4S6_XXXXXXXXXXX_remote_control_active_state-homeconnect:Oven:SIEMENS-HN678G4S6-XXXXXXXXXXX:remote_control_active_state' has been added.
2018-08-27 19:52:35.418 [vent.ItemStateChangedEvent] - homeconnect_Oven_SIEMENS_HN678G4S6_XXXXXXXXXXX_remote_control_active_state changed from NULL to ON
2018-08-27 19:52:36.778 [.ItemChannelLinkAddedEvent] - Link 'homeconnect_Oven_SIEMENS_HN678G4S6_XXXXXXXXXXX_active_program_state-homeconnect:Oven:SIEMENS-HN678G4S6-XXXXXXXXXXX:active_program_state' has been added.
2018-08-27 19:52:37.786 [.ItemChannelLinkAddedEvent] - Link 'homeconnect_Oven_SIEMENS_HN678G4S6_XXXXXXXXXXX_selected_program_state-homeconnect:Oven:SIEMENS-HN678G4S6-XXXXXXXXXXX:selected_program_state' has been added.
2018-08-27 19:52:39.926 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-HN678G4S6-XXXXXXXXXXX] No handlers to update channel "remaining_program_time_state" found!
2018-08-27 19:52:39.931 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-HN678G4S6-XXXXXXXXXXX] No handlers to update channel "remaining_program_time_state" found!
2018-08-27 19:52:39.933 [.ItemChannelLinkAddedEvent] - Link 'homeconnect_Oven_SIEMENS_HN678G4S6_XXXXXXXXXXX_remaining_program_time_state-homeconnect:Oven:SIEMENS-HN678G4S6-XXXXXXXXXXX:remaining_program_time_state' has been added.
2018-08-27 19:52:40.836 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-HN678G4S6-XXXXXXXXXXX] No handlers to update channel "program_progress_state" found!
2018-08-27 19:52:40.839 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-HN678G4S6-XXXXXXXXXXX] No handlers to update channel "program_progress_state" found!
2018-08-27 19:52:40.842 [.ItemChannelLinkAddedEvent] - Link 'homeconnect_Oven_SIEMENS_HN678G4S6_XXXXXXXXXXX_program_progress_state-homeconnect:Oven:SIEMENS-HN678G4S6-XXXXXXXXXXX:program_progress_state' has been added.
2018-08-27 19:52:42.697 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-HN678G4S6-XXXXXXXXXXX] No handlers to update channel "oven_current_cavity_temperature" found!
2018-08-27 19:52:42.701 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-HN678G4S6-XXXXXXXXXXX] No handlers to update channel "oven_current_cavity_temperature" found!
2018-08-27 19:52:42.704 [.ItemChannelLinkAddedEvent] - Link 'homeconnect_Oven_SIEMENS_HN678G4S6_XXXXXXXXXXX_oven_current_cavity_temperature-homeconnect:Oven:SIEMENS-HN678G4S6-XXXXXXXXXXX:oven_current_cavity_temperature' has been added.
2018-08-27 19:52:46.556 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-HN678G4S6-XXXXXXXXXXX] No handlers to update channel "elapsed_program_time" found!
2018-08-27 19:52:46.561 [WARN ] [dler.AbstractHomeConnectThingHandler] - [SIEMENS-HN678G4S6-XXXXXXXXXXX] No handlers to update channel "elapsed_program_time" found!

The power state switch does not change if i switch on the oven.
I think the other channels do work :slight_smile:

Hi Jonas,

Just in these days I was thinking about such binding :slight_smile:

I’m very happy and would like to start testing next days.

Thanks for your effort and kind regards
Stefan

Hi @mstehle,

I removed the warnings as they are useless. A new jar is available.

Background:

  • the plugin is using the restful Home Connect API to fetch channel information
  • it also uses the Server Sent Events (SSE) Interface to get channel information
  • some channels eg. “program_progress_state” don’t use the REST API to update there state - instead they only update them-self on events coming through the SSE connection

but they only seem to get populated once the appliance is on and not in standby

Yes that’s correct. In Standby/Off mode these values are not set

Hi Stefan,

thanks for your help!

Kind regards,
Jonas

Hi @borcon,

thanks for the update. Your logs are looking good.

The power state switch does not change if i switch on the oven.

Is it possible that you increase the log level, so that I can see all the events coming in?

Steps

  1. log into Karaf console
    1.1 https://www.openhab.org/docs/administration/console.html#accessing-the-console
  2. set log level
    2.1 (https://www.openhab.org/docs/administration/logging.html#defining-what-to-log)
    2.2 openhab> log:set DEBUG org.openhab.binding.homeconnect

Thanks,
Jonas

Hi Jonas,

thank you very much for the update and for the explanation. I have installed the update and everything seems to be running perfectly - no warnings anymore in the log :slight_smile:

I have one more suggestion should you still plan to change something:
Maybe it would be more convenient to have the remaining_program_time_state channel reports in minutes instead of seconds.

Thanks again for all your effort.

Cheers,
Matt

Hi Jonas

Actually I have some issues with the Home Connect account. Need to solve this first.

Open the verification_uri_complete link in a web browser. You can now login and grant access.

I’m currently not able to login, for some reason. Android App is working fine.
I can even login to the webpage. and have created the application for openhab-binding as you describe.

I will be using Washer & Dryer no other Aplliances in the focus for the time beeing.

Kind regards
Stefan