Home Connect addon: Looking for beta testers


(Jonas ) #1

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 dishwashers. I plan to add other device types in the future as well.

Here you can see it in action:

It would be very cool if other Siemens or Bosch dishwasher owners could test my addon as well. I’ve tested it with openHAB 2.3.

Code and documentation can be found at:

TODOs

  • try improve authentication process
    • check if Code Grant Flow works
    • persist and use new refresh token
  • power state of the coffee machine
  • add hood and cooktop
  • Listen to ConsumerProducts.CoffeeMaker.Event.BeanContainerEmpty and ConsumerProducts.CoffeeMaker.Event.WaterTankEmpty events
  • allow selection of program (impl. DynamicStateDescriptionProvider)

Current snapshot download
2018/12/30

Older releases
2018/12/23

  • update bridge configuration on oAuth refresh token change

https://s3.eu-central-1.amazonaws.com/jb-bucket-34324/2018-12-23/org.openhab.binding.homeconnect-2.4.0-SNAPSHOT.jar

2018/09/30

https://s3.eu-central-1.amazonaws.com/jb-bucket-34324/2018-09-30/org.openhab.binding.homeconnect-2.4.0-SNAPSHOT.jar

2018/09/21

https://s3.eu-central-1.amazonaws.com/jb-bucket-34324/2018-09-21/org.openhab.binding.homeconnect-2.4.0-SNAPSHOT.jar

2018/09/01
https://s3.eu-central-1.amazonaws.com/jb-bucket-34324/org.openhab.binding.homeconnect-2.4.0-SNAPSHOT.jar

Thanks,
Jonas


BSH Home Connect Binding
(mattnl ) #2

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


(borcon) #3

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


(mattnl ) #4

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


(Jon) #5

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


(Jonas ) #6

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


(mattnl ) #7

Great, thanks Jonas!


(Jonas ) #8

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


(Shorty707) #9

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

Cheers


(mattnl ) #10

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


(Jonas ) #11

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


(Jonas ) #12

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


(mattnl ) #13

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


(borcon) #14

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:


(Stefan M. Haller) #15

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


(Jonas ) #16

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


(Jonas ) #17

Hi Stefan,

thanks for your help!

Kind regards,
Jonas


(Jonas ) #18

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


(mattnl ) #19

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


(Stefan M. Haller) #20

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