Watermeter

Moderator: leecollings

Hendrik
Posts: 18
Joined: Saturday 04 January 2014 20:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Watermeter

Post by Hendrik »

I want to connect a water meter, using a TCRT5000 IR Barrier Line Track Sensor (With the code from the MySensor website)
I have connect it to my gateway, and the following is in the log:
2015-03-17 20:11:33.206 MySensors: Node: 2, Sketch Name: Water Meter
2015-03-17 20:11:33.211 MySensors: Node: 2, Sketch Version: 1.0
But there is no new device, when i test the sensor, this is working

another weird thing, i have on the same Rpi a 1-wire network, with two sensors, this works good
but when i connect the watermeter, to the MySensor gateway, i have errors on my 1-wire
2015-03-17 20:14:19.018 Error: 1-Wire system : error reading value from /sys/bus/w1/devices/28-000004cb3769

And my CPU_usage is going from 2% to 9%
Anybody an idea, whats wrong??
CubieTruck with Domoticz
RfxTrx 433Mhz Usb, Rfx Sensor, Z-Wave
Slave Raspberry Pi with Domoticz, Piface, P1 usb
GaryStofer
Posts: 2
Joined: Wednesday 15 April 2015 18:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Watermeter

Post by GaryStofer »

I am also trying to get a MySensor water meter connected. With little success so far.
Using the basic skeleton of the MySensor water meter example that counts pulses from a meter either optically or via hall effect.

Here are my issues I see with Domoticz r 2382 running on a Rpi:

A.) There is a catch 22 when trying to connect a S_WATER sensor. Initially the sensor request the last recorded count from the controller ( via VAR1) before it can start to report usage . This fails on the initial connection of a new sensor, probably because the controller has no knowledge of a prior counter value and apparently doesn't just send a 0 instead. -- I worked around this by initializing the counter value from the sensors code once and then commenting out the lines after the sensor was known by the controller. Note that it is not a good idea to keep the last counter value in the sensors EEPROM -- it will wear out from the constant erasing/rewriting before too long.

B.) Domoticz does not enumerate the S_Water sensor unless an initial V_Volume message is sent ( i.e. does not show it in the devices list). Other sensors, for example a lamp switch shows up immediately upon the reception of the "present" message.

C.) S_WATER does not do anything with the V_FLOW message, only V_VARn and V_Volume do something.

D.) The sensor display once you have added it, under the "Utilities" menu shows two numbers. The little number immediately next to the icon displays the last reported Volume according tho the factor set in the setup pages, however the big number in the heading bar shows some unrelated number that doesn't seem to have any relation to flow or volume. The same incorrect number is also displayed on the Dashboard panel once you place the meter on the dashboard.

E.) The Log pages are completely goofed up. For the current hour in the last 24 display it shows 18 Pentillion m3 and for the last week it shows that same incorrect number as is displayed on the Dashboard sticker.

F.) There is no way of initializing / setting of the initial counter status -- defaulting and returning an initial 0 could work, but it doesn't satisfy the case when you have to transfer a counter value to a new sensor mid-run. Other sensors have a clear button on the log pages -- maybe a clear AND set button would be prudent

The Water Sensor is my main application for wanting to use Domoticz and I really need to get this working pretty soon -- We have a drought in California and people want to monitor their own water usage to avoid fines etc..

I must say that I'm overall impressed with Domoticz as everything up to this point worked as expected.
Thanks

Gary
GaryStofer
Posts: 2
Joined: Wednesday 15 April 2015 18:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Watermeter -- Gizmocus ??

Post by GaryStofer »

Could Gizmocus please comment on the items above , especially on point D and E. Thanks !
andriej
Posts: 46
Joined: Tuesday 10 December 2013 22:27
Target OS: Linux
Domoticz version: beta
Contact:

Re: Watermeter

Post by andriej »

I guess it should be written in Bugs thread for Gizmocuz to act faster ;-)
Orange Pi (@ Debian) / MySensors Serial / GPIO / Custom Serial 433 MHz Transmitter (for plug switches and livolo wall switches) / JSON&Bash API scripts
User avatar
gizmocuz
Posts: 2394
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Watermeter

Post by gizmocuz »

Plz submit a code patch, thats the fastest way to get this implemented
Quality outlives Quantity!
User avatar
gizmocuz
Posts: 2394
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Watermeter

Post by gizmocuz »

