Home Connect binding

Hi Jonas,

just letting you know that I just tested with my oven. Setting up the binding works like a charm on the first try.

I can get the state from the home appliance instantaneously into OpenHAB! Like!!1!

I can’t change things like power on/off within OpenHAB, it seems to be read-only. Is this expected behavior?

Thanks a lot for implementing this!!

best,
Bernhard

PS: I also have a Home Connect coffee machine and would be willing to beta test as soon as you implemented this device type!

Hi,

@bbock

I can’t change things like power on/off within OpenHAB, it seems to be read-only. Is this expected behavior?

Yes it is. You can find a good overview of all channels and read-only status at https://github.com/bruestel/org.openhab.binding.homeconnect/tree/master/addons/binding/org.openhab.binding.homeconnect#channels

PS: I also have a Home Connect coffee machine and would be willing to beta test as soon as you implemented this device type!

Great. Next I will implement dryer and afterwards coffee machine support. Than I have covered all types :slight_smile: Thanks for willing to test.

@mstehle

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.

I’m working on support for Units of Measurement (https://www.openhab.org/docs/concepts/units-of-measurement.html#units-of-measurement). Then you can decide which output unit you would like to use. I’ve tested it in a sitemap config and it worked.

sitemap demo label="Main Menu"
{
    Default item=homeconnect_Dishwasher_SIEMENS_HCS02DWH1_6F2FC400C1EA4A_remaining_program_time_state label="Remaining Time [%d min]"
    Default item=homeconnect_Dishwasher_SIEMENS_HCS02DWH1_6F2FC400C1EA4A_remaining_program_time_state label="Remaining Time [%d s]"
    Default item=homeconnect_Dishwasher_SIEMENS_HCS02DWH1_6F2FC400C1EA4A_remaining_program_time_state label="Remaining Time [%d ms]"
}

Thanks,
Jonas

I’m working on support for Units of Measurement

good news, even better :slight_smile:
Please let me know when an updated binding is available.

Thank you,
Matt

@bbock and @mstehle new version is available

1 Like

Hi Jonas,

UoM is working for the Dishwasher time. Thanks.

Basic operation with the oven (reading state) still works as expected. Did just a short smoke test, though.

Hi @jb4711 ,

I am currently on openhab snapshot 2.4.0 #1370. When I restart I get the following in the log:

2018-09-25 00:32:38.237 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occurred while calling thing handler factory 'org.openhab.binding.homeconnect.internal.factory.HomeConnectHandlerFactory@4cfc90f6': Base thing handler factory has not been properly initialized. Did you forget to call super.activate()?
java.lang.IllegalStateException: Base thing handler factory has not been properly initialized. Did you forget to call super.activate()?
        at org.eclipse.smarthome.core.thing.binding.BaseThingHandlerFactory.setHandlerContext(BaseThingHandlerFactory.java:145) ~[107:org.eclipse.smarthome.core.thing:0.10.0.201809210646]
        at org.eclipse.smarthome.core.thing.binding.BaseThingHandlerFactory.registerHandler(BaseThingHandlerFactory.java:128) ~[107:org.eclipse.smarthome.core.thing:0.10.0.201809210646]
        at org.eclipse.smarthome.core.thing.internal.ThingManager.doRegisterHandler(ThingManager.java:594) [107:org.eclipse.smarthome.core.thing:0.10.0.201809210646]
        at org.eclipse.smarthome.core.thing.internal.ThingManager.registerHandler(ThingManager.java:575) [107:org.eclipse.smarthome.core.thing:0.10.0.201809210646]
        at org.eclipse.smarthome.core.thing.internal.ThingManager.registerAndInitializeHandler(ThingManager.java:1045) [107:org.eclipse.smarthome.core.thing:0.10.0.201809210646]
        at org.eclipse.smarthome.core.thing.internal.ThingManager.access$24(ThingManager.java:1041) [107:org.eclipse.smarthome.core.thing:0.10.0.201809210646]
        at org.eclipse.smarthome.core.thing.internal.ThingManager$3.run(ThingManager.java:616) [107:org.eclipse.smarthome.core.thing:0.10.0.201809210646]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
        at java.lang.Thread.run(Thread.java:748) [?:?]

Any idea why? The binding works without problems though…

Hi @mstehle,

thanks for your log.

Really strange problem. I don’t understand the error message since I do not overwrite any method which requires me to call super.activate().

     * Initializes the {@link BaseThingHandlerFactory}. If this method is overridden by a sub class, the implementing
     * method must call <code>super.activate(componentContext)</code> first.

Will check if I can reproduce it.

Thank you so much for writing this binding. I have two ovens and a dishwasher and got both of them running right away.

Two questions from my side:

  1. I am a friend of textual configs. Is there an option to save the bridge and appliances in a thing file, like with the other bindings?
  2. Is the restriction that an oven can not be turned on or off imposed by the API itself? The strange thing is, that the HomeConnect app has no issue turning on and off the oven…

Thanks,
Jochen

Hi,

Thank you very much for the binding. I have tried to create a things file but while the bridge is connected and online the washer and dryer do not seem to be recognized. Any directions are utmost welcome:

Bridge homeconnect:api_bridge:home “Homeconnect API” @ “Cloud” [ clientSecret=“secret”, clientId=“id”, simulator=false, refreshToken=“refresh” ] {
Thing Dryer BDRGC “BDRGC” @ “Cellar” [ haId=“BOSCH-WAYH2840CH-XXXXXXXXXXX” ]
Thing Washer BWAGC “BWAGC” @ “Cellar” [ haId=“BOSCH-WTYH7740CH-XXXXXXXXXXX”]
}

Hi @thaScheich, @jotpehenn,

I’ve added some configuration file examples to the documentation (https://github.com/bruestel/org.openhab.binding.homeconnect/tree/master/addons/binding/org.openhab.binding.homeconnect#examples-file-based-configuration). Hope it helps.

@jotpehenn

Is the restriction that an oven can not be turned on or off imposed by the API itself? The strange thing is, that the HomeConnect app has no issue turning on and off the oven…

Currently the majority of the implemented channels is read-only, so you can only see the current status of the appliance. I will focus on actions like “starting program” etc. after I’m finished with coffee machine support. Unfortunately I cannot start ovens or get camera images from a fridge. To do this, a “Additional Partner
Agreement” is required by BSG (https://developer.home-connect.com/docs/authorization/scope).

Thanks for testing,
Jonas

Thanks @jb4711 !

Actually the Text config you added to the description appear to lead to

2018-09-30 13:15:05.368 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'homeconnect.things', using it anyway:
Provide a thing type ID and a thing ID in this format:
 <thingTypeId> <thingId>

Apparently this has to do with a new thing definition format, I tried to apply the new format which would then look like:

Bridge homeconnect:api_bridge:mybridge "Home Connect API" [ clientId="xyz", clientSecret="xyz", refreshToken="xyz", simulator=false] {
    // Thing configurations
    Thing dishwasher siemensdishwasher "Siemens Dishwasher"  [ haId="SIEMENS-SN658X06TE-12340E1539BF" ]
}

which seems to work, with the only difference, that the item definition also needs the bridge in the item definition:

Switch                 DishwasherPowerState                  "Power State"                       {channel="homeconnect:dishwasher:mybridge:siemensdishwasher:power_state"}

This is probably the same as @thaScheich was trying. (except the appliance type is written in all lower case, mybe this was why it did not work for him) Any reason why this method of thing definition would make problems with this binding?

Interesting, any idea what actually is required for this partner agreement?

Regards,
Jochen

Hi @jotpehenn,

thanks for the reply. I wondered why the bridge name was in the channel name of the thing:

which seems to work, with the only difference, that the item definition also needs the bridge in the item definition:

I will change it to the correct way.

Thanks,
Jonas

Indeed the appliance type has to be in lower case, it work for me now. Thank you @jotpehenn. I was taking the information from the JSON storage where the first letter was written in capital.

Regards Raphael

Continuing the discussion from Home Connect addon: Looking for beta testers:

Hi,

@bbock I’ve added coffee machine. Thanks for willing to test.

I upgraded the binding and the coffee machine is recognized immediately.

What I tried: I can successfully monitor OperationState and Selected Program. Works like a charm. :smile:

I can and will test more on thursday/friday when I’m back in my office. Anything specific you want me to focus on?

Cool, thanks. I couldn’t test the door sensor, due to simulator issues. It would be great if you could test if door channel works.

Hey jb4711,
first of all thanks for this amazing Binding!

Just tried it out now. Works pretty good. I have a Siemens Dishwasher, Steamoven and a Microwaveoven.
Dishwasher and Microwaveoven seem to be good.

However with the Steamer i get the following:

Communication error! response code: 429, message: Too Many Requests, body: { "error": { "key": "429", "description": "The rate limit \"50 calls in 1 minute\" was reached. Requests are blocked during the remaining period of 13 seconds." } } (Tried at Tue Oct 02 15:11:00 CEST 2018)

I understand the nature of this error. But will it actually update at some time? or is it not possible to use 3 Devices with the Limit?

Hey,

I don’t know if they increase the limits in the future. Usually if you don’t restart open very often, you shouldn’t reach the limits. The things will only call the API on startup or after adding. The rest of the time the Server Sent Events channel is used.
Do you know which request was blocked?

Thanks,
Jonas

It fixed itself. It went offline after adding the thing. Maybe i was to quick with adding everything. Anyway working now.

Is there a ETA when you will merge the binding ?