User Manual

50
-- Schedule: Always (in this setting is unused)
--
-- Save the script and restart NETIO4x device.
-- After restart, script starts blinking two selected power outputs.
-- To stop a running script, uncheck Enabled, Save changes and restart the
NETIO4x device again.
Configuration of the script:
------------Config Section 1------------
local output1 = 1
local output2 = 2
local interval = 1
---------End of Config Section 1---------
local state = 0
output1
Select the first NETIO 4x output to switch (possible values: 1,
2, 3 or 4)
output2
Select the second NETIO 4x output to switch (possible values:
1, 2, 3 or 4)
interval
Delay (in seconds) between the switching of the 1
st
and the
2
nd
output
state
Initial state of the variable controlling the flasher (0 -
switched off)
Definition of the function that actually switches the outputs (flashing):
local function switch()
state = not state
devices.system.SetOut{output=output1, value=state} --
devices.system.SetOut{output=output2, value=not state}
delay(interval,switch)
end
function switch()
Function definition/name
state = not state
Inverts the state
variable (if the state was 0, after this
command it will be 1 and vice versa)
devices.system.SetOut{output,value}
Sets the output state (socket ON/OFF)
delay Invokes the same function after a dela
y