FortrezZ Water Flow Meter

That’s because “cumulative” is a custom attribute. Simple Event Logger looks for ST’s standard capabilities a device has, and cumulative isn’t part of any ST device capabilities. To get a water meter to even make itself available it had to be classified with power and energy meter capabilities, which exposes the attributes energy and power. Water Sensor is also a capability exposed, which makes the “water” attribute exposed (you’ll see wet or dry in your readings).

I can look at the SmartApp to see if it can be tricked into capturing cumulative, and let you know what I find.

Hi @AppWorx_Bill,

Got it to capture cumulative values. Here’s what you need to do to the Simple Event Logger SmartApp in the IDE.

Assuming you took the developer’s original code and didn’t change anything that would cause line numbers to be different, change line 879 to look like this:

[title: "Power Meters", cap: "powerMeter", attr: ["power", "cumulative"]],

Once you do that, go to the SmartApp in the ST app and configure it to send cumulative numbers.

Please note that if you have Github integration enabled that your version will now be different and in blue text in your list of SmartApps. If you update the code from the original developer’s repo your changes will be erased.

1 Like

I have ended up modifying the original Fortrezz code and have been able to
get the events I am interested in.
Thanks

@johnconstantelo
Your suggestion worked like a charm.
Thanks

1 Like

I just had the Leak Gopher installed, it would be nice if an all in one device existed that has a flow meter and shut off valve.

johnconstantelo,

I love your setup but I’ve gotten a little lost in translation. I to would like pin point accuracy on water usage while also tracking my weekly/monthly consumption. I think I may have messed up my smart apps and device handle in the process. I think just need to delete everything and start over. Could you please provide me the links to your device handler & interface? I am brand new to home automation and the FortrezZ Flow Meter is my first device. I’m a pipe fitter by trade so programming is definitely not my strong suit. Here is my new piping system:

Here’s a photo of the correct valve lineup. As you can see, the FortrezZ Water Valve body is installed. Once I can afford the head unit, I’ll get that up and running as well. So far I am very impressed with the quality of the valve’s. Yes, they are expensive but they seem to be worth every penny.

hi, I have uploaded the code on to my smartthings hub. i see the app, but the app doesn’t show anything and always reads 0W. the fortrezz flow meter is within range of the hub. how do i get past this?

Hi @TMASS11,

I didn’t notice your post until just now, sorry about that. Welcome to ST and HA! Very nice setup by the way, very clean. I agree that the valve quality is really good, and setup/installation isn’t too difficult. I have PEX as my main line coming in, which can be a little tricky for a DIY’er.

You don’t have to delete everything if you don’t want, just replace your code or create a new DTH and update the device in the IDE.

Here’s the link to the DTH:

https://raw.githubusercontent.com/constjs/jcdevhandlers/master/devicetypes/jscgs350/my-fortrezz-flow-meter-interface.src/my-fortrezz-flow-meter-interface.groovy

Here’s the link to the reset SmartApp:

https://raw.githubusercontent.com/constjs/jcdevhandlers/master/smartapps/jscgs350/fortrezz-flow-meter-reset-manager.src/fortrezz-flow-meter-reset-manager.groovy

Hi @sapna.ds,

Can you provide more detail? After you created your custom DTH, did you modify the device in the IDE to use your new code? If it’s reading 0W (watts), it still thinks it’s a power meter, not a water meter; which means it’s not using your code.

thanks for your reply. i wasn’t aware that i was supposed to change the device id. i just used the flow meter - FMI code for device handler and apps @ https://github.com/fortrezz/smartthings. what do i need to change the device id to ? in my home-> things i see the app however, it is always showing 0W with a refresh button and nothing else

Everything you need to know to install the device type handler (DTH), and any of FortrezZ’s SmartApps is located here:

Since you added the meter to SmartThings before you created the DTH, you now need to change the device’s Type, not ID, to use the code you just created. This guide will help:

Look for the section titled “Using a Custom Device Type”:
http://thingsthataresmart.wiki/index.php?title=Using_Custom_Code

thanks! that helped. i now see the flow meter with the status as open. does it need to hit the water usage goal time to update more information?

First off thank you for your device handler. I updated my device handler from your code. I went from 6-12-2017 to 9-23/9-27? Since then the fortrezz leak detector smartapp no longer works. I have removed the leak detector app and set it up again but still not working. I am using continuous flow setting.

Thanks,
JB

