How would I generate day plots from the past on demand?

Posted on
Sat Sep 09, 2017 1:57 am
superholz offline
Posts: 52
Joined: Jun 10, 2015
Location: The Netherlands

How would I generate day plots from the past on demand?

Hi,

It would be great if I could create a control page with the plots generated from INDIGOplotD with a history function.
E.g. by selecting a date and then showing the plot of that date. As I understood data are stored in an SQL database. So the data should be there and had to be used for generating a plot.
Is that possible? Has anyone an idea how to start?
First step is I think to figure out a script that tells INDIGOplotD to generate a specific plot.

Posted on
Sat Sep 09, 2017 6:35 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: How would I generate day plots from the past on demand?

What is your definition of demand?
If it is a device / state value it is straight forward. Or if it is in a variable.


Sent from my iPhone using Tapatalk

Posted on
Sat Sep 09, 2017 9:09 am
superholz offline
Posts: 52
Joined: Jun 10, 2015
Location: The Netherlands

Re: How would I generate day plots from the past on demand?

I would like to use the plot on a controlpage/website when the user demands it trough clicking a button. e.g. to go back in time day by day when clicking on an arrow. I'm not sure if the process would be fast enough or if a set of graphs should be "on stock" (e.g. the current and 10 days from the past). That could be done via an variable I guess where the variable consist of a date to be displayed. and the variable certainly could be updated by the user click.

Posted on
Mon Sep 11, 2017 2:22 pm
Colly offline
Posts: 535
Joined: Jan 16, 2016
Location: Ireland

Re: How would I generate day plots from the past on demand?

I was after something similar in this post - http://forums.indigodomo.com/viewtopic.php?f=136&t=18968. I haven't received any responses to date. What is the best way to create a graph for each day and have it retrievable from a control page? Ideally it would be a calendar view but maybe that's pushing it too far.
kw123 wrote:
What is your definition of demand? If it is a device / state value it is straight forward. Or if it is in a variable.

In my case it would be a device state - thermostat either on or off.

Posted on
Mon Sep 11, 2017 3:06 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: How would I generate day plots from the past on demand?

indigoplotd will create plots with binning : 5minutes/1hour/one day

there are created every 5 minutes

it will automatically read the SQL history once a day (as a refresh) and then during the day it will check the devices/state(s) of the plots every 1 minute and build averages, max/min/sum/ delta, consumption...
any data that are numbers or true/false/up/down/on/off/expired ... can be used

you can setup plots (2 steps) manually or through scripts (you need to use python do do that. it will automatically create a script for each plot that would recreate it in .../py in the indigoplotd directory)
1. define the data source: device/ state/ measurement (ave,min/max/ ..)
2. define a plot device ( (a) size color .. .. (b) pick from the data defined in step one to populate plots you can have 1... 100 lines / histograms dots / numbers etc per plot.

There is a menu item" simple plot" which does step 1&1 in one menu, but only for single line plots and very few options for size, color etc. If you want to change them, you need to change that in the regular step 2. --- it is meant to enable you to create a simple plot in seconds.

prerequisite for history is naturally that you have either sqlite or postgres active, or the history is started as soon as you define data source- in the internal data files

there is also a PDF in the download section.. some generations old but besides fancy options it should get you through .

Karl

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests

cron