[RELEASE] Auto Lock

Whatever you changed resolved the null pointer on line 473 when the door is unlocked, but now I get the same error on line 430 when the door locks.

Sorry that my device driver is difficult. Maybe a similar patch will work for when it locks also? Thanks for sticking with me on this. I really like how your App works.

app:7172021-07-31 04:36:00.572 pm errorjava.lang.NullPointerException: Cannot invoke method contains() on null object on line 430 (method lock1LockHandler)
app:7172021-07-31 04:36:00.545 pm debugTest Auto Lock: null
app:7172021-07-31 04:36:00.515 pm debugTest Auto Lock: Lock command sent
app:7172021-07-31 04:34:48.403 pm debugTest Auto Lock: Locking door in 60 seconds.
app:7172021-07-31 04:34:48.320 pm debugTest Auto Lock: null

And yes, all 3 were empty and the switch disabled.

Uncheck the enable event, low battery, and failure notifications. Those toggles are what is triggering the null errors. All I did for 473 was set the door unlock notification to do nothing if the event description was null. Here is the update to ignore for 430, but you shouldn't need it if you toggle those three off.

https://pastebin.com/raw/WAwY7JBi

You can select multiple now.

image

Invert disabled switch added.

Both these changes and all the others between the last release rolled up so you can update via HPM.

I originally started out with about 50 rules and as I changed things around it got harder and harder to deal with all the rules which is why I started working on this app. Chris already had a good app to build from and this gave me flexibility without all the complexity. As a bonus I learned how to write apps for Hubitat. This got me comfortable enough to help people with drivers. It's been a lot of fun just haven't had a whole lot of time. I try to respond relatively quickly but sometimes life happens. This is a great community and I enjoy helping out. Lately I've been working to upgrade my home network. I relocated everything from an in wall Legrand On-Q cabinet to a wall mounted 12u rack. I'm preparing to add several wifi 6 access points and upgrading several of the drops to 10gb. Wan failover is setup now and working great. I ran som fiber from the ONT over to the new rack so I can couple it over and get rid of the ONT from my bedroom once I get AT&T out here to cut me over to the new BGW320 modem.

1 Like

Thanks, that resolved it.

By the way, all 3 notification types (event, low battery, and failure) were unchecked for all of my tests. I just enabled them for that last screenshot to reconfirm that I had not left my phone as a notification device. If you look at my screenshot from earlier of the variable settings, you can see all 3 NotifyOn variables are false. So something else must have been triggering the null error. Either way whatever you did resolved it.

Will you be pushing this version to HPM so I can keep up with any other updates?

1 Like

Yes, it's already pushed. :smiley:

I'm really tempted to submit some changes to that driver to standardize it some with everything else that's out there. We'll see if I get some free time soon.

Thank you for the updates! Perfect!

1 Like

Hmmm these two errors are now appearing with all three of my locks and door sensors from the App. Each time the door is opened or closed, and each time a lock is locked or unlocked. Seems to be working normally i think.

Haven't seen a lock or contact that doesn't support the current value before. What model of lock and contact sensor are you using? Is it a native driver or community driver?

yeah it's weird, didn't see the errors (that I can recall) until I installed the Hubitat update this morning. I am using Aeotec Door Sensor 7 ZW187 and three Kwikset locks. Like I said all was fine before. Hmmm did I also update Auto Lock this morning?

Let me take a look and see.

Can you open up the auto lock child code and see what version it's on? should be 1.59

absolutely!

def setVersion(){
state.version = "1.1.59" // Version number of this app

Just ran some simple test, all the sensors and lock are indicating / working normally. Each time the door is close or opened I get an error and each time the door is locked or unlocked I get an error. Always the same error as above. All three doors are acting the same.

Those line errors are in regards to each of the handlers trying to update the state of the device in the app. Functionally, they don't actually do anything. Merely used as a status indicator. If currentValue is failing though I would expect the app to break completely though since it's used throughout.

Functionally, it appears to be working fine. Strange one.

Hmm, actually that looks like it's referencing the smoke detector and not the lock or contact. Which driver are you using for the smoke/CO detector? I suspect that changing (fireMedical?.currentValue("smokeSensor") to (fireMedical?.currentValue("smoke") might fix it.

well thats interesting....I just installed two smoke /co detectors this morning too!. First alert gen 2 Zwave plus I am using Generic Z-Wave Plus Smoke/CO Dector

Let me see if I can find a driver for that one so I can see what the driver is outputting.

I totally forgot they are a part of the Auto Lock. I have my locks to unlock in the event of a smoke alarm