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

  • DukeN - Friday, October 26, 2012 - link

    How dare these capitalists make a profit after paying for materials, assembly, hardware and software developers!
  • ganeshts - Friday, October 26, 2012 - link

    I don't want to come across as 'defending' the product, but the fact is that this is cheapest solution for the set of functions that it delivers. Have you taken a look at the Watts Up? Pro .NET solution which delivers similar functionality (electrical parameters measurement / network switching / cloud back-end) on one socket for almost double the cost?

    The solution that you put in requires plenty of work to make it 'Internet' enabled, and it is not a generic solution. What about energy history? There are plenty of features and the components needed to achieve those add up.

    Btw, where are you getting a good relay (rated for 15A) for less than $5? When I looked up the Schrack relay being used in the UFO, I found that each of them costs $6 by itself [ http://www.newark.com/te-connectivity-schrack/rt31... ]. 4 relays makes it ~$25 by itself.

    I stand by my concluding remarks: The UFO Power Center presents unbeatable value for the $130 MSRP / ~$115 Amazon selling price.
  • ZETAPIERRE - Friday, October 26, 2012 - link

    There's a big difference between hacking circuits together for a single use and creating a product that meets safety agency and provides ease of use. We too started with just a relay and worked our way up to a nice product.

    The price of this product is quite reasonable. We only have 2 relays, but still have a micro and WiFi. Ours will be around $99 once it goes to market.
  • jgarcows - Friday, October 26, 2012 - link

    "It is possible to set up port forwarding to access the unit via the default HTTP port. However, in the case that this port already forwards to another machine in the local network, the user has no way to access the UFO over the Internet without modifying the HTTP port of the other machine."

    There are many ways to get around this: forward a different port to the UFO, use a sub-domin to choose where which machine to forward the port to, have the machine currently receiving HTTP traffic check the request and forward appropriate requests to the UFO, etc...
  • cserwin - Friday, October 26, 2012 - link

    Wow, the manufacturer really needs to be commended for using 16A switches on all outlets.

    It makes sense that they limited the device to 15A overall - as I understand it that is the limit of common household outlets in the United States. If they permitted higher draws, it would likely trip circuit breakers or fuses.

    A lesser manufacturer would have designated 1 outlet as 'up to 10A' and the rest as 1.25A or some such nonsense.
  • ZETAPIERRE - Friday, October 26, 2012 - link

    Well, one is almost forced to use 16A relays in this application. Since there is no front end fuse, one needs to rely on the circuit breaker. So, that means that the traces on the board and the relay contacts need to survive long enough during a dead short for the circuit breaker to trip.

    My concern is if they plug this into, say a kitchen outlet that is at 20A.

    We do the same, each relay is rated for 16A, but we set the whole unit to 15A because of the one pigtail going to an outlet.
  • danjw - Friday, October 26, 2012 - link

    To solve the issue of the wall warts not seating properly, you can use a power strip saver. Usually these are just about 1' long extension cords. Then the warts can sit in the base and not have a problem. I use them on my power strips to deal with blocked sockets. That said, they really need a smaller design that will fit in better. I am a function first, form second kind of guy, but this still puts me off.
  • Henk Poley - Friday, October 26, 2012 - link

    Seems like a nice match with the DIY Kyoto Wattson :: http://www.diykyoto.com/uk/wattson
  • CharonPDX - Friday, October 26, 2012 - link

    This review has nothing to do with iOS. Did you really feel it necessary to bring up your slam on iOS in it? A simple "I had no iOS devices to test with" would have sufficed. Better would be to have a friend who has an iOS device come over and test it for you, or let you borrow their device to test with.

    I can understand making an iOS comment on an iOS review, or even an Android system review; but not this.
  • Tomislav R - Saturday, October 27, 2012 - link

    +1

Log in

Don't have an account? Sign up now