Motion trigger off


Just installed WebCore on my Hubitat.

Here is my first piston, for my kitchen lights, different times and dimmer levels.

Everting works ok to turn ON, at right level.

But, I can’t get it to stay on until no motion is detected for X time.

Line 63 to 74

It always turns off, one minute after I get the first : motion is inactive ( Zooz 4in1 )

It does get : motion is active, after inactive, but the light does go OFF.

What’s wrong with my piston ?



Please enable Log and Trace and we can provide better help.


What time are you testing? As @Pantheon said, turn on trace and full logging. Then post the full green snapshot of the piston log with the log and we can see what is going wrong. One suggestion is to avoid midnight in any time range. So rather than time is between 22 and 5, say time is NOT between 5 and 22. This will be more reliable.


I note that your entire piston is guarded by an only when and that instantly makes me look for a changes trigger that could fall foul of it.

To cut a long story short, the 4in1 Cuisine's motion changes trigger only considers the motion events that occurred when illuminance was less than 40 lux. So if, for example, motion goes inactive in the dark, active in the light, and inactive in the dark, the trigger only sees the two inactive values and so doesn’t see a change.

I don’t know if that is your issue as I haven’t looked deeply enough.


Here is a link to an Excel file for the log + the trace.

Before testing, I changed the minimum Lux level to 80 ( line 15 ) and the off delay to 10 min ( line 70 )
Thanks for helping.


Also, I believe your “stays unchanged” at line 55 may not work. See this.


Wasn’t expecting a command not to work properly.
When from “Stay unchanger” to “did not change” and it seems to works.
Will do more test tonight.