Schalge Door Lock error java.lang.NullPointerException: Cannot invoke method unlock() on null object



I keep getting the error java.lang.NullPointerException: Cannot invoke method unlock() on null object. The Schalge door lock is added to my hub and I can see status changes when I manually unlock the door. I am just unable to lock/unlock using the SmartThings apps. I already deleted and re-added the device to my hub as a troubleshooting step.

(jkp) #2

What model Schlage lock do you have? What device handler is assigned to it in IDE?


It is a Schlage Connect touchscreen deadbolt. I am new to troubleshooting this stuff with IDE, so I don’t see any device handlers in the IDE.

(jkp) #4

You can try @garyd9’s handler

There are a couple of SmartApps you can look at for managing your lock:

  1. @ethayer Lock Manager
    [RELEASE] Lock Manager

  2. @RBoy Universal Enhanced Z-Wave Lock, Schlage Lock, Yale Lock, Kwikset Lock, IDLock and DanaLock Device Handler with alarm control, notification, RFID and advanced features
    [RELEASE] Universal Enhanced Z-Wave Lock, Schlage Lock, Yale Lock, Kwikset Lock, IDLock, DanaLock, August Pro and Samsung Lock Device Handler with Alarm Control, Notification, RFID, Door Sensor and advanced features


Just tried his device handler and still getting the same error. Is it something with the lock? I have another Schlage lock that isn’t having the same issue.

(Realy Living Dream) #6

It could be as simple as the lock did not properly exchange the security key when you included it. Was it working before in ST ?
While the most secure and having the most features the Schlage touchscreen are also very particular when it comes to inclusion.
Have you tried excluding it, ( make a note of your personal lock codes ) . Once it is removed from ST, do a full reset of the lock via the lock keypad. Grab a Cat6 cable and extension cord and bring ST hub within 3-5 feet of the lock. Then put ST into inclusion mode, enter the admin code into the lock to put it into inclusion mode, wait for the green check mark.
Manually lock/unlock the lock a few times and see if the status updates properly in ST.

Definitely go with @GaryD9 ( my choice ) or @RBoy’s . You can look through the threads linked above for a lot of info on troubleshooting getting the locks working properly.
While they can be a PIA to get included properly, once they are, both of mine have been working flawlessly for over a year.

( - Make your home your butler!) #7

What SmartApp are you using here? This sounds like a smartapp issue rather than a DH issue. It’s trying call unlock but the underlying object is null instead of a lock object.


Everything was working fine, then all of a sudden, it stopped working. I have been using the built in smart apps with the hub, didn’t add anything.

( - Make your home your butler!) #9

Then there would be an issue with one of those apps. I would suggest delete the app and install it again. Could be data corruption.