Home Connect binding

I’m pleased to announce the availability of a new binding version.

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

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

@AndrewFG, @MichaelHeimann, @stevendp, @Lolodomo, @harald_knoll, @Lodewijk, @Pascal_S, @Channel

1 Like

Hi Jonas.
Thank you very much. :+1::+1::ok_hand:
One question. Should i remove all old things before i update the jar file?
Greetings,
Markus

Yes please.

Hi Jonas,

Thanks! Nice new UI in the console!
Should setting the venting level and program for the Hood work? In PaperUI it doesn’t seem to work or how should I use it?

grtz

Steven

Hood changes are not included in this ‘release’. Working on that right now.

Aha ok, then that’s expected :slight_smile: FYI, to set the automatic program the following can be used: curl -X POST --header “Content-Type: text/plain” --header “Accept: application/json” -d ‘{“data”:{“key”:“Cooking.Common.Program.Hood.Automatic”}}’ "http://localhost:8080/rest/items/NeffAfzuigkapNEFFD96IKW1S068A40E088639_ProgramActions”

No urgency as I can make it work with these calls as well :wink:

Hey @jb4711
very nice binding. all information works well for my Oven BOSCH-HBG676EB6
i’m right that i only can switch the oven on/off but can not start the selected program?
will that be possible in the future?

thanks

Yes, you are right. I think you are only able to start a program or stop (not sure). It might change in the future.
For further information please have a look at https://developer.home-connect.com/docs/authorization/scope

Hi @jb4711,

Is the neest version of the binding working with OH3 M2 ??

Cheers
Stefan

Not yet. I work on that. Currently I work on hood support. Afterwards I will focus on OH3.

2 Likes

New version available:
Download: org.openhab.binding.homeconnect-2.5.9.202011081053.jar

Change log:

  • full hood support (big thanks to @stevendp for his help)

What about Functional Light and Ambient Light?

I’ve put it on my todo list. Must be a new feature, haven’t seen it before in the documentation.

Hi Jonas

The feature has been in the API at least since January. Back then I added it to your code while experimenting with using Visual Studio Code for Java development and have been using it right up until you made you version 2020/09/11. I use it for turning ambient light on in my kitchen in the evening.

I was waiting for you to move to the OpenHab branch before making a pull request. Its been quite a long time, but when you start implementing this, I can send you my changes.I haven’t had time to merge my changes into your recent changes, so its based on your code from February.

