Help with water meter

Post Reply
raptorjr
Posts: 33
Joined: Tuesday 14 June 2016 21:23
Target OS: Raspberry Pi
Domoticz version:
Contact:

Help with water meter

Post by raptorjr » Monday 14 May 2018 19:05

Hello

I’ve tried once before to understand how the water meter is working. But that time I didn’t really have a working sensor. But now that I have a sensor working I would like to give it another try.

This is my setup.
I have a water valve and a water flow sensor connected to water. I use MySensors to control this and send values to Domoticz. The valve is temperature controlled through a DcVentz script.

Every second, when the valve is open I send current water flow and total volume for this “session” to Domoticz.

What I would like to have is to see how many times during the day the valve have been opened and the amount of water used that time. And also see the total of water used for each day.

When the valve is open I can see the m3 value increase, and when the valve is closed I send one zero value to indicate the end of the session. m3 then returns to zero. I don’t know if that is wrong behaviour?

Anyway, my question is, what kind of values does Domoticz expect to behave correctly? Should I maybe send the volume for each second instead of total? Should I not send zero at the end? Maybe I over complicate things and try to do stuff that Domoticz would handle by itself?

Any help is appreciated. I can change my MySensor sketch to send the right kind of values.

raptorjr
Posts: 33
Joined: Tuesday 14 June 2016 21:23
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Help with water meter

Post by raptorjr » Tuesday 19 June 2018 19:35

So I still need help with this and hopes that someone can help me. I have changed the code in my MySensors node and now no longer send 0 for water volume when I end the session Thought I got it, but no.

In the picture attached you can see that I filled 4 liters during 18:00, I then waited to after 19:00 and filled 2 liters more. The water volume widget shows the right values, but the 24-hour history is all messed up as you can see.

Also worth noting that a few hours earlier, though with old code in the node, I filled 37 litres. Not visible in the 24-hour view, but visible in the Week view? Also strange, why did it disappear from 24-hour view? And why isn't the 4 litres added to the week view?

Any suggestions to why this happen and what to do about it would be appreciated.
Water_volume.jpg
Water_volume.jpg (48.99 KiB) Viewed 514 times

User avatar
gizmocuz
Posts: 8677
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi
Domoticz version: beta
Location: Top of the world
Contact:

Re: Help with water meter

Post by gizmocuz » Wednesday 20 June 2018 8:20

Domoticz work with the default mysensors water meter example, in fact, i work with it

"When the valve is open I can see the m3 value increase, and when the valve is closed I send one zero value to indicate the end of the session. m3 then returns to zero. I don’t know if that is wrong behaviour?"
Sure it is a problem, it is a counter... and should always increase

If you follow the JSON wiki how to update a water meter and look at the water meter mysensors example , you should get this working
Also fetch the last meter value from domoticz like in the example
Quality outlives Quantity!

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests