bachya / regenmaschine

💧 A simple, clean, well-tested Python library for interacting with RainMachine™ smart sprinkler controllers
MIT License
11 stars 8 forks source link

Feature Request: Add support for watering/flowmeter endpoints #150

Closed shbatm closed 2 years ago

shbatm commented 2 years ago

Is your feature request related to a problem? Please describe. New API Feature

Describe the solution you'd like Add support for the watering/flowmeter end-points and a Home Assistant service to push flow meter values to the RainMachine.

https://rainmachine.docs.apiary.io/#reference/watering/wateringflowmeter/get

Feature was added in version 4.6.1 of the API to be able to send flowmeter values from an external flow meter.

Describe alternatives you've considered n/a

Additional context My sprinkler main valve, flow meter, and pressure transmitter are connected to an ESP32 device at the front of my house. I'd like to be able to utilize the new API feature to send the data from this back to the Rainmachine for water history tracking.

bachya commented 2 years ago

The API docs indicate that you can pass data in multiple units:

Units can be "clicks", "gal", "m3", and "litre"

We should standardize on one (and should probably standardize on metric to keep things consistent). Any suggestion between m3 and litre?

shbatm commented 2 years ago

Would it be easy enough to just pass it as a service parameter? Default to litre and allow a select from the service call?