Taking Advantage of the Open APIs

Visible Energy more than makes up for the absence of an Android app by fully opening up access to the unit and gathered statistics over HTTP. The APIs are simple to use, with the data being presented in either HTML or JSON format. For example, to determine the current status of the sockets, one could just send a HTTP request to the UFO Power Center of the form: http://{IP}/{SOCKET}/status.[xml|js] ; A XML request returns data in the XML format, and a JS request in the JSON format. The exact format and fields can be found in the developer documentation.

The APIs can be used to create custom apps / scripts / programs which display or change the following information:

  1. Device status, inclusive of network configuration
    1. Device type, name and firmware version
    2. Device uptime
    3. Current time and GMT offset
    4. Ethernet MAC address, DHCP state, IP configuration details
    5. Wi-FI signal strength
    6. Number of device restarts by type
    7. Software threads and memory status
  2. Real-Time-Clock status
  3. LED light status and control (brightness as well as power consumption level corresponding to the yellow and red colours which are set to 50W and 100W by default)
  4. Device and socket names
  5. Socket control
    1. State and status information
    2. Relay activation
    3. One shot / weekly schedule timer setup
    4. Timer overriding
    5. Role status
  6. Instantaneous power reading on a device as well as per-socket basis
  7. Total energy consumption (recorded at 5-minute intervals) for a pre-defined time period on a device as well as per-socket basis (Records are guaranteed to be available for each socket at least for two months, sometimes more)
  8. Life-time meter (device as well as per-socket)
  9. Memory log of raw consumption data

The purpose of this section is to not simply list out the various aspects accessible to developers through the open APIs. In the remainder of this section, I will discuss how the open APIs have been put to practical use by me and my colleagues at AnandTech.

As tech reviewers, power consumption of various devices is one aspect on which we spend a lot of time and effort. In the initial days, I used a Kill A Watt meter for this purpose. While it could deliver a rough idea of the power consumption, it wasn’t possible to record the values over a given time interval. In order to overcome this shortcoming, I shifted to using a Watts Up? Pro meter. By connecting it through USB to a PC and using the bundled software, it became possible to gather the instantaneous power consumption values over a particular time interval. Anand used to utilize the Extech True RMS Power Analyzer Datalogger for power measurement purposes. All the above devices provide power measurement with a 0.1 W resolution only. In addition, the Extech meter has a RS232 interface to the PC and the Watts Up? Pro has a USB interface, and both of them use custom software to track and download data from them.

Given the above aspects, all of us at AnandTech were looking for a power meter which could provide more accurate power measurement and also be easier to use / automate. One of my first tasks after putting the UFO Power Center through the paces was to use the provided power measurement APIs to solve this problem. I developed a custom Perl script to interact with the UFO Power Center (the script can actually interact with any Visible Energy device in the local network) and record the power consumed by a selected socket.

The power consumption recording is started and stopped by the user from within the program (this makes it useful to record the power consumed by a device, say, when it is running some particular sequence) and exported as a CSV file. After I developed this script, Anand went out and purchased a UFO Power Center of his own and started using the script for his reviews too. For example, all the power consumption graphs in the Vishera review were generated using Microsoft Excel and the CSV files exported by the Perl script.

Sample Graph Created using Values Exported from the UFO Power Center using the Open APIs

The power numbers reported by the UFO Power Center have a 0.01W resolution. In addition, it is possible to track the power consumed by all the four sockets simultaneously. In effect, the device can replace 4 Kill A Watts or 4 Watts Up? Pro meters and can be polled wirelessly for power measurement purposes. Similar to the script I created above, developers can utilize the provided APIs to come up with other interesting applications.

Functionality and Cloud Back-End Concluding Remarks - Unbeatable Value
Comments Locked

35 Comments

View All Comments

  • Mr Perfect - Friday, October 26, 2012 - link

    I'd like to see what Anandtech can find in the way of hardwired rackmountable options too.

    We've been looking for such a device, and so far all we've got is a non-rackable device that doesn't seem to be designed to work as part of a system. There are three of them so far with plans for more, but they can't tie back to a central server for management, each unit needs to be addressed individually through a web interface. Does anyone know of hardwired, rackmountable PDUs that can be centrally controlled?
  • ganeshts - Friday, October 26, 2012 - link

    This one is 'rackmountable' in the sense that it can be vertically mounted along side rail:

    http://www.digital-loggers.com/vpdu.html

    No power measurement / energy management features, though.
  • Mr Perfect - Wednesday, October 31, 2012 - link

    Thanks. They've got a couple interesting things. Our devices are PoE, so maybe just getting their rackmountable PoE PDU/injector would work better then putting the existing PoE injectors on a separate PDU.
  • Rick83 - Friday, October 26, 2012 - link

    Looks to me like this is a brilliant use case for PoE.
    That way at least you only have one wasteful transformer in your home, and it can also feed your phone, attached switches, APs and other small light/switch-gadgets and sensors.

    PoE should be obligatory for any IP-based home automation system.
  • Mr Perfect - Friday, October 26, 2012 - link

    It could work, but would be kind of limited. PoE can deliver 25.5 watts of power, so if the UFO uses 2.2 watts all by itself, you've only got about 23 watts to power your devices. Also, the PoE delivers as DC. You'd either need to throw in a DC to AC converter, or just make it a USB charger.
  • taltamir - Friday, October 26, 2012 - link

    What is a PoE?
  • ganeshts - Friday, October 26, 2012 - link

    PoE = Power Over Ethernet

    PoE makes sense for non-Wi-Fi IP cameras and other such devices. Not sure it makes sense for this type of product.
  • ZETAPIERRE - Friday, October 26, 2012 - link

    PoE would be an RJ45 cable. Since this plugs into an AC outlet already, there's no need to bring power via the Ethernet cable. WiFi eliminates the need for the Ethernet cable.
  • ZETAPIERRE - Friday, October 26, 2012 - link

    We have units that do the same thing with hardwired Ethernet. The problem I found is that I don't have Ethernet near every outlet, like behind the refrigerator. So, we re-designed ours to use WiFi and now we can place them everywhere. We can also use them to control the lights in the house during Xmas, they can all go on and off at the same time.
  • Shadowmaster625 - Friday, October 26, 2012 - link

    This is an absolute disgrace. There is no way this is worth $130, that is just pure madness. I built my own relay board that takes usb power from my tv and controls a relay to power my home theater receiver. So when my pc goes to sleep, my tv goes to sleep with it, and since its usb port shuts off, it turns off the receiver too. Simple $5 solution.

    I bought a serial (RS232) AC current sensor off ebay for $13 and built my own power usage logger. I've used it to profile my pc's. Yet another <$20 solution. Taking some overpriced gimmick and slapping wifi on it is just blasphemy.

Log in

Don't have an account? Sign up now