string devices.system.output1_state

From wiki.netio-products.com
Revision as of 10:10, 15 April 2017 by Jturon (talk | contribs)
Jump to navigation Jump to search

Returns the state of corresponding outlet. The property is read only! To change the state, use devices.system.SetOut().


state of outlet 1:

string devices.system.output1_state

state of outlet 2:

string devices.system.output2_state

state of outlet 3:

string devices.system.output3_state

state of outlet 4:

string devices.system.output4_state

Value

  • "on" when the outlet is on
  • "off" when the outlet is off

warning the value is not boolean!

if devices.system.output1_state==true then ...

The above condition always fails!

Usage

if devices.system.output1_state=="on" then
  log("Outlet 1 is on")
else
  log("Outlet 1 is off")
end

See also