Fantastic work Jonas! Many thanks!
The Functional and ambient lights would be nice indeed as well. I can see it in the api docs (https://developer.home-connect.com/docs/api/settings/ambientlight) but I don’t know if these settings are also writeable? I’m currently using IFTTT for this, but using Openhab would be better of course :wink: Is there a way to test this with the custom commands? When I try it, I get the following:

GET
/api/homeappliances/…/settings/BSH.Common.Setting.AmbientLightEnabled

I get:
{
“readyState”: 4,
“responseText”: “\n\n<meta http-equiv=“Content-Type” content=“text/html;charset=utf-8”/>\nError 500 Communication error! response code: 409, message: Conflict, body: {\n “error”: {\n “key”: “SDK.Error.UnsupportedSetting”,\n “description”: “Setting not found for HomeAppliance”\n }\n} (Tried at Mon Nov 09 13:20:27 CET 2020)\n\n

HTTP ERROR 500

\n

Problem accessing /homeconnect/appliances. Reason:\n

    Communication error! response code: 409, message: Conflict, body: {\n  “error”: {\n    “key”: “SDK.Error.UnsupportedSetting”,\n    “description”: “Setting not found for HomeAppliance”\n  }\n} (Tried at Mon Nov 09 13:20:27 CET 2020)

<a href=“http://eclipse.org/jetty”>Powered by Jetty:// 9.4.20.v20190813
\n\n\n\n”,
“status”: 500,
“statusText”: “Communication error! response code: 409, message: Conflict, body: {? “error”: {? “key”: “SDK.Error.UnsupportedSetting”,? “description”: “Setting not found for HomeAppliance”? }?} (Tried at Mon Nov 09 13:20:27 CET 2020)”
}

Can you send me your code changes? It would help me to save time on this.

Can you try the command while the hood is powered on. Maybe it makes a difference.

Can you try the following commands via “send raw command (GET)” action in the binding UI?
GET /api/homeappliances/{haid}/settings/Cooking.Common.Setting.Lighting
GET /api/homeappliances/{haid}/settings/Cooking.Common.Setting.LightingBrightness
GET /api/homeappliances/{haid}/settings/BSH.Common.Setting.AmbientLightEnabled
GET /api/homeappliances/{haid}/settings/BSH.Common.Setting.AmbientLightBrightness

You can find the files I changed here.

https://1drv.ms/u/s!AvUmW7E_YQYmtlUkE3oXPQFT5ipl?e=u8EgPi

About a month ago I quickly tried to pull your changes, but I don’t remember how far I got on merging.

Sorry, I was trying to send these requests to the hob instead of the hood :wink:

They indeed work.
With sending the following raw command (PUT) to
/api/homeappliances/…/settings/BSH.Common.Setting.AmbientLightEnabled

{
    "data": {
        "key": "BSH.Common.Setting.AmbientLightEnabled",
        "value": true,
        "type": "Boolean"
    }
}

I can turn the ambient lightning on (true) or off (false) :wink:

GET to
/settings/Cooking.Common.Setting.Lighting
gives

{
	"data": {
		"key": "Cooking.Common.Setting.Lighting",
		"value": false,
		"type": "Boolean",
		"constraints": {
			"access": "readWrite"
		}
	}
}

GET /api/homeappliances/{haid}/settings/Cooking.Common.Setting.LightingBrightness

{
“data”: {
“key”: “Cooking.Common.Setting.LightingBrightness”,
“constraints”: {
“min”: 10,
“max”: 100,
“access”: “readWrite”
},
“unit”: “%”,
“type”: “Double”,
“value”: 10
}
}

GET /api/homeappliances/{haid}/settings/BSH.Common.Setting.AmbientLightEnabled

{
“data”: {
“key”: “BSH.Common.Setting.AmbientLightEnabled”,
“value”: true,
“type”: “Boolean”,
“constraints”: {
“access”: “readWrite”
}
}
}

GET /api/homeappliances/{haid}/settings/BSH.Common.Setting.AmbientLightBrightness

gives

"key": "SDK.Error.InvalidSettingState",? "description": "Setting currently not available or readable"

GET /api/homeappliances/{haid}/settings/BSH.Common.Setting.AmbientLightColor
gives

{
“data”: {
“key”: “BSH.Common.Setting.AmbientLightColor”,
“value”: “BSH.Common.EnumType.AmbientLightColor.CustomColor”,
“type”: “BSH.Common.EnumType.AmbientLightColor”,
“constraints”: {
“allowedvalues”: [
“BSH.Common.EnumType.AmbientLightColor.CustomColor”,
“BSH.Common.EnumType.AmbientLightColor.Color1”,
“BSH.Common.EnumType.AmbientLightColor.Color2”,
“BSH.Common.EnumType.AmbientLightColor.Color3”,
“BSH.Common.EnumType.AmbientLightColor.Color4”,
“BSH.Common.EnumType.AmbientLightColor.Color5”,
“BSH.Common.EnumType.AmbientLightColor.Color6”,
“BSH.Common.EnumType.AmbientLightColor.Color7”,
“BSH.Common.EnumType.AmbientLightColor.Color8”,
“BSH.Common.EnumType.AmbientLightColor.Color9”,
“BSH.Common.EnumType.AmbientLightColor.Color10”,
“BSH.Common.EnumType.AmbientLightColor.Color11”,
“BSH.Common.EnumType.AmbientLightColor.Color12”,
“BSH.Common.EnumType.AmbientLightColor.Color13”,
“BSH.Common.EnumType.AmbientLightColor.Color14”,
“BSH.Common.EnumType.AmbientLightColor.Color15”,
“BSH.Common.EnumType.AmbientLightColor.Color16”,
“BSH.Common.EnumType.AmbientLightColor.Color17”,
“BSH.Common.EnumType.AmbientLightColor.Color18”,
“BSH.Common.EnumType.AmbientLightColor.Color19”,
“BSH.Common.EnumType.AmbientLightColor.Color20”,
“BSH.Common.EnumType.AmbientLightColor.Color21”,
“BSH.Common.EnumType.AmbientLightColor.Color22”,
“BSH.Common.EnumType.AmbientLightColor.Color23”,
“BSH.Common.EnumType.AmbientLightColor.Color24”,
“BSH.Common.EnumType.AmbientLightColor.Color25”,
“BSH.Common.EnumType.AmbientLightColor.Color26”,
“BSH.Common.EnumType.AmbientLightColor.Color27”,
“BSH.Common.EnumType.AmbientLightColor.Color28”,
“BSH.Common.EnumType.AmbientLightColor.Color29”,
“BSH.Common.EnumType.AmbientLightColor.Color30”,
“BSH.Common.EnumType.AmbientLightColor.Color31”
],
“access”: “readWrite”
}
}
}

BSH.Common.Setting.AmbientLightCustomColor
gives

{
“data”: {
“key”: “BSH.Common.Setting.AmbientLightCustomColor”,
“value”: “#ff7f00”,
“type”: “String”,
“constraints”: {
“access”: “readWrite”
}
}
}

Thanks.

Probably only works if light is turned on?

Do you know if the commands work if the hood is powered off?