INDIGOplotD -- a plot tool for indigo

Posted on
Mon May 12, 2014 8:54 am
kw123 offline
User avatar
Posts: 8360
Joined: May 12, 2013
Location: Dallas, TX

INDIGOplotD -- a plot tool for indigo

The thread is the discussion forum for http://www.perceptiveautomation.com/filelib/index.php?id=341

The "official" version will always be posted there and intermediate versions for the adventurous user will be posted on DropBox.



Karl
Last edited by kw123 on Mon Oct 20, 2014 10:42 am, edited 2 times in total.

Posted on
Tue May 13, 2014 12:42 pm
Shutter offline
Posts: 345
Joined: Mar 07, 2014
Location: London, UK

Re: INDIGOplotD -- a plot tool for indigo

Hi Karl,

I've been playing around with this since yesterday and I have to say thank you - it's pretty slick.

While at first it seemed a bit daunting it was quite easy to get most of the settings sorted out once I started generating plots and moving back and forth between the browser and Indigo - changing a setting and seeing the effect. Granted, I feel I've only touched the surface and haven't yet configured anything as detailed as the examples in the PDF, but so far so good. So far I'm plotting temp for two rooms and the external temp from forecast.io via Cynical Weather. I'd like to think this will come in handy to justify to my other half getting more sensors to show how all this HA is going to save on our energy bills. :D

A couple of things I've noticed so far.
1. Sometimes I'll change a setting, something minor, and the day png doesn't get generated and errors appear in the log. Is there anything I can check to see why?

2. Is there a way to sort the order the data lines key in the top of the plots are displayed. I thought it was creation order but I'm not so sure now.

3. Would it be possible to post a couple more screenshots of your configurations and the results? I tried recreating a right plot, as in your output example, but it looked nothing like it.


Otherwise I'm off to make some more plots. :)

Posted on
Wed May 14, 2014 10:31 am
kw123 offline
User avatar
Posts: 8360
Joined: May 12, 2013
Location: Dallas, TX

Re: INDIGOplotD -- a plot tool for indigo

sorry to answer late.. just saw your posting now:

1.
Sometimes I'll change a setting, something minor, and the day png doesn't get generated and errors appear in the log.
when you have an error message could you post it?
one common mistake is: if you have a fresh plot no line confirmed i.e. configure the line, click save, but forgot to click on confirm, gnuplot will throw an error. I can add a warning message.

2.
Is there a way to sort the order the data lines key

in gnuplot it goes left to right first line defined to last line defined
in marplot left lines have 3 keys in one line and the fourth key goes into the next line. same for "right" lines. they go to the right.


3.
post a couple more screenshots
: will post some examples.


Karl

Posted on
Wed May 14, 2014 3:57 pm
kw123 offline
User avatar
Posts: 8360
Joined: May 12, 2013
Location: Dallas, TX

Re: INDIGOplotD -- a plot tool for indigo

[url]https://www.dropbox.com/s/3bduyek99owx7u0/INDIGOplotD-2-6-4.zip/url] 2.6.4


fixes:
- math option: lineA/lineB if -- if LineB had 0.0 values MATplot did not work (gnuplot was fine), now a value of 0.0 is used as result


adds:
- when you have a space in the plot name (i.e. filename of the png file), the log file dump of the png filenames now replace spaces with "%20". This makes it easier to copy and paste into control pages - the control page does not like space in filenames.

- font scale factor between resolution 1 and resolution 2: before the font size was the same for the large and the smaller plot. Now you can scale the font size.
formula: font size of resolution 2 = font size of resolution 1 * scale factor.... Sounds much more complicated than it is.
e.g. you have 8 points fonts for the smaller plot; with a scale factor of 1.5 the font size for the larger plot is 12 points

- added warning / check if you defined a plot WITHOUT confirming = creating a line in the plot. It will create an empty plot with no line in it and print a waring line in the log file.

I will update the how- to-PDF and some more examples in the next days.

Karl

If I don't hear of any bugs I will post this version next week as a regular version on this web site.

reminder: the dropBox posting are for new releases, once stable the stable version will be posted in the plugin section.
Last edited by kw123 on Wed May 14, 2014 10:35 pm, edited 1 time in total.

Posted on
Wed May 14, 2014 10:34 pm
kw123 offline
User avatar
Posts: 8360
Joined: May 12, 2013
Location: Dallas, TX

