Reactor Function to set lights to 100%

Hi All,

I have a bug in my logic that I cannot seem to figure out.
I have created a condition that checks is a dimmable light is set from 1 to 99. When this happens, I would like to have the light move to 100 at all times. (Got this working just fine) but when I turn the light off is where I have trouble. If I use the Vera app, not issues turning off the light, but when the switch is pressed, it always keeps the light on and I cannot turn it off. (Based on the Condition I set)

My question is, how can I have the light turn on to 100 and then when I press the button to turn off the switch, have the light turn off without running the Condition again?

INSTRUCTIONS: When pasting this report into the Vera Community forums, please include ALL lines below this one. The next and last lines will ensure proper formatting and must not be removed!

*************************************************** REACTOR LOGIC SUMMARY REPORT ***************************************************
   Version: 3.4 config 19226 cdata 19082 ui 19237 pluginDevice 354
    System: Vera version 1.7.4453 on Sercomm G450; loadtime 1577858407; systemReady 1577858428; Lua 5.1; JSON dkjson 1.2
Local time: 2020-01-01T14:42:23-0600; DST=0;
House mode: plugin 1; system 1; tracking off
  Sun data: { "stamp": 2020001, "civdawn": 1577883895, "nautdawn": 1577882047, "sunset": 1577921587, "nautdusk": 1577925072, "latitude": 32.9642, "astrodusk": 1577926877, "longitude": -97.3578, "civdusk": 1577923224, "astrodawn": 1577880242, "sunrise": 1577885532 }
  Geofence: not running
====================================================================================================================================
H
ouse Modes (#422)
    Version 19082.94 01/01/20 14:41:26
    Message/status: Not tripped
    Variable/expressions
       0: ModeState                 [last ""(string)] (exported)
       1: DoorLockMode              [last ""(string)] (exported)
    Condition group "Operations" (NUL)  false as of 12-20.12:46:17 <root>
      Z-F-group "GuestMode" (NUL)  false as of 12-20.15:11:31 <grplupoju0>
      |     Z-F-service (self) (-1) urn:toggledbits-com:serviceId:ReactorValues/ModeState = GuestMode [guestmode =>  at 14:40:07; F/F as of 14:40:07/14:40:07] <condluvkk1d>
      |     Z-F-group "Kitchen Table No Dimming" (AND)  false as of 14:39:44 <grpluv7flk>
      |     |     &-F-service Kitchen Table Lights (341) urn:upnp-org:serviceId:Dimming1/LoadLevelStatus bet 1,99 after condluvkk1d [61 => 100 at 14:39:29; F/F as of 14:39:29/14:39:44] <condluv7sj8>
      |     |     &-T-service Kitchen Table Lights (341) urn:upnp-org:serviceId:SwitchPower1/Status = 1 [0 => 1 at 14:35:33; T/T as of 14:35:33/14:35:33] <condluv89ff>
      Z-T-group "HomeMode" (OR)  TRUE as of 12-27.19:06:09 <grpluxjst0>
      |     |-?-comment "Back to Normal" <condluxk0t1>
      |     |-F-service (self) (-1) urn:toggledbits-com:serviceId:ReactorValues/ModeState =  after grplupoju0 [guestmode =>  at 14:40:07; T/F as of 14:40:07/12-20.21:50:32] <condluxqyhv>
      |     |-F-service (self) (-1) urn:toggledbits-com:serviceId:ReactorValues/ModeState =  after condluoirxj [guestmode =>  at 14:40:07; T/F as of 14:40:07/12-20.21:52:16] <condlv96tf4>
    Activity grpluv7flk.true
        Device Kitchen Table Lights (341) action urn:upnp-org:serviceId:Dimming1/SetLoadLevelTarget( newLoadlevelTarget="100" )
    Events
        01/01/20 14:35:49 devicewatch: device=341, old="1", name=Kitchen Table Lights, var=urn:upnp-org:serviceId:Dimming1/LoadLevelStatus, new="100"
        01/01/20 14:35:49 condchange: newState=false, cond=grpluv7flk, oldState=true
        01/01/20 14:35:49 evalchange: newState=false, cond=grpluv7flk, oldState=true
        01/01/20 14:35:51 devicewatch: device=341, old="100", name=Kitchen Table Lights, var=urn:upnp-org:serviceId:Dimming1/LoadLevelStatus, new="75"
        01/01/20 14:35:51 condchange: newState=true, cond=grpluv7flk, oldState=false
        01/01/20 14:35:51 evalchange: newState=true, cond=grpluv7flk, oldState=false
        01/01/20 14:35:51 startscene: scene=grpluv7flk.true, sceneName=grpluv7flk.true
        01/01/20 14:35:51 runscene: scene=grpluv7flk.true, sceneName=grpluv7flk.true, group=1, notice=Starting scene group 1
        01/01/20 14:35:51 endscene: scene=grpluv7flk.true, sceneName=grpluv7flk.true
        01/01/20 14:35:51 devicewatch: device=341, old="75", name=Kitchen Table Lights, var=urn:upnp-org:serviceId:Dimming1/LoadLevelStatus, new="100"
        01/01/20 14:35:51 condchange: newState=false, cond=grpluv7flk, oldState=true
        01/01/20 14:35:51 evalchange: newState=false, cond=grpluv7flk, oldState=true
    Devices
        ZWave (1) urn:schemas-micasaverde-com:device:ZWaveNetwork:1 (19/0); parent 0; plugin -
        Kitchen Table Lights (341) urn:schemas-upnp-org:device:DimmableLight:1 (2/0); parent 1; plugin -

You can probably simplify just by testing LoadLevelTarget (rather than LoadLevelStatus) between 1,99; remove the (plain) Status test altogether. Testing LoadLevelTarget should be all you need.

You’ve got some after restrictions mixed in there, too, though, and it’s not clear to me what your intent is there, but I’d remove them and focus on getting one element working at a time.

The “Kitchen Table No DImming” group being inside the “GuestMode” group also doesn’t seem right…

And to refer to the value of a variable in the ModeState test, you need to write the value as {GuestMode} not GuestMode… you’re getting a string value “guestmode” rather than the value of the variable without telling Reactor that the value is a variable reference.

Thanks @rigpapa. So to answer your questions here is what I was trying to accomplish with the logic.

  1. Grouping inside of GuestMode was to keep from having to add
    Z-F-service (self) (-1) urn:toggledbits-com:serviceId:ReactorValues/ModeState = GuestMode [guestmode => at 14:40:07; F/F as of 14:40:07/14:40:07]
    to each condition.

The reason I added Device State = GuestMode under Nul Guest Mode Condition is to allow for this to be selected as a Restriction “Condition must occur after (self) ModeState equals “GuestMode””

For some reason, even with all of this logic, the switch is doing something odd when you turn it off at the wall. I am trying Pulse to see if that helps, but for the life of me, I cannot figure out how the switch is turning off at the wall differently than with Vera Web or Alexa.

My goal here is to create a mode where the lights go to 100 when set to 1-99 and then can be turned off at the switch. I need to figure out why when I push the off button on the switch, the lights turn back on and cannot be shut off.

Still fiddling around to see if I can find a combination that works.

At my dacha, the TKB dimmers include LED lamps)) My working option…


1 Like