Home Connect binding

Yes the format is wrong. It needs to be an JWT token. You can check if the token is ok at https://jwt.io/

Don’t know how to deserialize it.

Since a while I cannot see the on/off channel in my Home Connect things. In the past it was there and I have two items which still function.

Any clue?

I’m trying for hours to get this binding running. I did everything at least 10 times but whenever I do the wizard, when the callback URL is called, I get an error 500 “could not fetch token”. The log prints:

2023-07-11 23:14:56.588 [ERROR] [oauth2client.internal.OAuthConnector] - grant type authorization_code to URL https://api.home-connect.com/security/oauth/token failed with HTTP response code 401
2023-07-11 23:14:56.595 [ERROR] [.internal.servlet.HomeConnectServlet] - Could not fetch token!
org.openhab.core.auth.client.oauth2.OAuthException: Bad http response, http code 401
[stack trace starts here]

I deleted everything and started all over several times, checked the settings in developer portal, did multiple applications but I still end up with the problem above. I also downgraded openhab, the binding, deleted the Storagehandler…jsondb, I can’t retrieve the access token.

I was successful getting it to work with homebridge and its plugin so in general the account setup should be ok (for homebridge you need “Device Flow Authentication”, that’s the only difference)

Does anyone know, what I’m missing? Many thanks in advance for your help!

1 Like

Hello all,
unfortunately I do have similar problem. OHversion 3.4.4 - Release Build.
The bridge is online and seems to work:


Unfortunately I am not able to create a Oven Thing. If I do it manually I am getting this error message:

Home Connect service is not reachable or a problem occurred! (Communication error! response code: 403, message: Forbidden, body: { "error": { "description": "Not allowed to access this HomeAppliance", "key": "insufficient_scope" } } (Tried at Fri Jul 14 23:44:55 CEST 2023)). 

The log is showing following message:

Response Body
{
  "error": {
    "description": "Not allowed to access this HomeAppliance",
    "key": "insufficient_scope"
  }
}

It seems I do have a the access right?

Any idea how to fix it?
Thanks in advance

When you hit the “authorize bridge” button it takes you to a screen where you can select the scope. i.e. select all the options.

Many thanks. Now the maunal is clear and it works properly as expected.

Thanks for your reply. Do you think that you will implement this function in the future? It would be really convenient to be able to set the timer by openhab, as the manual control is really squishy :wink:

Did Home Connect recently restrict their API rate limits more? 1000 calls in 1 day is not a lot when i have 5 of their connected appliances… Is there a way to adjust the polling rate in the binding or will it help to leave some of the thing channels unlinked to reduce the API usage?

My devices are disconnecting now with the error

Home Connect service is not reachable or a problem occurred! 
(Communication error! response code: 429, message: 
Too Many Requests, body: { "error": { "description": "The rate limit \"1000 calls in 1 day\" was reached. 
Requests are blocked during the remaining period of 60173 seconds.", "key": "429" }

I wish I could control them locally and not have to worry about such cloud APIs :frowning:

I didn’t try it myself yet, but it does sound like it could work, is you are ready to get your hands dirty: GitHub - osresearch/hcpy: Python tool to talk to Home Connect appliances over the local network (no cloud required)
:wink:

Thank you for providing the link. Will have a look.

1 Like

I really like the approach. Works like a charm. I’ve adjusted the code to my needs (GitHub - bruestel/hcpy: Python tool to talk to Home Connect appliances over the local network (no cloud required)).

You really get all the relevant information about the devices (cleaning required, dishwashing salt soon to be exhausted, etc.). Actually, the openHAB binding would have to be completely revised. Unfortunately I do not have time. :frowning:

Hi,

First of all - thanks a lot for the work your doing on this binding. It works great.

But I have one issue.
I have an oven hood and have written a rule that checks after you turn the hood on if the window is open - if not it should turn the hood off. (Security reason because we have a wood oven in the same room)

So the rule simple sends OFF command to the corresponding Power item but this only works if it wait‘s approx 15 seconds before sending the command.

When I turn on the hood on the physical button I can also turn it off on the physical button right away.
When I turn on the hood using the OpenHAB 4.03 Item GUI it‘s also possible to turn it off instantly.

BUT when I turn it on using the physical button and try to turn it of via the OpenHab Item GUI button or via the sendCommand OFF in my rule it only works after 15 seconds.

Can someone else confirm this behavior? Any idea what I could do to solve this?

Thank you

Andy

As long as it uses the api,there is no much to do about it… I am a bit confused by 15 seconds, i thought it must be 60 seconds, but yes, Bosch / Siemens “protect” their API by refusing “too many actions” within a given timeframe… So not much to do about it :slight_smile:
in total, to be honest the home Connect behaviour is stupid at all… My most hated thing is, I understand, why u can’t turn on the permission for remote control of a device via the API, but it’s bullshit, that u can’t turn off the permission to remote start via the API :slight_smile: … And some similar strange behaviour…

Thanks for your feedback, but I don’t think it’s an limitation of the Siemens API.
Because the problem occurs when I turn it on using the physical button and try to turn it off instantly using OpenHAB (API).
When I wait for approx 15 Secs it works :frowning:

Hi,
I’ve a problem with the bridge authorization. Every time I click “Authorize bridge” I get from the oauth-adressee the following error message:

{
“error”: “unauthorized_client”,
“error_description”: “Invalid client id”,
“state”: “my identifier”
}

When I log in on singlekey-id-website or in my android app everything is fine, so the identifier has to be the right one.

Please help me.