I found a really nice looking service called emoncms.org to visualise energy consumption measured in Vera. It’s free and open source. You can use emoncms.org or setup your own server at home. You can also use it to log arbitrary numerical variables in vera, such as battery level, light, temperature etc. You can create custom dashboards and export to CSV.
Here is how I did it:
[size=18pt]Setup Vera (instructions for UI7)[/size]
[ul][li]Register for an account at emoncms.org[/li]
[li]Look up your write API key on your profile page[/li]
[li]Download the attached EnergyMonitor.lua[/li]
[li]Edit the file, enter your emoncms API key and setup your devices in VARIABLES according to the sample code already there[/li]
[li]Please note that the energy can be fetched in two ways. The first way is directly from the Watts variable of your device. The second way is to use a lua function to calculate the energy. The second option is useful if you don’t control the device directly from Vera. I use it to measure if my computer is on using a PingSensor, and send the power based on the sensor reading. I also have an ‘Other’ where I enter the average power of external devices such as Washmachines etc.[/li]
[li]In the Vera UI, go to Apps -> Develop Apps -> Luup Files[/li]
[li]On the right, click “Choose File”. Browse to and select your edited EnergyMonitor.lua file, and click “Upload”[/li]
[li]On the left, click “Edit Startup Lua” and add the following line:[/li][/ul]
[li]Enjoy your data flowing to emoncms.org![/li][/ul]
[size=18pt]Setup emoncms inputs and feeds[/size]
You will immediately find your data here: http://emoncms.org/input/view
The inputs are by default not stored. Therefore, you will need to setup what is known as “feeds”. Feeds is where the data is stored.
Feeds and inputs are very flexible, and therefore not very intuitive in the beginning. There are some guides at the bottom of this page which explains how to create feeds from your inputs:
In short, what I did was this:
[ul][li]Go to your inputs at http://emoncms.org/input/view[/li]
[li]Find the input called Total and click the Spanner icon to access its processes. [/li]
[li]You will now create three feeds:[/li]
[li]Enter the following under Add process: Log to feed / CREATE NEW: / Total W / Fixed Interval With Averaging (PHPFIWA) / 10 s. Click Add.[/li]
[li]Enter the following under Add process: Power to kWh / CREATE NEW: / Total kWh / Fixed Interval No Averaging (PHPFINA) / 10 s. Click Add.[/li]
[li]Enter the following under Add process: Power to kWh/d / CREATE NEW: / Total kWhd. Click Add.[/li]
[li]If everything is setup correctly, you will now find your feeds at http://emoncms.org/feed/list[/li][/ul]
[size=18pt]Setup emoncms energy app[/size]
Now for the fun part, setting up the dashboard.
[ul][li]Click Apps > My Electric[/li]
[li]Click the Spanner icon at the top right[/li]
[li]Choose feeds as follows:[/li]
[li]Power feed (Watts): Total W[/li]
[li]Bar graph feed: Total kWh[/li]
[li]Wh or kWh feed?: kWh elapsed[/li]
[li]Set currency and unit cost if you wish.[/li]
[li]Enjoy your energy dashboard![/li][/ul]
Attached is the code and examples of the two dashboards. My Electric displays current and historic energy consumption. I played around with My Solar to visualize how much energy I could save if I would switch to LED instead of halogen lights.
You can also design your own dashboard. I recommend that you watch the YouTube introduction before designing.
This code could be made into a Vera app. If anyone feels like taking the time to make an app, feel free to use my code as a base - just mention my name somewhere