Water meter

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

Water meter

Post by raptorjr » Sunday 28 August 2016 21:29

I've made a water flow sensor and use MySensors to send the data to Domoticz.

It is presented with:
present(WATERFLOW_ID, S_WATER, "Water flow");

And sends messages:
MyMessage flowMsg(WATERFLOW_ID, V_FLOW);
MyMessage volumeMsg(WATERFLOW_ID, V_VOLUME);

What I would like is to measure the amount of water when a valve is opened, and then close the valve after a given amount has flown through the sensor.

I added it to Domoticz and it is not working as I hoped. First, it says, in the upper right corner of the sensor, 353880992 Litres?? Where did that number come from? And how do I reset it every time the water valve is opened? I don't want a overall total amount of water, I want the total for this specific open/close session of the valve.

On the Utility page there is also a 0.000m3 meter that seems to show the value for the current open/close session, but it is not shown when used on the dashboard, all I see then is 353880992 Litres. And I would liked to have the value in litres instead of cubic meters and shown on the dashboard.

Is it possible to get what I want? A representation showing the volume in litres for the last open/close session of the valve? It feels like Domoticz is made for some very specific setups/sensors, and maybe not very flexible in it's usage? But I could very well be my lack of knowledge. I hope it is.

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

Re: Water meter

Post by raptorjr » Monday 05 September 2016 22:08

Not possible to solve this? Any suggestions on another way to do it?

Yobby
Posts: 15
Joined: Thursday 10 April 2014 9:18
Target OS: Raspberry Pi
Domoticz version: beta
Contact:

Re: Water meter

Post by Yobby » Wednesday 14 September 2016 14:51

I don't if you still need it, but using a lua-script, a virtual meter and a uservariable it should be possible.

When the valve is opened, set the uservariable to the total water amount from the actual Waterflow sensor, and with each update of that sensor, set the value of the virtual meter to the difference in liters between Waterflow sensor and uservariable.
And to finish: If [virtual meter] >= [amount wanted] then [close valve]

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

Re: Water meter

Post by raptorjr » Monday 19 September 2016 20:54

Yobby wrote:I don't if you still need it, but using a lua-script, a virtual meter and a uservariable it should be possible.

When the valve is opened, set the uservariable to the total water amount from the actual Waterflow sensor, and with each update of that sensor, set the value of the virtual meter to the difference in liters between Waterflow sensor and uservariable.
And to finish: If [virtual meter] >= [amount wanted] then [close valve]
I still need it. Haven't found a solution. But all this is very new to me, so I don't really understand what kind of virtual meter to create?

Yobby
Posts: 15
Joined: Thursday 10 April 2014 9:18
Target OS: Raspberry Pi
Domoticz version: beta
Contact:

Re: Water meter

Post by Yobby » Tuesday 20 September 2016 10:44

raptorjr wrote:I still need it. Haven't found a solution. But all this is very new to me, so I don't really understand what kind of virtual meter to create?
  • Setup
  • Hardware
  • Add Dummy
  • Create Virtual Sensors
You could just use Custom Sensor in the dropdown. Or Rain, as it has both flow&volume.

Image

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

Re: Water meter

Post by raptorjr » Tuesday 20 September 2016 17:28

Thank you for your reply. I could try the rain sensor. Not a problem for me to change the sketch and present the watermeter as a rain sensor. Then I wouldn't have to make a virtual sensor.

But anyway, I know how to make virtual sensors. But this custom sensor you talk about, how can I create it? In another thread I also got the advice to create a custom sensor, but never a explanation how to do that.

This is the only sensor types I have available when creating virtual sensors:

Image

Yobby
Posts: 15
Joined: Thursday 10 April 2014 9:18
Target OS: Raspberry Pi
Domoticz version: beta
Contact:

Re: Water meter

Post by Yobby » Tuesday 20 September 2016 19:22

As you see above, I'm running the beta, version 3.5641

and I get this:
Image

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

Re: Water meter

Post by raptorjr » Tuesday 20 September 2016 22:20

Thank you. Guess I'll have to test the beta then.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest