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 Reactor | toggledbits 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