Re: INDIGOplotD -- a plot tool for indigo

https://www.dropbox.com/s/3bduyek99owx7u0/INDIGOplotD-2-6-4.zip v 2.6.4

with expanded "how to" PDF
- some more examples
- how to do special characters
- added font scale factor example

fixes:
- left right Y axis in MATplot sometimes did not work properly
- a rare python exception when adding a new device (now checking if device already exists) ..


Karl

Posted on
Fri May 16, 2014 3:46 am
Shutter offline
Posts: 345
Joined: Mar 07, 2014
Location: London, UK

Re: INDIGOplotD -- a plot tool for indigo

Hi Karl,

Shortly after I posted to the thread I made a change and everything stopped working. So I reset the plugin and started again. That initially appeared to fix the issue and was working for most of the day. I then messed around with the smoothing options, always remembering to click confirm, when the day plot suddenly stopped showing any lines. (I've found that even the lowest smoothing option can make the lines appear inaccurate).

I switched off smoothing yesterday and then this morning the day plot started to display lines. So far so good. I also ran the update yesterday.

Now this morning I decided to create another plot with on/off motion sensor states. Now I'm seeing lots of errors. I've tried setting it up 3 times and I've always made sure to click confirm before moving to the next step. Here are the error logs:

Code: Select all
6 May 2014 10:36:50 am
  INDIGOplotD                     command: write the looong path/filenames of plotfiles to logfile for copy and paste
  INDIGOplotD                     IndigoPlot png file names: copy and paste to field <URL:>  below Display: <RefreshingImage URL>
  INDIGOplotD                        file:/Users/simon/Documents/INDIGOPlotD/Home%20Temp.-minute-S1.png
  INDIGOplotD                     IndigoPlot png file names: copy and paste to field <URL:>  below Display: <RefreshingImage URL>
  INDIGOplotD                        file:/Users/simon/Documents/INDIGOPlotD/Home%20Temp.-minute-S2.png
  INDIGOplotD                     IndigoPlot png file names: copy and paste to field <URL:>  below Display: <RefreshingImage URL>
  INDIGOplotD                        file:/Users/simon/Documents/INDIGOPlotD/Home%20Temp.-hour-S1.png
  INDIGOplotD                     IndigoPlot png file names: copy and paste to field <URL:>  below Display: <RefreshingImage URL>
  INDIGOplotD                        file:/Users/simon/Documents/INDIGOPlotD/Home%20Temp.-hour-S2.png
  INDIGOplotD                     IndigoPlot png file names: copy and paste to field <URL:>  below Display: <RefreshingImage URL>
  INDIGOplotD                        file:/Users/simon/Documents/INDIGOPlotD/Home%20Temp.-day-S1.png
  INDIGOplotD                     IndigoPlot png file names: copy and paste to field <URL:>  below Display: <RefreshingImage URL>
  INDIGOplotD                        file:/Users/simon/Documents/INDIGOPlotD/Home%20Temp.-day-S2.png
  INDIGOplotD                     command: write the looong path/filenames of plotfiles to logfile for copy and paste .. done
  INDIGOplotD                     /Users/simon/Documents/INDIGOPlotD/Motion Sensors ON/OFF States-minute-S1.gnu has no lines defined --click CONFIRM before you save the lines and plots
  INDIGOplotD Error               Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 2730, in runConcurrentThread
  File "plugin.py", line 2856, in syncPlotsWithIndigo
  File "plugin.py", line 1188, in setupGNUPlotFiles
  File "plugin.py", line 1193, in createGNUfile
<type 'exceptions.IOError'>: [Errno 2] No such file or directory: u'/Users/simon/Documents/INDIGOPlotD/Motion Sensors ON/OFF States-minute-S1.gnu'

  INDIGOplotD Error               plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
  INDIGOplotD                     /Users/simon/Documents/INDIGOPlotD/Motion Sensors ON/OFF States-minute-S1.gnu has no lines defined --click CONFIRM before you save the lines and plots
  INDIGOplotD Error               Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 2649, in runConcurrentThread
  File "plugin.py", line 1188, in setupGNUPlotFiles
  File "plugin.py", line 1193, in createGNUfile
<type 'exceptions.IOError'>: (2, 'No such file or directory', u'/Users/simon/Documents/INDIGOPlotD/Motion Sensors ON/OFF States-minute-S1.gnu')

  INDIGOplotD Error               plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
  INDIGOplotD                     /Users/simon/Documents/INDIGOPlotD/Motion Sensors ON/OFF States-minute-S1.gnu has no lines defined --click CONFIRM before you save the lines and plots
  INDIGOplotD Error               Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 2649, in runConcurrentThread
  File "plugin.py", line 1188, in setupGNUPlotFiles
  File "plugin.py", line 1193, in createGNUfile
<type 'exceptions.IOError'>: (2, 'No such file or directory', u'/Users/simon/Documents/INDIGOPlotD/Motion Sensors ON/OFF States-minute-S1.gnu')

  INDIGOplotD Error               plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
  INDIGOplotD                     /Users/simon/Documents/INDIGOPlotD/Motion Sensors ON/OFF States-minute-S1.gnu has no lines defined --click CONFIRM before you save the lines and plots
  INDIGOplotD Error               Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 2649, in runConcurrentThread
  File "plugin.py", line 1188, in setupGNUPlotFiles
  File "plugin.py", line 1193, in createGNUfile
<type 'exceptions.IOError'>: (2, 'No such file or directory', u'/Users/simon/Documents/INDIGOPlotD/Motion Sensors ON/OFF States-minute-S1.gnu')

  INDIGOplotD Error               plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
  Smartphone Radar                "Guest iPhone 4" state is now Away.
  Smartphone Radar                All smartphones are now Away.
  Trigger                         All iPhones away set SS to Active
  INDIGOplotD                     /Users/simon/Documents/INDIGOPlotD/Motion Sensors ON/OFF States-minute-S1.gnu has no lines defined --click CONFIRM before you save the lines and plots
  INDIGOplotD Error               Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 2649, in runConcurrentThread
  File "plugin.py", line 1188, in setupGNUPlotFiles
  File "plugin.py", line 1193, in createGNUfile
<type 'exceptions.IOError'>: (2, 'No such file or directory', u'/Users/simon/Documents/INDIGOPlotD/Motion Sensors ON/OFF States-minute-S1.gnu')

  INDIGOplotD Error               plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
  INDIGOplotD                     /Users/simon/Documents/INDIGOPlotD/Motion Sensors ON/OFF States-minute-S1.gnu has no lines defined --click CONFIRM before you save the lines and plots
  INDIGOplotD Error               Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 2649, in runConcurrentThread
  File "plugin.py", line 1188, in setupGNUPlotFiles
  File "plugin.py", line 1193, in createGNUfile
<type 'exceptions.IOError'>: (2, 'No such file or directory', u'/Users/simon/Documents/INDIGOPlotD/Motion Sensors ON/OFF States-minute-S1.gnu')

  INDIGOplotD Error               plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)


