IRIS Keypad Battery Change Question

On Phone app, Does theMy Home Keypad display screen show a battery percentage? Update time about 2 hours old. When tapping (one time) “refresh” circle with arrow on lower right it always produces the battery messages in the logs (on my system)

The Ide also shows it in “My Device” then tap/click keypad name scroll down to Current States. What is the info in battery and LastUpdateTime? My Time is about 2 hours old in the IDE

In the keypad DTH this is the code that issue a “refresh” when tapping the refresh icon around line 231

def refresh() {
return sendStatusToDevice() +
zigbee.readAttribute(0x0001,0x20) +
zigbee.readAttribute(0x0402,0x00)
}

You may prove it is executed by changing it to the following
def refresh() {
log.debug "Keypad Refresh Issued"
return sendStatusToDevice() +
zigbee.readAttribute(0x0001,0x20) +
zigbee.readAttribute(0x0402,0x00)
}

If this gets issued and there is not response, then perhaps hardware varies between the keypads.

I also looked if there was any special code for the differant keypads: there is not

Guys. Instead of messing with dth just physically measure the battery Voltage. Mine is definitely below a level where it would show 100%. By my math the display should be about 70ish%. This confirms that it’s either dth or device itself…

I tried CR123A battery, and went from 40% with the CR123 battery to 60%. So it has to be a combination of the DTH and the voltage of the batteries. I will use my multi meter and check for sure. I will post my results on Monday.

Cr123 and cr123a are the same thing fyi

I do know that, but there is definitively a difference between brands. The first I tried was Duracell 123, gave me 20%, second was EverReady Lithium CR123, 40%, the third was SureFire 2-Pack 123A which gave me 60%. very confusing. All brand new in date batteries.

Shelf life? Dirty contacts on the battery/device? Or just the device/dth… that’s all it could be… I doubt it’s batteries since you have tried more than one… unless they were 5+yrs old

Edit: missed the “in date” statement lol… so dirty contacts or device/dth. Nothing else

I don’t think it is the device as it is working flawlessly. Now I was using a different DTH which showed 80% battery. I changed DTH so it would work with SHM, the first was custom for Smart Alarm. So I think it is the DTH. Contacts look clean, but I will sand them gen tly tomorrow.

Don’t sand… it can cause more issues in the long run depending on contact material and how it forms oxide layers. Use a pvc (white) eraser. I use it all the time on anything with slight oxide layers. Works a charm… especially if you like retro games :wink: (that’s where I learned the trick, blowing into the cart only makes things worse)

Actually I will use my contact cleaner I used on the job for that purpose. Very gentle and applied with a swab. Works fast and is plastic and electronic safe.

I too am leaning towards the dth(minus the fact that changing to different batteries increased the Voltage)… so maybe a futile endeavor to clean the contacts. To test, put in the first set of new batteries and see if it drops back down. I’ll try changing my dth when I finish my finals.

Will do. How are you going to change the DTH?

It was necessary to look at the DTH to get the formula. Part of the problem is the keypad DTH and for that matter all DTHs provide the battery power as a percentage versus the actual voltage. Showing the actual voltage along with the pseudo percentage would be much more useful for me.

You also confirm what I told @joelw135 in a private message. “Use a volt meter; the keypad device could be providing incorrect measurements; the keypad percentage calculation may be inaccurate

When the keypad reports a voltage value of hex 1c or 2.8 volts the percentage could be calculated as
2.8/3.0 = x/100 or about 93%

The DTH attempts to compensate for the unknown(afaik) “what is the lowest voltage at which the device will properly operate”. So you get this result

0% <=2.5 volts
20% = 2.6 volts
40% = 2.7 volts
60% = 2.8 volts
80% = 2.9 volts
100% >= 3.0 volts

Another factor making battery percentage aribtrary is it does not consider how long the battery will continue producing the voltage. So do you want a battery that starts at and will produce 2.8 volts for 3 years, or one that starts at 3.0 and drops to 2.6 in 6 months?

What about forgetting the battery all together, and using a 3 volt DC supply?

With Nicola Tesla’s over the air power, that would work for me.

Edit : add battery backup

1 Like

Lmmmmmmmfaaaaaaooooooo @ wireless power Tesla comment

In terms of power: assuming that the keypad won’t get affected by Voltage ripple or noise then I don’t see a problem with giving it power. But in theory, depending on the circuit design introducing noise from power supply could cause all kinds of hell. (Also depending on the supply as well… )

Battery backup ftw

Also @arnb I totally agree. All I meant was it would have been quicker to just do process of elimination by measuring Voltages, checking things as opposed to diving into someone else’s code. And man, actual Voltage levels would be dope…

1 Like

I spent 40+ years as a computer programmer and system designer. Diving into someone else’s code is easier for me than finding my volt meter and pulling the battery from a device.

I’m actually pleased I did that code exploration. I no longer believe any battery % coming from any DTH, and will check the battery with a volt meter or two prior to replacement.

Should this thread not convince everyone that battery % is arbitrary, take a look at this code for the SmartSense/Centralite Motion Sensor starting around line 148. The programmers did their best to get out a reasonable number, but why not simply include the voltage reading!

def batteryMap = [28: 100, 27: 100, 26: 100, 25: 90, 24: 90, 23: 70, 22: 70, 21: 50, 20: 50, 19: 30, 18: 30, 17: 15, 16: 1, 15: 0]
Interpretation
if you have a Smarthings branded motion sensor
2.8 to 2.6 volts 100%;
2.5 to 2.4 volts 90%
2.3 to 2.2 volts 70%
etc
otherwise it’s more logic than I want to figure out.

OK this morning, I removed the batteries in the keypad, and used two different multi testers and received the following results.
CR123A shows 3.21 volts and DTH shows 80% in DTH
CR123 Duracell shows 2.90 volts shows 20% in DTH
CR123 Energizer Lithium shows 2.95 volts shows 40% in DTH

So I can see batteries differ and DTH is off for sure.

Thank you for posting those results.

Yes the DTH is totally whacked as are most all DTHs, but so is the device hardware, which is sending 2.8 volts for a 3.2 volt battery :exploding_head:

I feel besides the addition of device provided voltage to the DTH display, a voltage adjustment field is a reasonable request. My feeling is this will never happen.