Difference between revisions of "Function devices.system.SetOut()"

From wiki.netio-products.com
Jump to navigation Jump to search
(Založena nová stránka s textem „Changes state of specified outlet. Supported firmware: 2.3.2+ <i>nil</i> devices.system.SetOut{<u>config</u>} === Parameters === <i>table</i> <u>config<…“)
 
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
Changes state of specified outlet. Supported firmware: 2.3.2+
+
{{DISPLAYTITLE:function devices.system.SetOut()}}
  <i>nil</i> devices.system.SetOut{<u>config</u>}
+
Changes the state (on or off) of the outlet.
 +
  <i>nil</i> <b>devices.system.SetOut</b>(<i>table</i> <code>config</code>)
  
 
=== Parameters ===
 
=== Parameters ===
  <i>table</i> <u>config</u>
+
  <i>table</i> config{<code>output</code>, <code>value</code>}
* <i>number</i> <u>output</u> outlet to change (1 to 4)
+
* <i>number</i> <code>output</code> outlet to change (1 to 4)
* <i>boolean</i> <u>value</u> true = on, false = off
+
* <i>boolean</i> <code>value</code>
 +
** <tt>true</tt> = turn on
 +
** <tt>false</tt> = turn off
  
 
=== Return value ===
 
=== Return value ===
Line 13: Line 16:
 
  -- turns outlet No.1 on
 
  -- turns outlet No.1 on
 
  devices.system.SetOut{output=1,value=true}
 
  devices.system.SetOut{output=1,value=true}
 +
 +
=== See also ===
 +
* [[Function devices.system.ResetOut()|devices.system.ResetOut()]] to conveniently reset the state
  
 
__NOTOC__
 
__NOTOC__

Latest revision as of 19:28, 5 May 2017

Changes the state (on or off) of the outlet.

nil devices.system.SetOut(table config)

Parameters

table config{output, value}
  • number output outlet to change (1 to 4)
  • boolean value
    • true = turn on
    • false = turn off

Return value

nil

Usage

-- turns outlet No.1 on
devices.system.SetOut{output=1,value=true}

See also