MiOS LuuP — Smart Applications And Devices Made Easy.
MiOS is the inventor of LuuP, an innovative, versatile and powerful software engine that can wirelessly manage a broad spectrum of electronic devices. LuuP (Lua-UPnP) gets its name by incorporating Lua, a popular scripting language, and UPnP, the industry standard for device control. LuuP translates all the various protocols used in today’s electronics into standard UPnP.
MiOS’ LuuP opens a limitless world of control possibilities that includes wireless ecosystems such as Z-Wave, ZigBee, Insteon, KNX/EIB and other home protocols; infrared remote control (such as used in TVs, set-top boxes, etc.), serial devices (as used in alarm panels and custom A/V gear, etc.) and Ethernet devices (such as IP cameras) — not to mention your own custom devices and applications. All these technologies are translated by LuuP into industry standard UPnP, and can be controlled by any UPnP Control Point.
It Starts With UPnP
UPnP (Universal Plug and Play) is the de facto industry standard protocol for controlling electronic devices. Microsoft, Intel, Sony, Cisco, Panasonic, Samsung, General Electric and virtually every major consumer electronics company worldwide is a member of the UPnP Forum, which creates free, open standards for controlling devices. For more information on UPnP, see www.upnp.org.
Many UPnP control points are in existence already, which are basically remote controls for UPnP devices. They run on web pads, PDA’s, set top boxes, cell phones, media center PC’s, etc., and they can control UPnP devices. There are already industry standard UPnP protocols for home automation devices, too, such as UPnP light switches, thermostats, etc. These standards have been ratified by all the major CE companies, and they allow those devices to be controlled by any of the UPnP control points on the market.
Despite this, there are virtually no home automation devices available which conform to the UPnP standard, because all the current manufacturers instead use various proprietary standards, like Z-Wave, Zigbee, Insteon, X10, etc., mainly because UPnP only runs on TCP/IP networks (aka Ethernet, LAN, Internet), which made it impractical for home automation — until MiOS’ LuuP engine came along.
Then We Add Lua
Our LuuP engine embeds Lua, an easy to use, fast, lightweight language commonly used for scripting and macros and with a solidly established user and knowledge base. Lua is quite popular in video games to allow gamers to write custom scripts to expand the game’s functionality. MiOS’s LuuP engine handles all the complexities of the smarthome system. All the difficult things relating to the UPnP interface, socket handling, job queuing and prioritization, multi-threading, serial I/O, etc., are provided by the Luup engine. There are many documents and guides to Lua; the official Lua reference is at http://www.lua.org.
Any Lua code can use:
- Standard Lua libraries, described on the lua.org website
- Common Lua extension modules like LuaSocket, LuaExpat and LuaSec;
- And of course, the LuuP API, described here.
Working With MiOS LuuP
If you want to create a specific smart home application with MiOS, you simply define the actions you want your device to implement using our web-based tool. This simple tool gives you fill-in-the-blanks capabilities to add a Lua script to provide the functionality. The Luup engine provides the hooks and API calls for your Lua scripts to handle all the complex parts. This allows you to develop sophisticated smart home applications very quickly. Lua is very minimalistic in the sense of having very few special constructs, but they’re carefully chosen for its wide generality, so Lua has a wide expressive power.
The LuuP Lua API
The API exposed by LuuP to Lua code consists of:
- Global variables: these hold most of the system status: geographic situation, list of devices, rooms, scenes and remotes.
- System functions: manages the log, task display, timers, signal failures.
- Device functions: to inspect device capabilities, to get/set/watch state variables, to start actions.
- Child Device functions: creating child devices can make it easier to manage devices with multiple functions.
- I/O functions: use these to write data on the configured port. For input, it’s usually better to set an ‘incoming’ function to be called when there’s data.
To learn more about the MiOS LuuP API, click here.