logo elektroda
logo elektroda
X
logo elektroda

Smart Home: Counting water consumption and automatic water shut-off by ESP8266 and Domoticz

doopa 2310 14
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 18947650
    doopa
    Level 14  
    Posts: 146
    Help: 3
    Rate: 17
    Hello,
    I am building myself a smart home :) based on Domoticz in which I have, among other things, flood sensors.
    I set out to make a system based on esp8266 which:
    will count water consumption
    shut off water from the building

    And here my request for recommendation
    a water consumption meter/flow meter with pulse count capability
    a solenoid valve (and here I ask for an opinion whether it should be NO NZ or maybe one that closes on impulse and opens on impulse)

    ESP connected to the above appliances and integrated with domoticz.
    If the flood sensor is triggered it will cut off the water.
    if it detects at odd times that the water consumption exceeds the norm (i.e. 1 bath) it will shut off the water
    if no one is home and the washing machine or dishwasher is not running, it will shut off the water ;) .
    maybe you have some more ideas....
    regards
  • ADVERTISEMENT
  • #2 18948552
    pier
    Level 24  
    Posts: 2444
    Help: 40
    Rate: 1891
    Valve such recommend.
  • #3 18948616
    Anonymous
    Level 1  
  • ADVERTISEMENT
  • #4 18953558
    p4v3u
    Level 27  
    Posts: 1256
    Help: 50
    Rate: 37
    pier wrote:
    Valve such recommend.
    .

    I bought this for testing and it looks cool, is relatively quiet and has a lot of power.
  • #5 18955467
    doopa
    Level 14  
    Posts: 146
    Help: 3
    Rate: 17
    KrzysztofS wrote:
    .

    The photo shows the 230V version I have the 12V option. Faultless and available off-the-shelf in the country.You apply voltage to it and it closes. When it closes, it stops. There is a switch in the middle. You apply voltage to the other pin and it opens in the same way. And the disadvantage, it buzzes a little during operation :P .
    .
    How many wires does it have for control and power?
    In my case a problem because I will have to specially make a 12V power supply for it, but it looks interesting.
    Greetings
  • #6 18955482
    p4v3u
    Level 27  
    Posts: 1256
    Help: 50
    Rate: 37
    Mine on 12v has 2 - reversing the polarity gives a turn in the 2nd direction
  • ADVERTISEMENT
  • #7 18955854
    Anonymous
    Level 1  
  • #8 18956143
    Anonymous
    Level 1  
  • ADVERTISEMENT
  • #9 18956440
    Anonymous
    Level 1  
  • #10 18956512
    Anonymous
    Level 1  
  • #11 18965498
    doopa
    Level 14  
    Posts: 146
    Help: 3
    Rate: 17
    I will say yes :) for now I have chosen a makeshift solution and hope that this makeshift will not be for years.
    And everything really depends on the meter, which has cables with the possibility of counting pulses.
    Because when I buy it, then it will be necessary to change the installation and the possibility of installing a professional valve.

    Can you recommend a meter/fluid meter?
    kind regards
  • #12 19315647
    doopa
    Level 14  
    Posts: 146
    Help: 3
    Rate: 17
    I raise a question :) .
    I am looking for an impulse meter/litre minimum
    I'm thinking about a flow meter link but I don't know how to figure out the formula in esp :) F=5*Q {Q=[L/m] F=[Hz]} so that it counts my litres :) .
  • #13 19315666
    Anonymous
    Level 1  
  • #14 19316377
    ber_and
    Level 1  
    Posts: 1
    doopa wrote:
    Bump up the question :) .
    I am looking for an impulse meter/litre minimum
    I'm thinking about a flow meter .......................... but I don't know how to figure out the formula in esp :) F=5*Q {Q=[L/m] F=[Hz]} so that it counts my litres :)
    .
    Hello Colleagues
    I am looking for a similar water meter, with external pulse counting. Unfortunately the link provided no longer works. I plan to use this water meter to control the watering of the garden. It doesn't have to be too accurate (+-10% should be enough) Rather durability and threaded plumbing connections are important. The plastic gadgets found in chain stores are not the right solution for me.
    Best regards
    Andrew
  • #15 19316536
    Anonymous
    Level 1  

Topic summary

✨ The discussion revolves around creating a smart home water management system using the ESP8266 and Domoticz. The user seeks recommendations for a water consumption meter with pulse counting capabilities and a solenoid valve for automatic shut-off. Various responses suggest different solenoid valve options, including a 12V model that operates by reversing polarity and a Chinese model with WiFi and Tuya compatibility, suitable for integration with Domoticz. Users also discuss the importance of selecting a reliable water meter, with suggestions for testing methods to determine pulse-to-volume conversion. The conversation highlights the need for durable components and the potential for automation in home water management.
Generated by the language model.

FAQ

