Is there anything I should know before I change the batteries? Is it like any other device, take it down, change batteries and that is it?
What have you got to lose Lol?
I think that the worst that can happen is it will forget itās zigbee pairing (which is easily fixed by repairing without deleting the āthingā in St app)
(not sure on this, canāt recall if the codes are stored on the keypad or not) the other possibility is you lose programmed user codes, which depending on how you programmed them is also easy to fix.
Canāt see any major issues lol. I have replaced my batteries without issue⦠make sure you get polarity right? Lol donāt know what else could go wrong minus breaking the time space continuum
I just remember how hard it was to pair. I know I have to do it, but wanted to be ready for any surprises.
I donāt know which keypad you have but I never had problems with my Lowes Iris keypad (smaller one)
Yes that is the one the smaller one. I am down to 20%, not sure how long that would be in time left. I donāt use it much.
Well your in luck then. Change one battery at a time. They are in parallel. I canāt speak to other versions but the smaller one definitely runs parallel (at least mine does just checked for u lmfao).
Btw new batteries cpl months, keypad is heavily used. Still at100% battery lol Iām assuming those were the included batteries u are abput to change out?
Yes original batteries.
Like I said (maybe Mark it as a solution?) The batteries are parallel in that keypad (the smaller one from Lowes, not 100% for others⦠but 70% sure). This means as long as the batteries arenāt too dead you can pull one out at a time replace it and then remove and replace the other one . This way constantly supplied with Voltage⦠no power loss
I changed the batteries with Duracell but the device still shows 20% do the batteries have to be lithium?
I dont think chemistry matters so long as the voltage is right. Ill have to check the voltage when i get home. Did you try refreshing the device?
So long as you get cr123a size batteries that have a nominal Voltage of 3v then it should work. Iām starting to suspect the keypad/dth bc mine reports 100% after months. I will check Voltages and report after my exams
I replaced the batteries again with 123 Lithium. I contacted Energizer to ask if 123 and 123A are the same. They said yes. I now get 40% battery. I have no idea what is going on. I wonder if it is the DTH I am using. Could you please direct me to your DTH?
I also get a perpertual 100% battery level, which I suspect is wrong. So I took a look at the DTH and added a bit of logging. When I went to the device display in My Home the following messages were logged:
- 44a0978d-ee02-44e1-8477-8fc0ce8d46a0 1:11:05 AM: debug [name:battery, value:100, descriptionText:Xfinity 3400-X Keypad battery was 100%, isStateChange:false, displayed:false, linkText:Xfinity 3400-X Keypad]
- 44a0978d-ee02-44e1-8477-8fc0ce8d46a0 1:11:05 AM: debug enter getBatteryResult 30
- 44a0978d-ee02-44e1-8477-8fc0ce8d46a0 1:11:05 AM: debug Received battery level report
- 44a0978d-ee02-44e1-8477-8fc0ce8d46a0 1:11:05 AM: debug Parsing āread attr - raw: 2DBB0100010A200000201E, dni: 2DBB, endpoint: 01, cluster: 0001, size: 0A, attrId: 0020, result: success, encoding: 20, value: 1eā
Hex 1e is 30, which is the voltage times 10 or 3.0 volts.
So if 3.0 volts is the rated output of the battery, then 100% is correct
@joelw135 In the IDE get to Live Logging in a browser, go to keyboard device display in My Home, give it a few seconds, and post your battery value results. With such a narrow range in the code below, my guess is it will be hex 1b or 2.7 volts
Below is the calculation for the battery percentage
//TODO: find actual good battery voltage range and update this method with proper values for min/max
//
//Converts the battery level response into a percentage to display in ST
//and creates appropriate message for given level
private getBatteryResult(rawValue) {
def linkText = getLinkText(device)
def result = [name: 'battery']
def volts = rawValue / 10
def descriptionText
if (volts > 3.5) {
result.descriptionText = "${linkText} battery has too much power (${volts} volts)."
}
else {
def minVolts = 2.5
def maxVolts = 3.0
def pct = (volts - minVolts) / (maxVolts - minVolts)
result.value = Math.min(100, (int) pct * 100)
result.descriptionText = "${linkText} battery was ${result.value}%"
}
return result
}
I donāt see anything about voltage in live logging. And my DTH lines for battery look just like yours. I am confused.
Do I have to add some code to the DTH? If yes at what line.
Try this
- On a device that is not used to control SmartThings: go to the IDE Live Logging
- on the device that controls SmartThings: tap āMy Homeā, scroll to keypad device, tap it.
- The device status display shows. Tap the down arrow on Temperature and or the Circle with the arrow in the lower right corner. Give it a few seconds
- Filter the Live Logging by tapping on the āKeypad nameā on the top menu.
The down arrow does nothing no display in live logging. it only shows status in logging no battery. from 9:39 to 9:52 not one battery update.
As I mentioned in a prior post, I added some log.debug statements that give the results. Without those changes you will only see
- debug Received battery level report
Search for ābatteryā in the filtered log
immediately preceeded by (list is in LIFO order) - debug Parsing āread attr - raw: 2DBB0100010A200000201E, dni: 2DBB, endpoint: 01, cluster: 0001, size: 0A, attrId: 0020, result: success, encoding: 20, value: 1eā
The value field data is the battery voltage in hex * 10
Should this not show in any logging data, Iām out of ideas.
With the very narrow range 2.5 to 3.0 volts in the calculation
0% <=2.5 volts
20% = 2.6 volts
40% = 2.7 volts
60% = 2.8 volts
80% = 2.9 volts
100% >= 3.0 volts
Give me the edit, so at least we can see. tell me where to insert in keypad dth. Thanks
Changes are in bold
At or around line 262
if (descMap.cluster == ā0001ā && descMap.attrId == ā0020ā) {
log.debug "Received battery level report"
results = createEvent(getBatteryResult(Integer.parseInt(descMap.value, 16)))
log.debug results
}
At or around line 376 in routine getBatteryResult
private getBatteryResult(rawValue) {
log.debug "enter getBatteryResult ${rawValue}"
def linkText = getLinkText(device)
Even after the changes no battery voltage showing.