I see the logs display the following error:
Code: Select all
  INDIGOplotD                     /Users/simon/Documents/INDIGOPlotD/Motion Sensors ON/OFF States-minute-S1.gnu has no lines defined --click CONFIRM before you save the lines and plots


But I did click confirm. When I go back into the edit device settings there are no longer any lines in the third step.

Here's a thought - could python be messed up on my Mac? Every plugin I try gives me at least one error at some point. With some I never get past the configure stage and just give up.

Posted on
Fri May 16, 2014 7:02 am
kw123 offline
User avatar
Posts: 8360
Joined: May 12, 2013
Location: Dallas, TX

Re: INDIGOplotD -- a plot tool for indigo

could you send one of the gnu plot files to karlwachs@me.com

Karl

Posted on
Sun May 18, 2014 10:56 pm
kw123 offline
User avatar
Posts: 8360
Joined: May 12, 2013
Location: Dallas, TX

Re: INDIGOplotD -- a plot tool for indigo

https://www.dropbox.com/s/36zjj9y8wg51lf8/INDIGOplotD-2-7-1.zip version 2.7.1

fixes:
smaller clean-up, i.e. delete test files etc.

added:
electric energy monitoring functionality. See attached image on hoe to use it.

Karl
Attachments
Screen Shot 2014-05-18 at 11.53.11 PM.png
Screen Shot 2014-05-18 at 11.53.11 PM.png (185.63 KiB) Viewed 19268 times

Posted on
Mon Jun 09, 2014 9:33 am
T-Power offline
User avatar
Posts: 220
Joined: May 10, 2010

Re: INDIGOplotD -- a plot tool for indigo

Hello Karl,

