[OBSOLETE] LeakSmart Water Valve

I won’t be converting the LeakSmart Water Valve DTH into an Edge Driver, but the device should be functional with the built-in driver.


This is a device handler for the LeakSmart Water Valve.

It polls regularly so you can use a SmartApp like the Simple Device Viewer to monitor it and receive notifications if it stops reporting.

The battery level it displays is just an estimate so every time it goes down a level you should test to make sure the batteries can still power it.

If you notice that the device is displaying 0%, but it still works on batteries or it’s showing more than 0% and it doesn’t work, please let me know so I can adjust the calculation.

4 Likes

I have found that the battery level appears to be estimating low.
The valve will still close at 0% and the battery’s appear to still be ok.

Thank you for this dht!

Thanks for letting me know. I just released another version with a slightly lower limit so let me know if this one is more accurate.

2 Likes

I am trying this out and I am getting weird results. I have my LeakSmart Valve paired with Smartthings and when it paired it showed up as a generic Thing. I used your code and paired it with the Thing. Now it shows up as a water faucet with open/close options. When I select to either open or close the valve the corresponding light will blink for about 5 seconds and then the other light will blink and it goes back and fourth like that for about 30 seconds. At around 30 seconds the lights start to just alternate every second from green to red for about 10 seconds and then all the light go out. Looking at the log on the IDE smartthings page it seems the valve is opening and closing back and fourth for the first 30 seconds. Any reason why it is doing this and is there any way to get it to pair as a valve as that might be the first issue.

This is from my log when running your code. I keep getting errors and I looked at line 136, I don’t know what is wrong with it…

1884df84-5fff-4672-8575-56058ea5bdd5 5:15:46 AM: debug Battery Level is 0%
Map: [raw:48940100010820002032, dni:4894, endpoint:01, clusterInt:1, cluster:0001, size:08, attrInt:32, attrId:0020, encoding:20, value:32]
1884df84-5fff-4672-8575-56058ea5bdd5 5:14:21 AM: debug Valve is open
1884df84-5fff-4672-8575-56058ea5bdd5 5:12:33 AM: debug Valve is open
1884df84-5fff-4672-8575-56058ea5bdd5 5:12:31 AM: debug Opening
1884df84-5fff-4672-8575-56058ea5bdd5 5:09:41 AM: error java.lang.NumberFormatException: null @ line 136
1884df84-5fff-4672-8575-56058ea5bdd5 5:09:41 AM: error java.lang.NumberFormatException: null @ line 136
1884df84-5fff-4672-8575-56058ea5bdd5 5:09:41 AM: error java.lang.NumberFormatException: null @ line 136

If you didn’t install the code before pairing the device, the configuration code wouldn’t have run.

Have you tried opening the device settings through the mobile app and tapping Done? That should force the configuration code to run if it hasn’t already.

I got it to work. I just had to change the Thing in the IDE page to a Zigbee Valve and it works fine now with the built in app

1 Like

What’s the mode # of your device?

Before you switched to the Zigbee valve, did you try updating the settings as suggested or remove it and pair it again after installing the DTH?

The original works, but it doesn’t report the battery level and the DTH doesn’t do anything when the device checks in so you can’t use a monitoring SmartApp to get notified if it drops off the network.

What is the DTH? I tried removing the valve multiple times from
Smartthings and adding it back and it will still always initially show up
as a generic Thing. It works fine though now that I have it set as a
Zigbee Valve. I don’t use any of the actual apps in Smartthings to control
anything. I find the programming in Smartthings to be extremly buggy and
unreliable. I use a combination of Tasker and Sharptools to control all my
automation. Doing this also allows for far more customization in what
happens. The built in programs for Smartthings are extremely limiting and
frustrating. With Tasker I can do basically anything I want high a high
level of customization.

What’s the model# of your device?

If you don’t have the mode# handy, please post the Raw Description which you can find by going to My Devices in the IDE and clicking on your device.

DTH is the short name for Device Type Handler.

Raw description is 01 0104 0002 00 07 0000 0001 0003 0006 0020 0B02 FC02 01
0019

What does this tell you?

I thought it might be a different model of the same product, but it matches the one the device handler was written for.

If the device handler was installed and published before it was paired, it should have identified it as the LeakSmart Water Valve and not a Thing so I’m not sure why it didn’t work for you.

Thanks for providing the raw description.

Kevin,

I’ve recently had to switch to your DTH and I can say that it works great. I was forced to switch because recently the Zigbee Valve DTH stopped working properly. I could control the valve but it’s no longer reporting open/close status. I reset and re-paired the valve but the results were the same, no status updates so the valve always reported the last state.

Switching to this DTH immediately corrected the status reporting and it works great. If I revert back to the native Zigbee valve DTH the stuck status reporting behavior returns. Any ideas why? I don’t mind using your DTH but I’m concerned there may be another issue with the valve.

I wrote the device handler, but I don’t have the device and I’ve never actually seen it.

@greg did all the testing and I think he was seeing a similar problem at first. We went back and forth a bunch of times with me sending him code and him sending back the live logging data after testing it.

I think I ended up fixing it through trial and error so I’m not exactly sure what was causing it.

1 Like

It works perfectly for me and I’ve never looked back.

1 Like

Is there any way to modify this device handler to have the valve show up in Smart Lighting so I can controll it via a remote? It is working great for app and Alexa control, but would be convenient to use the physical button. Thanks!

The handler supports the Switch capability so it already works with Smart Lighting…

Update:

It should have showed up in Smart Lighting, but I just remembered that one of the SmartApps, possibly SmartLighting, verifies the state before executing the command so it’s possible that it wasn’t working as expected in Smart Lighting.

I just released a new version that should fix that problem.

1 Like

It’s working now. When I last tried it a while back it was not showing up
as a switch in smart lighting. Thanks for the reply and the great device
handler!

1 Like

I am using this device handler and even after replacing the batteries it’s still showing 0%. It’s been like this for weeks. Working fine. If I remove then add the sensor back in it reports the correct voltage. Any ideas?