Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds OAuth (Bosch SingleKey ID support) #117

Merged
merged 21 commits into from
Apr 26, 2023
Merged

Adds OAuth (Bosch SingleKey ID support) #117

merged 21 commits into from
Apr 26, 2023

Conversation

sander1988
Copy link
Owner

Note: I have only tested the calls used by the HA integration (https://github.com/jm-73/Indego/) .

eavanvalkenburg and others added 16 commits July 2, 2021 09:32
Add accept_tc_id to variable DEFAULT_BODY for successfull authentication.
Bosch Indego authentication modification
Merged some re-usable code to base client.
Added User-Agent header to fix block by Microsoft Azure proxy.
Added API call to retrieve the available mowers/serials in the account.
Fixed issue where the lib closes the HA HTTP session.
@buennerbernd
Copy link

@sander1988 It looks like you got the Indego running again.
I'm trying the same for the FHEM Indego module.
I have some questions how you solved this.
How did you get the first bearer token?
What is the URL to start the login? Any headers needed?

Thank you,
Stefan.

@sander1988
Copy link
Owner Author

@sander1988 It looks like you got the Indego running again. I'm trying the same for the FHEM Indego module. I have some questions how you solved this. How did you get the first bearer token? What is the URL to start the login? Any headers needed?

Thank you, Stefan.

Please check this issue: sander1988/Indego#171

This is what we reverse engineered from the Indego Android app. That's what I used to implement this update.

@buennerbernd
Copy link

buennerbernd commented Mar 31, 2023

Please check this issue: jm-73/Indego#171

This is what we reverse engineered from the Indego Android app. That's what I used to implement this update.

Thank you, this was helpful. I have this running in Postman now using the Bearer Token.
How can I use the refresh_token?

Edit:
My educated guess was:
https://prodindego.b2clogin.com/prodindego.onmicrosoft.com/b2c_1a_signup_signin/oauth2/v2.0/token?grant_type=refresh_token&refresh_token=eyJ...

Works!

…ion to improve handling by other applications like HomeAssistant.
@sander1988
Copy link
Owner Author

I just added a small update to version 2.2.0 . This adds the option raise_request_exceptions. This way we can detect these kind of errors in the applications (like HA) make some decisions based on it.

For example to delay the next update, to prevent update loops. I have seen this issues where a 502 on the Bosch side caused the client to do > 10 requests a second.

@jm-73
Copy link
Collaborator

jm-73 commented Apr 1, 2023

Same here: would be great to do pull requests to the develop branch. I always do this when i develop new features or trying to fix bugs.

@sander1988
Copy link
Owner Author

sander1988 commented Apr 1, 2023

Same here: would be great to do pull requests to the develop branch. I always do this when i develop new features or trying to fix bugs.

You can the PR right? As you are the project owner.

@jm-73
Copy link
Collaborator

jm-73 commented Apr 20, 2023

Same here: would be great to do pull requests to the develop branch. I always do this when i develop new features or trying to fix bugs.

You can the PR right? As you are the project owner.

I dont know how.

@sander1988 sander1988 changed the base branch from master to develop April 21, 2023 17:04
@sander1988
Copy link
Owner Author

Same here: would be great to do pull requests to the develop branch. I always do this when i develop new features or trying to fix bugs.

You can the PR right? As you are the project owner.

I dont know how.

Ok, I have changed it.

@jm-73 jm-73 merged commit 0939e1a into sander1988:develop Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants