Strange warning in logs for Aeon DSC06 smart energy switch


(Ron) #1

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 ?


(Ron S) #2

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:


(James Pansarasa) #3

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.


(Ron) #4

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:


(James Pansarasa) #5

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(...)


(Larry) #7

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(),
zwave.switchBinaryV1.switchBinaryGet().format(),
“delay 3000”,
zwave.meterV2.meterGet(scale: 2).format()
]
}


(ELllv) #8

Any idea why I might get this null pointer message ?

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


(ELllv) #9

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