PacAnimal / grohe-api

A C# implementation of the Grohe Sense API, exposing a Swagger / Swashbuckle web interface for further integration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

grohe-api

A C# implementation of the Grohe Sense API, exposing a Swagger / Swashbuckle web interface for easier integration with home automation systems and similar.

Screenshot

Warning

This project is based on decompiling the Grohe Sense app for Android and may break at any time if Grohe change their API.

Make sure to star this project if you use it, to follow future updates in the case of API changes.

Implemented features

  • Turning on and off the water valves of SenseGuard
  • Snoozing a SenseGuard so it doesn't interfere with sprinklers or washing machines in 'eco' mode
  • Listing and easily iterating notifications, as well as marking them as read or deleting them
  • Checking battery levels and when devices last reported

Homey

This was mainly written with the intent to further integrate it with the Homey smart hub, but I'm sure it's useful for other things as well, if only to save you the work of decompiling the Grohe Android app and circumventing certificate pinning, and so on, when making your own edition.

Example homey usage

In the following screenshots, the API is being used with Homey.

It's using the standard web requests of the advanced flows, with basic authentication in the headers. The content of the header string is the entire header, for simplicity, for example Authorization: Basic c2VjcmV0OnNlY3JldA== for the username 'secret' and password 'secret'.

"Smart" home

  • Using “Virtual Devices” to create a switch to control the valve of the Grohe Sense (it’s a “Remote → Switch”) in Virtual Devices
  • Polling the status of the valve every 5 Minutes, in case it changed from elsewhere

Screenshot

Valve follows house alarm

  • If the house alarm is Armed (we’re away, or it would be “partial armed”), it waits for the washing machine and dishwasher to stop running, then closes the valve
  • When the house alarm is no longer armed, the valve is turned on, but only if it was turned off by Homey

Screenshot

Auto snooze

  • While the washing machine runs, keep snoozing the SenseGuard for 4 hours at a time, so it doesn’t trigger in the middle of the night due to the washing machine’s “eco” mode, which draws very little water at a time during its 7-8 hour cycle.

Screenshot

Notifications

  • Using the notifications/next endpoint to fetch all the notifications available in the Grohe app, storing the timestamp of the last seen notification in Homey
  • Optionally deleting or marking notifications as read once Homey has grabbed them

Screenshot

Maintenance

  • Using the maintenance endpoint to check once a day if there are devices with low battery or that haven't reported
  • Configurable limits for both, and easy to parse JSON for Homey

Screenshot

Contributing

Feedback and testing is very welcome on this project, and pull requests doubly so.

Give it a star if you use it? :)

About

A C# implementation of the Grohe Sense API, exposing a Swagger / Swashbuckle web interface for further integration

License:GNU General Public License v2.0


Languages

Language:C# 96.1%Language:Dockerfile 2.0%Language:C 1.7%Language:Shell 0.3%