Reactor Sensor - Trigger with repeated code

I have an IR remote sending codes to a Vera Plus. The codes are received through the KiraRT plugin. The codes trigger a Reactor Sensor and run LUUP code depending on the code received. I have adjusted the MaxUpdateRate and the MaxChangeRate and have the Reactor Sensor working well with one exception. If I send the same code a second or third time the Reactor Sensor won’t trigger. As soon as I send a different code the Reactor Sensor will trigger as expected. For example: when I send a “2” from the remote the Reactor Sensor will trigger and execute the LUUP code to toggle a light. If I send the same “2” to toggle the light again nothing happens. Please offer a suggestion to resolve this.
Thank you, Mark

How is your device trigger set up, The device trigger can be on updates

1 Like

@ElCid is spot on. To give you full instructions, though, we need you to post a Logic Summary (Tools tab of your ReactorSensor). Almost always needed, by the way, so get in the habit.

Wow that was quick. Thank both of you. I pushed #2 button several more times without triggering the Reactor Sensor. Here is the Logic Summery:

*************************************************** REACTOR LOGIC SUMMARY REPORT ***************************************************
   Version: 3.5 config 20017 cdata 20045 ui 20045 pluginDevice 190 LuaXP not loaded
    System: Vera version 1.7.4970 (7.31) on Sercomm G450 ID 36 (Vera Plus); loadtime 1584206514; systemReady 1584206560; Lua 5.1; JSON dkjson 1.2; UnsafeLua=nil
Local time: 2020-03-14T10:24:18-0700; DST=1; San Bernardino, California United States; formats %Y-%m-%d %H:%M:%S
House mode: plugin 1; system 1; tracking off
  Sun data: {}
  Geofence: not running
