NETIO power sockets are programmable by custom Lua scripts

NETIO 4x smart power sockets can be programmed using Lua scripts. This gives the user a powerful tool for custom solutions.
User scripts run separately from the system core and cannot damage it.

Questions about NETIO and LUA scripts

  • Example scripts written in Lua are available in  NETIO ANxx (Application Notes).
  • NETIO Wiki describes all Lua functions supported by NETIO smart sockets.
LUA scripting

Power of Lua in NETIO smart sockets

  • Lua scripts are entered via the WEB interface of NETIO 4x sockets. There is nothing to install, no permanently running computers.  The scripts are executed directly in the NETIO 4x smart sockets devices.
  • Several custom Lua scripts can run in parallel in the NETIO 4x smart socket device.
  • A Lua script can be started by switching on a socket, upon starting the NETIO smart socket device, by calling a CGI script (accessing a webpage), or periodically (using a timer).
  • An advanced timer with complex conditions can be easily written as a Lua script.
  • A Lua script can send PING requests and receive responses. This can be used to create a very sophisticated watchdog.
  • A Lua script can continuously measure the consumption at each socket (NETIO 4All only) and send an e-mail if the current is too low or too high.
  • A Lua script can process .xml files retrieved from any IP address. This can be used, for example, to read the daily precipitation rate in millimeters at the current location (given by the postcode) from weather.com and then switch on the watering pump for a precisely timed period to give your flowers the ideal amount of moisture.
  • A periodically invoked Lua script can read the temperature from an IP thermometer over SNMP or XML. Based on the temperature, it subsequently switches on or off a backup air-conditioning unit.
  • Lua scripts can access binary data sent and received over the serial port of NETIO 4C. This makes it easy to switch outlets on and off, for instance according to a value from a connected sensor.
  • Lua scripts running in parallel can exchange parameters in global variables.
  • Even teenagers in your neighborhood can program in Lua. Lua is the language that Blizzard Entertainment uses for scripting its best-selling World Of Warcraft online game, because the language is easy to use even for non-programmers.

Do not forget:

Do you have any questions?

For device testing use name/password demo/demo