petergridge / irrigation_component_v4

Irrigation custom component with a companion custom card
13 stars 4 forks source link

Flow / liters based approach #2

Closed knom closed 2 years ago

knom commented 2 years ago

Hi, I really love this component!

Instead of relying on TIME - I generally found FLOW meter based approaches be more reliable. This way you say - measure 10 Liters of water - no matter how long it takes.

There's flow meters for 10$ on the internet https://www.amazon.com/HiLetgo-1-75MPa-Flowmeter-Control-Arduino/dp/B01N2NJQHD/ref=zg_bs_306928011_5/147-3589379-9778044?pd_rd_i=B01N2NJQHD&psc=1

That can be integrated into HASS via EasyESP or RPIEasy (https://tutorials-raspberrypi.com/reading-out-the-flow-meter-water-flow-sensor-on-the-raspberry-pi/)

Now of course I wonder... Would your component allow to switch to FLOW based as an alternative option to the existing TIME BASED?

Thx!

petergridge commented 2 years ago

Hi,

I don't see any reason why this could not be provided.

The flow meter sensors you provide in HA would need to provide the volume delivered not the flow rate.

I would only need one new configuration item for the zone 'water sensor' to read the volume, the existing 'water' value would then be read as flow meter units instead of time, monitoring the difference between starting volume and current volume to determine the amount of water delivered to a zone to determine when to stop watering.

I will add this to the backlog of work I have and update you when it is ready for testing, I would appreciate if your could help with that .

Cheers Pete

knom commented 2 years ago

Sure! Sounds like a great plan ;)

petergridge commented 2 years ago

Hi Version 4.0.10 has been release with the functionality you have requested.

This version uses the flow rate/minute to calculate the volume delivered. Just add a 'flow_sensor' attribute to the zones you want this applied to and the 'Water' attribute will be read as Volume instead of time.

Please run a few tests to ensure the logic is correct as I do not have a flow meter installed.

Cheers Pete