Strange warning in logs for Aeon DSC06 smart energy switch

I left my log running for a while and notice the following message but don’t know what it means.

1:09:12 PM: warn Exception ‘java.lang.NullPointerException: Cannot invoke method and() on null object’ encountered parsing 'cmd: 3202, payload: 21’
1:09:12 PM: debug Parse(description: "zw device: 0A, command: 3202, payload: 21 ")

I have no log.warn messages in my device code and I don’t have any calls to method and().

I think the zwave message is corrupted because most of the time the message is successful and reads
1:29:12 PM: debug MeterReport(deltaTime:60 secs, meterType:Electric, meterValue:0.040, previousMeterValue:0.040, scale:energy(0), precision:3, rateType:1)
1:29:12 PM: debug Parse(description: "zw device: 0A, command: 3202, payload: 21 64 00 00 00 28 00 3C 00 00 00 28 ")

Should I just ignore these ?

I have seen something similar for Aeon outlet on my refrigerator. Don’t have access right now but will post the error from live logging tmrw. This has been going on for weeks so doubt that that the new app is causing it… So in our world “latent” issue! :wink:

1 Like

Are you using my device type from this thread Aeon Labs Smart Energy Switch DSC06 or another?

I have seen these messages when debugging device types.I have not touched the code in a bit but there could always be a lurking bug somewhere.

Yes however I have copied and modified a bit. I added “Days since reset” and “Average KWH”.

I also made a version that reports micro watts since I have a device I needed to monitor at a finer level.
This one is only slightly modified to report in mWH (micro watts) although Smart Things forces the mWH label to MWH which is really mega-watts :smile:

I looked over the code and it looks clean, nothing jumped out at me.
I think that your original assumption is correct; looks like the zwave message is corrupt. I am not sure how you would guard against that unless you validated the description in the parse method before calling zwave.parse(...)

I get the same message intermittanty in the on and off routines for the zw15sm metering switch… I have modified the device type to add light on/off control but did not touch the routine that is triggering the warning…

based on my debugging the warning is coming out from one of the statements in the following proc, which I have not touched.
I wonder if the intermittency is due to not a long enough delay?

def off() {
log.debug “in off”
zwave.basicV1.basicSet(value: 0x00).format(),
“delay 3000”,
zwave.meterV2.meterGet(scale: 2).format()

Any idea why I might get this null pointer message ?

error java.lang.NullPointerException: Cannot invoke method div() on null object @ line 448

Well simply because I had to reset the KW/H a first time to have a lastresettime value lol