Error with Xiaomi wall switch custom driver

Hi all
I'm using the code as supplied in the following post for my Xiaomi Aqara Wall Switch (QBKG03LMQBKG04LM, no neutral).

But I'm getting an error in the logs as below.
java.lang.NullPointerException: Cannot invoke method sendEvent() on null object on line 88 (parse)

I assumed that all those codes are well used. Is it just me that's getting the error or have I done something wrong?
Thanks for any help.
Alan

Did you install the Generic Child Switch Driver first.
Then click on the create child button.
I have these installed with no errors being generated.

I didn't, thanks, done now. I'm not too sure exactly what to do but I clicked on "recreate child devices" but am still getting the error. There was no create child button.

If you have no rules etc. tied to the device yet, I would delete all the devices, don't delete the Device Types you have installed, and re-pair the light switch.
Now set the options, one button or two buttons and save.
Now press create child devices and all should be good. (Hopefully).
I'm pretty sure this is what I had to do as I think I ended up in the same situation.

1 Like

Use the delete child’s, then wait a little then hit Configure. Then recreate the child’s, make sure you can use them and no errors.

1 Like

And depending on single or double, set the switches in the prefs accordingly before you do the above

1 Like

Thanks for the help. Got it running in the end.

2 Likes

Download the Hubitat app