I've been making some changes to the emonCMS software to fit with what I want it to do. Some of the changes have also been requested by people, so I thought I would share the changes for others to use.
First addition is the ability to draw a LED with different colours depending on the feed value.
To use this edit your dashboard and add the following line into your widget div definition
<div class="led" feed="feedname"></div>
Change feedname to the name of the feed that is an integer of a status you wish to display using the LED.
The feed value can be one of the following values. Next to teh value I have shown which colour LED will be shown
e.g. This is my JSON post command to create a green LED
I created a feed from this input called LEDstatus which uses the Log to Feed process
The second addition is the ability to calculate the rate of change for a givern input.
To use this click on one of the inputs you wish to calculate the rate of change for.
Then create a new feed, choosing 'rate of change' as the Process and give it a feedname in the Arg column. Ensure that this is after your Log to Feed process. This process works by taking the current value and subtracting the previous value. This way you get the rate of change since your last measurement.
My plan is to use this new process to determine if a givern input has increased or decreased in value and is so by how much. So if I was to use the JSON api to get this rate of change I could feed it into growler or similar to notify me if a large power hungry device had suddenly turned itself on or off. Dont know how useful this will be yet.
Wow, this is great! Just copied in the files and it worked straight away!
Love the rate of change processor too!
can I update this to the github version?
Thanks a lot, Trystan
Yep add it if you feel the code is upto scratch
I think some the code can probably be tweaked, but appears to work.
Next task is to tie the rate of change into using the LED . i.e. a large rate increase will generate a red led and a large negative rate of change will generate a green LED.
Great, its now up on github and vis.openenergymonitor, I have added it to my dashboard to show if the solar hot water pump is on or off, take a look here http://openenergymonitor.org/emon/emoncms/showcase
Thanks a lot, its a great feature
I'm currently starting to use the LED widget, but by some reason there's seem to be appearing a "grey" frame arround my led. I've been looking at the code, but haven't managed to discover how to turn it transparent.
Can you help me?
Attaching a screenshot of my dashboard.
How do I show the ethernet status and the RF module via LED like in the picture here ... ?
Open-source tools for energy monitoring and analysis. This project uses the GNU General Public Licence