Energy conversion

#1680

Using this I successfully build an EnderIO gateway for the new api:
![screenshot from 2014-05-04 17 08 03](https://cloud.githubusercontent.com/assets/1416030/2872589/e01ac138-d36b-11e3-8415-e82a0c19780a.png)