TL;DR: For ESP8266 + Domoticz water control, start with 225 imp/L (±10%) meters and "You pour water into a bucket, count the pulses." Calibrate, choose a two‑wire 12V or 230V actuator, or use a Tuya clamp-on WiFi overlay. [Elektroda, Anonymous, post #19315666]

Why it matters: This setup lets you auto‑shut water on leaks, catch off‑hours overuse, and protect your home.

Quick Facts

Which pulse‑output water meter should I pick for ESP8266/Domoticz?

A named option in this thread is the “PM‑1‑B flow meter.” Search by that exact name if a listing disappears. It provides pulses you can count with ESP8266, then calibrate in software. For irrigation or household use, verify its thread size and perform a quick bucket calibration. [Elektroda, Anonymous, post #19316536]

How do I convert pulses to liters on ESP8266 without complex math?

Calibrate once, then use pulses_per_liter in code.
  1. Fill a known-volume bucket through the meter.
  2. Count pulses during the fill.
  3. pulses_per_liter = pulses / liters; volume_l = total_pulses / pulses_per_liter. “You pour water into a bucket, count the pulses.” This practical method avoids assumptions from datasheets. Re‑check after plumbing changes. [Elektroda, Anonymous, post #19315666]

What starting pulses‑per‑liter constant should I use?

Begin with 225 impulses per liter and expect about ±10% variance. Then calibrate with the bucket method to tighten accuracy. Update your constant in firmware after calibration. This gets you close quickly and avoids overfitting to one flow rate. [Elektroda, Anonymous, post #19315666]

Are cheap turbine flow meters accurate enough for garden watering?

Yes, if you accept about ±10% accuracy and calibrate. Users report these plastic turbine sensors work, but they are not for billing accuracy. Perform a field calibration and re‑check seasonally. Use threaded models for durability and easy maintenance. [Elektroda, Anonymous, post #19315666]

How many wires does a 12V actuator have and how do I drive it?

Typical 12V drives have two wires; reverse the polarity to reverse direction. That means a DPDT relay or H‑bridge can open and close the valve. Keep wiring short and use adequate current capacity. Add limit‑switch interlocks if your model supports them. [Elektroda, p4v3u, post #18955482]

What actuator voltages and wiring options are available?

Common options include A82 (230VAC or 24VAC) and A80Eco (230VAC or 24VDC). Base models use 3 wires, with 4‑wire or 7‑wire variants available for a surcharge. Some actuator stickers show 9–24V ranges. Match the actuator voltage to your power availability. [Elektroda, Anonymous, post #18955854]

Are motorized ball valves noisy in operation?

They make a slight buzz while moving, then go quiet at rest. One user notes it “buzzes a little during operation.” Expect brief noise only during opening or closing. This is acceptable for indoor use in most cases. [Elektroda, Anonymous, post #18948616]

Is the AliExpress clamp‑on valve quiet and strong enough?

A user who bought it for testing reports it looks good, is relatively quiet, and has a lot of power. Quote: “it looks cool, is relatively quiet and has a lot of power.” Mount it firmly and test full open/close under pressure. [Elektroda, p4v3u, post #18953558]

Do I need a separate 12V power supply, or can I avoid it?

You can avoid a new supply by choosing a 230VAC actuator version. Options include A82 230VAC/24VAC and A80Eco 230VAC/24VDC. Some models are labeled 9–24V; choose what matches your available power. This simplifies installation and wiring. [Elektroda, Anonymous, post #18955854]

Will the motorized valve hold position after power is cut?

Yes. These drives run to end‑stop, then stop and stay put until driven again. As one user explains, “You apply voltage to it and it closes… apply voltage to the other pin and it opens.” There is no spring return in this type. [Elektroda, Anonymous, post #18948616]

Can I use a clamp‑on Tuya WiFi valve and flash Tasmota for Domoticz?

Yes. “It has Esp8266 on board and you can upload Tasmota there too.” This overlay mounts on your existing valve, so no plumbing work. The same post calls it ideal for automation and Domoticz. Verify movement limits and secure the clamp. [Elektroda, Anonymous, post #18956143]

Are clamp mounts reliable, or can they twist and fail to close?

A user warns the clamp can twist sideways instead of closing if the mount is weak. This is a real failure mode to avoid. Use a rigid bracket and test under flow and pressure. Re‑torque after initial runs. [Elektroda, Anonymous, post #18956440]

How do I prevent clamp slippage when installing a drive?

Profile the holder correctly and fasten the clamp firmly. “A properly fastened clamp and … profiled holder … does not cause such symptoms.” Fit the holder to pipe size and recheck after a few cycles. [Elektroda, Anonymous, post #18956512]

How should I automate safety rules—leak shutoff, off‑hours use, and away mode?

Use flood sensors to trigger immediate water shutoff. Add consumption thresholds to catch unusual off‑hour use and close the valve. In away mode, keep water off unless a dishwasher or washer is scheduled. ESP8266 links these rules into Domoticz scenes. [Elektroda, doopa, post #18947650]
Generated by the language model.
ADVERTISEMENT