************************************************************************************************************************************
Pronto Hue Dimmer (#228)
    Version 20045.39 03/14/20 10:20:36
    Message/status: Not tripped
    Condition group "Reactor Sensor 11" (AND)  false as of 10:24:03 <root>
      &-F-service Hue & Bed Trigger 1 (226) urn:MDS_Construction1/Trigger2 <> -1 [2 => -1 at 10:24:03; F/F as of 10:24:03/10:24:03] <cond0>
    Activity root.true
        Run Lua:
             1: local dID = 100
             2: local dID2 = 226
             3: luup.call_action("urn:micasaverde-com:serviceId:HaDevice1","ToggleState",{},dID)
             4: luup.variable_set("urn:MDS_Construction1", "Trigger2", "-1", dID2)  -- Reset trigger
    Events
        2020-03-14 10:22:35: Reactor startup (Luup reload)
        2020-03-14 10:22:35: Starting (Luup Startup/Reload)
        2020-03-14 10:24:02: Device Hue & Bed Trigger 1 (#226) urn:MDS_Construction1/Trigger2 changed from "-1" to "2"
        2020-03-14 10:24:02: Condition cond0 test state changed from false to true
        2020-03-14 10:24:02: Condition cond0 evaluation state changed from false to true
        2020-03-14 10:24:02: Group Reactor Sensor 11 test state changed from false to true
        2020-03-14 10:24:02: Group Reactor Sensor 11 evaluation state changed from false to true
        2020-03-14 10:24:02: Launching Reactor Sensor 11.true activity
        2020-03-14 10:24:02: Launching scene/activity root.true
        2020-03-14 10:24:02: Starting "root.true" group 1
        2020-03-14 10:24:02: Device Hue & Bed Trigger 1 (#226) urn:MDS_Construction1/Trigger2 changed from "2" to "-1"
        2020-03-14 10:24:02: Activity "root.true" finished
        2020-03-14 10:24:02: Changing RS tripped state to true
        2020-03-14 10:24:03: Condition cond0 test state changed from true to false
        2020-03-14 10:24:03: Condition cond0 evaluation state changed from true to false
        2020-03-14 10:24:03: Group Reactor Sensor 11 test state changed from true to false
        2020-03-14 10:24:03: Group Reactor Sensor 11 evaluation state changed from true to false
        2020-03-14 10:24:03: Changing RS tripped state to false
    Devices
        Hue & Bed Trigger 1 (226) urn:schemas-upnp-org:device:BinaryLight:1 (3/0); parent 0; plugin -; mfg  model ; dev D_BinaryLight1.xml impl 
    Watches
        Device #228 Pronto Hue Dimmer service urn:toggledbits-com:serviceId:ReactorSensor variable TestHouseMode
        Device #226 Hue & Bed Trigger 1 service urn:MDS_Construction1 variable Trigger2
        Device #228 Pronto Hue Dimmer service urn:toggledbits-com:serviceId:ReactorSensor variable TestTime
        Device #228 Pronto Hue Dimmer service urn:toggledbits-com:serviceId:ReactorSensor variable cdata
    Special Configuration
        UseReactorScenes = 1
        LogEventsToFile = 0
        Retrigger = 0
        MaxUpdateRate = 500
        MaxChangeRate = 500
        FailOnTrouble = 0
        ContinuousTimer = 0

Thank you, Mark

OK. You can see the RS is running your actions, so the ReactorSensor is doing what it needs to do. But because the Run Lua reverts the Trigger value back to -1, it’s happening so fast that you can’t see it in the UI. But if you look at the “Events” section of what you posted, you can see it has run and done a full cycle. There’s no evidence of a second press here. You need to press the button again, then do a Logic Summary. Do not reload luup or restart the RS between.

Doing a “luup.call_action()” in a Run Lua block for the ToggleState is the hard way… you can use a Device Action for this. It should not make any difference. Just making note of the oddity.

Thanks again for the help. I pushed the “2” button 5 more times without the Reactor Sensor triggering. The logic summery looks unchanged (I didn’t post it). I don’t think the report changed because no trigger happened.

I pressed the “1” button and then the “2” button and the light toggled as expected twice (once for the “1” and once for the “2”.

I then pressed the “2” button 5 more times without triggering. Please see the report after the “1” button and then the “2” button pushed 6 times.

*************************************************** REACTOR LOGIC SUMMARY REPORT ***************************************************
   Version: 3.5 config 20017 cdata 20045 ui 20045 pluginDevice 190 LuaXP not loaded
    System: Vera version 1.7.4970 (7.31) on Sercomm G450 ID 36 (Vera Plus); loadtime 1584206514; systemReady 1584206560; Lua 5.1; JSON dkjson 1.2; UnsafeLua=nil
Local time: 2020-03-14T11:33:07-0700; DST=1; San Bernardino, California United States; formats %Y-%m-%d %H:%M:%S
House mode: plugin 1; system 1; tracking off
  Sun data: {}
  Geofence: not running
************************************************************************************************************************************
Pronto Hue Dimmer (#228)
    Version 20045.39 03/14/20 10:20:36
    Message/status: Not tripped
    Condition group "Reactor Sensor 11" (AND)  false as of 11:28:47 <root>
      &-F-service Hue & Bed Trigger 1 (226) urn:MDS_Construction1/Trigger2 <> -1 [2 => -1 at 11:28:47; F/F as of 11:28:47/11:28:47] <cond0>
    Activity root.true
        Run Lua:
             1: local dID = 100
             2: local dID2 = 226
             3: luup.call_action("urn:micasaverde-com:serviceId:HaDevice1","ToggleState",{},dID)
             4: luup.variable_set("urn:MDS_Construction1", "Trigger2", "-1", dID2)  -- Reset trigger
    Events
        2020-03-14 10:22:35: Reactor startup (Luup reload)
        2020-03-14 10:22:35: Starting (Luup Startup/Reload)
        2020-03-14 10:24:02: Device Hue & Bed Trigger 1 (#226) urn:MDS_Construction1/Trigger2 changed from "-1" to "2"
        2020-03-14 10:24:02: Condition cond0 test state changed from false to true
        2020-03-14 10:24:02: Condition cond0 evaluation state changed from false to true
        2020-03-14 10:24:02: Group Reactor Sensor 11 test state changed from false to true
        2020-03-14 10:24:02: Group Reactor Sensor 11 evaluation state changed from false to true
        2020-03-14 10:24:02: Launching Reactor Sensor 11.true activity
        2020-03-14 10:24:02: Launching scene/activity root.true
        2020-03-14 10:24:02: Starting "root.true" group 1
        2020-03-14 10:24:02: Device Hue & Bed Trigger 1 (#226) urn:MDS_Construction1/Trigger2 changed from "2" to "-1"
        2020-03-14 10:24:02: Activity "root.true" finished
        2020-03-14 10:24:02: Changing RS tripped state to true
        2020-03-14 10:24:03: Condition cond0 test state changed from true to false
        2020-03-14 10:24:03: Condition cond0 evaluation state changed from true to false
        2020-03-14 10:24:03: Group Reactor Sensor 11 test state changed from true to false
        2020-03-14 10:24:03: Group Reactor Sensor 11 evaluation state changed from true to false
        2020-03-14 10:24:03: Changing RS tripped state to false
        2020-03-14 11:28:43: Device Hue & Bed Trigger 1 (#226) urn:MDS_Construction1/Trigger2 changed from "-1" to "1"
        2020-03-14 11:28:43: Condition cond0 test state changed from false to true
        2020-03-14 11:28:43: Condition cond0 evaluation state changed from false to true
        2020-03-14 11:28:43: Group Reactor Sensor 11 test state changed from false to true
        2020-03-14 11:28:43: Group Reactor Sensor 11 evaluation state changed from false to true
        2020-03-14 11:28:43: Launching Reactor Sensor 11.true activity
        2020-03-14 11:28:43: Launching scene/activity root.true
        2020-03-14 11:28:43: Starting "root.true" group 1
        2020-03-14 11:28:43: Device Hue & Bed Trigger 1 (#226) urn:MDS_Construction1/Trigger2 changed from "1" to "-1"
        2020-03-14 11:28:43: Activity "root.true" finished
        2020-03-14 11:28:43: Changing RS tripped state to true
        2020-03-14 11:28:44: Condition cond0 test state changed from true to false
        2020-03-14 11:28:44: Condition cond0 evaluation state changed from true to false
        2020-03-14 11:28:44: Group Reactor Sensor 11 test state changed from true to false
        2020-03-14 11:28:44: Group Reactor Sensor 11 evaluation state changed from true to false
        2020-03-14 11:28:44: Changing RS tripped state to false
        2020-03-14 11:28:46: Device Hue & Bed Trigger 1 (#226) urn:MDS_Construction1/Trigger2 changed from "-1" to "2"
        2020-03-14 11:28:46: Condition cond0 test state changed from false to true
        2020-03-14 11:28:46: Condition cond0 evaluation state changed from false to true
        2020-03-14 11:28:46: Group Reactor Sensor 11 test state changed from false to true
        2020-03-14 11:28:46: Group Reactor Sensor 11 evaluation state changed from false to true
        2020-03-14 11:28:46: Launching Reactor Sensor 11.true activity
        2020-03-14 11:28:46: Launching scene/activity root.true
        2020-03-14 11:28:46: Starting "root.true" group 1
        2020-03-14 11:28:46: Device Hue & Bed Trigger 1 (#226) urn:MDS_Construction1/Trigger2 changed from "2" to "-1"
        2020-03-14 11:28:46: Activity "root.true" finished
        2020-03-14 11:28:46: Changing RS tripped state to true
        2020-03-14 11:28:47: Condition cond0 test state changed from true to false
        2020-03-14 11:28:47: Condition cond0 evaluation state changed from true to false
        2020-03-14 11:28:47: Group Reactor Sensor 11 test state changed from true to false
        2020-03-14 11:28:47: Group Reactor Sensor 11 evaluation state changed from true to false
        2020-03-14 11:28:47: Changing RS tripped state to false
    Devices
        Hue & Bed Trigger 1 (226) urn:schemas-upnp-org:device:BinaryLight:1 (3/0); parent 0; plugin -; mfg  model ; dev D_BinaryLight1.xml impl 
    Watches
        Device #228 Pronto Hue Dimmer service urn:toggledbits-com:serviceId:ReactorSensor variable TestHouseMode
        Device #226 Hue & Bed Trigger 1 service urn:MDS_Construction1 variable Trigger2
        Device #228 Pronto Hue Dimmer service urn:toggledbits-com:serviceId:ReactorSensor variable TestTime
        Device #228 Pronto Hue Dimmer service urn:toggledbits-com:serviceId:ReactorSensor variable cdata
    Special Configuration
        UseReactorScenes = 1
        LogEventsToFile = 0
        Retrigger = 0
        MaxUpdateRate = 500
        MaxChangeRate = 500
        FailOnTrouble = 0
        ContinuousTimer = 0

Thank you, Mark

OK. Sorry, it looks like the RS is doing what it needs to do, but the device itself may not be reacting correctly. If the device implementation (one of the Hue plugins?) is relying on other state variables in its own implementation to change in order to get to settings MDS_Construction1/Trigger2, that will fail, as Luup does not normally send events when a variable is set to the value it already has. Whatever is driving the calculation of that variable is where the problem likely lies.

Thank you for the explanation. I will need to find a work-around. I am always trying to do things about 20% beyond my pay grade. I really appreciate the help! :thinking:

Thank you, Mark

What you might do is take the device into the “Device Spy” in the Tools tab and look at all of the variable changes that send events. You may find other variables changing that you can use as additional input.

What’s driving this device (226)?

I created device 226 using D_BinaryLight1.xml using Apps/Develop Apps/Create Device. I have another Reactor that receives the code. That other Reactor sets the remote code received into Trigger1 on device 226. This might seam like a long way around but, this is just one small part of a somewhat complicated remote interface. The remote operates quite a few devices. I’m getting close to completing a complete rebuild of my system (with the help of a few replies from you, I might add :+1:).

Thank you, Mark

OK. Can you detail out all those moving parts… code blocks, screen shots where appropriate, etc.

Important thing you need to know, alluded to earlier: Vera does not fire a watch and write a device state variable when the variable already has the value being written. It looks like you are being bitten by this in the implementation that ultimately sets MDS_Construction1/Trigger2. There are certain variables that are an exception on some devices (scene controllers and locks in particular), and those variables are easily identified by the sl_ prefix. They get special handling. If we can take a look at what you’re doing, I might be able to suggest changes to get you over that hump.

I’m not sure if I could explain even it. I don’t want to take a lot of you time. Kinda of scared I will show my lack of knowledge as well :grimacing:.

I think I understand what you are explaining. Could I create a device with D_DoorLock1.xml and have the device re-trigger as explained above? Here is the Reactor Sensor code that receives the codes from the KiraRT plugin.

Thank you, Mark

local dID = {83,225,226,196}
-- 1 KiraBedroom, 2 KiraBedroomTrigger, 3 Trigger"Outlet", 4 HueControler
local build_service = {"urn:upnp-org:serviceId:VContainer1","urn:upnp-org:serviceId:Dimming1","urn:MDS_Construction1","dummy","dummy","urn:upnp-org:serviceId:SwitchPower1","urn:micasaverde-com:serviceId:HaDevice1"}
local build_variable = {"Variable1","Variable2","Variable3","Variable4","Variable5","Trigger1","Trigger2","Trigger3","Trigger4","Trigger5","BuildAmPm","BuildHour","BuildDigit"}
local build_value = ""  -- Declare build_value

local request = luup.variable_get("urn:dcineco-com:serviceId:KiraRT1","RxCode",dID[1])
--luup.variable_set("urn:dcineco-com:serviceId:KiraRT1","RxCode",-1,dID[1])  -- Reset trigger
local code_name = string.sub(request, 1,3)  -- Parce request name

if code_name == "Ser" then  -- Service string
  build_value =  tonumber(string.sub(request, 5))
  luup.variable_set("urn:MDS_Construction1", "Variable1",build_value, dID[2])
elseif code_name == "Var" then  -- Variable select
  build_value = tonumber(string.sub(request, 4))
  luup.variable_set("urn:MDS_Construction1", "Variable2",build_value, dID[2])
elseif code_name == "Dev" then  -- dID selected
  build_value = tonumber(string.sub(request, 4))
  luup.variable_set("urn:MDS_Construction1", "Variable3",build_value, dID[2])
elseif code_name == "Num" then  --  Number to send
  local pronto_service = luup.variable_get("urn:MDS_Construction1", "Variable1", dID[2])
  pronto_service = tonumber( pronto_service)
  local pronto_variable = luup.variable_get("urn:MDS_Construction1", "Variable2", dID[2])
  pronto_variable = tonumber(pronto_variable)
  local pronto_dev_no = luup.variable_get("urn:MDS_Construction1", "Variable3", dID[2])
  pronto_dev_no = tonumber(pronto_dev_no)
  local pronto_number = tonumber(string.sub(request, 4))
  luup.sleep(300)  --  Seams to help - consistant opperation
  luup.variable_set(build_service[pronto_service], build_variable[pronto_variable], pronto_number, dID[pronto_dev_no])
  --print(build_service[pronto_service], build_variable[pronto_variable], pronto_number, dID[pronto_dev_no])
end

Well… the cat is out of the bag! Hope this helps. Yup. I’m going beyond my pay grade.

Can you post the Logic Summary for that ReactorSensor?

Device type doesn’t matter. It’s all about the variable name.

I sent thr code sequence that sets the service string, variable name and device ID. Then I sent the “2” three times. Here is the logic summery:

*************************************************** REACTOR LOGIC SUMMARY REPORT ***************************************************
   Version: 3.5 config 20017 cdata 20045 ui 20045 pluginDevice 190 LuaXP not loaded
    System: Vera version 1.7.4970 (7.31) on Sercomm G450 ID 36 (Vera Plus); loadtime 1584206514; systemReady 1584206560; Lua 5.1; JSON dkjson 1.2; UnsafeLua=nil
Local time: 2020-03-14T14:50:49-0700; DST=1; San Bernardino, California United States; formats %Y-%m-%d %H:%M:%S
House mode: plugin 1; system 1; tracking off
  Sun data: {}
  Geofence: not running
************************************************************************************************************************************
Kira Bedroom (#225)
    Version 20045.5 03/14/20 11:58:43
    Message/status: Not tripped
    Condition group "Reactor Sensor 9" (AND)  false as of 14:50:33 <root>
      &-F-service Kira - Bedroom Only (83) urn:dcineco-com:serviceId:KiraRT1/RxCode update  [1584222632 => 1584222633 at 14:50:33; F/F as of 14:50:33/14:50:33] <cond0>
    Activity root.true
        Run Lua:
             1: local dID = {83,225,226,196}
             2: -- 1 KiraBedroom, 2 KiraBedroomTrigger, 3 Trigger"Outlet", 4 HueControler
             3: local build_service = {"urn:upnp-org:serviceId:VContainer1","urn:upnp-org:serviceId:Dimming1","urn:MDS_Construction1","dummy","dummy","urn:upnp-org:serviceId:SwitchPower1","urn:micasaverde-com:serviceId:HaDevice1"}
             4: local build_variable = {"Variable1","Variable2","Variable3","Variable4","Variable5","Trigger1","Trigger2","Trigger3","Trigger4","Trigger5","BuildAmPm","BuildHour","BuildDigit"}
             5: local build_value = ""  -- Declare build_value
             6: local request = luup.variable_get("urn:dcineco-com:serviceId:KiraRT1","RxCode",dID[1])
             7: --luup.variable_set("urn:dcineco-com:serviceId:KiraRT1","RxCode",-1,dID[1])  -- Reset trigger
             8: local code_name = string.sub(request, 1,3)  -- Parce request name
             9: if code_name == "Ser" then  -- Service string
            10:   build_value =  tonumber(string.sub(request, 5))
            11:   luup.variable_set("urn:MDS_Construction1", "Variable1",build_value, dID[2])
            12: elseif code_name == "Var" then  -- Variable select
            13:   build_value = tonumber(string.sub(request, 4))
            14:   luup.variable_set("urn:MDS_Construction1", "Variable2",build_value, dID[2])
            15: elseif code_name == "Dev" then  -- dID selected
            16:   build_value = tonumber(string.sub(request, 4))
            17:   luup.variable_set("urn:MDS_Construction1", "Variable3",build_value, dID[2])
            18: elseif code_name == "Num" then  --  Number to send
            19:   local pronto_service = luup.variable_get("urn:MDS_Construction1", "Variable1", dID[2])
            20:   pronto_service = tonumber( pronto_service)
            21:   local pronto_variable = luup.variable_get("urn:MDS_Construction1", "Variable2", dID[2])
            22:   pronto_variable = tonumber(pronto_variable)
            23:   local pronto_dev_no = luup.variable_get("urn:MDS_Construction1", "Variable3", dID[2])
            24:   pronto_dev_no = tonumber(pronto_dev_no)
            25:   local pronto_number = tonumber(string.sub(request, 4))
            26:   luup.sleep(300)  --  Seams to help - consistant opperation
            27:   luup.variable_set(build_service[pronto_service], build_variable[pronto_variable], pronto_number, dID[pronto_dev_no])
            28:   --print(build_service[pronto_service], build_variable[pronto_variable], pronto_number, dID[pronto_dev_no])
            29: end
    Events
        2020-03-14 14:50:20: Activity "root.true" finished
        2020-03-14 14:50:20: Changing RS tripped state to true
        2020-03-14 14:50:20: Condition cond0 test state changed from true to false
        2020-03-14 14:50:20: Condition cond0 evaluation state changed from true to false
        2020-03-14 14:50:20: Group Reactor Sensor 9 test state changed from true to false
        2020-03-14 14:50:20: Group Reactor Sensor 9 evaluation state changed from true to false
        2020-03-14 14:50:20: Changing RS tripped state to false
        2020-03-14 14:50:21: Device Kira - Bedroom Only (#83) urn:dcineco-com:serviceId:KiraRT1/RxCode changed from "Num1" to "Var7"
        2020-03-14 14:50:21: Condition cond0 test state changed from false to true
        2020-03-14 14:50:21: Condition cond0 evaluation state changed from false to true
        2020-03-14 14:50:21: Group Reactor Sensor 9 test state changed from false to true
        2020-03-14 14:50:21: Group Reactor Sensor 9 evaluation state changed from false to true
        2020-03-14 14:50:21: Launching Reactor Sensor 9.true activity
        2020-03-14 14:50:21: Launching scene/activity root.true
        2020-03-14 14:50:21: Starting "root.true" group 1
        2020-03-14 14:50:21: Activity "root.true" finished
        2020-03-14 14:50:21: Changing RS tripped state to true
        2020-03-14 14:50:21: Condition cond0 test state changed from true to false
        2020-03-14 14:50:21: Condition cond0 evaluation state changed from true to false
        2020-03-14 14:50:21: Group Reactor Sensor 9 test state changed from true to false
        2020-03-14 14:50:21: Group Reactor Sensor 9 evaluation state changed from true to false
        2020-03-14 14:50:21: Changing RS tripped state to false
        2020-03-14 14:50:22: Device Kira - Bedroom Only (#83) urn:dcineco-com:serviceId:KiraRT1/RxCode changed from "Var7" to "Dev3"
        2020-03-14 14:50:22: Condition cond0 test state changed from false to true
        2020-03-14 14:50:22: Condition cond0 evaluation state changed from false to true
        2020-03-14 14:50:22: Group Reactor Sensor 9 test state changed from false to true
        2020-03-14 14:50:22: Group Reactor Sensor 9 evaluation state changed from false to true
        2020-03-14 14:50:22: Launching Reactor Sensor 9.true activity
        2020-03-14 14:50:22: Launching scene/activity root.true
        2020-03-14 14:50:22: Starting "root.true" group 1
        2020-03-14 14:50:22: Activity "root.true" finished
        2020-03-14 14:50:22: Changing RS tripped state to true
        2020-03-14 14:50:22: Condition cond0 test state changed from true to false
        2020-03-14 14:50:22: Condition cond0 evaluation state changed from true to false
        2020-03-14 14:50:22: Group Reactor Sensor 9 test state changed from true to false
        2020-03-14 14:50:22: Group Reactor Sensor 9 evaluation state changed from true to false
        2020-03-14 14:50:22: Changing RS tripped state to false
        2020-03-14 14:50:23: Device Kira - Bedroom Only (#83) urn:dcineco-com:serviceId:KiraRT1/RxCode changed from "Dev3" to "Num2"
        2020-03-14 14:50:23: Condition cond0 test state changed from false to true
        2020-03-14 14:50:23: Condition cond0 evaluation state changed from false to true
        2020-03-14 14:50:23: Group Reactor Sensor 9 test state changed from false to true
        2020-03-14 14:50:23: Group Reactor Sensor 9 evaluation state changed from false to true
        2020-03-14 14:50:23: Launching Reactor Sensor 9.true activity
        2020-03-14 14:50:23: Launching scene/activity root.true
        2020-03-14 14:50:23: Starting "root.true" group 1
        2020-03-14 14:50:25: Activity "root.true" finished
        2020-03-14 14:50:25: Changing RS tripped state to true
        2020-03-14 14:50:25: Condition cond0 test state changed from true to false
        2020-03-14 14:50:25: Condition cond0 evaluation state changed from true to false
        2020-03-14 14:50:25: Group Reactor Sensor 9 test state changed from true to false
        2020-03-14 14:50:25: Group Reactor Sensor 9 evaluation state changed from true to false
        2020-03-14 14:50:25: Changing RS tripped state to false
        2020-03-14 14:50:29: Device Kira - Bedroom Only (#83) urn:dcineco-com:serviceId:KiraRT1/RxCode changed from "Num2" to ""
        2020-03-14 14:50:29: Condition cond0 test state changed from false to true
        2020-03-14 14:50:29: Condition cond0 evaluation state changed from false to true
        2020-03-14 14:50:29: Group Reactor Sensor 9 test state changed from false to true
        2020-03-14 14:50:29: Group Reactor Sensor 9 evaluation state changed from false to true
        2020-03-14 14:50:29: Launching Reactor Sensor 9.true activity
        2020-03-14 14:50:29: Launching scene/activity root.true
        2020-03-14 14:50:29: Starting "root.true" group 1
        2020-03-14 14:50:29: Activity "root.true" finished
        2020-03-14 14:50:29: Changing RS tripped state to true
        2020-03-14 14:50:29: Condition cond0 test state changed from true to false
        2020-03-14 14:50:29: Condition cond0 evaluation state changed from true to false
        2020-03-14 14:50:29: Group Reactor Sensor 9 test state changed from true to false
        2020-03-14 14:50:29: Group Reactor Sensor 9 evaluation state changed from true to false
        2020-03-14 14:50:29: Changing RS tripped state to false
        2020-03-14 14:50:29: Device Kira - Bedroom Only (#83) urn:dcineco-com:serviceId:KiraRT1/RxCode changed from "" to "Num2"
        2020-03-14 14:50:32: Device Kira - Bedroom Only (#83) urn:dcineco-com:serviceId:KiraRT1/RxCode changed from "Num2" to ""
        2020-03-14 14:50:32: Condition cond0 test state changed from false to true
        2020-03-14 14:50:32: Condition cond0 evaluation state changed from false to true
        2020-03-14 14:50:32: Group Reactor Sensor 9 test state changed from false to true
        2020-03-14 14:50:32: Group Reactor Sensor 9 evaluation state changed from false to true
        2020-03-14 14:50:32: Launching Reactor Sensor 9.true activity
        2020-03-14 14:50:32: Launching scene/activity root.true
        2020-03-14 14:50:32: Starting "root.true" group 1
        2020-03-14 14:50:32: Activity "root.true" finished
        2020-03-14 14:50:32: Changing RS tripped state to true
        2020-03-14 14:50:32: Device Kira - Bedroom Only (#83) urn:dcineco-com:serviceId:KiraRT1/RxCode changed from "" to "Num2"
        2020-03-14 14:50:32: Condition cond0 test state changed from true to false
        2020-03-14 14:50:32: Condition cond0 evaluation state changed from true to false
        2020-03-14 14:50:32: Group Reactor Sensor 9 test state changed from true to false
        2020-03-14 14:50:32: Group Reactor Sensor 9 evaluation state changed from true to false
        2020-03-14 14:50:32: Changing RS tripped state to false
        2020-03-14 14:50:33: Device Kira - Bedroom Only (#83) urn:dcineco-com:serviceId:KiraRT1/RxCode changed from "Num2" to ""
        2020-03-14 14:50:33: Condition cond0 test state changed from false to true
        2020-03-14 14:50:33: Condition cond0 evaluation state changed from false to true
        2020-03-14 14:50:33: Group Reactor Sensor 9 test state changed from false to true
        2020-03-14 14:50:33: Group Reactor Sensor 9 evaluation state changed from false to true
        2020-03-14 14:50:33: Launching Reactor Sensor 9.true activity
        2020-03-14 14:50:33: Launching scene/activity root.true
        2020-03-14 14:50:33: Starting "root.true" group 1
        2020-03-14 14:50:33: Activity "root.true" finished
        2020-03-14 14:50:33: Changing RS tripped state to true
        2020-03-14 14:50:33: Condition cond0 test state changed from true to false
        2020-03-14 14:50:33: Condition cond0 evaluation state changed from true to false
        2020-03-14 14:50:33: Group Reactor Sensor 9 test state changed from true to false
        2020-03-14 14:50:33: Group Reactor Sensor 9 evaluation state changed from true to false
        2020-03-14 14:50:33: Changing RS tripped state to false
        2020-03-14 14:50:33: Device Kira - Bedroom Only (#83) urn:dcineco-com:serviceId:KiraRT1/RxCode changed from "" to "Num2"
    Devices
        Kira - Bedroom Only (83) urn:schemas-dcineco-com:device:KiraRT:1 (0/-1); parent 0; plugin 8176; mfg  model ; dev D_KiraRT.xml impl I_KiraRT.xml
    Watches
        Device #225 Kira Bedroom service urn:toggledbits-com:serviceId:ReactorSensor variable TestHouseMode
        Device #225 Kira Bedroom service urn:toggledbits-com:serviceId:ReactorSensor variable TestTime
        Device #225 Kira Bedroom service urn:toggledbits-com:serviceId:ReactorSensor variable cdata
        Device #83 Kira - Bedroom Only service urn:dcineco-com:serviceId:KiraRT1 variable RxCode
    Special Configuration
        UseReactorScenes = 1
        LogEventsToFile = 0
        Retrigger = 0
        MaxUpdateRate = 500
        MaxChangeRate = 500
        FailOnTrouble = 0
        ContinuousTimer = 0

Thank you again, Mark

OK. Here’s what I was looking for. RxCode is not one of those variables that’s going to update when the same value gets written to it. So if that’s the received IR code, and it receives the same code twice, there won’t be an event for the second receive. That’s not a Reactor thing, you’ve structured your test correctly. It’s a Vera thing.

What I recommend you do here is that, like your other code, as soon as you react to the received code, destory/overwrite the value with null/empty data. So when the code comes in, it gets handled by the Run Lua action, and its last task is to wipe RxCode back to empty. That will cause the RS to retrigger itself, so be sure your Lua code recognizes the empty value you choose and ignores it (you could also change your condition to just respond to any value in RxCode not equal to your empty value rather than updates). Then when a second press/code arrives, it will overwrite the empty code and that will trigger an event from Vera to the watching ReactorSensor. Follow me?

You had the right idea, you’re just not doing it in enough places. It has to be done where the data first gets received, at least.

Thank you! I will work on later today or tomorrow and post my results.

Thank you, Mark

1 Like

When I cleared the KiraRT code after processing the intended received code, it caused some reliability problems. I am just sending a “dummy” code when necessary. When I complete the rebuild I will look for a better solution.

Thanks again,
Mark

Best Home Automation shopping experience. Shop at getvera!

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