you can now use the latest watermeter pulse counter from mysensors. (with the latest domoticz beta version, #2834)
(github latest code, i just changed some code)
i also implemented the V_FLOW, but at the moment as a percentage sensor, so when you have 0.44L/Minute, it displays 0.44 as percentage
this will have to change later to a better sensor

using this sketch now myself

I know for some people it might be to expensive to measure the water meter, specially like me, when you have a water meter that does not have a way to get a sensor on it.
My way was to install an additional water meter behind it

but for the hobby, it is great! ;)

costs:
- Water Meter with pulse output - 87,50
http://www.bestelsnel.nu/winkel/O212000 ... 0pulsgever
- Installation costs (40 euro), needed some other connectors, and an engineer used some time
- Arduino Nano+nRF = ~8 euro

i connected the arduino to power....
Quality outlives Quantity!
Justintime
Posts: 228
Joined: Thursday 21 May 2015 9:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Watermeter

Post by Justintime »

gizmocuz wrote:you can now use the latest watermeter pulse counter from mysensors. (with the latest domoticz beta version, #2834)
(github latest code, i just changed some code)
i also implemented the V_FLOW, but at the moment as a percentage sensor, so when you have 0.44L/Minute, it displays 0.44 as percentage
this will have to change later to a better sensor

using this sketch now myself


i connected the arduino to power....
Hey very nice..... added the device. And now watching what my little girl is using on waterflow ;)

And the counter is now in Liters also nice.
Last edited by Justintime on Wednesday 26 August 2015 19:38, edited 1 time in total.
User avatar
gizmocuz
Posts: 2394
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Watermeter

Post by gizmocuz »

I had no idea how much water i used in one day.... it was a bit of a shock ! :mrgreen:
.... but i guess it is normal :roll:
Quality outlives Quantity!
Justintime
Posts: 228
Joined: Thursday 21 May 2015 9:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Watermeter

Post by Justintime »

gizmocuz wrote:I had no idea how much water i used in one day.... it was a bit of a shock ! :mrgreen:
.... but i guess it is normal :roll:
Uhhh yes i know.... i had to check it three times....
User avatar
sincze
Posts: 1300
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Watermeter

Post by sincze »

ah, I'll stick to the cheap 2 euro watermeter
http://www.domoticz.com/forum/viewtopic ... ter#p45151

but the v_flow sounds promissing. :D
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
User avatar
gizmocuz
Posts: 2394
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Watermeter

Post by gizmocuz »

Yes, if you have such a meter yes :)
Quality outlives Quantity!
Justintime
Posts: 228
Joined: Thursday 21 May 2015 9:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Watermeter

Post by Justintime »

sincze wrote:ah, I'll stick to the cheap 2 euro watermeter
http://www.domoticz.com/forum/viewtopic ... ter#p45151

but the v_flow sounds promissing. :D
I have the same sensor, so the flow works. Just allow new hardware device, unplug the power of the arduino and plug it back in. (If you run Mysensors, that was not clear to me)
And you have a new (flow)device.
User avatar
sincze
Posts: 1300
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Watermeter

Post by sincze »

Justintime wrote:
sincze wrote:ah, I'll stick to the cheap 2 euro watermeter
http://www.domoticz.com/forum/viewtopic ... ter#p45151

but the v_flow sounds promissing. :D
I have the same sensor, so the flow works. Just allow new hardware device, unplug the power of the arduino and plug it back in. (If you run Mysensors, that was not clear to me)
And you have a new (flow)device.
Okay, in that case needs some modification. :D
I use external process running on a PI, that reads the sensors pulses and remotely updates a virtual device in domoticz with latest values.
In this case If domoticz crashes it still knows the actual water_meter value. Since I moved to Cubietruck to host my domoticz (on SSD) I have never witnesses a crash before. :D

Kudo's to the programmers for building rock-solid !!
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
dressie
Posts: 156
Joined: Monday 25 May 2015 22:44
Target OS: Raspberry Pi / ODroid
Domoticz version: V2020.2
Location: Netherlands
Contact:

Re: Watermeter

Post by dressie »

Did someone already connect this meter directly to the Pi? Is it possible? Image

Thanks!
roblom
Posts: 402
Joined: Wednesday 26 February 2014 15:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: the Netherlands
Contact:

Re: Watermeter

Post by roblom »

I use it but with a PiFace between it. So you have to use a non latest kernel version otherwise it doesn't work.
dressie
Posts: 156
Joined: Monday 25 May 2015 22:44
Target OS: Raspberry Pi / ODroid
Domoticz version: V2020.2
Location: Netherlands
Contact:

