Logic problem with latched conditions

Ok my latched solution didn’t actually work. I think because I may have misunderstood how latch works?

As described above, I have a condition where if motion sensors sense no motion for a period of time, along with some some other conditions, the house should go into night mode. Then I put a latch so (i thought) it would stay true until the house goes back to home mode the next morning. BUT, the condition went false when it senses motion.

Am I misunderstanding how latching works?

I just read the wiki here http://toggledbits.com/reactor and I think its because of this:

The ReactorSensor untrips (root group goes false ) when the ResetLatchedOnUntrip state variable is set 1;

What should the variable be so it doesn’t untrip? I assume 0? And is this the correct solution?

Here is my logic summary:

*************************************************** REACTOR LOGIC SUMMARY REPORT ***************************************************
   Version: 3.5 config 20017 cdata 20045 ui 20045 pluginDevice 8 LuaXP not loaded
    System: Vera version 1.7.4969 (7.31) on Sercomm NA301 ID 35 (Vera Edge); loadtime 1584677764; systemReady 1584677801; Lua 5.1; JSON dkjson 1.2; UnsafeLua=1
Local time: 2020-03-20T00:24:13-0400; DST=1; Oakville, Ontario Canada; formats %Y-%m-%d %H:%M:%S
House mode: plugin 3; system 3; tracking on
  Sun data: { "source": "int", "civdawn": 1584701554, "nautdawn": 1584699546, "sunset": 1584747057, "nautdusk": 1584750778, "stamp": 2020080, "latitude": 43.4501, "astrodusk": 1584752831, "longitude": -79.6829, "civdusk": 1584748770, "astrodawn": 1584697492, "sunrise": 1584703266 }
  Geofence: not running