Thanks for creating the wonderful plugin!
I am setting up an Aeon Labs Aeotec Home Energy Meter 2 Phase DSB09104-ZWUS and need a little help with the fine tuning.

I have your plugin installed and it seems to be working(its doing something :wink: )
Question: how would I set this up to display in a control page with periodic updates?

T.I.A.
Toran

MacMini 2.3 GHz Intel Core i7 16GB DDR3
Indigo Pro 2022.1 macOS Mojave 10.14.6

Posted on
Tue Jun 10, 2014 7:29 pm
kw123 offline
User avatar
Posts: 8360
Joined: May 12, 2013
Location: Dallas, TX

Re: INDIGOplotD -- a plot tool for indigo

check if it produces a file "name-of-plot-inute/hour/day.png in the Documents/Indigioplotd directory

double click the file , check if graph ok

check the manual at the bottom, it shows how to include a plot in a control page and how to make it dynamic.

if you have anymore question, please let me know.

Karl

Posted on
Thu Jun 12, 2014 1:16 am
haavarda offline
User avatar
Posts: 702
Joined: Aug 18, 2012
Location: Norway

Re: INDIGOplotD -- a plot tool for indigo

Hi Karl,
I am seeing some errors when I try to enable INDIGOplotD. Do you think you can help me out?
I have managed to get indigoplot working before. And I have tried to reinstall Xcode gnu plot etc...
I am using the latest version of indigo 6.

This is the error I get in the log:

7.1"
INDIGOplotD initializing ... 2-7-1
INDIGOplotD indigo version found: 6
INDIGOplotD Error Error in plugin execution startup:

Traceback (most recent call last):
File "plugin.py", line 323, in startup
File "plugin.py", line 3027, in syncPlotsWithIndigo
File "plugin.py", line 1198, in setupGNUPlotFiles
<type 'exceptions.ValueError'>: empty string for float()

INDIGOplotD Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 2811, in runConcurrentThread
File "plugin.py", line 1198, in setupGNUPlotFiles
<type 'exceptions.ValueError'>: empty string for float()

INDIGOplotD Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
INDIGOplotD Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 2811, in runConcurrentThread
File "plugin.py", line 1198, in setupGNUPlotFiles
<type 'exceptions.ValueError'>: empty string for float()

INDIGOplotD Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
INDIGOplotD Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 2811, in runConcurrentThread
File "plugin.py", line 1198, in setupGNUPlotFiles
<type 'exceptions.ValueError'>: empty string for float()

INDIGOplotD Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
INDIGOplotD Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 2811, in runConcurrentThread
File "plugin.py", line 1198, in setupGNUPlotFiles
<type 'exceptions.ValueError'>: empty string for float()

INDIGOplotD Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
INDIGOplotD Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 2811, in runConcurrentThread
File "plugin.py", line 1198, in setupGNUPlotFiles
<type 'exceptions.ValueError'>: empty string for float()

INDIGOplotD Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
INDIGOplotD Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 2811, in runConcurrentThread
File "plugin.py", line 1198, in setupGNUPlotFiles
<type 'exceptions.ValueError'>: empty string for float()

INDIGOplotD Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)

Håvard

Posted on
Thu Jun 12, 2014 5:05 am
kw123 offline
User avatar
Posts: 8360
Joined: May 12, 2013
Location: Dallas, TX

Re: INDIGOplotD -- a plot tool for indigo

https://www.dropbox.com/s/m6hs5ft22yoa9ew/indigoplotD-2-7-2.zip V 2-7-2
haavarda: this version should avoid the error, but it does not fix the underlying problem.

Could you tell me what you did before you got the error? The error comes from the fact that "text size variable is empty, i.e. not a number" .
- did you set the text size to blank? and if so how did you do it?
- any other action, upgrade ...??

Karl

Posted on
Thu Jun 12, 2014 5:19 am
haavarda offline
User avatar
Posts: 702
Joined: Aug 18, 2012
Location: Norway

Re: INDIGOplotD -- a plot tool for indigo

Hmm I dont think so. I changed from Indigoplot to IndigoplotD.
But in the prosess something might have happened? I can go over my plots again and see

Håvard

Posted on
Thu Jun 12, 2014 5:50 am
haavarda offline
User avatar
Posts: 702
Joined: Aug 18, 2012
Location: Norway

Re: INDIGOplotD -- a plot tool for indigo

I tried to remove everything and start over. I have installed Xcode, so I skipped that. But installed the other part. But no luck... this is the output from the log:

Starting plugin "INDIGOplotD 2.7.2" (pid 68082)
Started plugin "INDIGOplotD 2.7.2"
INDIGOplotD initializing ... 2-7-2
INDIGOplotD indigo version found: 6
INDIGOplotD /Users/Server/Documents/INDIGOPlotD/testplot-minute-S1.gnu has no lines defined --click CONFIRM before you save the lines and plots
INDIGOplotD /Users/Server/Documents/INDIGOPlotD/testplot-hour-S1.gnu has no lines defined --click CONFIRM before you save the lines and plots
INDIGOplotD /Users/Server/Documents/INDIGOPlotD/testplot-day-S1.gnu has no lines defined --click CONFIRM before you save the lines and plots
INDIGOplotD /Users/Server/Documents/INDIGOPlotD/testplot-minute-S2.gnu has no lines defined --click CONFIRM before you save the lines and plots
INDIGOplotD /Users/Server/Documents/INDIGOPlotD/testplot-hour-S2.gnu has no lines defined --click CONFIRM before you save the lines and plots
INDIGOplotD /Users/Server/Documents/INDIGOPlotD/testplot-day-S2.gnu has no lines defined --click CONFIRM before you save the lines and plots
INDIGOplotD read file /Users/Server/Documents/INDIGOPlotD/minute.dat lines: 2304
INDIGOplotD read file /Users/Server/Documents/INDIGOPlotD/hour.dat lines: 912
INDIGOplotD read file /Users/Server/Documents/INDIGOPlotD/day.dat lines: 390
INDIGOplotD wait for SQL logger to finish start up -- before retrieving SQL data

12 Jun 2014 13:46:07
INDIGOplotD sql-logger not enabled
INDIGOplotD initializing ...2
INDIGOplotD /Users/Server/Documents/INDIGOPlotD/testplot-minute-S1.gnu has no lines defined --click CONFIRM before you save the lines and plots
INDIGOplotD /Users/Server/Documents/INDIGOPlotD/testplot-hour-S1.gnu has no lines defined --click CONFIRM before you save the lines and plots
INDIGOplotD /Users/Server/Documents/INDIGOPlotD/testplot-day-S1.gnu has no lines defined --click CONFIRM before you save the lines and plots
INDIGOplotD /Users/Server/Documents/INDIGOPlotD/testplot-minute-S2.gnu has no lines defined --click CONFIRM before you save the lines and plots
INDIGOplotD /Users/Server/Documents/INDIGOPlotD/testplot-hour-S2.gnu has no lines defined --click CONFIRM before you save the lines and plots
INDIGOplotD /Users/Server/Documents/INDIGOPlotD/testplot-day-S2.gnu has no lines defined --click CONFIRM before you save the lines and plots
INDIGOplotD sql-logger not enabled
INDIGOplotD sql-logger not enabled
INDIGOplotD sql-logger not enabled
INDIGOplotD sql-logger not enabled
INDIGOplotD sql-logger not enabled
INDIGOplotD sql-logger not enabled
INDIGOplotD sql-logger not enabled
INDIGOplotD sql-logger not enabled
INDIGOplotD sql-logger not enabled
INDIGOplotD sql-logger not enabled
Disabling plugin "INDIGOplotD 2.7.2"
Stopping plugin "INDIGOplotD 2.7.2" (pid 68082)
INDIGOplotD stopConcurrentThread ...
INDIGOplotD main loop stopped
INDIGOplotD stopConcurrentThread ...
Stopped plugin "INDIGOplotD 2.7.2"

Håvard

Posted on
Thu Jun 12, 2014 8:41 am
kw123 offline
User avatar
Posts: 8360
Joined: May 12, 2013
Location: Dallas, TX

Re: INDIGOplotD -- a plot tool for indigo

1. do you have sql logger enabled?
2. could you switch to "Do not use SQL-Logger" in Configuration at the bottom of the page, see attached screen shot.
3. and if you are on OSX 10.9 could you try using matplot?

indigoplot to indigoplotD does not transfer any data, should be no interference, 2 completely independent plugins.


Once its running, could you go into the test plot and see if there are any lines defined.

thanks

Karl
Attachments
Screen Shot 2014-06-12 at 9.37.29 AM.png
Screen Shot 2014-06-12 at 9.37.29 AM.png (63.24 KiB) Viewed 18942 times

Who is online

Users browsing this forum: No registered users and 3 guests

cron