INDIOplotD: first steps

Posted on
Sun Jul 24, 2016 8:36 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

INDIOplotD: first steps

getting started with INDIGOplotD:
(I will add to this post over time)

INDIGOplotD has two modes:
1. Simple plot: one step creation of simple plots (one data line only)
2. full function: two steps needed: (a) define data source (b) define the plots
Putting everything into one step would require too many fields in one menu. Indigo will timeout handling > 50 fields that are dynamically updated.


Prep:
1. step install plugin from http://forums.indigodomo.com/viewtopic.php?f=165&t=12754&start=45
a detailed PDF (for an older version, but most is correct):https://www.dropbox.com/s/hi91tvybxgu51l0/indigoplotD.pdf?dl=0
2. if OS X >=10.8==> use matplot (select in configure ),
otherwise you need to install GNUplot (see PDF file)
3. switch on sqllogger plugin for historical info ( for beginners use SQLITE) and enable in INDIGOplotD config


SIMPLE PLOT:
create first plot: menu/plugins/INDIGOplotD/Simple plot/
-- enter name / new /confirm (eg my plot1)
-- select device and state to be plotted eg thremometer/ temperature
-- select line type/ width/color
-- add txt etc
-- click on create, wait 30 seconds
-- click on show the plot should appear on the server screen -- not if you are on a remote indigo client
==> you will have now a device with name "plot1" (you can edit it later) and graphic files: plot1-minute.png and plot1-hour.png and plot1-day.png in your plot directory (default is ~/documents/INDIGOplotD/) these plots have a binning of 5 minutes/ 1 hour/ 1 day and go over 2 days/ 5 days /30 days you can changes that in edict the plot1 device
Screen Shot 2016-07-31 at 19.11.51.png
Screen Shot 2016-07-31 at 19.11.51.png (323.41 KiB) Viewed 15315 times




Full function
step 1. define the data source: this will create background tasks that will collect and keep all data up to date and will do any math that is required (min/max/average, sum, delta.. ) to prep the data for step 2
step 2. create an INDIGOplotD device: you will create/ edit a device with model=INDIGOplotD. I the edit you can set a large number of parameters, size of plots, innings, scales and for the data you select the datasource. you can combine data, add/ subtract etc and you can plot partial data, do time shift (plot same line twice one from this week and one from last week) etc. Once defined INDIGOplotD will create PNG format files in the background.


1. define the data source
-- in menu"INDIGOplotD/select data source"
-- select new / enter name / confirm
-- select state and measure (Average is probably the best for now, you could use min/ max count etc.. for eg max temp in a day ..)
-- click CONFIRM ==> then the plugin will collect the data from the sql logger and do any necessary calculations
== define as many sources as you like. In step # 2 you will need these defined datasources to select them to create lines in a plot
Screen Shot 2016-07-31 at 19.13.57.png
Screen Shot 2016-07-31 at 19.13.57.png (118.51 KiB) Viewed 15315 times



2. create a INDIGOplotD device
- define size etc
- click on confirm
Screen Shot 2016-07-31 at 19.16.23.png
Screen Shot 2016-07-31 at 19.16.23.png (152.75 KiB) Viewed 15315 times

== now select the data sources you defined in step 1
- select line type, line key etc
- CONFIRM

(if you have expert mode enabled (top of the screen) you then can click on create and show)

you can add up to 100 lines to a plot using the left and right scale. they can be completely different lin/ log/ scale off set etc.
Screen Shot 2016-07-31 at 19.30.23.png
Screen Shot 2016-07-31 at 19.30.23.png (326.2 KiB) Viewed 15315 times

once you have mastered that you could add or subtract 2 datasources -- into one line eg 2 energy measurement and add them to a total.

hope that helps. if you need further help we could do an online one-on-one session.




Karl

if you have an older OS X you will need to install gnuplot. It is not difficult, but requires some steps. GNUPLOT is much better in resources usage by a factor of 10.
the functionality is 95% the same between matoplot and gnuplot in INDIGOplotD


why "D" : it comes after A, B, C and I got stuck with the name. It is difficult to change the name of a plugin.

Posted on
Mon Jul 23, 2018 10:13 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: INDIOplotD: first steps

a simple example for min / max temperature over the last 9 months

using
device / state = temperature,
measurement: min / max

background = dark grey
line smooth 3 bins
thickness = 2
font Arial unicode

using MATPLOT
Screen Shot 2018-07-23 at 11.06.53.png
Screen Shot 2018-07-23 at 11.06.53.png (206.74 KiB) Viewed 14274 times


using GNUPLOT
Screen Shot 2018-07-23 at 11.12.16.png
Screen Shot 2018-07-23 at 11.12.16.png (203.23 KiB) Viewed 14274 times


Karl

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest