Motion trigger off


#1

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 ?

Thanks


#2

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


#3

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.


#4

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.


#5

Here is a link to an Excel file for the log + the trace.
https://drive.google.com/file/d/1XVE18P32V4AmS7l5HM0onQP9GcVeKofe/view?usp=sharing


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


#6

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


#7

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.
Thanks
Gilles