INDIGOplotD -- a plot tool for indigo

A Plugin to create Plots from INDIGO data and other sources
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: INDIGOplotD -- a plot tool for indigo

Post by kw123 »

richo,
the attached plot is done using the attached code to convert YOUR file to x;y format

Code: Select all

import os, pwd
dirPath= '/users/'+pwd.getpwuid( os.getuid() )[ 0 ]+'/documents/indigoplotd/data/'
inFile= "z-wavemesh.csv"
outFile= "z-wavemesh2.indi"
g=open(dirPath+outFile,"w")
f=open(dirPath+inFile,"r")
g.write("#;dots\n")
for line in f.readlines():
	line = line.strip("\n")
	line = line.strip("\r")
	parts =line.split(";")
	if parts[0]==""  :continue
	if parts[0]==" " :continue
	print ">>"+str(parts)+"<<"
	for k in range(1,len(parts)):
		if len(parts[k]) ==0  :continue
		if parts[k]==""  :continue
		if parts[k]==" " :continue
		g.write(parts[0]+";"+parts[k].strip("\n")+"\n")
f.close()
g.close()

Code: Select all

#x;dot
3;7
3;8
3;9
3;10
3;11
3;14
3;19
3;21
3;24
3;29
3;30
3;31
3;32
3;34
3;35
3;58
3;101
7;3
...
and the settings shown in the screenshot

then select add line.. choose linetype = DOT*


Is this what you want?

naturally you could change colors could add grid lines ..


Karl
Attachments
Screen Shot 2015-01-20 at 6.58.01 PM.png
Screen Shot 2015-01-20 at 6.58.01 PM.png (138.44 KiB) Viewed 5181 times
matrix-S1.png
matrix-S1.png (8.37 KiB) Viewed 5181 times
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: INDIGOplotD -- a plot tool for indigo

Post by kw123 »

or how about this.. not yet supported, but could be done..
Attachments
test.png
test.png (8.24 KiB) Viewed 5171 times
richo
Posts: 161
Joined: Tue Nov 25, 2014 3:54 am
Location: Pomorskie, Poland

Re: INDIGOplotD -- a plot tool for indigo

Post by richo »

Wow, this is it :D

If you implement the other one that would be something extra. We are getting close to heat maps...

I start enjoying the Indigo community more and more. Very responsive and proactive.

Thanks a lot.

Here is a map of my z-wave mesh. Plenty of nodes so not very clear but want to add ability to choose devices to display to limit the number of dots.


PS
I wonder if there would be a possibility to suppress the nodes that don't have neighbors to remove the large gaps in the chart. Usually these are the nodes removed from the network.
Attachments
Screen Shot 2015-01-21 at 10.37.46.png
Screen Shot 2015-01-21 at 10.37.46.png (107.6 KiB) Viewed 5152 times
Ryszard
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: INDIGOplotD -- a plot tool for indigo

Post by kw123 »

richo,
just a comment: your Y-scale excludes some nodes.. should be 0:165 like the x-axis

Do I understand your question correctly: you want to get rid of e.g. the nodes ~65..~82 .. just not draw them?

One way would be to remove them from the data you supply. In the program I supplied add an if statement something like if line empty continue (a little bit more complicated...)
or you sort the file then cut ..

The plot function will always plot the data you supply, don't know how to suppress data that is in the file..

Karl
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: INDIGOplotD -- a plot tool for indigo

Post by kw123 »

coming up: scatter plot with weight = color / size of circle / size of bubble..

This example shows temperature (left scale) and the point colors indicates the humidity at that point in time.
Attachments
scatter1-minute-S1.png
scatter1-minute-S1.png (43.33 KiB) Viewed 5114 times
autolog
Posts: 4077
Joined: Tue Sep 10, 2013 3:07 am
Location: West Sussex, UK
Contact:

Re: INDIGOplotD -- a plot tool for indigo

Post by autolog »

kw123 wrote:... This example shows temperature (left scale) and the point colors indicates the humidity at that point in time.
That is very impressive :D
richo
Posts: 161
Joined: Tue Nov 25, 2014 3:54 am
Location: Pomorskie, Poland

Re: INDIGOplotD -- a plot tool for indigo

Post by richo »

Super cool


Sent using Tapatalk
Ryszard
richo
Posts: 161
Joined: Tue Nov 25, 2014 3:54 am
Location: Pomorskie, Poland

Re: INDIGOplotD -- a plot tool for indigo

Post by richo »

I don't know what has happened but PlotD has stopped to generate new charts for some of them.
I haven't changed anything and most of them stopped working yesterday before midnight.
During the day I have confirmed and updated a few of them but after some time they have stopped being updated again. One of them "Temp salon.." however is working w/o problems !?

SQL data is OK and plugin reload doesn't help at all.

See the attached image:

PS
Reloading SQL helped but don't know for how long.
Attachments
Screen Shot 2015-01-22 at 17.25.15.png
Screen Shot 2015-01-22 at 17.25.15.png (104.97 KiB) Viewed 5081 times
Last edited by richo on Thu Jan 22, 2015 2:36 pm, edited 1 time in total.
Ryszard
tadg
Posts: 29
Joined: Wed Feb 13, 2008 1:37 pm
Location: San Diego, CA

