Notifications App Null Pointer Exception errors

I have notifications on my doors for when they are unlocked. The Notifications are pushed to my phone through the Android Hubitat app.

I am getting the following errors showing up in the Log whenever a door is unlocked. I do however seem to be getting the notifications.

java.lang.NullPointerException: Cannot invoke method replace() on null object (evtHandler).

I am currently running
The door locks are Kwikset 910s using the Generic ZWave Lock driver

I only just checked my logs since upgrading my firmware and I'm seeing the same error on all my Notifier apps. @bravenel, I'm not sure if this was reported elsewhere but my search only yielded this thread. Thought?

It's known bug. They throw the error after notifying. Fixed in 2.1.3. Coming...


I am getting this error in the log but the notification is working fine. This is on a Sonos.


I am seeing the following errors in the logs from notifications I have setup to my GH speakers. The notification is still announced through the speaker though.

java.lang.NullPointerException: Cannot invoke method playTextAndRestore() on null object (evtHandler)

See the posts just above yours about this being a known bug.

Thanks, I see its fixed in the next version even better.

Just updated right now to and error with Notification App still.
I got this on my Log when I'm trying to play a track on VLC Thing (The VLC Thing device works perfectly with RM so is the Notification app):

dev:8332019-08-02 06:34:06.302 pm errorgroovy.lang.MissingMethodException: No signature of method: user_driver_statusbits_VLC_Thing_393.playTrack() is applicable for argument types: (java.lang.String, java.lang.Long) values: [, ...]

Any thought?

Please show a screenshot of the log error, instead of copy/paste.

bravenel sorry because I was out some days...

Here are the logs, mainly two of them, one for Notification and another for HSM. In any of them the VLC works fine but in the RM is working ok.

Notification App:

HSM App:

Now, I implemented a RM to just play a track "" and VLC works perfect:

Please let me know if you need anything else to solve this issue.

That error is coming from the driver you are using. What happens if you try to play directly from the device page?

It works fine, and that's I can't understand why you say is from the driver because the same driver with another App, RM in this case, works fine (check my third log).

Don't you think this can be the way to call that function in HSM and in Notification App? just guessing...

It seems possible that the driver doesn't implement the method for playTrack that has two parameters, the track name and volume level. Try a Custom Action in RM with only a single parameter for playTrack -- namely the track name.

Yeap this could be the problem as I realize in RM do not use the volumen parameter:

and in Notification it use that parameter:

But I can tell you when you change volumen in the driver it works fine too.

Now the problem is that in fact this is the only driver for VLC Thing who works fine... any idea how to solve this issue?

I need VLC as I can't be connected all time to internet like demand others solutions for notifications or tts.

There needs to be added a method with two parameters. It would call the other two methods.

def playTrack(track, level) {

Or, if you don't care about the volume, just this would work:

def playTrack(track, level) {
1 Like

Hum!! I tried but I don't know groovy yet :thinking:

Here is the driver methods I'm using and as you see there is only one parameter. The second function is the only place where that PlayTrack function is called.

Can you please let me know how to change it to get two parameters?.
Is there any definition I have to make at the beginning of the driver?

I will learn Groovy for sure but right now depend on your help :slight_smile:

// MusicPlayer.playTrack
def playTrack(uri) {
//log.debug "playTrack(${uri})"
def command = "command=in_play&input=" + URLEncoder.encode(uri, "UTF-8")
return apiCommand(command, 500)

// MusicPlayer.playText
def playText(text) {
    log.debug "playText(${text})"
    def sound = textToSpeech(text, "Brian")
    //def sound = myTextToSpeech(text)
    log.debug "line 278 ${sound}"
    return playTrack(sound.uri)

Right below where it has

def playTrack(uri) {

you add what I showed you above. Just drop in the second one I showed. That's all you have to do.

Yeap!!... it is working fine now HSM and Notifications that was the problem!!

Now, let me share the driver code with the forum in order to help others with similar issues :wink:.

Can you please suggest me some links, books or similar where I can start to learn Groovy?
I made some apps for android so I guess it will not be too difficult for me....

The very best way to do this is to start with someone else's app or driver, and modify it just to change some feature about it. Figure out how it works, get your change to work.

There are a ton of resources about Groovy online. Just google any question you have.

For Hubitat, you will need to learn some things about subscriptions, inputs, etc. That's where taking another app comes in handy. There are lots of app posted here from simple to complex.

1 Like