Yep. I went into it and hit save twice just to make sure.
Ya know I don't even recall being asked about those permissions when I installed the patch. They were turned off. I have turned them on, set them to allow all the time, and removed battery optimization. That seemed to fix it, thought it did take a few minutes of Reporting Error # 2 before it all finally synced up. I haven't left the house yet today, but when I go to work in a little bit I will check to see if this is working as I had hoped.
I just tried it on mine and it seemed to work. How are you creating the lock codes so I can try to reproduce the problem? I'm creating mine through the built in "Lock code manager" app.
Does everything display correctly in the configuration screen? Mine looks like this:
That error looks like it may be thrown from the JsonSlurper, and the string looks to be an encrypted value. Maybe turn off encryption for codes in the driver…
It just dawned on me what the issue may be. I use two hubs connected by hub Mesh. the lock and lock code manager live on the devices hub, where all my other apps including presence sensor live on the apps or server hub. So when I try to connect lock codes, there's nothing there for it to see, since the lock code manager doesn't appear to be shareable via hub mesh., unless someone has an idea how to make that work, ill probably have to move PS over to the device hub.
It's definitely possible that would cause an issue.
Depending on how comfortable you are with groovy, you could add a line in there to log the data before it throws the error. Then we could at least see what data it's giving you.
Moving presence sensor to the other hub might solve the problem to lol
My comfort with groovy is thinking I remember Shaggy saying it on Scooby-Doo a lot. Needless to say, I'm clueless about that. Would love to learn, but I have no clue where to begin.
Well, since I have no clue about groovy I fell back to plan B. Removed Presence sensor from my apps / rules hub and set it up on my devices hub (the same hub that Lock Code manager is on) . Still getting errors when trying to add lock codes. Th codes were set up in Lock code manager initally about a year ago.
So at this point I think the best plan is to make it log some extra stuff. I'm not really sure how to solve the problem if I don't know what information it's trying to parse
You can add log.debug(lock.currentValue('lockCodes')) right after line 121. It should look like this:
def lockPage() {
dynamicPage(name: "lockPage", install: true) {
section("Locks"){
paragraph "Select what lock to listen for events on. This option is used for all devices."
input "locks", "capability.lockCodes", multiple: true, required: false, submitOnChange: true
}
section("Device") {
def codeNames = []
if(locks != null)
for(lock in locks){
log.debug(lock.currentValue('lockCodes')) // <--- Add this here (line 122)
def slurper = new JsonSlurper()
def lockCodes = slurper.parseText(lock.currentValue('lockCodes'))
for(code in lockCodes.keySet())
if(lock.getLabel() != null)
codeNames.push("(${lock.getId()})${lock.getLabel()}: ${lockCodes[code].name}")
}
paragraph "Choose a device and select the codes you would like to assign. When any of a device's assigned codes are used, the device will be assumed present for a few minutes. The amount of time can be set in the device preferences."
input "lockPresenceDevice", "capability.presenceSensor", multiple: false, required: false, submitOnChange: true
if(lockPresenceDevice != null) input "codes-${lockPresenceDevice.getDeviceNetworkId()}", "enum", multiple: true, required: false, submitOnChange: true, options: codeNames, description: "Select lock codes"
}
}
}
After you add that that in there it should log some information after you click go to the "assign lock codes" screen.
** EDIT **
For background, I was not able to add via HPM, had to import the URLS from Github, used the links in the top post for those. HPM for some reason wont let me down load these. instead of the down load Icon and click ability, this only gives me a check box, and it is not click able.
How did you install the app? All installed apps (regards of if they actually work) should show up. If you installed it manually then I would double check they you installed the app and the driver.
Tasker (the autolocation solution in another thread) works, but it drains your battery something awful . I was loosing a full charge in less than 8 hours.
Improved Mobile Presence is much more battery friendly, and has been a bit more accurate than Tasker.