************************************************************************************************************************************
Home/Night AutoChang (#91)
    Version 20045.21 03/20/20 00:11:43
    Message/status: Not tripped
    Condition group "Home/Night - NULL" (AND)  false as of 03-08.03:00:08 <root>
      &-T-group "GPS We are Home" (OR)  TRUE as of 03-17.13:27:23 <grpo7kz0lt>
      |     |-T-service HomeMJ (36) urn:micasaverde-com:serviceId:SecuritySensor1/Tripped = 1 [0 => 1 at 03-17.13:12:23; T/T as of 03-17.13:12:23/03-17.13:12:23] <condo7l03m5>
      |     |-T-service HomeRJ (37) urn:micasaverde-com:serviceId:SecuritySensor1/Tripped = 1 [0 => 1 at 03-18.15:42:11; T/T as of 03-18.15:42:11/03-18.15:42:11] <condo7l047l>
      &-T-group "Overnight" (OR)  TRUE as of 23:00:00 <grpoddw8hv>
      |     |-F-trange after ,,,23,0,,,,, [1584677628 => 1584677799 at 00:16:39; F/F as of 00:00:00/00:00:00] <condoddwjon>
      |     |-T-sun before sunrise+30, [1584677628 => 1584677799 at 00:16:39; T/T as of 00:00:00/00:00:00] <condoddwk94>
      &-F-group "Is Night Mode" (AND)  after grpo7klgla; output latching false as of 00:13:17 <grpo7klfs6>
      |     &-T-grpstate (self) (-1) GPS We are Home (grpo7kz0lt) istrue for ge 600s [true at 03-17.13:27:23; T/T as of 03-17.13:27:23/03-17.13:37:23] <condo7kqine>
      |     &-T-grpstate (self) (-1) Overnight (grpoddw8hv) istrue [true at 23:00:00; T/T as of 23:00:00/23:00:00] <condoddyz1i>
      |     &-F-group "No Motion" (AND)  for ge 900s false as of 00:13:17 <grpo7kpo2a>
      |     |     &-T-service Back Door Sensor (13) urn:micasaverde-com:serviceId:SecuritySensor1/Tripped = 0 [1 => 0 at 20:12:41; T/T as of 20:12:41/20:12:41] <condo7kq496>
      |     |     &-T-service Front Door Sensor (14) urn:micasaverde-com:serviceId:SecuritySensor1/Tripped = 0 [1 => 0 at 15:58:38; T/T as of 15:58:38/15:58:38] <condo7kq5nw>
      |     |     &-T-service Kitchen Motion (56) urn:micasaverde-com:serviceId:SecuritySensor1/Tripped = 0 [1 => 0 at 00:13:48; T/T as of 00:13:48/00:13:48] <condo7kq3l8>
      |     |     &-T-service Office Motion Sensor (84) urn:micasaverde-com:serviceId:SecuritySensor1/Tripped = 0 [1 => 0 at 23:19:10; T/T as of 23:19:10/23:19:10] <condo7kq2xe>
      |     |     &-T-service Front Hall Motion (53) urn:micasaverde-com:serviceId:SecuritySensor1/Tripped = 0 [1 => 0 at 23:44:30; T/T as of 23:44:30/23:44:30] <condo7kq6bk>
      &-F-group "Is Home Mode" (AND)  false as of 23:00:00 <grpo7klgla>
      |     &-F-grpstate (self) (-1) Overnight (grpoddw8hv) isfalse [true at 23:00:00; F/F as of 23:00:00/23:00:00] <condode1585>
      |     &-T-grpstate (self) (-1) GPS We are Home (grpo7kz0lt) istrue for ge 900s [true at 03-17.13:27:23; T/T as of 03-17.13:27:23/03-17.13:27:23] <condode15yc>
    Activity grpo7klgla.true
        Change house mode to 1
        Reset latched conditions in grpo7klfs6
    Activity grpo7klfs6.true
        Change house mode to 3
    Events
        2020-03-20 00:16:36: Reactor startup (Luup reload)
        2020-03-20 00:16:37: Starting (Luup Startup/Reload)
        2020-03-20 00:16:39: Condition condo7kqine successfully sustained for at least 600 seconds (actual 211756)
        2020-03-20 00:16:39: Group No Motion holding evaluation state for check that duration >= 900 (729 to go)
        2020-03-20 00:16:39: Condition condode15yc successfully sustained for at least 900 seconds (actual 211756)
    Devices
        ZWave (1) urn:schemas-micasaverde-com:device:ZWaveNetwork:1 (19/0); parent 0; plugin -; mfg  model ; dev D_ZWaveNetwork.xml impl 
        Office Motion Sensor (84) urn:schemas-micasaverde-com:device:MotionSensor:1 (4/3); parent 1; plugin -; mfg NEO Coolcam model NAS-PD01Z; dev D_MotionSensor1.xml impl 
        HomeMJ (36) urn:schemas-micasaverde-com:device:DoorSensor:1 (4/1); parent 35; plugin -; mfg  model ; dev D_DoorSensor1.xml impl 
        HomeRJ (37) urn:schemas-micasaverde-com:device:DoorSensor:1 (4/1); parent 35; plugin -; mfg  model ; dev D_DoorSensor1.xml impl 
        Kitchen Motion (56) urn:schemas-micasaverde-com:device:MotionSensor:1 (4/3); parent 1; plugin -; mfg NEO Coolcam model NAS-PD01Z; dev D_MotionSensor1.xml impl 
        Lobo GeofenceBeta (35) urn:schemas-toggledbits-com:device:Lobo:1 (1/-1); parent 0; plugin -; mfg  model ; dev D_Lobo1.xml impl I_Lobo1.xml
        Front Door Sensor (14) urn:schemas-micasaverde-com:device:DoorSensor:1 (4/1); parent 1; plugin -; mfg Linear model WADWAZ-1; dev D_DoorSensor1.xml impl 
        Back Door Sensor (13) urn:schemas-micasaverde-com:device:DoorSensor:1 (4/1); parent 1; plugin -; mfg Linear model WADWAZ-1; dev D_DoorSensor1.xml impl 
        Front Hall Motion (53) urn:schemas-micasaverde-com:device:MotionSensor:1 (4/3); parent 1; plugin -; mfg NEO Coolcam model NAS-PD01Z; dev D_MotionSensor1.xml impl 
    Watches
        Device #91 Home/Night AutoChang service urn:toggledbits-com:serviceId:ReactorGroup variable GroupStatus_grpoddw8hv
        Device #91 Home/Night AutoChang service urn:toggledbits-com:serviceId:ReactorGroup variable GroupStatus_grpo7kz0lt
        Device #91 Home/Night AutoChang service urn:toggledbits-com:serviceId:ReactorSensor variable TestHouseMode
        Device #53 Front Hall Motion service urn:micasaverde-com:serviceId:SecuritySensor1 variable Tripped
        Device #84 Office Motion Sensor service urn:micasaverde-com:serviceId:SecuritySensor1 variable Tripped
        Device #37 HomeRJ service urn:micasaverde-com:serviceId:SecuritySensor1 variable Tripped
        Device #36 HomeMJ service urn:micasaverde-com:serviceId:SecuritySensor1 variable Tripped
        Device #91 Home/Night AutoChang service urn:toggledbits-com:serviceId:ReactorSensor variable cdata
        Device #91 Home/Night AutoChang service urn:toggledbits-com:serviceId:ReactorSensor variable TestTime
        Device #56 Kitchen Motion service urn:micasaverde-com:serviceId:SecuritySensor1 variable Tripped
        Device #13 Back Door Sensor service urn:micasaverde-com:serviceId:SecuritySensor1 variable Tripped
        Device #14 Front Door Sensor service urn:micasaverde-com:serviceId:SecuritySensor1 variable Tripped
    Special Configuration
        UseReactorScenes = 1
        LogEventsToFile = 0
        Retrigger = 0
        FailOnTrouble = 0
        ContinuousTimer = 0

Latched conditions reset when any of a number of conditions are met; the one you quoted is part of an “or” that includes four other things that could happen to unlatch the condition.

Looking at your summary (thank you!), the reason it unlatched is probably because a sibling condition went false–your latched group has three siblings that could reset it–three other groups in the same subgroup (root).

I’m also not seeing how the RS itself would ever trip, because you’ve got a root group “AND”, and although I haven’t delved deep into your logic (and won’t), a surface-level examination suggests to me that all of these groups can never be true at the same time (therefore the root group can never be anything but false). Under those conditions, if ResetLatchedOnUntrip=1 then the latch will never latch, because the RS is always untripped.

This is why I never use the <root> group of any Reactor sensor (rather, I always leave them set to NUL). While I fully realize some users – with clearer minds than mine or whose Conditions groups are more straightforward than the ones I prefer – go the route of creating a new Reactor Sensor for each job, I’d rather use each sensor as a giant “container” for other, stand-alone subgroups to do their thing.

Dunno why (maybe it’s just me), but I can troubleshoot subgroups on their own with relative ease (even if they have their own subgroups!), compared with mentally untangling a complex <root> group. And I never get caught unawares – inadvertently breaking a <root> Reactor’s functionality, for instance – just because I later decide to toss in another subgroup. :slight_smile:

If you are referring to the main main root group…it isn’t used, so it has no bearing on anything in the RS as no activities are associated to it. Please correct me if my understanding of not using the main root group is wrong, but I was under the impression the operator on it doesn’t actually matter if its not used.

If you are referring to the “Is Night Mode” (AND) group…it triggers, as mentioned, problem is it re-triggers as described above.

@LibraSun…Agreed! I’m just delving into Reactor over the last several months and have learned a lot! Building in groups came to me later in the game and I really like building them with that structure too.

Here is a screenshot of the build, I find it easier to visualize. I think I have to latch another subgroup so there are no other conditions which can cause it to unlatch…If anyone has a better way please let me know.

If you set ResetLatchedOnUntrip, then you are creating a reliance on the root group, because the root group is what drives the Tripped state of the ReactorSensor. You should not use this setting (i.e. restore it to “0”).

What are you imagining should reset the latched group?

When the “Is Home Mode” goes true, the latch should reset. Because night and day mode are dependent on time, there is no way for them to both be true at the same time.

OK. Then you need to put the groups “Is Night Mode” and “Is Home Mode” together in a subgroup of their own. Just create a new “AND” group at the same level as those two groups, and move those two groups into it.

The way you have it structured now, the “GPS We are Home” and “Overnight” groups can reset the latched state of “Is Night Mode”, too.

Make sure you turn ResetLatchedOnUntripped off (=0), too.

I never changed this so assume its still at default 0. I didn’t see this listed as a variable on the advanced>status>variables.

I tried structuring as you suggested and ran a test for 11pm. The latch doesn’t hold when a motion sensor senses motion…thoughts?

*************************************************** REACTOR LOGIC SUMMARY REPORT ***************************************************
   Version: 3.5 config 20017 cdata 20045 ui 20045 pluginDevice 8 LuaXP not loaded
    System: Vera version 1.7.4969 (7.31) on Sercomm NA301 ID 35 (Vera Edge); loadtime 1584731960; systemReady 1584731997; Lua 5.1; JSON dkjson 1.2; UnsafeLua=1
Local time: 2020-03-20T15:25:19-0400; DST=1; Oakville, Ontario Canada; formats %Y-%m-%d %H:%M:%S
House mode: plugin 1; system 1; tracking on
  Sun data: { "source": "int", "civdawn": 1584701554, "nautdawn": 1584699546, "sunset": 1584747057, "nautdusk": 1584750778, "stamp": 2020080, "latitude": 43.4501, "astrodusk": 1584752831, "longitude": -79.6829, "civdusk": 1584748770, "astrodawn": 1584697492, "sunrise": 1584703266 }
  Geofence: not running
************************************************************************************************************************************
Home/Night AutoChang (#91)
    Version 20045.23 03/20/20 15:15:51
    Message/status: Not tripped
    Condition group "Home/Night - NULL" (AND)  false as of 15:21:28 <root>
      &-T-group "GPS We are Home" (OR)  TRUE as of 15:21:28 <grpo7kz0lt>
      |     |-T-service HomeMJ (36) urn:micasaverde-com:serviceId:SecuritySensor1/Tripped = 1 [1 at 15:21:28; T/T as of 15:21:28/15:21:28] <condo7l03m5>
      |     |-T-service HomeRJ (37) urn:micasaverde-com:serviceId:SecuritySensor1/Tripped = 1 [1 at 15:21:28; T/T as of 15:21:28/15:21:28] <condo7l047l>
      &-F-group "Overnight" (OR)  false as of 15:21:28 <grpoddw8hv>
      |     |-F-trange after ,,,23,0,,,,, [1584732088 at 15:21:28; F/F as of 15:21:28/15:21:28] <condoddwjon>
      |     |-F-sun before sunrise+30, [1584732088 at 15:21:28; F/F as of 15:21:28/15:21:28] <condoddwk94>
      &-F-group "For Latching - NULL" (AND)  false as of 15:21:28 <grppgqn7sc>
      |     &-F-group "Is Night Mode" (AND)  after grpo7klgla; output latching false as of 15:21:28 <grpo7klfs6>
      |     |     &-F-grpstate (self) (-1) GPS We are Home (grpo7kz0lt) istrue for ge 600s [true at 15:21:28; T/F as of 15:21:28/15:21:28] <condo7kqine>
      |     |     &-F-grpstate (self) (-1) Overnight (grpoddw8hv) istrue [false at 15:21:28; F/F as of 15:21:28/15:21:28] <condoddyz1i>
      |     |     &-F-group "No Motion" (AND)  for ge 900s false as of 15:21:28 <grpo7kpo2a>
      |     |     |     &-T-service Back Door Sensor (13) urn:micasaverde-com:serviceId:SecuritySensor1/Tripped = 0 [0 at 15:21:28; T/T as of 15:21:28/15:21:28] <condo7kq496>
      |     |     |     &-T-service Front Door Sensor (14) urn:micasaverde-com:serviceId:SecuritySensor1/Tripped = 0 [0 at 15:21:28; T/T as of 15:21:28/15:21:28] <condo7kq5nw>
      |     |     |     &-T-service Kitchen Motion (56) urn:micasaverde-com:serviceId:SecuritySensor1/Tripped = 0 [0 at 15:21:28; T/T as of 15:21:28/15:21:28] <condo7kq3l8>
      |     |     |     &-T-service Office Motion Sensor (84) urn:micasaverde-com:serviceId:SecuritySensor1/Tripped = 0 [0 at 15:21:28; T/T as of 15:21:28/15:21:28] <condo7kq2xe>
      |     |     |     &-T-service Front Hall Motion (53) urn:micasaverde-com:serviceId:SecuritySensor1/Tripped = 0 [0 at 15:21:28; T/T as of 15:21:28/15:21:28] <condo7kq6bk>
      |     &-F-group "Is Home Mode" (AND)  false as of 15:21:28 <grpo7klgla>
      |     |     &-T-grpstate (self) (-1) Overnight (grpoddw8hv) isfalse [false at 15:21:28; T/T as of 15:21:28/15:21:28] <condode1585>
      |     |     &-F-grpstate (self) (-1) GPS We are Home (grpo7kz0lt) istrue for ge 900s [true at 15:21:28; T/F as of 15:21:28/15:21:28] <condode15yc>
    Activity grpo7klgla.true
        Change house mode to 1
        Reset latched conditions in grpo7klfs6
    Activity grpo7klfs6.true
        Change house mode to 3
    Events
        2020-03-20 15:19:52: Reactor startup (Luup reload)
        2020-03-20 15:19:53: Starting (Luup Startup/Reload)
        2020-03-20 15:19:55: Test time 2020-03-20 23:00:00
        2020-03-20 15:19:55: Condition condo7kqine successfully sustained for at least 600 seconds (actual 293557)
        2020-03-20 15:19:55: Condition condo7kq2xe test state changed from true to false
        2020-03-20 15:19:55: Condition condo7kq2xe evaluation state changed from true to false
        2020-03-20 15:19:55: Group No Motion test state changed from true to false
        2020-03-20 15:19:55: Group No Motion evaluation state changed from true to false
        2020-03-20 15:19:55: Group Is Night Mode test state changed from true to false
        2020-03-20 15:19:55: Group Is Night Mode evaluation state changed from true to false
        2020-03-20 15:19:55: Condition condode15yc successfully sustained for at least 900 seconds (actual 293557)
        2020-03-20 15:20:41: Device Office Motion Sensor (#84) urn:micasaverde-com:serviceId:SecuritySensor1/Tripped changed from "1" to "0"
        2020-03-20 15:20:41: Test time 2020-03-20 23:00:00
        2020-03-20 15:20:41: Condition condo7kqine successfully sustained for at least 600 seconds (actual 293557)
        2020-03-20 15:20:41: Condition condo7kq2xe test state changed from false to true
        2020-03-20 15:20:41: Condition condo7kq2xe evaluation state changed from false to true
        2020-03-20 15:20:41: Group No Motion test state changed from false to true
        2020-03-20 15:20:41: Group No Motion holding evaluation state for check that duration >= 900 (900 to go)
        2020-03-20 15:20:41: Condition condode15yc successfully sustained for at least 900 seconds (actual 293557)
        2020-03-20 15:21:15: Device Home/Night AutoChang (#91) urn:toggledbits-com:serviceId:ReactorSensor/TestTime changed from "1584759600" to ""
        2020-03-20 15:21:16: Condition condoddwjon test state changed from true to false
        2020-03-20 15:21:16: Condition condoddwjon evaluation state changed from true to false
        2020-03-20 15:21:16: Group Overnight test state changed from true to false
        2020-03-20 15:21:16: Group Overnight evaluation state changed from true to false
        2020-03-20 15:21:16: Condition condo7kqine successfully sustained for at least 600 seconds (actual 266032)
        2020-03-20 15:21:16: Condition condoddyz1i test state changed from true to false
        2020-03-20 15:21:16: Condition condoddyz1i evaluation state changed from true to false
        2020-03-20 15:21:16: Group No Motion holding evaluation state for check that duration >= 900 (28425 to go)
        2020-03-20 15:21:16: Condition condode1585 test state changed from false to true
        2020-03-20 15:21:16: Condition condode1585 evaluation state changed from false to true
        2020-03-20 15:21:16: Condition condode15yc successfully sustained for at least 900 seconds (actual 266032)
        2020-03-20 15:21:16: Group Is Home Mode test state changed from false to true
        2020-03-20 15:21:16: Group Is Home Mode evaluation state changed from false to true
        2020-03-20 15:21:16: Device Home/Night AutoChang (#91) urn:toggledbits-com:serviceId:ReactorGroup/GroupStatus_grpoddw8hv changed from "1" to "0"
        2020-03-20 15:21:16: Launching Is Home Mode.true activity
        2020-03-20 15:21:16: Launching scene/activity grpo7klgla.true
        2020-03-20 15:21:16: Starting "grpo7klgla.true" group 1
        2020-03-20 15:21:16: Activity "grpo7klgla.true" finished
        2020-03-20 15:21:17: Condition condo7kqine successfully sustained for at least 600 seconds (actual 266034)
        2020-03-20 15:21:17: Group No Motion holding evaluation state for check that duration >= 900 (28423 to go)
        2020-03-20 15:21:17: Condition condode15yc successfully sustained for at least 900 seconds (actual 266034)
        2020-03-20 15:21:27: Restart action invoked; clearing state and restarting ReactorSensor
        2020-03-20 15:21:27: Restarting
        2020-03-20 15:21:28: Condition condo7l03m5 test state changed from (nil) to true
        2020-03-20 15:21:28: Condition condo7l03m5 evaluation state changed from (nil) to true
        2020-03-20 15:21:28: Condition condo7l047l test state changed from (nil) to true
        2020-03-20 15:21:28: Condition condo7l047l evaluation state changed from (nil) to true
        2020-03-20 15:21:28: Group GPS We are Home test state changed from (nil) to true
        2020-03-20 15:21:28: Group GPS We are Home evaluation state changed from (nil) to true
        2020-03-20 15:21:28: Condition condoddwjon test state changed from (nil) to false
        2020-03-20 15:21:28: Condition condoddwjon evaluation state changed from (nil) to false
        2020-03-20 15:21:28: Condition condoddwk94 test state changed from (nil) to false
        2020-03-20 15:21:28: Condition condoddwk94 evaluation state changed from (nil) to false
        2020-03-20 15:21:28: Group Overnight test state changed from (nil) to false
        2020-03-20 15:21:28: Group Overnight evaluation state changed from (nil) to false
        2020-03-20 15:21:28: Condition condo7kqine test state changed from (nil) to true
        2020-03-20 15:21:28: Condition condo7kqine holding evaluation state for check that duration >= 600 (600 to go)
        2020-03-20 15:21:28: Condition condo7kqine evaluation state changed from (nil) to false
        2020-03-20 15:21:28: Condition condoddyz1i test state changed from (nil) to false
        2020-03-20 15:21:28: Condition condoddyz1i evaluation state changed from (nil) to false
        2020-03-20 15:21:28: Condition condo7kq496 test state changed from (nil) to true
        2020-03-20 15:21:28: Condition condo7kq496 evaluation state changed from (nil) to true
        2020-03-20 15:21:28: Condition condo7kq5nw test state changed from (nil) to true
        2020-03-20 15:21:28: Condition condo7kq5nw evaluation state changed from (nil) to true
        2020-03-20 15:21:28: Condition condo7kq3l8 test state changed from (nil) to true
        2020-03-20 15:21:28: Condition condo7kq3l8 evaluation state changed from (nil) to true
        2020-03-20 15:21:28: Condition condo7kq2xe test state changed from (nil) to true
        2020-03-20 15:21:28: Condition condo7kq2xe evaluation state changed from (nil) to true
        2020-03-20 15:21:28: Condition condo7kq6bk test state changed from (nil) to true
        2020-03-20 15:21:28: Condition condo7kq6bk evaluation state changed from (nil) to true
        2020-03-20 15:21:28: Group No Motion test state changed from (nil) to true
        2020-03-20 15:21:28: Group No Motion holding evaluation state for check that duration >= 900 (900 to go)
        2020-03-20 15:21:28: Group No Motion evaluation state changed from (nil) to false
        2020-03-20 15:21:28: Group Is Night Mode test state changed from (nil) to false
        2020-03-20 15:21:28: Group Is Night Mode evaluation state changed from (nil) to false
        2020-03-20 15:21:28: Condition condode1585 test state changed from (nil) to true
        2020-03-20 15:21:28: Condition condode1585 evaluation state changed from (nil) to true
        2020-03-20 15:21:28: Condition condode15yc test state changed from (nil) to true
        2020-03-20 15:21:28: Condition condode15yc holding evaluation state for check that duration >= 900 (900 to go)
        2020-03-20 15:21:28: Condition condode15yc evaluation state changed from (nil) to false
        2020-03-20 15:21:28: Group Is Home Mode test state changed from (nil) to false
        2020-03-20 15:21:28: Group Is Home Mode evaluation state changed from (nil) to false
        2020-03-20 15:21:28: Group For Latching - NULL test state changed from (nil) to false
        2020-03-20 15:21:28: Group For Latching - NULL evaluation state changed from (nil) to false
        2020-03-20 15:21:28: Group Home/Night - NULL test state changed from (nil) to false
        2020-03-20 15:21:28: Group Home/Night - NULL evaluation state changed from (nil) to false
        2020-03-20 15:21:28: Changing RS tripped state to false
    Devices
        ZWave (1) urn:schemas-micasaverde-com:device:ZWaveNetwork:1 (19/0); parent 0; plugin -; mfg  model ; dev D_ZWaveNetwork.xml impl 
        Office Motion Sensor (84) urn:schemas-micasaverde-com:device:MotionSensor:1 (4/3); parent 1; plugin -; mfg NEO Coolcam model NAS-PD01Z; dev D_MotionSensor1.xml impl 
        HomeMJ (36) urn:schemas-micasaverde-com:device:DoorSensor:1 (4/1); parent 35; plugin -; mfg  model ; dev D_DoorSensor1.xml impl 
        HomeRJ (37) urn:schemas-micasaverde-com:device:DoorSensor:1 (4/1); parent 35; plugin -; mfg  model ; dev D_DoorSensor1.xml impl 
        Kitchen Motion (56) urn:schemas-micasaverde-com:device:MotionSensor:1 (4/3); parent 1; plugin -; mfg NEO Coolcam model NAS-PD01Z; dev D_MotionSensor1.xml impl 
        Lobo GeofenceBeta (35) urn:schemas-toggledbits-com:device:Lobo:1 (1/-1); parent 0; plugin -; mfg  model ; dev D_Lobo1.xml impl I_Lobo1.xml
        Front Door Sensor (14) urn:schemas-micasaverde-com:device:DoorSensor:1 (4/1); parent 1; plugin -; mfg Linear model WADWAZ-1; dev D_DoorSensor1.xml impl 
        Back Door Sensor (13) urn:schemas-micasaverde-com:device:DoorSensor:1 (4/1); parent 1; plugin -; mfg Linear model WADWAZ-1; dev D_DoorSensor1.xml impl 
        Front Hall Motion (53) urn:schemas-micasaverde-com:device:MotionSensor:1 (4/3); parent 1; plugin -; mfg NEO Coolcam model NAS-PD01Z; dev D_MotionSensor1.xml impl 
    Watches
        Device #91 Home/Night AutoChang service urn:toggledbits-com:serviceId:ReactorGroup variable GroupStatus_grpoddw8hv
        Device #91 Home/Night AutoChang service urn:toggledbits-com:serviceId:ReactorGroup variable GroupStatus_grpo7kz0lt
        Device #37 HomeRJ service urn:micasaverde-com:serviceId:SecuritySensor1 variable Tripped
        Device #36 HomeMJ service urn:micasaverde-com:serviceId:SecuritySensor1 variable Tripped
        Device #91 Home/Night AutoChang service urn:toggledbits-com:serviceId:ReactorSensor variable cdata
        Device #84 Office Motion Sensor service urn:micasaverde-com:serviceId:SecuritySensor1 variable Tripped
        Device #53 Front Hall Motion service urn:micasaverde-com:serviceId:SecuritySensor1 variable Tripped
        Device #91 Home/Night AutoChang service urn:toggledbits-com:serviceId:ReactorSensor variable TestHouseMode
        Device #91 Home/Night AutoChang service urn:toggledbits-com:serviceId:ReactorSensor variable TestTime
        Device #56 Kitchen Motion service urn:micasaverde-com:serviceId:SecuritySensor1 variable Tripped
        Device #13 Back Door Sensor service urn:micasaverde-com:serviceId:SecuritySensor1 variable Tripped
        Device #14 Front Door Sensor service urn:micasaverde-com:serviceId:SecuritySensor1 variable Tripped
    Special Configuration
        UseReactorScenes = 1
        LogEventsToFile = 0
        Retrigger = 0
        FailOnTrouble = 0
        ContinuousTimer = 0

Sheesh… sorry, my bad. Move “Is Home Mode” out of the “For Latching” group.

ok thanks will try this.

I noticed as the cat was walking around last night that the latch still isn’t holding after doing the above suggestion. :frowning: Any thoughts on why?

*************************************************** REACTOR LOGIC SUMMARY REPORT ***************************************************
   Version: 3.5 config 20017 cdata 20045 ui 20045 pluginDevice 8 LuaXP not loaded
    System: Vera version 1.7.4969 (7.31) on Sercomm NA301 ID 35 (Vera Edge); loadtime 1585796696; systemReady 1585796717; Lua 5.1; JSON dkjson 1.2; UnsafeLua=1
Local time: 2020-04-01T23:07:48-0400; DST=1; Oakville, Ontario Canada; formats %Y-%m-%d %H:%M:%S
House mode: plugin 1; system 1; tracking on
  Sun data: { "source": "int", "civdawn": 1585737032, "nautdawn": 1585734973, "sunset": 1585784705, "nautdusk": 1585788500, "stamp": 2020092, "latitude": 43.4501, "astrodusk": 1585790639, "longitude": -79.6829, "civdusk": 1585786440, "astrodawn": 1585732833, "sunrise": 1585738768 }
  Geofence: not running
************************************************************************************************************************************
Home/Night AutoChang (#91)
    Version 20045.30 03/21/20 12:50:53
    Message/status: Not tripped
    Condition group "Home/Night - NULL" (AND)  false as of 03-21.12:51:11 <root>
      &-T-group "GPS We are Home" (OR)  TRUE as of 03-21.12:51:11 <grpo7kz0lt>
      |     |-T-service HomeMJ (36) urn:micasaverde-com:serviceId:SecuritySensor1/Tripped = 1 [0 => 1 at 19:07:39; T/T as of 19:07:39/19:07:39] <condo7l03m5>
      |     |-T-service HomeRJ (37) urn:micasaverde-com:serviceId:SecuritySensor1/Tripped = 1 [0 => 1 at 17:53:49; T/T as of 17:53:49/17:53:49] <condo7l047l>
      &-T-group "Overnight" (OR)  TRUE as of 23:00:00 <grpoddw8hv>
      |     |-T-trange after ,,,23,0,,,,, [1585796821 => 1585796850 at 23:07:30; T/T as of 23:00:00/23:00:00] <condoddwjon>
      |     |-F-sun before sunrise+30, [1585796821 => 1585796850 at 23:07:30; F/F as of 07:29:00/07:29:00] <condoddwk94>
      &-F-group "For Latching - NULL" (AND) ; output latching false as of 07:19:43 <grppgqn7sc>
      |     &-F-group "Is Night Mode" (AND)  after grpo7klgla false as of 07:19:43 <grpo7klfs6>
      |     |     &-T-grpstate (self) (-1) GPS We are Home (grpo7kz0lt) istrue for ge 600s [true at 03-21.12:51:11; T/T as of 03-21.12:51:11/03-21.13:01:11] <condo7kqine>
      |     |     &-T-grpstate (self) (-1) Overnight (grpoddw8hv) istrue [true at 23:00:00; T/T as of 23:00:00/23:00:00] <condoddyz1i>
      |     |     &-F-group "No Motion" (AND)  for ge 900s false as of 17:33:29 <grpo7kpo2a>
      |     |     |     &-T-service Back Door Sensor (13) urn:micasaverde-com:serviceId:SecuritySensor1/Tripped = 0 [1 => 0 at 22:11:34; T/T as of 22:11:34/22:11:34] <condo7kq496>
      |     |     |     &-T-service Front Door Sensor (14) urn:micasaverde-com:serviceId:SecuritySensor1/Tripped = 0 [1 => 0 at 22:09:45; T/T as of 22:09:45/22:09:45] <condo7kq5nw>
      |     |     |     &-T-service Kitchen Motion (56) urn:micasaverde-com:serviceId:SecuritySensor1/Tripped = 0 [1 => 0 at 23:07:30; T/T as of 23:07:30/23:07:30] <condo7kq3l8>
      |     |     |     &-T-service Office Motion Sensor (84) urn:micasaverde-com:serviceId:SecuritySensor1/Tripped = 0 [1 => 0 at 22:55:44; T/T as of 22:55:44/22:55:44] <condo7kq2xe>
      |     |     |     &-T-service Front Hall Motion (53) urn:micasaverde-com:serviceId:SecuritySensor1/Tripped = 0 [1 => 0 at 23:06:43; T/T as of 23:06:43/23:06:43] <condo7kq6bk>
      &-F-group "Is Home Mode" (AND)  false as of 23:00:00 <grpo7klgla>
      |     &-F-grpstate (self) (-1) Overnight (grpoddw8hv) isfalse [true at 23:00:00; F/F as of 23:00:00/23:00:00] <condode1585>
      |     &-T-grpstate (self) (-1) GPS We are Home (grpo7kz0lt) istrue for ge 900s [true at 03-21.12:51:11; T/T as of 03-21.12:51:11/03-21.13:06:11] <condode15yc>
    Activity grpo7klgla.true
        Change house mode to 1
        Comment: Delay is to allow latch reset not to conflict with home mode.
        Delay 60 inline
        Reset latched conditions in grpo7klfs6
    Activity grpo7klfs6.true
        Change house mode to 3
    Events
        2020-04-01 23:05:12: Reactor startup (Luup reload)
        2020-04-01 23:05:15: Starting (Luup Startup/Reload)
        2020-04-01 23:05:17: Condition condo7kqine successfully sustained for at least 600 seconds (actual 987246)
        2020-04-01 23:05:17: Group No Motion holding evaluation state for check that duration >= 900 (613 to go)
        2020-04-01 23:05:17: Condition condode15yc successfully sustained for at least 900 seconds (actual 987246)
        2020-04-01 23:06:12: Device Front Hall Motion (#53) urn:micasaverde-com:serviceId:SecuritySensor1/Tripped changed from "0" to "1"
        2020-04-01 23:06:12: Condition condo7kqine successfully sustained for at least 600 seconds (actual 987301)
        2020-04-01 23:06:12: Condition condo7kq6bk test state changed from true to false
        2020-04-01 23:06:12: Condition condo7kq6bk evaluation state changed from true to false
        2020-04-01 23:06:12: Group No Motion test state changed from true to false
        2020-04-01 23:06:12: Condition condode15yc successfully sustained for at least 900 seconds (actual 987301)
        2020-04-01 23:06:43: Device Front Hall Motion (#53) urn:micasaverde-com:serviceId:SecuritySensor1/Tripped changed from "1" to "0"
        2020-04-01 23:06:43: Condition condo7kqine successfully sustained for at least 600 seconds (actual 987332)
        2020-04-01 23:06:43: Condition condo7kq6bk test state changed from false to true
        2020-04-01 23:06:43: Condition condo7kq6bk evaluation state changed from false to true
        2020-04-01 23:06:43: Group No Motion test state changed from false to true
        2020-04-01 23:06:43: Group No Motion holding evaluation state for check that duration >= 900 (900 to go)
        2020-04-01 23:06:43: Condition condode15yc successfully sustained for at least 900 seconds (actual 987332)
        2020-04-01 23:06:59: Device Kitchen Motion (#56) urn:micasaverde-com:serviceId:SecuritySensor1/Tripped changed from "0" to "1"
        2020-04-01 23:06:59: Condition condo7kqine successfully sustained for at least 600 seconds (actual 987348)
        2020-04-01 23:06:59: Condition condo7kq3l8 test state changed from true to false
        2020-04-01 23:06:59: Condition condo7kq3l8 evaluation state changed from true to false
        2020-04-01 23:06:59: Group No Motion test state changed from true to false
        2020-04-01 23:06:59: Condition condode15yc successfully sustained for at least 900 seconds (actual 987348)
        2020-04-01 23:07:01: Device Kitchen Motion (#56) urn:micasaverde-com:serviceId:SecuritySensor1/Tripped changed from "1" to "1"
        2020-04-01 23:07:01: Condition condo7kqine successfully sustained for at least 600 seconds (actual 987350)
        2020-04-01 23:07:01: Condition condode15yc successfully sustained for at least 900 seconds (actual 987350)
        2020-04-01 23:07:30: Device Kitchen Motion (#56) urn:micasaverde-com:serviceId:SecuritySensor1/Tripped changed from "1" to "0"
        2020-04-01 23:07:30: Condition condo7kqine successfully sustained for at least 600 seconds (actual 987379)
        2020-04-01 23:07:30: Condition condo7kq3l8 test state changed from false to true
        2020-04-01 23:07:30: Condition condo7kq3l8 evaluation state changed from false to true
        2020-04-01 23:07:30: Group No Motion test state changed from false to true
        2020-04-01 23:07:30: Group No Motion holding evaluation state for check that duration >= 900 (900 to go)
        2020-04-01 23:07:30: Condition condode15yc successfully sustained for at least 900 seconds (actual 987379)
    Devices
        ZWave (1) urn:schemas-micasaverde-com:device:ZWaveNetwork:1 (19/0); parent 0; plugin -; mfg  model ; dev D_ZWaveNetwork.xml impl 
        Office Motion Sensor (84) urn:schemas-micasaverde-com:device:MotionSensor:1 (4/3); parent 1; plugin -; mfg NEO Coolcam model NAS-PD01Z; dev D_MotionSensor1.xml impl 
        HomeMJ (36) urn:schemas-micasaverde-com:device:DoorSensor:1 (4/1); parent 35; plugin -; mfg  model ; dev D_DoorSensor1.xml impl 
        HomeRJ (37) urn:schemas-micasaverde-com:device:DoorSensor:1 (4/1); parent 35; plugin -; mfg  model ; dev D_DoorSensor1.xml impl 
        Kitchen Motion (56) urn:schemas-micasaverde-com:device:MotionSensor:1 (4/3); parent 1; plugin -; mfg NEO Coolcam model NAS-PD01Z; dev D_MotionSensor1.xml impl 
        Lobo GeofenceBeta (35) urn:schemas-toggledbits-com:device:Lobo:1 (1/-1); parent 0; plugin -; mfg  model ; dev D_Lobo1.xml impl I_Lobo1.xml
        Front Door Sensor (14) urn:schemas-micasaverde-com:device:DoorSensor:1 (4/1); parent 1; plugin -; mfg Linear model WADWAZ-1; dev D_DoorSensor1.xml impl 
        Back Door Sensor (13) urn:schemas-micasaverde-com:device:DoorSensor:1 (4/1); parent 1; plugin -; mfg Linear model WADWAZ-1; dev D_DoorSensor1.xml impl 
        Front Hall Motion (53) urn:schemas-micasaverde-com:device:MotionSensor:1 (4/3); parent 1; plugin -; mfg NEO Coolcam model NAS-PD01Z; dev D_MotionSensor1.xml impl 
    Watches
        Device #53 Front Hall Motion service urn:micasaverde-com:serviceId:SecuritySensor1 variable Tripped
        Device #91 Home/Night AutoChang service urn:toggledbits-com:serviceId:ReactorGroup variable GroupStatus_grpoddw8hv
        Device #91 Home/Night AutoChang service urn:toggledbits-com:serviceId:ReactorGroup variable GroupStatus_grpo7kz0lt
        Device #84 Office Motion Sensor service urn:micasaverde-com:serviceId:SecuritySensor1 variable Tripped
        Device #56 Kitchen Motion service urn:micasaverde-com:serviceId:SecuritySensor1 variable Tripped
        Device #37 HomeRJ service urn:micasaverde-com:serviceId:SecuritySensor1 variable Tripped
        Device #91 Home/Night AutoChang service urn:toggledbits-com:serviceId:ReactorSensor variable cdata
        Device #91 Home/Night AutoChang service urn:toggledbits-com:serviceId:ReactorSensor variable TestHouseMode
        Device #91 Home/Night AutoChang service urn:toggledbits-com:serviceId:ReactorSensor variable TestTime
        Device #36 HomeMJ service urn:micasaverde-com:serviceId:SecuritySensor1 variable Tripped
        Device #13 Back Door Sensor service urn:micasaverde-com:serviceId:SecuritySensor1 variable Tripped
        Device #14 Front Door Sensor service urn:micasaverde-com:serviceId:SecuritySensor1 variable Tripped
    Special Configuration
        UseReactorScenes = 1
        LogEventsToFile = 0
        Retrigger = 0
        FailOnTrouble = 0
        ContinuousTimer = 0

Check the documentation for the conditions under which a latched condition resets. That’s here: https://www.toggledbits.com/static/reactor/docs/Condition-Options/#output-control-options

I have no idea what your logic is doing and why, but I can tell you that a latched condition will not hold latched when any sibling condition is false. That’s intended operation. It looks to me like because your “Is Home Mode” group is false, the latch doesn’t hold on “For Latching - NULL”. And that would be correct. I can tell from the Event log and the timestamps on the groups that “Is Home Mode” was false for the entire time, and that will prevent any sibling from latching.

1 Like

Best Home Automation shopping experience. Shop at getvera!

© 2020 Vera Control Ltd., All Rights Reserved. Terms of Use | Privacy Policy