Here is a link for LuaTest:
https://community.getvera.com/t/luatest-a-tool-for-testing-scene-lua-code/180205
I was previously using a test condition added to a existing Reactor. I created a new Reactor and the time to complete the actions was reduced substantially to 41ms. I am using the LuaTest to change a variable in the Shade1 vairable “ShadePreset” with the commands:
local dID = 212
local new_preset = 6
luup.variable_set(“urn:upnp-org:serviceId:Dimming1”,“ShadePreset”,new_preset,dID)
*************************************************** REACTOR LOGIC SUMMARY REPORT ***************************************************
Version: 3.4 config 19226 cdata 19082 ui 19237 pluginDevice 190
System: Vera version 1.7.4453 on Sercomm G450; loadtime 1580413805; systemReady 1580413834; Lua 5.1; JSON dkjson 1.2
Local time: 2020-01-30T12:33:05-0800; DST=0; San Bernardino, California United States
House mode: plugin 1; system 1; tracking off
Sun data:
Geofence: not running
====================================================================================================================================
Trigger 1 (#215)
Version 19082.5 01/30/20 12:30:07
Message/status: Not tripped
Condition group "Reactor Sensor 2" (AND) false as of 12:31:27 <root>
&-F-group "Shades" (AND) false as of 12:31:27 <grpnhefe0b>
| &-F-service Shade 1 (212) urn:upnp-org:serviceId:Dimming1/ShadePreset update [1580416233 => 1580416287 at 12:31:27; F/F as of 12:31:27/12:31:27] <condnhefvl6>
Activity root.true
Run Lua:
1: local dID = 46
2: local P_light = luup.variable_get("urn:upnp-org:serviceId:SwitchPower1", "Status", dID)
3: luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{newTargetValue = (tonumber(P_light)+1) % 2}, dID)
Events
01/30/20 12:30:07 evalchange: newState=true, cond=grpnhefe0b
01/30/20 12:30:07 condchange: newState=true, cond=root, oldState=false
01/30/20 12:30:07 evalchange: newState=true, cond=root, oldState=false
01/30/20 12:30:07 sensorstate: state=true
01/30/20 12:30:07 startscene: scene=root.true, sceneName=root.true
01/30/20 12:30:07 runscene: scene=root.true, sceneName=root.true, group=1, notice=Starting scene group 1
01/30/20 12:30:07 endscene: scene=root.true, sceneName=root.true
01/30/20 12:30:07 condchange: newState=false, cond=condnhefvl6, oldState=true
01/30/20 12:30:07 evalchange: newState=false, cond=condnhefvl6, oldState=true
01/30/20 12:30:07 condchange: newState=false, cond=grpnhefe0b, oldState=true
01/30/20 12:30:07 evalchange: newState=false, cond=grpnhefe0b, oldState=true
01/30/20 12:30:07 condchange: newState=false, cond=root, oldState=true
01/30/20 12:30:07 evalchange: newState=false, cond=root, oldState=true
01/30/20 12:30:07 sensorstate: state=false
01/30/20 12:30:33 devicewatch: device=212, old="6", name=Shade 1, var=urn:upnp-org:serviceId:Dimming1/ShadePreset, new="9"
01/30/20 12:30:33 condchange: newState=true, cond=condnhefvl6, oldState=false
01/30/20 12:30:33 evalchange: newState=true, cond=condnhefvl6, oldState=false
01/30/20 12:30:33 condchange: newState=true, cond=grpnhefe0b, oldState=false
01/30/20 12:30:33 evalchange: newState=true, cond=grpnhefe0b, oldState=false
01/30/20 12:30:33 condchange: newState=true, cond=root, oldState=false
01/30/20 12:30:33 evalchange: newState=true, cond=root, oldState=false
01/30/20 12:30:33 sensorstate: state=true
01/30/20 12:30:33 startscene: scene=root.true, sceneName=root.true
01/30/20 12:30:33 runscene: scene=root.true, sceneName=root.true, group=1, notice=Starting scene group 1
01/30/20 12:30:33 endscene: scene=root.true, sceneName=root.true
01/30/20 12:30:33 condchange: newState=false, cond=condnhefvl6, oldState=true
01/30/20 12:30:33 evalchange: newState=false, cond=condnhefvl6, oldState=true
01/30/20 12:30:33 condchange: newState=false, cond=grpnhefe0b, oldState=true
01/30/20 12:30:33 evalchange: newState=false, cond=grpnhefe0b, oldState=true
01/30/20 12:30:33 condchange: newState=false, cond=root, oldState=true
01/30/20 12:30:33 evalchange: newState=false, cond=root, oldState=true
01/30/20 12:30:33 sensorstate: state=false
01/30/20 12:31:27 devicewatch: device=212, old="9", name=Shade 1, var=urn:upnp-org:serviceId:Dimming1/ShadePreset, new="8"
01/30/20 12:31:27 condchange: newState=true, cond=condnhefvl6, oldState=false
01/30/20 12:31:27 evalchange: newState=true, cond=condnhefvl6, oldState=false
01/30/20 12:31:27 condchange: newState=true, cond=grpnhefe0b, oldState=false
01/30/20 12:31:27 evalchange: newState=true, cond=grpnhefe0b, oldState=false
01/30/20 12:31:27 condchange: newState=true, cond=root, oldState=false
01/30/20 12:31:27 evalchange: newState=true, cond=root, oldState=false
01/30/20 12:31:27 sensorstate: state=true
01/30/20 12:31:27 startscene: scene=root.true, sceneName=root.true
01/30/20 12:31:27 runscene: scene=root.true, sceneName=root.true, group=1, notice=Starting scene group 1
01/30/20 12:31:27 endscene: scene=root.true, sceneName=root.true
01/30/20 12:31:27 condchange: newState=false, cond=condnhefvl6, oldState=true
01/30/20 12:31:27 evalchange: newState=false, cond=condnhefvl6, oldState=true
01/30/20 12:31:27 condchange: newState=false, cond=grpnhefe0b, oldState=true
01/30/20 12:31:27 evalchange: newState=false, cond=grpnhefe0b, oldState=true
01/30/20 12:31:27 condchange: newState=false, cond=root, oldState=true
01/30/20 12:31:27 evalchange: newState=false, cond=root, oldState=true
01/30/20 12:31:27 sensorstate: state=false
Devices
Lutron RadioRA2 Gateway (211) urn:schemas-micasaverde-com:device:LutronRA2Telnet:1 (0/-1); parent 0; plugin 5096
Shade 1 (212) urn:schemas-micasaverde-com:device:WindowCovering:1 (8/0); parent 211; plugin -
Thank you, Mark