Edit added log
de2e6c0a-734f-403e-a16f-f7a3da9ace1f 10:34:39 PM: debug Flow has stopped, so process what the meter collected.
44a6e595-8418-482a-b514-e9ed2a0d32b4 10:34:39 PM: debug Continuous Flow Test (GPM): [startTime:2017-10-01T21:54:00.000-0500, dev:5c8fabca-2f96-4796-85fe-651cd565810b, ruleName:Wat, gpm:0.1, flowMinutes:1, command:on, modes:[Away, Home, Night], endTime:2017-10-01T09:54:00.000-0500, type:Continuous Flow]
44a6e595-8418-482a-b514-e9ed2a0d32b4 10:34:39 PM: debug GPM Handler: [gpm: 0, cumulative: 5.0]
7239c48b-74f4-4bb0-9cb0-00c22e5cdddb 10:34:39 PM: debug Continuous Flow Test (GPM): [dev:5c8fabca-2f96-4796-85fe-651cd565810b, ruleName:Water, command:on, flowMinutes:1, type:Continuous Flow]
7239c48b-74f4-4bb0-9cb0-00c22e5cdddb 10:34:39 PM: debug GPM Handler: [gpm: 0, cumulative: 5.0]
fecab266-1764-46a7-bb12-de7465239fd5 10:34:39 PM: debug Continuous Flow Test (GPM): [dev:5c8fabca-2f96-4796-85fe-651cd565810b, ruleName:Wa, flowMinutes:1, command:on, type:Continuous Flow]
fecab266-1764-46a7-bb12-de7465239fd5 10:34:39 PM: debug GPM Handler: [gpm: 0, cumulative: 5.0]
fecab266-1764-46a7-bb12-de7465239fd5 10:34:29 PM: error java.lang.NullPointerException
fecab266-1764-46a7-bb12-de7465239fd5 10:34:29 PM: debug Continuous Flow Test: [dev:5c8fabca-2f96-4796-85fe-651cd565810b, ruleName:Wa, flowMinutes:1, command:on, type:Continuous Flow]
fecab266-1764-46a7-bb12-de7465239fd5 10:34:29 PM: debug Cumulative Handler: [gpm: 0.6, cumulative: 5.0]
44a6e595-8418-482a-b514-e9ed2a0d32b4 10:34:29 PM: error java.lang.NullPointerException

I should first start off saying that I am new to both Smartthings and Zwave and have no idea how to code. Not sure if this is a common issue or not with smartapps.

I will try to describe everything I did. I was using the 6-12 code and everything worked great had simple logging working all was good. After installing this DH I lost the ability to use Continuous Flow leak setting but Accumulative and Time Period worked. After swapping back to the original code I still had the same issue with “Error java.lang”. I decided to exclude my devices do a factory reset on the hub and reset the FMI. This did not work either still had the same issue with the Fortrezz provided code so did another factory reset and tried JohnCostantelo DH code. Still same issue. I removed and installed the Fortrezz Leak dectector smartapps many times. I tried doing a hub reset via IDE and nothing, finally I removed the batteries and pulled the power from the Hub and left it for 20 mins… To my surprise IT WORKED!

1 Like

and the error is back. All I did was change the amount of time from 20 to 30 mins. I did everything the same as above but now Error java.lang.nullpointerexception @ line 184 in the Fortrezz leak detector smartapp. Looks like I will be contacting Fortrezz tomorrow

Bummer. Let me look into the SmartApp code real quick to make sure my DTH isn’t the problem.

@JonnyB, I have a continuous flow rule running and I just changed the time from 45 to 2 and I didn’t get any errors. Let me do more testing.

I also want to double check that I didn’t modify their smartapp code as well. Stay tuned.

OK got the smartapp to work with the fortrezz code.

When I change to your DTH (6/12) I get an error on line 299, your newest 10/3 I get an error on 300. Let me load up the DTH and copy the log

EDIT log (DTH 10/3)
4:57:36 PM: error java.lang.NullPointerException: Cannot invoke method multiply() on null object @ line 300
4:57:36 PM: error java.lang.NullPointerException: Cannot invoke method multiply() on null object @ line 300
4:57:36 PM: debug Resetting high value for gallons used…
4:57:36 PM: debug Resetting high value for GPM…
4:57:36 PM: debug Resetting water meter…
4:57:35 PM: error groovy.lang.MissingMethodException: No signature of method: static java.lang.Math.round() is applicable for argument types: (null) values: [null]
Possible solutions: round(float), round(double), find(), rint(double), find(groovy.lang.Closure), random() @ line 508
ffd8cd8c-524f-4924-a2ef-1109be3507a9 4:57:35 PM: debug Setting gallon threshhold to null

@JonnyB,

Using my DTH and FortrezZ’z SmartApp code, I can’t repeat your error or get any error. The only thing I did between the DTH code you had and the latest code release was all related to the look and feel (cosmetics) of the DTH in the mobile app.

Can you capture live logs from the SmartApp? Adjust the settings and does live log show an error? When you’re running water, your live log for continuous flow monitoring should look like this:

image