Possible bug in Z-Wave Motion sensor device type with Phantom Events


(www.rboyapps.com - Make your home your butler!) #1

@duncan @slagle @jody.albritton

Folks tagging you, I think there may be a bug in the Z-Wave Motion Sensor device handler (stock ST). I was using that as a template for enhancing the motion sensor handler, so first up I just took the code as is and create a new device handler. Hooked up a Monoprice motion sensor and I get this error when there was a event:

error groovy.lang.MissingMethodException: No signature of method: script1453578995981235611986.sensorValueEvent() is applicable for argument types: (java.lang.Integer) values: [1]
Possible solutions: sensorValueEvent(java.lang.Short) @ line 98

Line 98 is:

result << sensorValueEvent(1)

sensorValueEvent function is defined in line 60 as

def sensorValueEvent(Short value) {

That’s the cause. I think it should be defined as:

def sensorValueEvent(def value) {


(Duncan) #2

Yes, that is a bug. Thanks for pointing it out. I don’t think any of our certified sensors have used that code path yet.


(www.rboyapps.com - Make your home your butler!) #3

I believe that Ecolink and Monoprice both use the same code path.


(Bobby) #4

I think what @duncan meant is that the ‘stock’ isn’t the stock you think it is :smiley: i have 6 or 7 ecolink PIR sensors with stock handler and never seen that error. Perhaps the template hasn’t been updated with their latest code ( or my devices are using old template)


(www.rboyapps.com - Make your home your butler!) #5

@duncan @slagle @jody.albritton

There’s another bug, but this one I think is related to the ST platform. The platform seems to be generating Phantom events.
See the logs below, the physical device generates ONE motion deactivated event, but the ST platform registers 2 to 3 of them AND they are incorrect values. The first one is correct and shows inactive, the second and third one is “active” which is incorrect. This is the same code base as the Stock ST Z-Wave Motion Sensor with debug logs added.

e1de53af-0260-43c5-8ed3-ee400586e9fd  6:23:13 PM: trace Parse returned [[name:motion, value:active, descriptionText:Room Motion And Temp Sensor detected motion, isStateChange:false, displayed:false, linkText:Room Motion And Temp Sensor]]
e1de53af-0260-43c5-8ed3-ee400586e9fd  6:23:13 PM: trace Parse returned [name:motion, value:inactive, descriptionText:Room Motion And Temp Sensor motion has stopped, isStateChange:true, displayed:true, linkText:Room Motion And Temp Sensor]
e1de53af-0260-43c5-8ed3-ee400586e9fd  6:23:13 PM: trace BasicSet(value: 0)
e1de53af-0260-43c5-8ed3-ee400586e9fd  6:22:02 PM: trace Parse returned [name:motion, value:active, descriptionText:Room Motion And Temp Sensor detected motion, isStateChange:true, displayed:true, linkText:Room Motion And Temp Sensor]
e1de53af-0260-43c5-8ed3-ee400586e9fd  6:22:02 PM: trace BasicSet(value: 255)
e1de53af-0260-43c5-8ed3-ee400586e9fd  6:22:02 PM: trace Parse returned [[name:motion, value:active, descriptionText:Room Motion And Temp Sensor detected motion, isStateChange:true, displayed:true, linkText:Room Motion And Temp Sensor]]
e1de53af-0260-43c5-8ed3-ee400586e9fd  6:21:26 PM: trace Parse returned [[name:motion, value:active, descriptionText:Room Motion And Temp Sensor detected motion, isStateChange:false, displayed:false, linkText:Room Motion And Temp Sensor]]
e1de53af-0260-43c5-8ed3-ee400586e9fd  6:21:26 PM: trace Parse returned [name:motion, value:inactive, descriptionText:Room Motion And Temp Sensor motion has stopped, isStateChange:false, displayed:false, linkText:Room Motion And Temp Sensor]
e1de53af-0260-43c5-8ed3-ee400586e9fd  6:21:26 PM: trace BasicSet(value: 0)

The problem gets resolved when isStateChange = true is explicitly specified in the code (the default codes doesn’t have it).

Issue #185026


(www.rboyapps.com - Make your home your butler!) #6

Okay I found the issue, it isn’t an issue with the platform but a BUG with the Stock ST Motion Sensor code:

EDIT: Since there wasn’t a response I’ll take it offline with Duncan


(Ina Kutscher) #7

Hi,
I’m having the same issue that the ST hub is creating additional events for my Fibaro motion sensor.
I have two of these sensors and I only see the problem for one of them. It’s the one which I used to use in in IFTTT recipe. It’s run successfully once or twice and now it’s failing. I deactivated the recipe but the problem with the additional events remains. I’m not sure if this is causing any damage and if there’s a solution.
I’m not a developer and pretty new to this, I kind of stumbled upon these logs and googled the problem, this is what led me here.

Here’s an example from the log:

194f60c9-d267-444b-b241-24f233cde87a 3:39:17 PM: debug Parse returned [[value:inactive, name:motion, descriptionText:Bathroom Sensor motion has stopped, isStateChange:false, displayed:false, linkText:Bathroom Sensor]]
194f60c9-d267-444b-b241-24f233cde87a 3:39:17 PM: debug Parse returned [[value:inactive, name:motion, descriptionText:Bathroom Sensor motion has stopped, isStateChange:false, displayed:false, linkText:Bathroom Sensor]]
194f60c9-d267-444b-b241-24f233cde87a 3:39:17 PM: debug Parse returned [[value:inactive, name:motion, descriptionText:Bathroom Sensor motion has stopped, isStateChange:false, displayed:false, linkText:Bathroom Sensor]]
194f60c9-d267-444b-b241-24f233cde87a 3:39:17 PM: debug Parse returned [[value:inactive, name:motion, descriptionText:Bathroom Sensor motion has stopped, isStateChange:false, displayed:false, linkText:Bathroom Sensor]]
194f60c9-d267-444b-b241-24f233cde87a 3:39:13 PM: debug Parse returned [[value:inactive, name:motion, descriptionText:Bathroom Sensor motion has stopped, isStateChange:false, displayed:false, linkText:Bathroom Sensor]]
194f60c9-d267-444b-b241-24f233cde87a 3:39:13 PM: debug Parse returned [[value:inactive, name:motion, descriptionText:Bathroom Sensor motion has stopped, isStateChange:false, displayed:false, linkText:Bathroom Sensor]]
194f60c9-d267-444b-b241-24f233cde87a 3:39:13 PM: debug Parse returned [[value:inactive, name:motion, descriptionText:Bathroom Sensor motion has stopped, isStateChange:false, displayed:false, linkText:Bathroom Sensor]]
194f60c9-d267-444b-b241-24f233cde87a 3:39:13 PM: debug Parse returned [[value:inactive, name:motion, descriptionText:Bathroom Sensor motion has stopped, isStateChange:true, displayed:true, linkText:Bathroom Sensor]]
194f60c9-d267-444b-b241-24f233cde87a 3:37:15 PM: debug Parse returned [[value:active, name:motion, descriptionText:Bathroom Sensor detected motion, isStateChange:false, displayed:false, linkText:Bathroom Sensor]]
194f60c9-d267-444b-b241-24f233cde87a 3:37:15 PM: debug Parse returned [[value:active, name:motion, descriptionText:Bathroom Sensor detected motion, isStateChange:false, displayed:false, linkText:Bathroom Sensor]]
194f60c9-d267-444b-b241-24f233cde87a 3:37:14 PM: debug Parse returned [[value:active, name:motion, descriptionText:Bathroom Sensor detected motion, isStateChange:false, displayed:false, linkText:Bathroom Sensor]]
194f60c9-d267-444b-b241-24f233cde87a 3:37:14 PM: debug Parse returned [[value:active, name:motion, descriptionText:Bathroom Sensor detected motion, isStateChange:false, displayed:false, linkText:Bathroom Sensor]]
194f60c9-d267-444b-b241-24f233cde87a 3:37:10 PM: debug Parse returned [[value:active, name:motion, descriptionText:Bathroom Sensor detected motion, isStateChange:false, displayed:false, linkText:Bathroom Sensor]]
194f60c9-d267-444b-b241-24f233cde87a 3:37:10 PM: debug Parse returned [[value:active, name:motion, descriptionText:Bathroom Sensor detected motion, isStateChange:false, displayed:false, linkText:Bathroom Sensor]]
194f60c9-d267-444b-b241-24f233cde87a 3:37:10 PM: debug Parse returned [[value:active, name:motion, descriptionText:Bathroom Sensor detected motion, isStateChange:true, displayed:true, linkText:Bathroom Sensor]]
194f60c9-d267-444b-b241-24f233cde87a 3:33:38 PM: debug Parse returned [[value:524, unit:lux, name:illuminance, isStateChange:false, displayed:false, linkText:Bathroom Sensor, descriptionText:Bathroom Sensor illuminance is 524 lux]]
194f60c9-d267-444b-b241-24f233cde87a 3:33:38 PM: debug Parse returned [[value:524, unit:lux, name:illuminance, isStateChange:true, displayed:true, linkText:Bathroom Sensor, descriptionText:Bathroom Sensor illuminance is 524 lux]]