Difference between revisions of "NETIO Specific Reference manual"

From wiki.netio-products.com
Jump to navigation Jump to search
(Script triggers)
(Script triggers)
Line 1: Line 1:
 
== Script triggers ==  
 
== Script triggers ==  
* [[Power measurements changed|Power measurements changed]]
+
* [[Power measurements changed|Power measurements changed]]<sup><code>3.3.1</code></sup>
* [[Global power characteristics changed|Global power characteristics changed]]
+
* [[Global power characteristics changed|Global power characteristics changed]]<sup><code>3.3.1</code></sup>
 
* [[Schedule has started or stopped|Schedule has started or stopped]]
 
* [[Schedule has started or stopped|Schedule has started or stopped]]
 
* [[Incoming URL API request|Incoming URL API request]]
 
* [[Incoming URL API request|Incoming URL API request]]
 
* [[System started up|System started up]]
 
* [[System started up|System started up]]
* [[Mqtt was disconnected from the broker|Mqtt was disconnected from the broker]]
+
* [[Mqtt was disconnected from the broker|Mqtt was disconnected from the broker]]<sup><code>3.3.1</code></sup>
* [[Mqtt received message on subscribed topic|Mqtt received message on subscribed topic]]
+
* [[Mqtt received message on subscribed topic|Mqtt received message on subscribed topic]]<sup><code>3.3.1</code></sup>
 
* [[System variables updated|System variables updated]]
 
* [[System variables updated|System variables updated]]
* [[Mqtt has connected to the broker|Mqtt has connected to the broker]]
+
* [[Mqtt has connected to the broker|Mqtt has connected to the broker]]<sup><code>3.3.1</code></sup>
 
* [[DO state changed|DO state changed]]
 
* [[DO state changed|DO state changed]]
  

Revision as of 19:44, 11 July 2019

Script triggers

Outlet Management

devices.system

Socket System Management

devices.system


Socket Communication

XML Processing 2.3.6

xml

  • function .escape() - escapes XML string to fit xml node contents
  • function .check() - tests if string is well-formed XML
  • function .parse() - parses XML string into XmlElement object

JSON Processing 3.3.1

json

  • function .decode() - parse json string into obj table
  • function .encode() - generate JSON string from table

(based on dkjson)

Modbus 3.3.1

Read functions

Write functions

MQTT 3.3.1

Standard Lua Functions

Miscellaneous

  • function log() - insert a record to the socket's event log
  • function logf() - insert a formated record (incl. numbers) to the socket's event log
  • function delay() - execute function with delay (seconds)
  • function milliDelay() - execute function with delay (milliseconds)
  • function toboolean() - converts any variable to boolean type