Had a few spare moments, and was bored, so I modified this LUA code to do what you want. In the following code, 29 is the device number for the first device (plug/module), and 30 is the device number for the second device. You would need to substitute your actual device number.
Scene 1 LUA code (use a timer to envoke scene when you want the wave action to start):
function RunLeft(stuff)
if (sWave == "1") then
luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="1" },29)
luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="0" },30)
luup.call_timer("RunRight", 1, "20", "", "")
end
end
function RunRight(stuff)
if (sWave == "1") then
luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="0" },29)
luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="1" },30)
luup.call_timer("RunLeft", 1, "20", "", "")
end
end
sWave = "1"
luup.call_timer("RunLeft", 1, "1", "", "")
Scene 2 LUA code (use a timer to envoke scene when you want the wave action to cease):
sWave = "0"
luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="0" },29)
luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="0" },30)