[RELEASE] Auto Lock

If the device reports battery level yes, sometimes this takes a while to show up as this usually only happens when the device reports in every 4 hours or so.

looking at my logs for auto lock my other contact sensors aren't throwing that error strange because they are the same kind only difference is the one that's showing errors could use a firmware update. None of my contacts show battery status in the auto lock app though weird Oh well I changed line 488.

Latest version via HPM.

Seems like this may be a pre-existing issue with the Aeotec 7's not reporting battery status. I'll dig into it a bit more and see if I can find a solution.

Not sure if this has been fixed in 225 or not though.

1 Like

I've tested it on multiple other sensors just now though and they are all showing up.

image

@lewis.heidrick, when this happened to me awhile back, I did an exclude/reset/include and it was fixed. It may also be possible to fix this by changing the driver (yes, @shawnx1, not the Auto Lock app :blush:) for the Aeotec DWS7 to Device, configure, reset states, switch back, configure, but I only did it by exclude/reset/include. Had a similar issue with Aeotec Recessed Door Sensor 7, same fix.

1 Like

Yea, I saw the post about editing the driver but wanted to get more info before I go and convert another driver for an edge case. Don't really like doing that when I don't have the device on hand to test with.

This would be a good time to go ahead and update the firmware on it as well.

2 Likes

The Aeotec DWS7 hasn’t changed firmware in a long time. Aeotec RDS7 won’t work with S2 unless 1.05 firmware.

1 Like

I just mentioned the firmware update because he said it wasn't on the same version as the others.

2 Likes

Here is the Aeotec DWS7 1.01 firmware:

Here is the Aeotec RDS7 1.05 firmware:

It’s faster to use a Z-Wave USB Stick and Simplicity Studio PC Controller to update, but I’ve also done it with the built-in Hubitat Device Firmware Updater.

2 Likes

You guys are awesome, Thank you for taking the time out to post all this.

2 Likes

I have a Visonic contact sensor on my front door, and it reports battery (shows in the device page) but hasn't shown battery in the app yet. I re-installed the app yeseterday when we were troubleshooting things, so the app has been running overnight.

image

Device page shows current battery:
2021-02-08 14_34_34-Door Front door
And the last time It reported battery was early this AM:

Not a big deal to me, just an FYI that Visonics don't appear to cooperate w/the app. :slight_smile: It's using the Generic Zigbee Contact Sensor driver.

I use evt.value when it comes in
otherwise it tries device.currentValue("battery")
if still nothing it tries device.latestValue("battery")
if still nothing it puts in a space.

If you click on events on the device page when was the last battery report recorded?

What model number is it?

All my contact sensors are reporting battery at least once a day. like I said this is weird and I started to notice these kind of errors after updating to one of the recent HE updates not just with Auto lock app.

Looking at how another driver maps the battery on that device it looks like they're doing best guess at what it is by pulling the voltage and it's not an actual device attribute like 0x80.

private Map getBatteryResult(rawValue) {
log.debug 'Battery'
def linkText = getLinkText(device)

def result = [:]

if (!(rawValue == 0 || rawValue == 255)) {
	def volts = rawValue / 10
	def minVolts = 2.1
	def maxVolts = 3.0
	def pct = (volts - minVolts) / (maxVolts - minVolts)
	def roundedPct = Math.round(pct * 100)
	result.value = Math.min(100, roundedPct)
	result.descriptionText = "${linkText} battery was ${result.value}%"
	result.name = 'battery'
}

return result
}

I'm guessing its a bad time for a options request? lol Even with errors all seems to be working fine, I don't have a problem with never looking at HE logs again.

Doesn't hurt to ask but I may not get to it tonight.