Re: INDIGOplotD -- copy graphs automatically

Post by tadg »

I'm loving the graphs, this is really cool. But I run my indigo server without a monitor and pretty much all my interaction is done via the web, and I wanted to make the graphs automatically available via the web server.

First, make a graphs subdirectory for the images:

Code: Select all

mkdir /Library/Application\ Support/Perceptive\ Automation/Indigo\ 6/IndigoWebServer/images/graphs
So this little chuck of bash copies all of the graphs into the Indigo web server images directory, and makes a small index file for them. This makes it easy to reference them in webpages and access them remotely.

Code: Select all

#!/bin/bash
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
cp /Users/tadg/Documents/INDIGOplotD/*.png /Library/Application\ Support/Perceptive\ Automation/Indigo\ 6/IndigoWebServer/images/graphs/
cd /Library/Application\ Support/Perceptive\ Automation/Indigo\ 6/IndigoWebServer/images/graphs
echo "<ol>" > index.html
for i in `ls *.png`; do echo "<li><a href='$i'>$i</a></li>" >> index.html; done
echo "</ol>" >> index.html
IFS=$SAVEIFS
You'll need to edit the path in this file to replace my username with yours.

And then I used LaunchControl (or Lingon [or vi]) to install this plist that watches the IndigoplotD folder for changed files, and invokes the bash script. It goes in ~/Library/LaunchAgents

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Disabled</key>
        <false/>
        <key>Label</key>
        <string>net.gallistel.indigo-graph</string>
        <key>ProgramArguments</key>
        <array>
                <string>/bin/sh</string>
                <string>-c</string>
                <string>/Users/tadg/Documents/Indigo-graph-copy.sh</string>
        </array>
        <key>StandardErrorPath</key>
        <string>/tmp/net.gallistel.indigo-graph.err</string>
        <key>StandardOutPath</key>
        <string>/tmp/net.gallistel.indigo-graph.out</string>
        <key>WatchPaths</key>
        <array>
                <string>/Users/tadg/Documents/INDIGOplotD/</string>
        </array>
</dict>
</plist>
After IndigoPlotD writes out the graphs, LaunchD will spot the changed files and call the bash script to copy them to the web server graphs directory. You can then see a list of them at:[url]http://<your-machine-IP-or-name>:8000/images/graphs/index.htm[/url]l . At this point it is really easy to reference the graphs in other pages.

Tad
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: INDIGOplotD -- a plot tool for indigo

Post by kw123 »

cool.

would you like to just be able to name the directory where the PNG files should go? ...thats a quick add..

Also indigoplotd sets an event when the plots are finished.. You can trigger on it.

Karl

could you share some of your plots.. its always interesting to see what folks do with the stuff...
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: INDIGOplotD -- a plot tool for indigo

Post by kw123 »

new version posted: http://forums.indigodomo.com/viewtopic. ... 010#p91010

Tadg: you can now select the directory where the output PNG files are stored.

+ scatter plots..


Karl
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: INDIGOplotD -- a plot tool for indigo

Post by kw123 »

richo wrote:I don't know what has happened but PlotD has stopped to generate new charts for some of them.
I haven't changed anything and most of them stopped working yesterday before midnight.
During the day I have confirmed and updated a few of them but after some time they have stopped being updated again. One of them "Temp salon.." however is working w/o problems !?

SQL data is OK and plugin reload doesn't help at all.

See the attached image:

PS
Reloading SQL helped but don't know for how long.
Any entries in the log file?
could you send me:
1. menu select print/log plot info
2. menu select print/log device info
3. menu select print/log formatted data .. send ../data/minute.data.formatted
4. /matplot/matplot.log file (when you are using MATPLOT)



Karl
moyse
Posts: 39
Joined: Mon Apr 14, 2014 6:55 am

Re: INDIGOplotD -- a plot tool for indigo

Post by moyse »

First off, thanks for the fantastic tool! It's been absolutely great for my project.

However I'm having a slightly weird problem (with v3.3.4) which I can't work out.... nothing gets drawn on my graph when temperatures drop below zero (i.e. the line disappears when it goes below zero at night, then reappears when the sun shines on the sensor at lunchtime).
refreshingimage.png
refreshingimage.png (9.49 KiB) Viewed 4983 times
The range for left scale is -10:40, with tick marks at -10,0,10,20,30,40. It all looks fine, except for the missing line segments. I'm really baffled!

Thanks in advance for any advice.
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: INDIGOplotD -- a plot tool for indigo

Post by kw123 »

thats the punishment for living in an area where it gets cold :D

I know where its issue is. .. that was introduced as a feature .. looks like a bug in this circumstance


could you be so kind and send me
1. xxx.gnu file
2. the output of menu/indigoplotd/print/log plots


Karl
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: INDIGOplotD -- a plot tool for indigo

Post by kw123 »

have you set the left Y range or is it auto scale ( empty)
Post Reply

Return to “INDIGOplotD”