Help with Proper Logic to Turn on Lights When Coming Home

I guess I’m having difficulty with my “Logic” and NOT OR isn’t the way to go, Truth Tables always help.

Since the logic works it is the case that if Vera is in Home Mode AND the TV gets turned off AND it is between dusk and dawn; or if Vera is in Home Mode AND the TV is off AND it becomes between dusk and dawn, then the lights will turn on.

How to work around this, IE have it ONLY triggered on the CHANGE in state of House Mode from any to HOME? Can Expressions be used here?

====================================================================================================================================
Welcome Home (#574)
    Version 19082.84 06/26/19 07:50:37
    Message/status: Not tripped
    Test time set: 2019-06-25 21:58
    Condition group "Mode to Home, @Night TV OFF" (AND) false as of 21:58:00 <root>
      &-F-housemode in ,1 [1 => 2 at 21:58:00; F/F as of 21:58:00/21:58:00] <condesewo4s>
      &-F-sun bet civdusk+0,civdawn+0 [1561525080 at 21:58:00; T/F as of 21:58:00/21:58:00] <condetd8e76>
      &-F-service Harmony Control (351) urn:rboer-com:serviceId:Harmony1/StartingActivityID = -1 after condesewo4s [32003180 => -1 at 21:58:00; T/F as of 21:58:00/21:58:00] <condetd8z3x>
    Activity grpetdaz2k.true
        Device 199 (Fam Room Light & Fan) action urn:upnp-org:serviceId:SwitchPower1/SetTarget( newTargetValue="0" )
        Device 26 (Tripod Dimmer) action urn:upnp-org:serviceId:SwitchPower1/SetTarget( newTargetValue="0" )
    Activity root.true
        Device 199 (Fam Room Light & Fan) action urn:upnp-org:serviceId:SwitchPower1/SetTarget( newTargetValue="1" )
        Device 26 (Tripod Dimmer) action urn:upnp-org:serviceId:Dimming1/SetLoadLevelTarget( newLoadlevelTarget="50" )
    Events
        06/26/19 07:09:23 evalchange: newState=false, cond=condetd8e76, oldState=true
        06/26/19 07:09:23 evalchange: newState=false, cond=condetd8z3x, oldState=true
        06/26/19 07:09:42 devicewatch: name=Reactor Plugin, var=HouseMode, device=558
        06/26/19 07:09:43 condchange: newState=true, cond=condesewo4s, oldState=false
        06/26/19 07:09:43 evalchange: newState=true, cond=condesewo4s, oldState=false
        06/26/19 07:09:43 evalchange: newState=true, cond=condetd8e76, oldState=false
        06/26/19 07:09:43 evalchange: newState=true, cond=condetd8z3x, oldState=false
        06/26/19 07:11:12 configchange: 
        06/26/19 07:11:13 condchange: newState=true, cond=root, oldState=false
        06/26/19 07:11:13 evalchange: newState=true, cond=root, oldState=false
        06/26/19 07:11:13 devicewatch: device=574, old="0", name=Welcome Home, var=urn:toggledbits-com:serviceId:ReactorGroup/GroupStatus_root, new="1"
        06/26/19 07:11:13 sensorstate: state=true
        06/26/19 07:11:13 startscene: scene=root.true, sceneName=root.true
        06/26/19 07:11:13 runscene: scene=root.true, sceneName=root.true, group=1, notice=Starting scene group 1
        06/26/19 07:11:13 endscene: scene=root.true, sceneName=root.true
        06/26/19 07:11:49 devicewatch: name=Reactor Plugin, var=HouseMode, device=558
        06/26/19 07:11:50 condchange: newState=false, cond=condesewo4s, oldState=true
        06/26/19 07:11:50 evalchange: newState=false, cond=condesewo4s, oldState=true
        06/26/19 07:11:50 evalchange: newState=false, cond=condetd8e76, oldState=true
        06/26/19 07:11:50 evalchange: newState=false, cond=condetd8z3x, oldState=true
        06/26/19 07:11:50 condchange: newState=false, cond=root, oldState=true
        06/26/19 07:11:50 evalchange: newState=false, cond=root, oldState=true
        06/26/19 07:11:50 devicewatch: device=574, old="1", name=Welcome Home, var=urn:toggledbits-com:serviceId:ReactorGroup/GroupStatus_root, new="0"
        06/26/19 07:11:50 sensorstate: state=false
        06/26/19 07:12:18 devicewatch: device=351, old="-1", name=Harmony Control, var=urn:rboer-com:serviceId:Harmony1/StartingActivityID, new="32003180"
        06/26/19 07:12:19 condchange: newState=false, cond=condetd8z3x, oldState=true
        06/26/19 07:12:36 devicewatch: name=Reactor Plugin, var=HouseMode, device=558
        06/26/19 07:12:37 condchange: newState=true, cond=condesewo4s, oldState=false
        06/26/19 07:12:37 evalchange: newState=true, cond=condesewo4s, oldState=false
        06/26/19 07:12:37 evalchange: newState=true, cond=condetd8e76, oldState=false
        06/26/19 07:13:07 devicewatch: device=351, old="32003180", name=Harmony Control, var=urn:rboer-com:serviceId:Harmony1/StartingActivityID, new="-1"
        06/26/19 07:13:08 condchange: newState=true, cond=condetd8z3x, oldState=false
        06/26/19 07:13:08 evalchange: newState=true, cond=condetd8z3x, oldState=false
        06/26/19 07:13:08 condchange: newState=true, cond=root, oldState=false
        06/26/19 07:13:08 evalchange: newState=true, cond=root, oldState=false
        06/26/19 07:13:08 devicewatch: device=574, old="0", name=Welcome Home, var=urn:toggledbits-com:serviceId:ReactorGroup/GroupStatus_root, new="1"
        06/26/19 07:13:08 sensorstate: state=true
        06/26/19 07:13:08 startscene: scene=root.true, sceneName=root.true
        06/26/19 07:13:08 runscene: scene=root.true, sceneName=root.true, group=1, notice=Starting scene group 1
        06/26/19 07:13:08 endscene: scene=root.true, sceneName=root.true
        06/26/19 07:13:54 devicewatch: name=Reactor Plugin, var=HouseMode, device=558
        06/26/19 07:13:55 condchange: newState=false, cond=condesewo4s, oldState=true
        06/26/19 07:13:55 evalchange: newState=false, cond=condesewo4s, oldState=true
        06/26/19 07:13:55 evalchange: newState=false, cond=condetd8e76, oldState=true
        06/26/19 07:13:55 evalchange: newState=false, cond=condetd8z3x, oldState=true
        06/26/19 07:13:55 condchange: newState=false, cond=root, oldState=true
        06/26/19 07:13:55 evalchange: newState=false, cond=root, oldState=true
        06/26/19 07:13:55 devicewatch: device=574, old="1", name=Welcome Home, var=urn:toggledbits-com:serviceId:ReactorGroup/GroupStatus_root, new="0"
        06/26/19 07:13:55 sensorstate: state=false
        06/26/19 07:50:37 configchange: 
```

I believe I have it!


====================================================================================================================================
Welcome Home (#574)
    Version 19082.87 06/26/19 08:12:09
    Message/status: Not tripped
    Test time set: 2019-06-25 21:58
    Condition group "Mode to Home, @Night TV OFF" (AND) false as of 21:58:00 <root>
      &-T-sun bet civdusk+0,civdawn+0 [1561525080 at 21:58:00; T/T as of 21:58:00/21:58:00] <condetd8e76>
      &-T-service Harmony Control (351) urn:rboer-com:serviceId:Harmony1/StartingActivityID = -1 (match case) [32003180 => -1 at 21:58:00; T/T as of 21:58:00/21:58:00] <condetd8z3x>
      &-F-housemode in ,1 [1 => 2 at 21:58:00; F/F as of 21:58:00/21:58:00] <condesewo4s>
      &-F-housemode in ,1 [1 => 2 at 21:58:00; F/F as of 21:58:00/21:58:00] <condetkygr8>
    Activity grpetdaz2k.true
        Device 199 (Fam Room Light & Fan) action urn:upnp-org:serviceId:SwitchPower1/SetTarget( newTargetValue="0" )
        Device 26 (Tripod Dimmer) action urn:upnp-org:serviceId:SwitchPower1/SetTarget( newTargetValue="0" )
    Activity root.true
        Device 199 (Fam Room Light & Fan) action urn:upnp-org:serviceId:SwitchPower1/SetTarget( newTargetValue="1" )
        Device 26 (Tripod Dimmer) action urn:upnp-org:serviceId:Dimming1/SetLoadLevelTarget( newLoadlevelTarget="50" )
    Events
        06/26/19 08:30:31 action: action=Reset
        06/26/19 08:30:31 sensorstate: state=false
        06/26/19 08:31:08 devicewatch: device=351, old="-1", name=Harmony Control, var=urn:rboer-com:serviceId:Harmony1/StartingActivityID, new="32003180"
        06/26/19 08:31:25 action: action=Restart
        06/26/19 08:31:25 disabled at startup: 
        06/26/19 08:36:42 devicewatch: device=351, old="32003180", name=Harmony Control, var=urn:rboer-com:serviceId:Harmony1/StartingActivityID, new="-1"
        06/26/19 08:36:55 devicewatch: name=Reactor Plugin, var=HouseMode, device=558
        06/26/19 08:36:58 action: action=SetEnabled, state=1
        06/26/19 08:37:00 condchange: newState=false, cond=condesewo4s, oldState=true
        06/26/19 08:37:00 evalchange: newState=false, cond=condesewo4s, oldState=true
        06/26/19 08:37:00 condchange: newState=false, cond=condetkygr8, oldState=true
        06/26/19 08:37:00 evalchange: newState=false, cond=condetkygr8, oldState=true
        06/26/19 08:37:00 condchange: newState=false, cond=root, oldState=true
        06/26/19 08:37:00 evalchange: newState=false, cond=root, oldState=true
        06/26/19 08:37:00 devicewatch: device=574, old="1", name=Welcome Home, var=urn:toggledbits-com:serviceId:ReactorGroup/GroupStatus_root, new="0"
        06/26/19 08:37:16 devicewatch: device=351, old="-1", name=Harmony Control, var=urn:rboer-com:serviceId:Harmony1/StartingActivityID, new="32003180"
        06/26/19 08:37:17 condchange: newState=false, cond=condetd8z3x, oldState=true
        06/26/19 08:37:17 evalchange: newState=false, cond=condetd8z3x, oldState=true
        06/26/19 08:37:40 devicewatch: name=Reactor Plugin, var=HouseMode, device=558
        06/26/19 08:37:41 condchange: newState=true, cond=condesewo4s, oldState=false
        06/26/19 08:37:41 condchange: newState=true, cond=condetkygr8, oldState=false
        06/26/19 08:37:41 evalchange: newState=true, cond=condetkygr8, oldState=false
        06/26/19 08:37:54 devicewatch: name=Reactor Plugin, var=HouseMode, device=558
        06/26/19 08:37:55 condchange: newState=false, cond=condesewo4s, oldState=true
        06/26/19 08:37:55 condchange: newState=false, cond=condetkygr8, oldState=true
        06/26/19 08:37:55 evalchange: newState=false, cond=condetkygr8, oldState=true
        06/26/19 08:37:59 devicewatch: device=351, old="32003180", name=Harmony Control, var=urn:rboer-com:serviceId:Harmony1/StartingActivityID, new="-1"
        06/26/19 08:38:00 condchange: newState=true, cond=condetd8z3x, oldState=false
        06/26/19 08:38:00 evalchange: newState=true, cond=condetd8z3x, oldState=false
        06/26/19 08:38:14 devicewatch: name=Reactor Plugin, var=HouseMode, device=558
        06/26/19 08:38:15 condchange: newState=true, cond=condesewo4s, oldState=false
        06/26/19 08:38:15 evalchange: newState=true, cond=condesewo4s, oldState=false
        06/26/19 08:38:15 condchange: newState=true, cond=condetkygr8, oldState=false
        06/26/19 08:38:15 evalchange: newState=true, cond=condetkygr8, oldState=false
        06/26/19 08:38:15 condchange: newState=true, cond=root, oldState=false
        06/26/19 08:38:15 evalchange: newState=true, cond=root, oldState=false
        06/26/19 08:38:15 devicewatch: device=574, old="0", name=Welcome Home, var=urn:toggledbits-com:serviceId:ReactorGroup/GroupStatus_root, new="1"
        06/26/19 08:38:15 sensorstate: state=true
        06/26/19 08:38:15 startscene: scene=root.true, sceneName=root.true
        06/26/19 08:38:15 runscene: scene=root.true, sceneName=root.true, group=1, notice=Starting scene group 1
        06/26/19 08:38:15 endscene: scene=root.true, sceneName=root.true
        06/26/19 08:38:37 devicewatch: name=Reactor Plugin, var=HouseMode, device=558
        06/26/19 08:38:38 condchange: newState=false, cond=condesewo4s, oldState=true
        06/26/19 08:38:38 evalchange: newState=false, cond=condesewo4s, oldState=true
        06/26/19 08:38:38 condchange: newState=false, cond=condetkygr8, oldState=true
        06/26/19 08:38:38 evalchange: newState=false, cond=condetkygr8, oldState=true
        06/26/19 08:38:38 condchange: newState=false, cond=root, oldState=true
        06/26/19 08:38:38 evalchange: newState=false, cond=root, oldState=true
        06/26/19 08:38:38 devicewatch: device=574, old="1", name=Welcome Home, var=urn:toggledbits-com:serviceId:ReactorGroup/GroupStatus_root, new="0"
        06/26/19 08:38:38 sensorstate: state=false
```

I spoke too soon. Even with this if Vera is in Home Mode and the TV is on and then I turn the TV Off the lights will come on.

====================================================================================================================================
Welcome Home (#574) tripped
    Version 19082.87 06/26/19 08:12:09
    Message/status: Tripped
    Test time set: 2019-06-25 21:58
    Condition group "Mode to Home, @Night TV OFF" (AND) TRUE as of 21:58:00 <root>
      &-T-sun bet civdusk+0,civdawn+0 [1561525080 at 21:58:00; T/T as of 21:58:00/21:58:00] <condetd8e76>
      &-T-service Harmony Control (351) urn:rboer-com:serviceId:Harmony1/StartingActivityID = -1 (match case) [32003180 => -1 at 21:58:00; T/T as of 21:58:00/21:58:00] <condetd8z3x>
      &-T-housemode in ,1 [2 => 1 at 21:58:00; T/T as of 21:58:00/21:58:00] <condesewo4s>
      &-T-housemode in ,1 [2 => 1 at 21:58:00; T/T as of 21:58:00/21:58:00] <condetkygr8>
    Activity grpetdaz2k.true
        Device 199 (Fam Room Light & Fan) action urn:upnp-org:serviceId:SwitchPower1/SetTarget( newTargetValue="0" )
        Device 26 (Tripod Dimmer) action urn:upnp-org:serviceId:SwitchPower1/SetTarget( newTargetValue="0" )
    Activity root.true
        Device 199 (Fam Room Light & Fan) action urn:upnp-org:serviceId:SwitchPower1/SetTarget( newTargetValue="1" )
        Device 26 (Tripod Dimmer) action urn:upnp-org:serviceId:Dimming1/SetLoadLevelTarget( newLoadlevelTarget="50" )
    Events
        06/26/19 08:38:15 runscene: scene=root.true, sceneName=root.true, group=1, notice=Starting scene group 1
        06/26/19 08:38:15 endscene: scene=root.true, sceneName=root.true
        06/26/19 08:38:37 devicewatch: name=Reactor Plugin, var=HouseMode, device=558
        06/26/19 08:38:38 condchange: newState=false, cond=condesewo4s, oldState=true
        06/26/19 08:38:38 evalchange: newState=false, cond=condesewo4s, oldState=true
        06/26/19 08:38:38 condchange: newState=false, cond=condetkygr8, oldState=true
        06/26/19 08:38:38 evalchange: newState=false, cond=condetkygr8, oldState=true
        06/26/19 08:38:38 condchange: newState=false, cond=root, oldState=true
        06/26/19 08:38:38 evalchange: newState=false, cond=root, oldState=true
        06/26/19 08:38:38 devicewatch: device=574, old="1", name=Welcome Home, var=urn:toggledbits-com:serviceId:ReactorGroup/GroupStatus_root, new="0"
        06/26/19 08:38:38 sensorstate: state=false
        06/26/19 08:41:59 devicewatch: name=Reactor Plugin, var=HouseMode, device=558
        06/26/19 08:42:00 condchange: newState=true, cond=condesewo4s, oldState=false
        06/26/19 08:42:00 evalchange: newState=true, cond=condesewo4s, oldState=false
        06/26/19 08:42:00 condchange: newState=true, cond=condetkygr8, oldState=false
        06/26/19 08:42:00 evalchange: newState=true, cond=condetkygr8, oldState=false
        06/26/19 08:42:00 condchange: newState=true, cond=root, oldState=false
        06/26/19 08:42:00 evalchange: newState=true, cond=root, oldState=false
        06/26/19 08:42:00 devicewatch: device=574, old="0", name=Welcome Home, var=urn:toggledbits-com:serviceId:ReactorGroup/GroupStatus_root, new="1"
        06/26/19 08:42:00 sensorstate: state=true
        06/26/19 08:42:00 startscene: scene=root.true, sceneName=root.true
        06/26/19 08:42:00 runscene: scene=root.true, sceneName=root.true, group=1, notice=Starting scene group 1
        06/26/19 08:42:00 endscene: scene=root.true, sceneName=root.true
        06/26/19 08:42:21 devicewatch: name=Reactor Plugin, var=HouseMode, device=558
        06/26/19 08:42:22 condchange: newState=false, cond=condesewo4s, oldState=true
        06/26/19 08:42:22 evalchange: newState=false, cond=condesewo4s, oldState=true
        06/26/19 08:42:22 condchange: newState=false, cond=condetkygr8, oldState=true
        06/26/19 08:42:22 evalchange: newState=false, cond=condetkygr8, oldState=true
        06/26/19 08:42:22 condchange: newState=false, cond=root, oldState=true
        06/26/19 08:42:22 evalchange: newState=false, cond=root, oldState=true
        06/26/19 08:42:22 devicewatch: device=574, old="1", name=Welcome Home, var=urn:toggledbits-com:serviceId:ReactorGroup/GroupStatus_root, new="0"
        06/26/19 08:42:22 sensorstate: state=false
        06/26/19 08:42:23 devicewatch: device=351, old="-1", name=Harmony Control, var=urn:rboer-com:serviceId:Harmony1/StartingActivityID, new="32003180"
        06/26/19 08:42:24 condchange: newState=false, cond=condetd8z3x, oldState=true
        06/26/19 08:42:24 evalchange: newState=false, cond=condetd8z3x, oldState=true
        06/26/19 08:42:46 devicewatch: name=Reactor Plugin, var=HouseMode, device=558
        06/26/19 08:42:47 condchange: newState=true, cond=condesewo4s, oldState=false
        06/26/19 08:42:47 condchange: newState=true, cond=condetkygr8, oldState=false
        06/26/19 08:42:47 evalchange: newState=true, cond=condetkygr8, oldState=false
        06/26/19 08:43:07 devicewatch: device=351, old="32003180", name=Harmony Control, var=urn:rboer-com:serviceId:Harmony1/StartingActivityID, new="-1"
        06/26/19 08:43:08 condchange: newState=true, cond=condetd8z3x, oldState=false
        06/26/19 08:43:08 evalchange: newState=true, cond=condetd8z3x, oldState=false
        06/26/19 08:43:08 evalchange: newState=true, cond=condesewo4s, oldState=false
        06/26/19 08:43:08 condchange: newState=true, cond=root, oldState=false
        06/26/19 08:43:08 evalchange: newState=true, cond=root, oldState=false
        06/26/19 08:43:08 devicewatch: device=574, old="0", name=Welcome Home, var=urn:toggledbits-com:serviceId:ReactorGroup/GroupStatus_root, new="1"
        06/26/19 08:43:09 sensorstate: state=true
        06/26/19 08:43:09 startscene: scene=root.true, sceneName=root.true
        06/26/19 08:43:09 runscene: scene=root.true, sceneName=root.true, group=1, notice=Starting scene group 1
        06/26/19 08:43:09 endscene: scene=root.true, sceneName=root.true
```

OK. I just arrived home after 11+ days away. Don’t do anything more at this point. Let me set this up as closely as I can in my development environment and see what I can shake out. Your latest attempt looks like it should place nice, and my earlier direction should also have worked. Let me investigate both now that I have access to both code and hardware.

1 Like

Thanks Patrick!

What I think it needs is to have the change from any to Home act as a relay with a momentary switch. Does that make sense? Is it possible?

BTW, right now I have several scenes that when a PIN code is entered into a lock it will switch to home mode using the house modes plugin. This is what I’m using to trigger this new reactor I am trying to set up. I would like to just have all these lock triggers built into this reactor. This was merely Phase 1 to get the logic worked out of turning on the lights only at night and only if the TV is off.

I get what you’re saying, but that won’t really change the way this works, and in fact, might make it a lot harder. When you need operations to be sequenced, the hold of the state is actually vitally important. But… your last even log shows a potential problem with the sequencing not being honored, and I’ve already fixed a sequencing issue for 3.3, and I now suspect what you are getting may be related, but I want to put it through my own environment before I send you off making more changes. I’ve been traveling and was sick while on the road as well, so I can’t say you’ve had the best version of me looking at this, and at the same time, you’ve been making a lot of big changes while I’m trying to focus in on a stable environment with just little, incremental changes, and that’s made it harder for me to track the issue all around. But I don’t want to put you through any more gyrations until I wrap my (clear) head around it and do this in my own controlled environment. Then we can worry about yours.

1 Like

@rigpapa

Thanks again; Much obliged!

Take care of yourself first. This is a matter of convenience not necessity!

OK. Sorry this took a bit, but as you’ve seen I’m also working with another community user on an issue, and it actually overlaps the issues here a bit, in addition to prior updates and work not yet released.

Please grab the current Github stable branch version (19178) and install it, all files. You’ll need to restart Luup and hard refresh your browser as well.

After you get this installed, send me a logic summary, so I know what your current configuration looks like. But I believe what you showed in this post should work. I’m not 100% on the StartingActivityId test because I don’t use Harmony, so I don’t know what the values mean or have a feel for the behavior and timing of the device. But let’s see what happens. Keep an eye on your Status tab display while testing; that’s usually informative, too.

Edit: install instructions, if needed…

  1. Go to the Github stable branch
  2. Click the green “Clone or download” button and choose “Download ZIP”
  3. Unzip the zip file to a folder.
  4. Upload the unzipped files by selecting them all and dragging the group to the upload tool at Apps > Develop apps > Luup files. This will also reload Luup after the uploads are done.
  5. Hard-refresh your browser.

I’ve tested Harmony for that command and state.

Harmony remotes have several Audio Video Activities that start up various devices as programmed. Power turns everything off. This corresponds to StartingActivityId = -1 from my testing with Reactor. When an activity is being used it returns an 8 digit numeric code…

I’ll install this beta and report back. Should be interesting using Jump Desktop RDP from my phone at work!

There’s AltUI and Readme files in there… drop ALL of them into Vera?

You can skip the “.md” files, but everything else should go.


*************************************************** REACTOR LOGIC SUMMARY REPORT ***************************************************
   Version: 3.3develop-19178 config 19178 cdata 19082 ui 19178 pluginDevice 558
    System: Vera version 1.7.4453 on Sercomm G450; loadtime 1561667912; systemReady 1561667948; Lua 5.1
Local time: 2019-06-27T13:46:53-0700; DST=1; Redacted
House mode: plugin 1; system 1; tracking on
  Sun data: { "stamp": 2019178, "civdawn": 1561637477, "nautdawn": 1561635324, "sunset": 1561691074, "nautdusk": 1561694976, "latitude": Redacted, "astrodusk": 1561697334, "longitude Redacted, "civdusk": 1561692824, "astrodawn": 1561632967, "sunrise": 1561639227 }
  Geofence: running in long mode, last update 06:48:00, data version 2
            User 1686711 ishome=0 inlist= since=06:48:00
            |1472309878 "Redacted" type="home" status="out" since=06:48:00
            User 1686611 ishome=1 inlist=1 since=06:48:00
            |    1 "Redacted" type="home" status="in" since=18:34:00
            User 2497352 ishome=1 inlist=1559003821 since=06:48:00
            |1559003821 "Redacted" type="home" status="in" since=16:37:00
            Raw: { "updated": 1561668360, "users_settings": [ { "id": 1686611, "ishome": 1 }, { "id": 1686711, "ishome": 0 }, { "id": 2497352, "ishome": 1 } ], "mode": -1, "users": [ { "id": 1686711, "Level": 1, "Name": "Meritage1", "IsGuest": 0 }, { "id": 1686611, "Level": 1, "Name": "Meritage10", "IsGuest": 0 }, { "id": 2497352, "Level": 1, "Name": "TaylorS", "IsGuest": 0 } ], "usergeofences": [ { "geotags": [ { "radius": 250, "PK_User": 1686611, "id": 1, "status": "Enter", "accuracy": 0, "ishome": 1, "name": "Redacted", "address": "Redacted", "longitude": "-Redacted", "latitude": "Redacted", "color": "006e45", "notify": 1 } ], "iduser": 1686611 }, { "geotags": [ { "radius": 100, "PK_User": 1686711, "id": 1472309878, "status": "Exit", "accuracy": 0, "ishome": 1, "name": "Redacted", "address": "Redacted ", "longitude": Redacted", "latitude": "Redacted", "color": "#ff0000", "notify": 1 } ], "iduser": 1686711 }, { "geotags": [ { "radius": 250, "notify": 1, "id": 1559003821, "status": "Enter", "color": "ff0000", "ishome": 1, "name": "Redacted", "address": "Redacted", "longitude": Redacted", "latitude": "Redacted", "accuracy": 0, "PK_User": 2497352 } ], "iduser": 2497352 } ] }
====================================================================================================================================
Welcome Home (#574) tripped
    Version 19082.87 06/26/19 08:12:09
    Message/status: Tripped
    Test time set: 2019-06-25 01:39
    Condition group "Mode to Home, @Night TV OFF" (AND) TRUE as of 06-25.01:39:00 <root>
      &-T-sun bet civdusk+0,civdawn+0 [1561643072 => 1561451940 at 06-25.01:39:00; T/T as of 06-25.01:39:00/06-25.01:39:00] <condetd8e76>
      &-T-service Harmony Control (351) urn:rboer-com:serviceId:Harmony1/StartingActivityID = -1 (match case) [32003180 => -1 at 06-25.01:39:00; T/T as of 06-25.01:39:00/06-25.01:39:00] <condetd8z3x>
      &-T-housemode in ,1 after condetd8z3x [2 => 1 at 06-25.01:39:00; T/T as of 06-25.01:39:00/06-25.01:39:00] <condesewo4s>
      &-T-housemode in ,1 after condetd8e76 [2 => 1 at 06-25.01:39:00; T/T as of 06-25.01:39:00/06-25.01:39:00] <condetkygr8>
    Activity grpetdaz2k.true
        Device Fam Room Light & Fan (199) action urn:upnp-org:serviceId:SwitchPower1/SetTarget( newTargetValue="0" )
        Device Tripod Dimmer (26) action urn:upnp-org:serviceId:SwitchPower1/SetTarget( newTargetValue="0" )
    Activity root.true
        Device Fam Room Light & Fan (199) action urn:upnp-org:serviceId:SwitchPower1/SetTarget( newTargetValue="1" )
        Device Tripod Dimmer (26) action urn:upnp-org:serviceId:Dimming1/SetLoadLevelTarget( newLoadlevelTarget="50" )
    Events
        06/27/19 13:38:56 reload: notice=Luup reload
        06/27/19 13:38:56 disabled at startup: 
        06/27/19 13:41:14 action: action=Restart
        06/27/19 13:41:14 disabled at startup: 
        06/27/19 13:41:20 action: action=Reset
        06/27/19 13:41:20 sensorstate: state=false
        06/27/19 13:41:41 action: action=Restart
        06/27/19 13:41:41 disabled at startup: 
        06/27/19 13:42:37 action: action=SetEnabled, state=1
        06/27/19 13:42:37 action: action=Restart
        06/27/19 13:42:37 start: 
        06/27/19 13:42:38 condchange: newState=true, cond=condetd8e76, oldState=false
        06/27/19 13:42:38 evalchange: newState=true, cond=condetd8e76, oldState=false
        06/27/19 13:42:38 condchange: newState=false, cond=condetd8z3x, oldState=true
        06/27/19 13:42:38 evalchange: newState=false, cond=condetd8z3x, oldState=true
        06/27/19 13:42:38 evalchange: newState=true, cond=condetkygr8, oldState=false
        06/27/19 13:42:40 action: action=SetEnabled, state=0
        06/27/19 13:43:46 action: action=SetEnabled, state=1
        06/27/19 13:43:47 action: action=Restart
        06/27/19 13:43:47 start: 
        06/27/19 13:43:48 condchange: newState=false, cond=condesewo4s, oldState=true
        06/27/19 13:43:48 condchange: newState=false, cond=condetkygr8, oldState=true
        06/27/19 13:43:48 evalchange: newState=false, cond=condetkygr8, oldState=true
        06/27/19 13:44:08 devicewatch: name=Reactor Plugin, var=HouseMode, device=558
        06/27/19 13:44:08 condchange: newState=true, cond=condesewo4s, oldState=false
        06/27/19 13:44:08 condchange: newState=true, cond=condetkygr8, oldState=false
        06/27/19 13:44:08 evalchange: newState=true, cond=condetkygr8, oldState=false
        06/27/19 13:44:18 devicewatch: name=Reactor Plugin, var=HouseMode, device=558
        06/27/19 13:44:18 condchange: newState=false, cond=condesewo4s, oldState=true
        06/27/19 13:44:18 condchange: newState=false, cond=condetkygr8, oldState=true
        06/27/19 13:44:18 evalchange: newState=false, cond=condetkygr8, oldState=true
        06/27/19 13:44:52 devicewatch: name=Reactor Plugin, var=HouseMode, device=558
        06/27/19 13:44:52 condchange: newState=true, cond=condesewo4s, oldState=false
        06/27/19 13:44:52 condchange: newState=true, cond=condetkygr8, oldState=false
        06/27/19 13:44:52 evalchange: newState=true, cond=condetkygr8, oldState=false
        06/27/19 13:45:16 devicewatch: device=351, old="32003180", name=Harmony Control, var=urn:rboer-com:serviceId:Harmony1/StartingActivityID, new="-1"
        06/27/19 13:45:16 condchange: newState=true, cond=condetd8z3x, oldState=false
        06/27/19 13:45:16 evalchange: newState=true, cond=condetd8z3x, oldState=false
        06/27/19 13:45:16 evalchange: newState=true, cond=condesewo4s, oldState=false
        06/27/19 13:45:16 condchange: newState=true, cond=root, oldState=false
        06/27/19 13:45:16 evalchange: newState=true, cond=root, oldState=false
        06/27/19 13:45:16 sensorstate: state=true
        06/27/19 13:45:16 startscene: scene=root.true, sceneName=root.true
        06/27/19 13:45:16 runscene: scene=root.true, sceneName=root.true, group=1, notice=Starting scene group 1
        06/27/19 13:45:16 endscene: scene=root.true, sceneName=root.true
```
 

It worked for all except when powering down Harmony Control Between Dusk and Down in Home Mode. That still triggered the lights to go on.

OK, now, the reason for that seems to be that the test time forces all the eval times to have a common base–by freezing the operation of the RS to one moment in time, you’re also making the sequence condition true because it thinks the house mode change is happening contemporaneously–you’ve stopped time from flowing and everything is now happening in the same instant.

This surprisingly complex set, unfortunately, is going to need to be tested in real time only. Or, you can test by modifying your sunrise/sunset to date/time with real times inside and outside the current real time of day. Just don’t use test time.

Makes perfect sense. I’ll change the time limitations to test and report back. Then I’ll try it again tonight. Thank you so much for the “Hot Fix”!

I find it difficult to keep track of the entire branch, maybe the offer has already been tried …
And if you take out the TV in a separate module, put the latch and add another “House mode” to it?
While the mode does not change, do with the TV anything …

Seemed to work last night but I need to keep testing as I wasn’t first home after dusk but the lights were on.

2 posts were split to a new topic: [Moved] Detecting lock unlocks/user codes

My problem is that there are two people living here, so I don’t want to have a motion sensor that toggles the lights on and off everytime someone opens the door and leaves, or have people coming over for a visit…Is there a way I can have the lights turn on when I’m home, and remain that way until I switch it off myself, or maybe have it programmed to turn off at a specific time? VidMate.vin Apk9Apps.com

As per comment request, I only have a LIFX smart bulb currently.

Sure, you would just express this in the logic and actions. Either omit the action to turn the lights off and rely on a human to do it, or trigger at a specific time, or perhaps even have a “catch all” that turns them off at a certain time (e.g. 2am) unless you’re in “party mode” or turns them off if they’ve been on for 6/8/12 hours, … It’s really up to what you decide.