Bathroom Light and Humidity Piston Help


#1

1) Give a description of the problem
(Even after the humidity and motion and within limits the switch does not turn off)

2) What is the expected behaviour?
(after the humidity go to below 60% and the motion is inactive for 5 minutes the switch should turn off)

3) What is happening/not happening?
(Switch stays on even though bot humidity and motion parameters are met)

**4) Post a Green Snapshot of the piston

)

5) Attach logs after turning logging level to Full
( |+0ms|╔Received event [Guest Bathroom ZSE40 Sensor].motion = inactive with a delay of 55ms|
| — | — |
|+113ms|║RunTime Analysis CS > 17ms > PS > 50ms > PE > 47ms > CE|
|+116ms|║Runtime (38592 bytes) successfully initialized in 50ms (v0.3.110.20191009) (115ms)|
|+117ms|║╔Execution stage started|
|+127ms|║║Comparison (integer) 60 is_greater_than_or_equal_to (integer) 60 = true (1ms)|
|+129ms|║║Condition #2 evaluated true (9ms)|
|+130ms|║║Condition group #1 evaluated true (state did not change) (9ms)|
|+132ms|║║Cancelling statement #3’s schedules…|
|+137ms|║║Skipped execution of physical command [Guest Bathroom Switch].on([]) because it would make no change to the device. (2ms)|
|+138ms|║║Executed [Guest Bathroom Switch].on (4ms)|
|+140ms|║╚Execution stage complete. (24ms)|
|+141ms|╚Event processed successfully (141ms)|
|12/7/2019, 2:13:43 PM +880ms|
|+1ms|╔Received event [Guest Bathroom ZSE40 Sensor].motion = active with a delay of 60ms|
|+148ms|║RunTime Analysis CS > 18ms > PS > 81ms > PE > 48ms > CE|
|+150ms|║Runtime (38590 bytes) successfully initialized in 81ms (v0.3.110.20191009) (148ms)|
|+151ms|║╔Execution stage started|
|+163ms|║║Comparison (integer) 60 is_greater_than_or_equal_to (integer) 60 = true (1ms)|
|+164ms|║║Condition #2 evaluated true (9ms)|
|+165ms|║║Condition group #1 evaluated true (state did not change) (10ms)|
|+167ms|║║Cancelling statement #3’s schedules…|
|+173ms|║║Skipped execution of physical command [Guest Bathroom Switch].on([]) because it would make no change to the device. (2ms)|
|+174ms|║║Executed [Guest Bathroom Switch].on (4ms)|
|+176ms|║╚Execution stage complete. (25ms)|
|+177ms|╚Event processed successfully (177ms)|Preformatted text)

REMOVE BELOW AFTER READING


#2

The logs just show the piston being fired because of the motion going active and inactive. Humidity is over 60% both times.

The piston only fires on motion changes. If the motion goes inactive before the humidity drops below 60, the five minute timed trigger never starts.

I haven’t thought it through, but swapping the position of the ‘stays’ trigger and ‘less than 60’ condition might help. Depends on exactly what behaviour you need.


#3

Your trigger is within an else-if statement, which may be problematic. There are many ways to do this. I have not tested this, but I would code it this way…

If motion Sensor 3 changes to active
or 
Humitidy sensor rises to or above 60%
    Then
      with Outlet 1
        Turn on
End If

If Motion Sensor 3 motion stays inactive for 5 minutes
and
Humidity sensor is less than 60%
  Then
    with Outlet 1
      Turn off
End If

If Humidity sensor drops below 60%
and
Motion sensor 3 motion says inactive for 5 minutes
  Then
    with Outlet 1
      Turn Off
End If

Edited for corrections suggested below.


#4

Thanks everyone for your input, it is greatly appreciated, i will try them and let you know, thanks again all.


#5

I believe this trigger is actually worded:

IF Humidity sensor RISES ABOVE 60%


#6

@WCmore, Sorry, yes.


#7

Also, changes to less than should be

If humidity sensor drops below 60%


#8

Good catch!

(maybe edit your original post for future reference?)


#9

Original post edited to reflect above suggestions. Thanks @WCmore.