mFi Controller Setup, Usage and Open APIs

The mFi product family has multiple members. All of them are capable of stand-alone operation. However, in order to present a unified interface to all the members in a particular network and also to implement the rules and scenes where one member can alter the state of another, we have a mFi controller instance running on a PC or supported embedded platform.

In order to configure the device, a PC or a mobile device is made to connect to its Wi-Fi SSID (a unique one for each device that appears when it has not been set up to connect to another SSID).

The details of the network to which it will connect to is configured, after which it can get an address via DHCP. Each device runs a web server and can be accessed for further configuration by logging into it with the default username / password combination - ubnt / ubnt.

The setup process of the InWall Light Switch and Dimmer as well as the InWall Outlet is similar to the one described in our initial mPower review. The gallery below shows how the InWall Light Switch and Dimmer was configured. By default, the device comes up in the switch mode (suitable for lights and also other devices - up to 120V @ 15 A). Altering the unit to the dimmer mode reduces the maximum load rating (to 120V @ 5A). We can also see how altering the dimming slider affects the power consumption of the lights.

The latest firmware allows many standalone operation options such as scheduling, vacation mode, port mirroring (keeping states of the outlets in sync) and automatic power shutoff (with minimums for voltage and maximums for voltage and current).

The adoption of the controller is a feature we didn't discuss in our earlier review. The mFi controller software is available for many platforms. Even the Raspberry Pi can be used. In our setup, we chose to install the software on Ubuntu.

We already have the QNAP TS-853Pro in long term testing and decided to install Ubuntu in a VM using the Virtualization Station package. Following the steps given in the Ubiquiti forums, we were able to get our mFi controller up and running in a VM on the QNAP NAS.

The controller can be used to set up rules and scenes as well as control the member devices, as shown in the gallery below.

The prevalence of smartphones and tablets have made mobile apps an indispensable part of any automation ecosystem (in both residential and business settings). Only recently has there been renewed interest in this area from Ubiquiti Networks. The officially-sanctioned Android app is still in beta, but delivers basic functionality for the mPower and InWall devices. The mPort devices are not supported yet.

However, the controller also has a mobile interface accessible at: https://<IP>:6443/mobile for comprehensive access to the system. A shortcut to the URL on the home screen of the mobile device can act as a very good substitute for a mobile app.

The interface allows control, viewing of instantaneous power consumption, rules and scenes.

All mFi devices run a Linux kernel. SSH access is available. HTTP APIs are well documented. Note that the availability of WebSockets allows for event-driven reactions and avoids the overhead caused by polling when trying to integrate mFi devices into other automation systems. Password protection provides security. As long as one's Wi-Fi network is secure, there is no security risk - mFi doesn't need any ports to be made open to the Internet. The security aspect is easily understood even by novice users.

That brings us to the only downside (in addition to the requirement of a standalone PC or embedded platform capable of running the mFi controller) - there is no way to access the controller and/or devices from an external network. This is easily solved by port forwarding. For a more secure solution, a VPN is preferable.

mFi and WeMo Product Lines WeMo Setup and Usage
Comments Locked

41 Comments

View All Comments

  • bznotins - Tuesday, April 28, 2015 - link

    Yup, I can remotely reboot my home media server which locks-up from time to time. I can also use it to monitor power consumption of said server to see if there are any processes using up power unnecessarily.
  • CynicalPhred - Monday, April 27, 2015 - link

    I use one on my wife and my electric blankets. As the blankets come on at full setting when power is "restored" (not what I'd call a safety feature but hey, useful in my circumstances) it's great to be able to turn on the blankets 10 minutes before bed time using my phone.
  • olafgarten - Tuesday, April 28, 2015 - link

    Your wife needs an electrical power source?
  • MobiusPizza - Tuesday, April 28, 2015 - link

    No offense to OP, but can't resist :)
    http://edition.cnn.com/2009/WORLD/asiapcf/12/16/ja...
  • Lord of the Bored - Tuesday, April 28, 2015 - link

    I've wondered that since I was a child in a house full of X10 modules. I never saw that a remote-control outlet was particularly useful. Maybe before electronics had standby modes and wireless remote controls, where the device plugged in would just turn on when you fired the outlet, but... that would be a long time ago
  • CoryS - Tuesday, April 28, 2015 - link

    I use one at my wifes bathroom outlet which turns off after 15 minutes of inactivity in the room. She always forgets to turn off the curling iron. I also use one to control the compressor on a chest freezer with beer kegs in it (zigbee temp sensor inside)
  • name99 - Tuesday, April 28, 2015 - link

    I THINK the value is in things like
    - did I leave the iron plugged in?
    - did I switch off the space heater when I left the house?
    - did I leave that lamp on, so my burglar camera can see the living room?

    All of these are nice to have, but the existing offerings are all crazy expensive and kinda lousy in how they actually work. For example, with the space heater or lamp the usage model kinda sucks. The normal way to operate these is to use the switch on the heater or lamp, which is conveniently placed at usage level. But to get the benefit of remote control, you have to ALWAYS ignore that convenient switch and grope around on the floor to switch the power socket on or off.

    I don't know how to do better. But that doesn't change the fact that these existing usage models generally suck, and that doesn't look like it will change until the integration moves higher up stack (ie the LAMP has the internet knowledge, not the socket). Of course that's not going to work out well until the prices fall SUBSTANTIALLY and the specs unify to a single spec...
  • sluflyer06 - Tuesday, May 19, 2015 - link

    Easy. My 90lb espresso machine takes 30-40 minutes to stabilize and I needed a way to both set schedules to have it turn on before I wake up and to be able to turn it on remotely if I'm out and about and want to have it hot and ready when I get home. These units do not have any kind of smart interface or computerization and nor will they ever, they are very mechanical in nature so solutions like the Insight switch are amazing.
  • Craig69 - Wednesday, November 11, 2015 - link

    I don't consider this a solution for general home users. It takes some tech savvy just to get this thing to work correctly. (It will not work with the latest Java version for example. I have had issues with Firefox so use Chrome.) I implemented at home to fully understand its functionality and limitations but deploy it at commercial sites. It allows me to control equipment remotely and avoid a truck roll. One customer site visit will pay for four of these devices. The outlet being installed in the wall eliminates someone from easily unplugging the device. I turn off the indicator light so it looks like a normal outlet. Someone unplugs or turns off the computer and I know it immediately. I don't need to call someone to turn off the computer to force a reset if all else fails. I have never used the light controller so I can't comment on its functionality. Great device in a commercial environment.
  • V900 - Monday, April 27, 2015 - link

    Well ok, I guess lamps and light switches could be controlled through a "smart" outlet...

    But since an led light usually uses around 5 watt an hour, how many decades do you need to keep the light on before a 50$ light switch and 2-300$ total solution pays for itself?

Log in

Don't have an account? Sign up now