You can also search for this plugin from the awesome Homebridge web UI and it will automagically be installed/updated for your.
What is supported
Plugin will automatically find and configure your Sense devices, and expose the following HomeKit services:
Sense Guard
Valve
Temperature Sensor
Leakage Sensor
Water pressure (log only)
Water flowrate (log only)
Sense
Leakage Sensor
Temperature Sensor
Humidity Sensor
Battery Service
Sense Plus (untested, as I dont have one)
Leakage Sensor
Temperature Sensor
Humidity Sensor
What is not supported
The system collects a lot of interesting information that unfortunately have no suitable characteristics counterpart defined in the official Apple HAP. This include (but not limited to) for example :
water pressure
flow metrics
water consumption
statistics
notifications
What I would like to see in the future
Proper OAuth library handling authentication
Displaying water pressure, flow metrics +++, but I have no idea what characteristics to use in Homebridge for this...
Configuration section in config.json
There is a Settings screen during plugin setup that helps you configure the configuration section shown below.
Note that for both refresh_token and username/password you must remove < > above when inserting your credentials.
You do NOT need to provide the refresh_token if you provide your username/password. Some/many are more comfortable using a refresh_token than the actual username/password credentials themselves in a config file.
refresh_interval
How often to query Ondus API for new data. Default setting of 3600 seconds is more than sufficient, because sensors only report data every 24 hours unless a notification threshold has been exceeded.
valve_control
If you have kids like me with iCloud family sharing enabled, and dont want them brats (just kidding, mine are actually angels) to turn off the main water supply through HomeKit as a prank when you are showering - this is for you! Set valve_control to false, and the plugin will ignore all valve control requests :-)
fakegato_support
Export historical sensor data for temperature and humidity to HomeKit using the proprietary Elgato Eve protocol. This feature will only be available from the Eve app, and will not display anything in the default Home app.
throttle_support
Depending on the number of Ondus devices you have, the Ondus API might restrict the number of requests accepted within a server configured time. If you see Error: Too Many Requests in the log, its time to start throttling!
shtf_mode
The Shit Hit The Fan mode is for debugging. If something is not working as expected, please enable this mode and run homebridge in debug mode. This will include more noisy logging which hopefully can help locate the problem. The debug log must be included when you are reporting an issue.
Actually obtaining a refresh_token from the GROHE ONDUS Api requires some manual steps.
In order to more deeply understand what is happening during the process, you can read more information about the OAuth2/OIDC (OpenID Connect) login flow by searching for these terms in your favorite search engine.
Here is a short step-by-step guide on how to obtain a refresh token:
Open a new tab in your Internet browser
Open the developer console of your browser (mostly possible by pressing F12)
Select the network tab of the developer console (which shows you the network request done by the browser)
You will automatically being redirected to the GROHE ONDUS login page, login there
After logging in successfully, nothing should happen, except a failed request to a page starting with token?
Click on this request (the URL in the request overview should start with ondus://idp2-apigw.cloud.grohe.com/v3/iot/oidc/token? or something like that
Copy the whole request URL (which should contain a lot of stuff, like a state parameter and so on)
Open a new tab in your Internet browser and paste the URL into the address bar (do not hit ENTER or start the navigation to this page, yet)
Replace the ondus:// part of the URL with https:// and hit ENTER
The response of the page should be plain text with a so called JSON object. Somewhere in the text should be a refresh_token string, select the string after this refresh_token text, which is encapsulated with ".
E.g.: If the response of the page looks like this:
Looked at FlorianSW java code alot for figuring out the Ondus web API
Spent 3 days trying to understand how 3 gazillion Node.js HTTP frameworks worked, and they all suck (just kidding.. well, not really) I mean... wtf... Seriosly, what is wrong with you guys??
请发表评论