WaterGuru Simple REST API
There is no authentication because the expectation is that you're running this on your internal, trusted home network. You've been warned.
Please do not abuse the WaterGuru API - this should not be run more than once or twice a day. It is not intended to be run more often as it does not properly implement a token refresh option. (Hint, hint, please add this and send me a pull request)
Installation (Docker)
- Grab the Dockerfile via wget and put it in a directory on your Docker server. Then run the commands below from that directory
# docker build -t waterguru-api --build-arg WG_USER='your@email.address' --build-arg WG_PASS='your_password' .
Don't forget the dot at the end! CTRL-C out of it when it's complete Optional arguments are WG_PORT. You will need to use your email and password that you use with the WaterGuru app already. These will default to us, na, and 53255.- Run your newly created image:
# docker run -d --restart unless-stopped -p 53255:53255 --name waterguru-api -t waterguru-api
(if you changed the port when you built your image, you should also change it here) - That's it. If you need to troubleshoot your docker image, you can get into
it via:
# docker exec -it waterguru-api /bin/bash
or# docker run -it waterguru-api /bin/bash
and then poke around and
Usage
You'll need to get the IP address of your docker host, then navigate to: http://your.ip.address:53255/api/wg - this should show you json output from WaterGuru
Hubitat
Coming Soon.
Bugs/Contact Info
Bug me on Twitter at @brianwilson or email me here.