-
Notifications
You must be signed in to change notification settings - Fork 6
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
Extend the API for Grohe Blue Home #12
Comments
Yes, the connection data is encrypted, as it should be, so sniffing the functions from the network traffic is most likely not the way to go forward and will never work. The way I started when doing the API for the GROHE Sense devices is by concentrating on the app and going through the de-compiled code of it. This is, however, only being reasonable, if you can also do the requests (like in cURL or Postman) and look at the result on the device (to see if it actually had an effect). So, it would probably be possible to do that work if you give me your Grohe account data, however, I feel very uncomfortable asking or taking them from you, as it would allow me to control the device inside of your home. And generally, why should you trust your very private login credentials some stranger on the internet? :D If I've some time, I'll probably take a look into the app to see what HTTP endpoint it actually talks to, provide some example requests and may come back to you to test them out. However, please don't expect anything anytime soon, as I need to find the time to actually do that, and there's absolutely no guarantee, that this will work out at the end, as well. What you, however, already can do is, to show me the model of the response for the appliances in your account. For that, please (if you still want to contribute here :P) obtain an access token as described here. Instead of taking the value of the Secondly, use the HTTP request sending tool of your choice (I like to use postman for that) and do the following requests:
Extract the value of
Extract the value If you want to do that, thanks in advance. Please, if you've any problem while doing these steps, where I might be able to help, feel free to ask me :) |
Hello, thanks for the great description. After the first step I get the following output:
regards Sebastian |
Interesting, that should not be the case :/ You can, alternatively, use the following request to get the whole response (locations, rooms and appliances from one request): GET https://idp2-apigw.cloud.grohe.com/v3/iot/dashboard You also need to put the |
It works now, see the last thread. |
GET https://idp2-apigw.cloud.grohe.com/v3/iot/dashboard
|
Just out of curiosity: Did you obfuscate the value of the I would also do the same, if I were you, for the serial number, that's nothing we need here to see if we can implement the stuff :) Additionally: GET https://idp2-apigw.cloud.grohe.com/v3/iot/locations/LOCATION_ID/rooms/ROOM_ID/appliances/APPLIANCE_ID/command |
|
Alright, that looks straight forward as of now. Now the question is: What are the relevant actions you can do in the app (which you also would like to have exposed in the API as well)? Would it be possible to show relevant screenshots of the app? |
Yes, first I removed the system from the app and added it again: GET https://idp2-apigw.cloud.grohe.com/v3/iot/dashboard
|
I marked the values that are interesting from my point of view with
|
Ok, so: With the last commits I made today and the days before, there's a basic support for reading data from the grohe blue device, based on the API responses you gave here in the thread. Next step would be to find out what actions in the app we can do with which API request. For that, I would ask you to do the following:
That should help us find out, what we need to provide in this library to do actions :) Thanks in advance! |
Cool! I'll take care of it tomorrow evening. |
I have one question regarding the first point: appliance request is https://idp2-apigw.cloud.grohe.com/v3/iot/locations/idxxx/rooms/idyyy/appliances But what exactly does the appliance action curl requests mean or what does it looks like? |
Oha, sorry, that's confusing, yes :D To be honest, I'm not entirely sure anymore, what I meant with the action API requests, too :P From looking at what I probably had in my mind, I can only think of the appliance command request, so https://idp2-apigw.cloud.grohe.com/v3/iot/locations/idxxx/rooms/idyyy/appliances/idzzz/command |
I tried to create a list of values (with a corresponding description) that would be interesting for the OpenHAB integration. |
@Sprocket02 Ui, that's very detailed, thanks for providing this, that will make the implementation of the features much easier! Please give me some time to find time to go through this list. I would also most likely ask you again to execute some requests on your side, to verify, that they work to change the values in the device, however, I would come back to you here in the thread then :) Like I said, it could take some time, very busy days :( |
Ok, I added some more values, which can be read from the API. Next step is updating values. For that, can you please check, if you can execute the following API commands and give me a hint what the return values are? First, get the current values of the appliance (as before) with: Then, change one of the params values, e.g. If you then do the GET requet from above: Did the value (e.g. Please repeat the same procedure, however, change one value of the Then, let's check, if we can change the Change the value of Now, do the GET request again and check, if the value Of course, you need to retrieve a valid access_token from the API again, and put this one into the Thanks again for your help here, please give me a hint, if you need help here somewhere :) To the hint in the excel with the App source code: Unfortunately, the app does not seem to reveal much about the Blue Home appliance at all, I couldn't find, e.g., the code which changes the values in the command endpoint. I could only find the values for the GROHE SENSE Guard. However, from looking at the API, the way of changing the values should work as on the other devices. The values itself are mostly something we need to guess, that was the same procedure in the other appliances as well. We don't have the apps source code, just the decompiled classes, and meaningful names are not really present there :) |
Sorry, but how can I PUT the request in Postman? I can't edit the GET request directly. |
Next to the URL (left side) there is a drop down box, where you can select the method, like GET, POST, DELETE or PUT :) |
I tested the PUT in the screenshot and now I can't send an GET request anymore.
|
Alright, you found the body for the PUT, however, you need to specify the applianceId after the /appliances/ part, so the request should look like: I truncated the appliance ID, please use the value of the JSON :) |
In your description, the applianceId is in front of the appliance. I don't understand it somehow.
And what do you mean by:
|
I mean, that you need to fill in the full UUID instead of the abbreviated one I used :) Look at the value of the |
The param wasn't changed, as there was an error (please always provide the status code (top right side of the response body section) for better understanding. In this case, one question: Did you strip (remove) parts from the body of the PUT request (which you retrieved from the GET request)? If so, this would most likely be the problem. A PUT request overwrites the representation of the object you PUT to as a whole, so it needs to contain all the required information. That's why you should do a GET request first, take the body of the response and use it as a body in the PUT request and only change values in it (e.g. carbon_hardness). If my assumption is correct, could you please try it again? Also, could you please try the following requests as well and check, if they return values or what the status code is? GET https://idp2-apigw.cloud.grohe.com/v3/iot/locations/LOCATION_ID/rooms/ROOM_ID/appliances/APPLIANCE_ID/config Thanks in advance! |
With params the same status. |
Ok, next try: Could you issue the same PUT request again, but this time use POST instead? |
Hi, how do I initialize the |
Oh damn... I see... I implemented a method to retrieve the current command (was there before already), which is Sorry again for my stupidness here, I just forgot this part :D |
With the last commit I added a way to change the tap_type value of the Blue appliance. Could you please take a look? Thanks in advance! :) |
Embarrassing :( You're absolutely right. It's fixed! |
Yeah, you do not need to create the |
Great, it works. The water runs like magic out of the tap according to the |
Oha, ok, that's interesting, I asked myself already what this parameter does :D I'll add a way to update this setting as well. Does it make sense to change Do you think that sending a 0 as a tap_type would turn off the flow of water? Would you be able to check that through postman? |
Ok, however, it's very hard for me to understand the unit behind the "amount" switch in the screenshot :/ Do you know what it means? Is it based on liters, is it based on time? What happens if you start when selecting 100? Is it on for 100 seconds? |
That's milliliters. I set the type of water, then the amount and press start. |
Alright, thanks for the info :) Let me change the API :) I'll answer here, when I uploaded the change, so it would be great if you could take one more look than. |
Ok, I uploaded the change :) Can you please check again? You can see the changes in the test file I linked above :) |
It works. It is the same as in the app! But I saw that my CO2 filter was also reset. Maybe the value |
Hmm, that's very unlikely, the command should contain all the information as they were before (that's why you should request the
And let me know what the value is? |
Hmm, here it was false, so maybe that is now set to true always because of the ApplianceCommand send :/ Weird... The problem is, this needs to be done by the API client in this case, as the returned
|
That works, now the value is false when I make a GET with Postman. |
What happens if you open the tap with the Java API again? Is the CO2 status reset true again? |
No |
Hmm, strange, then I don't know why this reset was triggered in the first place, and I doubt that it has to do with the "open tap" through the Java API :/ I would keep it like it is now and if it happens more often, we certainly need to take a look, but as of now, I don't see how this could be related :( Is there anything else missing then? Any feature for the |
No, I think everything is ready for the next step. |
Alright, I released the new version 1.0.0 with all the changes: |
Hi @FlorianSW and @Sprocket02, I have looked in to this since I recently acquired a Grohe Blue Home. However I'm still missing two things:
I can get the config and status from it by sending a GET request, but if I resend the JSON (sans the brackets and .params.water_hardness) it is replying with a 404 response. I can however send commands to the https://idp2-apigw.cloud.grohe.com/v3/iot/locations/LOCATION_ID/rooms/ROOM_ID/appliances/APPLIANCE_ID/command URL with a JSON like this:
To get 150ml sparkling water. Hope you have time to point me in the right direction 😊 |
Hello,
I have now bought a Grohe Home Blue and would like to integrate it into OpenHAB. The first step is to extend this API. I tried to read the network traffic between the Grohe Ondus app and the Grohe Blue Home. However, I was not able to do this because the connection is encrypted. Do you have a tip for me how to proceed? For example, if I could give you my access data to my Grohe account, you could look at the connection data yourself.
regards
Sebastian
The text was updated successfully, but these errors were encountered: