Home Connect binding

Hi @jb4711

first, thanks a lot for this nice binding :slight_smile:

but I found two issues.

The first error occurs when I change a washing program. I can see that the related item is updated. Like if I switch the washing machine to “Night Wash” I see it in my openhab UI for the assigned item.

but right after I get the following exception.

2020-10-15 15:49:41.514 [WARN ] [internal.client.HomeConnectApiClient] - [API_ERROR BOSCH-WAV28M40-68A40E39C393] GET 404 https://api.home-connect.com/api/homeappliances/BOSCH-WAV28M40-68A40E39C393/programs/available/LaundryCare.Washer.Program.Mix.NightWash
...
2020-10-15 15:49:41.515 [WARN ] [dler.AbstractHomeConnectThingHandler] - [HANDLER] Could not update program options. Communication error! response code: 404, message: , body: {
  "error": {
    "key": "SDK.Error.UnsupportedProgram",
    "description": "Program not supported"
  }
} (Tried at Thu Oct 15 15:49:41 CEST 2020)

but I don’t get this error for all programs.

The following programs produces this error:

LaundryCare.Washer.Program.Cotton.CottonEco
LaundryCare.Washer.Program.Rinse
LaundryCare.Washer.Program.Spin.SpinDrain
LaundryCare.Washer.Program.DrumClean
LaundryCare.Washer.Program.Super153045.Super1530
LaundryCare.Washer.Program.Mix.NightWash

and the following programs works without any error

LaundryCare.Washer.Program.Cotton
LaundryCare.Washer.Program.EasyCare
LaundryCare.Washer.Program.Mix
LaundryCare.Washer.Program.DelicatesSilk
LaundryCare.Washer.Program.Wool
LaundryCare.Washer.Program.SportFitness
LaundryCare.Washer.Program.ShirtsBlouses
LaundryCare.Washer.Program.Sensitive

looks like not all programs provides additional program options.

and the second error occurs sometimes after I switched the washing machine on and off

2020-10-15 15:22:28.076 [INFO ] [dler.AbstractHomeConnectThingHandler] - [HANDLER BOSCH-WAV28M40-68A40E39C393] Set Waschmaschine to ONLINE and update channels.
2020-10-15 15:22:28.411 [WARN ] [internal.client.HomeConnectApiClient] - [API_ERROR BOSCH-WAV28M40-68A40E39C393] GET 409 https://api.home-connect.com/api/homeappliances/BOSCH-WAV28M40-68A40E39C393/status/BSH.Common.Status.DoorState
...
{
  "error": {
    "key": "SDK.Error.HomeAppliance.Connection.Initialization.Failed",
    "description": "HomeAppliance is offline"
  }
}

or

{
  "error": {
    "key": "SDK.Error.HomeAppliance.Connection.Initialization.Failed",
    "description": "HomeAppliance did not respond to connection initialization requests in time, it might be offline"
  }
}

I guess this happens on corner cases where the real device power state is not synchronized immediately. Like in the following case

  1. machine is power on
  2. homeconnect is informed about this power state
  3. hommeconnect informs openhab that the device is on
  4. machine is switched off
  5. openhab is still thinking, the machine is powered on and tries to fetch some data from homeconnect
  6. hommeconnect informs openhab that the device is off

after 10 failed requests in a row where the washing machine was in state offline I got

{
  "error": {
    "key": "429",
    "description": "The rate limit \"10 successive error calls in 10 minutes\" was reached. Requests are blocked during the remaining period of 347 seconds."
  }
}

if you need more information or additional debugging. Let me now.

btw. I’m using openhab 2.5.9 and your binding in version 2.5.9

@jb4711

I tested a little bit more the second issues and uploaded the related log file

homeconnect_2020-10-15_16 53.zip.txt (3.7 KB)

I think my guess is right.

  1. I switched off my washing machine.
  2. Was waiting until the openhab thing was going OFFLINE
  3. Then I switched the washing machine on again
  4. And right after the openhab thing was going ONLINE, I switched the washing machine off again

now as you can see, the openhab binding is still trying to update a lot of states which results always in the mention error messages

  1. The disconnect event from homeconnect was coming in this case with a delay of 3 minutes,

Hi =) Would you still need testers? Which version should I test? =)

Tester users are more than welcome. I try to release a new version by the end of the week. Packed with lots of new stuff :smiley:

Will let you know.

Thanks

1 Like

Thanks for testing. Will try have a look. Let keep you updated.