Re: Watermeter

Post by dressie »

roblom wrote:I use it but with a PiFace between it. So you have to use a non latest kernel version otherwise it doesn't work.
So you have to use a PiFace for it?
roblom
Posts: 402
Joined: Wednesday 26 February 2014 15:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: the Netherlands
Contact:

Re: Watermeter

Post by roblom »

I'm not sure but I think you should also be able to connect tree sensor to a GPIO port without the piface.
hyla
Posts: 36
Joined: Tuesday 08 September 2015 16:44
Target OS: Raspberry Pi / ODroid
Domoticz version: current
Location: Germany
Contact:

Re: Watermeter

Post by hyla »

Domoticz V2.3304, mySensors V. 1.5
--------------------------------------------------
Hi,

I'd like to revisit this. Using an Arduino with mySensors firmware I am sending V_FLOW, V_VOLUME and V_VAR1.
I'm sending all three under the same child ID. Is that correct?
Now, when I look out for devices I find the device with type "General", a device ID 0f 10 and the percentage as
mentioned in this thread before. Which as I understand is l/min.
B.t.w., wIll that eventually be changed into the more meaningful units?

What I don't get there is the total water consumption.

Looking further, I find a device with an ID of 1001. It originally presents itself as a "gasmeter".
It's type is "RFXMeter", subtype RFXMeter counter, physical unit kWh.
Since I don't get any meaningful data from my sensor yet (darn pulse detection ...) I can
not really tell what I'm getting here. Some large number with 20 digits ;)
(Which I interestingly can't erase in the "Usage Last 7 Days" - graph. Idea anyone?)

What have I done wrong? What do I have to look at?
I'm wishing for something like the energy meter stuff (which works flawlessly now. I hope
I never have to reboot!): Total consumption, preferably in liters. Current flow in l/min
and maybe like in the energy meter water the current daily usage which is very useful.

Help,
anyone?
hyla
Posts: 36
Joined: Tuesday 08 September 2015 16:44
Target OS: Raspberry Pi / ODroid
Domoticz version: current
Location: Germany
Contact:

Re: Watermeter

Post by hyla »

Hi,

another question about the watermeter, if I may. :)

I'm detecting the rotation of a wheel with one rotation marking the use of one liter. Whenever the pulse is detected I send my
updated values for VOLUME and FLOW and pulsecount to the server.

SO, we are looking at a pulse which is dependant on a full period to occur. If we are using water at a rate of, say, 8l/min and suddenly
stop using water the current interval "gets stuck", so to speak. No more values are updated, which means that our 8l/min are going
to be the "current consumption rate" for maybe a long time. Whereas the real consumption might be "zero".

Do You deal with that in Your firmware? How?

Same problem with the energy meter of course, but for us to have a usage of 0 kWh would mean that there is a black out :)
so there's never a longer gap...

Thanks,
Christoph
User avatar
gizmocuz
Posts: 2394
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Watermeter

Post by gizmocuz »

hyla wrote:Domoticz V2.3304, mySensors V. 1.5
--------------------------------------------------
Hi,

I'd like to revisit this. Using an Arduino with mySensors firmware I am sending V_FLOW, V_VOLUME and V_VAR1.
I'm sending all three under the same child ID. Is that correct?
Now, when I look out for devices I find the device with type "General", a device ID 0f 10 and the percentage as
mentioned in this thread before. Which as I understand is l/min.
B.t.w., wIll that eventually be changed into the more meaningful units?

What I don't get there is the total water consumption.

Looking further, I find a device with an ID of 1001. It originally presents itself as a "gasmeter".
It's type is "RFXMeter", subtype RFXMeter counter, physical unit kWh.
Since I don't get any meaningful data from my sensor yet (darn pulse detection ...) I can
not really tell what I'm getting here. Some large number with 20 digits ;)
(Which I interestingly can't erase in the "Usage Last 7 Days" - graph. Idea anyone?)

What have I done wrong? What do I have to look at?
I'm wishing for something like the energy meter stuff (which works flawlessly now. I hope
I never have to reboot!): Total consumption, preferably in liters. Current flow in l/min
and maybe like in the energy meter water the current daily usage which is very useful.

Help,
anyone?
I think you should upgrade to the beta version of domoticz, remove the water meter devices, and power the mysensors node back up.
You should receive a meter, that you can edit, and set the type to 'water'

About the 8/l pulse problem, you should solve this in your sketch
Quality outlives Quantity!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests