Author Topic: Graph Data history.  (Read 7091 times)

videl

  • Newbie
  • *
  • Posts: 6
Re: Graph Data history.
« Reply #15 on: September 18, 2015, 02:30:39 PM »
Thanks Felix,

As the Moteino Gateway is not the only application running on my Pi I wanted to avoid using the image. But I managed to extract the moteino and www directories from the image. Now everythink works well. Congratulation for this improvement.

I also modified my previous post with the graph autoscaling function to match the new index.php.

Vincent

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5939
  • Country: us
    • LowPowerLab
Re: Graph Data history.
« Reply #16 on: September 18, 2015, 03:25:53 PM »
Excellent, I need to make a note about the graph scaling and take a look at it, thanks!

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5939
  • Country: us
    • LowPowerLab
Re: Graph Data history.
« Reply #17 on: September 23, 2015, 09:10:15 AM »
Vincent,
I reviewed your code. I guess I'm a bit confused how this really helps in certain situations because the graph already does pretty nice autoscaling.
With your code I have to define yaxis for each graph otherwise it will autoscale to the full height of the plot window, which is not really desirable in my opinion.
Can you give an example how your autoscaling helps (before/after screenshots), referring to this statement:

I just added a few lines of code for autoscaling the graphs because otherwise it was impossible to see the variations of atmospheric pressure.

videl

  • Newbie
  • *
  • Posts: 6
Re: Graph Data history.
« Reply #18 on: September 23, 2015, 01:12:48 PM »
Hi Felix,

I've put screenshots in the attached pdf file. You'll see pressure and temperature graphs with the standard index.php and with the autoscale function.

The pressure graph is useless without min/max scaling. The max y axis value is set correctly by Flot but the min y value is set to zero. As pressure variations are quite small compared to the absolute value, it's impossible to see anything more than a flat graph. I couldn't find any way to automatically set both ymin and ymax with Flot graph options. It's the reason why I added this piece of code. But may be there is a smarter way to do it.

Thanks,
Vincent

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5939
  • Country: us
    • LowPowerLab
Re: Graph Data history.
« Reply #19 on: September 23, 2015, 03:34:03 PM »
Ok I really see your point now, it makes a lot of sense.
I was not using it with similar data and that's why I didn't see the effect of the scaling.
Also there should be a default scaling factor when none is specified.
I will work to get this included.

videl

  • Newbie
  • *
  • Posts: 6
Re: Graph Data history.
« Reply #20 on: September 23, 2015, 03:41:44 PM »
That's perfect. Thank you Felix!

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5939
  • Country: us
    • LowPowerLab
Re: Graph Data history.
« Reply #21 on: September 23, 2015, 11:26:35 PM »
This has has been implemented and a new release (v6) is now available that includes this change.
Thanks Vincent for your contribution!

Lensdigital

  • Full Member
  • ***
  • Posts: 151
    • Xronos Clock
Re: Graph Data history.
« Reply #22 on: September 28, 2015, 03:39:22 PM »
I also would like to extend data log retention, but I cannot find "dbLog.remove" option anywhere...
I tried V6, and still not sure where it can be configured?
Check out my hand made open source Xronos Alarm Clock!
http://www.xronosclock.com

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5939
  • Country: us
    • LowPowerLab
Re: Graph Data history.
« Reply #23 on: September 29, 2015, 08:47:16 AM »
data log retention?
This discussion is about something else. And there is no data retention configuration.

Lensdigital

  • Full Member
  • ***
  • Posts: 151
    • Xronos Clock
Re: Graph Data history.
« Reply #24 on: September 29, 2015, 09:15:25 AM »
data log retention?
This discussion is about something else. And there is no data retention configuration.

Umm first post of this topic:
Hi there.

I am loving the gateway. I see that the graph data is limited to a weeks worth of data. How can this be changed to display a longer period of data, say a month or even a year?

I have looked through the graphHelper.js and I can see that the default display will be 8 hours (which can be adjusted) and that there is reference to a start time. But before I go off messing around there are a number of questions. Are graph logs limited i.e. cleared at intervals? Assume a longer period affects performance, processing time to load a longer period?

Thanks in advance.
Check out my hand made open source Xronos Alarm Clock!
http://www.xronosclock.com

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5939
  • Country: us
    • LowPowerLab
Re: Graph Data history.
« Reply #25 on: September 29, 2015, 09:49:00 AM »
Right, but Retention != displaying of the data. With the v6 image there is no limit to how much data is stored. Performance should not be affected. Also the default view loaded is 1 day worth of data and you can see up to 1 month from the controls, but also you can zoom out and see more than that. The graph will load up to 600 points (you can change that in the source if you want) but at 1 year with 600 points you are losing a lot of resolution simply because you cant see a million points on a 1920px display.

Also we are talking about how much data we are keeping and displaying and also mainly the topic is about the change of how data is displayed - scaling wise.
There is no purging of the data from the UI. If you want to remove data, you can delete the logs manually from the disk.

Lensdigital

  • Full Member
  • ***
  • Posts: 151
    • Xronos Clock
Re: Graph Data history.
« Reply #26 on: September 29, 2015, 09:52:05 AM »
Thanks Felix!  Understood! :)

I couldn't see before past 1 week, now I see 1 month after I updated to V6.
Check out my hand made open source Xronos Alarm Clock!
http://www.xronosclock.com

Stark

  • Newbie
  • *
  • Posts: 25
  • Country: gb
Re: Graph Data history.
« Reply #27 on: November 16, 2015, 04:41:06 PM »
Hi Felix.

As of this weekend I have only just found the time to update from the original gateway (if only I was as productive as you). I must say the graphing is great and vastly improved! Many thanks for all the hard work.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5939
  • Country: us
    • LowPowerLab
Re: Graph Data history.
« Reply #28 on: November 16, 2015, 04:55:32 PM »
Hey Stark, good to hear... now if only I found some time to deal with the v6 bugs  ::)