1 Like

Very Cool! Looking forward to it =)

Sound very nice! :slight_smile:

I´m a bit lazy right now setting up the HomeConnect bridge, but would love to test this. Is an OH3 version already on your roadmap or is it OH2.x only right now?

Thanks a lot for your work!

1 Like

I’m almost done with my code refactoring todo’s. After that I will start with the OH3 migration.

1 Like

Perfect - thank you! :star_struck:

As it seems, you are a user of HomeConnect devices for yourself. Maybe you´ll find a few minutes to give me an advice on this topic:

As my child loves dirt and isn´t as clean as I would love him to be - so we need a quick exchange for the current machine. And if I don´t come up with a quick solution the automation part gets burried in regards of just having some generic machine from the local electronic store (which I have to fiddle around with to make it at least somewhat ‘smart’ then and also keeping the women acceptance factor >=.7 - which is hard sometimes :stuck_out_tongue_winking_eye:)

Hi guys,
on my environement OpenHab 2.5 the new version of the binding causes strongly increased memory usage and high cpu usage. If I stop the binding everything turns to normal. I use the same config for more than one year. The former version from january 2020 worked well but died once a month.

Anys suggestions here would be nice!
Best regards, Thomas

I will release a new version soon (Friday or Saturday).

1 Like

Hi, do you need any logs for analyzing this strange beviour?

No, I think I know why this happens. I’ve replaced the SSE client library and improved the SSE connection monitor.

1 Like

Fine thanks in advance! I could test the new release if needed

Hey,

I have a Bosch Washing Machine with Homeconnect and am quite happy with it. WAWH2642FG.
Using integration with Openhab mainly for status updates when it is running and occasionally remote start. Anyway you need to load and “arm” the machine. and obviously unload.
You can also get the status of Detergent and Softener.

hope this helps
Achim

1 Like

Thank you for testing @holger_hees @Lodewijk. The logs you’ve provided helped me to understand the problem. @Lodewijk sorry for the late response.

There are the following problems:

  1. Certain washer programs cannot be selected and started.
    It’s not possible to select some programs via openHAB. If a program is selected directly on the appliance they change is reflected in openHAB. Unfortunately, openHAB is not able to fetch program options or start the program via API call.
    Affected programs
    LaundryCare.Washer.Program.Cotton.CottonEco
    LaundryCare.Washer.Program.Rinse
    LaundryCare.Washer.Program.Spin.SpinDrain
    LaundryCare.Washer.Program.DrumClean
    LaundryCare.Washer.Program.Super153045.Super1530
    LaundryCare.Washer.Program.Mix.NightWash
    → I’ll create a bug ticket at the Home Connect developer site. It is very strange that the API is responding with a list of supported programs and later on replies with Program not supported. It would help me if you could test it again with the new binding version below. A request export would be nice (http(s)://[openhab-ip]:[openhab port]/homeconnect/log/requests).

  2. Incorrect thing state due to slow state sync

I have no idea what to do about it? Suggestions are welcome.

Here is my current working binding: org.openhab.binding.homeconnect-2.5.9.202010221151.jar

@jb4711 nice new binding UI :slight_smile: I will provide a new logfile when the current washing program is done :slight_smile:

and for the second problem, I would recommend set the thing to OFFLINE when we get the response “HomeAppliance is offline”, because in this case we can except an upcoming OFFLINE event. At least I would stop any request to HomeConnect for the next 5 minutes, to avoid that our client is blocked/banned from their side.

@jb4711

2020-10-22_17-13__homeconnect_api_bridge_default__requests.json (36.0 KB)

No worries, i tested it right away with the new binding, but i get the same response, i attached the request export.2020-10-22_20-12__homeconnect_api_bridge_68f832d4__requests.json (75.2 KB)

i also like what @holger_hees is suggesting, my dishwasher is staying online when powered off but my washing machine is offline when powered off. But with the new monitor it stays online even when its powered off. When i eventually power on my washing machine after a couple off days it wont reconnect to OH. I have to reboot OH to get it working.

Thanks!!!

@holger_hees @Lodewijk

I’ve received a response from the Home Connect support. :frowning:

Hi Jonas,

Not all washer programs are supported by our Home Connect API. So there is a possibility that a washer will support programs that cannot be activated through the use of our API, even though a user can manually select and activate these programs on his/her appliance. That is the cause of the error you are encountering, as you the API will only return programs it supports. Please find the list of available washer programs here.