Home Connect addon: Looking for beta testers

(Johannes) #141

Oh good advice: for me the error also started after a restart.

(mattnl ) #142

Unfortunately it happened here again as well.

(Markus S.) #143

Have the same oAuth-Problem. But only by 2 of 3 machines. In the past, it was the same behaviour. If i create a new token, all is okay for some Time.
Greetings, Markus

(Jochen Bauer) #144

We would like to test the binding - where to go next?

Best regards,

(Jonas ) #145

Hi @Master79 @mstehle @johannesbonn @borcon,

I encountered the same error too. Will analyse the logs now. Till now I hadn’t enough energy to analyse the problem ( common cold).

If you would like to test the binding, I would recommend the simulator environment of HomeConnect. The binding can talk to that environment too. You don’t need to own a Siemens or Bosch device for that.
This is a good starting point: https://github.com/bruestel/org.openhab.binding.homeconnect/tree/master/addons/binding/org.openhab.binding.homeconnect

(Jonas ) #146

Just opened a ticket and waiting for a response.

Problem summary:

  • The API client is refreshing his access token every 24h
  • This is done with the help of the refresh token
  • During the refresh the API could also send a new refresh token, but this never happens. I always have to use the same refresh token
  • After a couple of days the API denies the refresh token --> broken client

Possible solution if the support can’t help:

(Dennis) #147

@jb4711 thank you for this great binding! I’ve had it working initially yesterday, but unfortunately got the famous 400 error here as well :smiley:. I’ll wait until you hear something from those Siemens guys!

(Manuel) #148

Hi Jonas,

first of all great work! But i have issues to receive the token…
Seems my command line is not correct.
My openhab server is a Windows Server 2016, never used curl before :slight_smile:

My first curl command is like this:

curl -X POST https://api.home-connect.com/security/oauth/device_authorization -H Cache-Control:no-cache -H Content-Type:application/x-www-form-urlencoded -d client_id=000000000000000&scope=IdentifyAppliance%20Monitor%20Settings

Seems to work, but at the end of the reply there is an error about the command “scope” wrong / not found?
Device code & user code are ok, verification via website also working.

At the next step mit command line looks like this:
curl -X POST https://api.home-connect.com/security/oauth/token -H Cache-Control:no-cache -H Content-Type:application/x-www-form-urlencoded -d client_id=00000000000000000&client_secret=000000000000000000000&grant_type=device_code&device_code=000000000000000

But here the reply begins with “error”: “invalid_request” “missing or invalid parameter”?

Can you please take a look at my commands what i´m doing wrong there?

Thanks &BR from Berlin,

(mattnl ) #149

Hi Jonas,
have you received any feedback yet?

(Jonas ) #150

No not yet. Writing back and forth with the support team. Conclusion so far: It should work like in the documentation mentioned. But somehow it does not work for us :smiley:

(Jonas ) #151

Did you used quote sign (') after -d like in my example?
You could also try to replace %20 with a space. &scope=IdentifyAppliance Monitor Settings

You don’t need to execute the curl commands from the openhab server machine. Can you try it on your local machine for example.

(Manuel) #152

@jb4711 Thanks for the fast answer :slight_smile:

Tried all, with quotes, space, without, on Windows 7, on Windows 10… hmpf… drives me crazy
Scope is always wrong or missing, and second command doesn´t work completely

Any more ideas?

(Jonas ) #153

Can you please send me a screenshot of your command line via PM. I will try to reproduce it.

(Jonas ) #154

Good news from the Home Connect Developer team:

First, sorry for the late response. We’ve checked it again on our side and it seems that we found the reason. In the next days we will deploy a new version of our OAuth service. As soon as this is done, we will inform you.

(Jan Dönges) #155

Yay :smiley: thanks for your help :slight_smile:

You know…it’s quite a hassle to live without lights that turn on when you open the dishwasher, or signals when the washung machine is done :rofl: :rofl:

(mattnl ) #156

Excellent! Thank you very much Jonas.

(Tom) #157

Thanks also for chasing this up too.

My wife didn’t think much to all the home automation stuff until I linked up the washing machine and drier with Alexa to tell us when either of them had finished their cycles.

That’s a major time saver on washing day.

(Jonas ) #158

New message from Home Connect development team.

We have good news for you. The latest version was deployed some minutes ago.

In addition you can decided per client in developer portal if a new refresh token is generated each time. But please not if you enable this then you can only use a refresh token once. If it is used twice or more then the whole client is revoked automatically. This is a recommendation of the OAuth standard.

Best regards,

(Dennis) #159

That’s great Jonas! Is the binding fully compatible with this or is there a modification required?

(Jonas ) #160

No modification required. Now it just should work.

@All: I would like to get rid of the initial curl commands. Has anyone a hint which other binding I could have a look at? I would like to checkout how other bindings handle oAuth flow.