homebridge-homeconnect: Home Connect API error: invalid content type [invalid_request]
Description of Issue
I am setting up the HomeConnect plugin. I copied the config.json as instructed, and added the ClientID that I set up for my application via the HomeConnect developer website.
When I run Homebridge (and look in the logs for the URL to authorize the app), I instead get the following error:
Home Connect API error: invalid content type [invalid_request]
Plugin Version
homebridge-homeconnect v0.24.1
Logs:
[03/05/2022, 20:45:17] [HomeConnect] No saved authorisation data found
[03/05/2022, 20:45:17] [HomeConnect] Requesting Home Connect authorisation using the Device Flow
[03/05/2022, 20:45:18] [HomeConnect] Home Connect API error: invalid content type [invalid_request]
[03/05/2022, 20:45:18] [HomeConnect] Retrying client authentication in 60 seconds
(node:5225) ExperimentalWarning: buffer.Blob is an experimental feature. This feature could change at any time
(Use node --trace-warnings ...
to show where the warning was created)
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 22 (5 by maintainers)
Commits related to this issue
- Send content-type header as part of authentication requests #86 — committed to allistera/homebridge-homeconnect by allistera 2 years ago
@thoukydides it works for me thank you very much for your work!
Nice one, it is working well. Many thanks
@Jacubeit …
Are you saying that you are seeing the same error using this plugin? Is this the first time you have attempted to use the plugin?
I have tried again, and with the ClientID correctly added to
config.json
I still do not see that error. Even using an invalid ClientID but using the correct format (64 hexadecimal digits) does not give that error. Only by configuring something that does not resemble a ClientID triggers that error.You can use that ClientID with this plugin by also setting the following in
config.json
:This allows use of the simulated appliances at https://developer.home-connect.com/simulator for testing.
That ClientID will not work with this plugin when using your own appliances, i.e. without
"simulator": true
.No. That is not the issue.
The scopes requested by this plugin can be found here: https://github.com/thoukydides/homebridge-homeconnect/blob/005662a214587968cd65d72af3664cc4bd5079e2/lib/homeconnect_api.js#L23
Even if unsuitable scopes were requested, that would only be discovered after authentication is attempted, and it is not getting that far.
If you look at the Home Connect documentation you will see that some scopes require an Additional Partner Agreement. This applies to
*-Images
,Images
, andFridgeFreezer
. This plugin does not request any of those scopes.That file is completely irrelevant. It is only used by homebridge-config-ui-x, and would not affect this error.
As far as I can see the Home Connect API is working correctly. In your test you are requesting scopes that require an Additional Partner Agreement and the API is correctly rejecting them.