SmartThings Community

Battery level kwickset 914 not reporting


(Nate Schwartz) #9

Ok~So it depends slightly on your DTH and how they formatted things but follow whichever looks like yours.

In the refresh function add something like:

cmds << secure(zwave.batteryV1.batteryGet())

or if your DTH looks like:

def cmds = secureSequence([zwave.doorLockV1.doorLockOperationGet(),

then add:

 zwave.batteryV1.batteryGet(),

somewhere in there. Then just save and publish and hit the refresh button. You can watch the live logging as well to see what response you get. Let me know if it works or you have issues.


Kwikset 910 Z-Wave battery
(Mike) #10

@njschwartz Thank you that did the trick. I finally have battery indication again. You the man! That has been bugging me for about 3 months now.,


(DLee) #11

Thanks. I recently switched to Lock Manager which has its own DTH IIRC, but I’m thinking your code might help me sort similar issues with a couple other device types.


(Nate Schwartz) #12

I think that is the DTH I am using as well “z-wave lock reporting”. What I said above will work with that DTH. Just throw the correct code into the refresh function and it should update it for you.


(Ravi Bhat) #13

Hello Nate, Where do I find the Device Type Handler for the device? I checked online and could locate the Device on api.smarthings.com, but there is no option to edit the Device Type Handler for this device. Please advise.


(Mike) #14

Go to My Devices, then select the device. At the bottom click the edit button. Go and select the DTH you want to use from the “type” drop down.

{edit] Just realized you want to know how to edit the DTH not just change it. That is a whole other thing. You will need to add it to my device handlers and then edit it there.

Maybe start here:


#15

I too have had battery issues with my kwikset 916. Battery goes from 100%-0% in 1 -2 weeks. Replace with new batteries, then 100%-0% percent in 1-2 weeks again.


(Nate Schwartz) #16

@sahabjee Hey Ravi, what @Terminal said is accurate. You are going to need to do a couple of things. First you need to get a new device handler for the lock that you can edit and install it in the IDE. I will try to walk you through it briefly.

In the IDE under My Device Handlers click settings in the top right and then click add new repository. Fill in the blanks as follows: under owner type: ethayer under name: type lock-manager and under branch type: master
Save that and then click on update from repo and you should see the one you just added. Click on it and it will show you all the Device Handlers you can choose from in that repo. You should see one called ethayer:Z-Wave Lock Reporting. Select it and click the publish box and then Execute update. Then you can go in and edit the code as I discussed above. On line 533 below def cmds = [secure(zwave.doorLockV1.doorLockOperationGet())] add the line cmds << secure(zwave.batteryV1.batteryGet())

Finally go to the My Devices tab of the IDE and find your lock click it and then select edit and then change the DTH to the new one you just edited and click update. Now if you go into the ST app on your phone and click refresh it should update the battery for you. If you want you can switch the DTH back to whatever you were using as well.

I know this is kind of long and confusing but hopefully it points you in the right direction. then switch

Nate


(Nate Schwartz) #17

I have heard of people having that issue and have had it myself once or twice. Are you using rechargeable batteries? That seems to be a major culprit.


#18

I’m not using rechargeable batteries. Did you ever get your issue fixed?


(Nate Schwartz) #19

For me it just kind of went away and I haven’t had an issue since. Did you try adding the code mentioned above to force the DTH to request the battery level? I am curious if that is what fixed it for me. I don’t really know for certain, but it couldn’t hurt to try. It seems like the stock DTH just doesn’t poll for battery correctly so maybe it isn’t accurate.


#20

I can give it a shot


(Nate Schwartz) #21

It’s a good place to start. If that doesn’t work you may have to either live with it or contact kwikset and see what they have to say. Hopefully it will fix it for you though!


#22

will do…thanks


(Ravi Bhat) #23

Folks, I seem to have fixed my problem. Thanks to all of you for your input as well.

First of all, after looking closely at the specs of my lock, it is Kwikset 910 (not 914 as I thought). It is a ZWave device.

All I did was to choose a different Zwave Type device in the device handler online. I choose “Zwave Lock with Codes” in the device properties. The default device type was “Zwave Lock”. This did the trick. I can see the battery percentage as 60% now and the 1% default error message is gone. I will have to wait now to replace the batteries when they are exhausted to see if the annoying 1% message shows up again. For now I am good. Thanks again.


(Cynthia Starr) #24

I have the same lock a Kwikset 910 – I changed the device type to “Zwave Lock with Codes” - how long does it take for the 0% to go away? I had changed the batteries already, prior to finding this possible solution. Thanks.


(Ravi Bhat) #25

It should change almost immediately, less than 10 sec. If it doesn’t, please try changing the device type to Z-wave Lock, update the device handler online. Then go back in and select “Z-wave Lock with codes” second time and see if that helps. Also, make sure you have used fresh set of batteries (I am sure you did, just wanted to make sure). I have to follow this process everytime I change the batteries on this Lock.


(smitbot) #26

@njschwartz: This solved a long standing problem I had with my kwikset locks! Many thanks.


(Michael Jordan) #27

You all are fantastic! Thank you for helping me fix this long time problem - me and my wife are thrilled!


(Gary) #28

Hi Nate,
I am finally getting a chance to look at this code and see the line included that you mentioned to add. Is there something I am missing?

Thank you,
Gary

def refresh() {
def cmds = [secure(zwave.doorLockV1.doorLockOperationGet())]
if (state.assoc == zwaveHubNodeId) {
log.debug “device.displayName is associated to {state.assoc}”
} else if (!state.associationQuery) {
log.debug “checking association”
cmds << “delay 4200”
cmds << zwave.associationV1.associationGet(groupingIdentifier:2).format() // old Schlage locks use group 2 and don’t secure the Association CC
cmds << secure(zwave.associationV1.associationGet(groupingIdentifier:1))
state.associationQuery = now()
} else if (secondsPast(state.associationQuery, 9)) {
cmds << “delay 6000”
cmds << zwave.associationV1.associationSet(groupingIdentifier:2, nodeId:zwaveHubNodeId).format()
cmds << secure(zwave.associationV1.associationSet(groupingIdentifier:1, nodeId:zwaveHubNodeId))
cmds << zwave.associationV1.associationGet(groupingIdentifier:2).format()
cmds << secure(zwave.associationV1.associationGet(groupingIdentifier:1))
state.associationQuery = now()
}
log.debug “refresh sending ${cmds.inspect()}”
cmds
}