Community
OpenEnergyMonitor

OpenEnergyMonitor Community

Emoncms graph timing

Just dive in, be prepared to get it wrong the first time (and the next!) and find out what you can and can’t do and how it all works, and be prepared to start afresh when it all goes wrong. That’s the best way to learn.

For example, I only found out today that when you set up a feed that runs every 15 minutes, irrespective of when you actually set it up, the start time is on the next quarter-hour by Internet time, and the graph shows the value at half-way through the quarter-hour, at 8 minutes past the quarter (I think - I need to verify that). Now that isn’t documented anywhere that I’ve looked.

Ha! Funny you should say that, @Robert.Wall, at this very moment I’m puzzling over one similar detail:
image
namely, how to interpret the timing in this graph. I’m struggling anyway to control how the data (still just one day’s worth so far) are presented - this is almost what I’d expect, but the first non-zero value should be at 00:30 and I’d like to see a piecewise constant function (like this), but changing its value every 30 minutes. Instead, that first non-zero value is shown (tool tip when the mouse hovers over it) at 12:15 which may be not unrelated to your comment… except that the data I uploaded had intervals that had explicit start times. The running script printed to the screen:

  Number of data points:	47
    2019-12-17T00:30:00.000 0.073
    2019-12-17T01:00:00.000 0.08
    2019-12-17T01:30:00.000 0.076
    2019-12-17T02:00:00.000 0.074
etc

If there’s anything like a manual, or someone has documented how the graphing features work that would be lovely, but otherwise, I’m in trial and error mode…
Cheers

Trystan Lea is generally the creator of all things emonCMS, I’m really an electrical engineer who’s been “into” software for a long time (like pre-Apple ][ ). I know a 3rd party graph module is used for emonCMS, but I can’t remember which, otherwise I’d point you towards that.

The only documentation that might help is in the Guides, and that really only covers the basics.

I think the problem you’ve got is very similar to the one here: How to accumulate watt Hours correctly from an input?
but in that case the user is trying to create or log quarter-hourly data from and alongside a 5 s feed. I don’t think the system was designed with that in mind, and it’s proving hard to convince it to do what they want. (You see, generally, we get data at 10 s intervals, so everything revolves around that sort of time interval - seconds and minutes rather than minutes and hours.)

Right - Trystan has already been very helpful, encouraging me to go ahead and modify an existing script to upload smart meter data that I already have.
(I’m only a physicist, and a theorist by training - I’m up to a bit of amateur hacking, mostly in python, comfortable with data analysis and some plotting, but have almost no hardware-related knowledge.)
I think I stumbled across the thread you mention in my initial browsing last night. I’ll go back and re-read. I’m sure I saw that 30 min is ok (even if it is the longest interval that works) for historic data. In this case, once I have live data coming in I’ll begin by validating my initial efforts, comparing this 30 min data with the history of the default 10 s feed. But the hardware is still in the post.
Thanks

If memory serves, (and I’m reading your comment correctly) the name of the graphing mdule is flot.

Got it @Bill.Thomson, thanks. I can see that flot is capable of doing the stuff that’s needed. And presumably GitHub - emoncms/graph: Versatile graphing module for emoncms is the relevant place to see how it might be being used (not that I’ve so far found more that a very few references to flot in there…)
Cheers

Thought I’d move the above posts out of the original thread so that we keep the first thread on topic for @marcoslater

The key concept to understand relating to this is that the way emoncms data requests are designed is that the data returned needs to fit the request start time and interval rather than necessarily returning data with times aligned to the request feed.

You can however get the result that you are after if you fix the interval in the graph module to half hourly (1800s), it will automatically align the start and end times to the nearest interval as well and return the data points in the positions you would expect!

Here’s an example screenshot of some power data averaged over each half hour and returned and displayed on the graph as bars centred on each half hour: