The Ubiquiti mPower series of smart outlets has been discontinued. As a replacement I purchased a Pro Switch from Digital Loggers.

Lua applications

Digitial Loggers have implemented a number of programs in Lua version 5.1.5:

[email protected]:~# ls /usr/bin/*.lua
/usr/bin/auth_server.lua                       /usr/bin/relay_adapter.lua
/usr/bin/autoping_server.lua                   /usr/bin/relay_modbus.lua
/usr/bin/default_route_manager.lua             /usr/bin/relay_mqtt.lua
/usr/bin/generic_state_server.lua              /usr/bin/relay_reset.lua
/usr/bin/i2c_state_mirror.lua                  /usr/bin/relay_snmp.lua
/usr/bin/meter_server.lua                      /usr/bin/relay_state_server.lua
/usr/bin/misc_config_server.lua                /usr/bin/relay_upnp.lua
/usr/bin/network_config_server.lua             /usr/bin/relay_web_ui.lua
/usr/bin/notification_server.lua               /usr/bin/renderer.lua
/usr/bin/platform_sysupgrade_notify_relay.lua  /usr/bin/scripting_server.lua

Based on the byte code header they are using version 5.1, which should be able to be decompiled using luadec, unfortunately building and running the tool I ran into an error, bad header in precompiled chunk. This may be related to the shebang or license in each file.

See also