Maker API Error

Getting the following error in the logs for the Maker API.
The error is inconsistent in that it doesn't happen all the time, based on the time stamps...

[app:4661](http://192.168.0.8/logs#app4661)2019-11-06 04:16:40.749 am [error](http://192.168.0.8/installedapp/configure/4661)java.lang.NullPointerException: Cannot invoke method getSupportedCommands() on null object on line 316 (sendDeviceCommand)
[app:4661](http://192.168.0.8/logs#app4661)2019-11-06 04:16:40.187 am [error](http://192.168.0.8/installedapp/configure/4661)java.lang.NullPointerException: Cannot invoke method getSupportedCommands() on null object on line 316 (sendDeviceCommand)
[app:4661](http://192.168.0.8/logs#app4661)2019-11-06 04:16:39.398 am [error](http://192.168.0.8/installedapp/configure/4661)java.lang.NullPointerException: Cannot invoke method getSupportedCommands() on null object on line 316 (sendDeviceCommand)
[app:4661](http://192.168.0.8/logs#app4661)2019-11-05 10:25:37.642 pm [error](http://192.168.0.8/installedapp/configure/4661)java.lang.NullPointerException: Cannot invoke method getSupportedCommands() on null object on line 316 (sendDeviceCommand)
[app:4661](http://192.168.0.8/logs#app4661)2019-11-05 10:25:36.592 pm [error](http://192.168.0.8/installedapp/configure/4661)java.lang.NullPointerException: Cannot invoke method getSupportedCommands() on null object on line 316 (sendDeviceCommand)
[app:4661](http://192.168.0.8/logs#app4661)2019-11-05 10:25:35.552 pm [error](http://192.168.0.8/installedapp/configure/4661)java.lang.NullPointerException: Cannot invoke method getSupportedCommands() on null object on line 316 (sendDeviceCommand)

App 4661 is the Maker API app.

Anybody got any ideas?

Thanks in advance

I get these every now and then too from my Homebridge querying the API. Patrick told me it’s caused by the API querying for device attributes that are null or not set. In other words it’s a device issue and not necessarily a Maker issue. He suggested removing devices in blocks until the error goes away and then slowly add them back to see which device is causing it and look at its attributes to see if something is off.

That was too much effort for me and I just ignore them.

1 Like

It could also be that you removed a device from the MakerAPI selection but the piece of SW that is talking to MakerAPI doesn't know that and still tries to communicate with that device id....

1 Like

As mentioned, the error is inconsistent.
The only method I am using the Maker API is 3 cameras in Blue Iris that trigger a corresponding virtual motion sensor in HE; they set motion active and inactive via the Maker API calls.

I take note of the comment that "it’s caused by the API querying for device attributes that are null or not set.", but I think this is misleading [read: wrong!] as the target device is a virtual & built-in HE device. This would imply the virtual HE motion sensor is configured incorrect, and well, there is nothing to it! So either the device or the API. Also, considering the ad hoc nature of the error, implies the error is internal to HE itself - the call from BI to HE is being made successfully.

You're correct it doesn't stop anything dead in its tracks, but I hate seeing red in the logs!

It doesn't look as though you are on the latest release. Not that this code has changed, but the line number in those errors is off. It would help track down the cause if you update and then repost.

It would also help if you would show the Maker API setup page.

So I just updated to the latest version, and we'll see what errors (if any) it now throws. Crossing fingers & toes no issues are raised!
Thanks Bruce.

J