INDIGOplotD -- a plot tool for indigo
Re: INDIGOplotD -- a plot tool for indigo
to test if it works:
add e.g. in line-key ü or ä ß or ^0 etc some of these special characters. If they work you are ok.
(in PLOT you would need to select e.g. arial unicode font before)
===
with home brew it would be:
/usr/local/bin/brew remove gnuplot
/usr/local/bin/brew remove libgd
/usr/local/bin/brew reinstall jpeg
/usr/local/bin/brew install libgd --with-freetype <==== this is for the fonts
/usr/local/bin/brew install gnuplot
add e.g. in line-key ü or ä ß or ^0 etc some of these special characters. If they work you are ok.
(in PLOT you would need to select e.g. arial unicode font before)
===
with home brew it would be:
/usr/local/bin/brew remove gnuplot
/usr/local/bin/brew remove libgd
/usr/local/bin/brew reinstall jpeg
/usr/local/bin/brew install libgd --with-freetype <==== this is for the fonts
/usr/local/bin/brew install gnuplot
Re: INDIGOplotD -- a plot tool for indigo
Ah ok! Then it does not seem to be properly installed for me. If I for example enter "Outdoor humidity (%) öäåü" in one of the line-keys the output on the plot sayskw123 wrote:to test if it works:
add e.g. in line-key ü or ä ß or ^0 etc some of these special characters. If they work you are ok.
(in PLOT you would need to select e.g. arial unicode font before)
Re: INDIGOplotD -- a plot tool for indigo
did you select a unicode font? in the font menu?
Re: INDIGOplotD -- a plot tool for indigo
He he sorry don't know. I had to do a COMPLETE reinstall of my Indigo-installation. Not a big problem since I am still in a "lab-phase" testing it. It was the SQL database which became corrupted for some reason.kw123 wrote:did you select a unicode font? in the font menu?
Anyway, I have reinstalled everything and now when I am trying to start INDIGOplotD I get the following error messages:
========
Starting plugin "INDIGOplotD 3.7.32" (pid 626)
Started plugin "INDIGOplotD 3.7.32"
INDIGOplotD initializing ... 3-7-32 debuglevel=False
INDIGOplotD indigo version found: 6
INDIGOplotD Error Error in plugin execution startup:
Traceback (most recent call last):
File "plugin.py", line 364, in startup
<type 'exceptions.IndexError'>: string index out of range
INDIGOplotD Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 7054, in runConcurrentThread
<type 'exceptions.AttributeError'>: 'Plugin' object has no attribute 'dataColumnCount'
INDIGOplotD Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
===========
I have tried with latest version as well but still the same error messages.
If try with the DELETE command I get these error messages:
==========
INDIGOplotD command: reset device parameters
INDIGOplotD Updating device/prop from SQL db: no device or variable defined.. skipping update ...
INDIGOplotD Updating device/prop from SQL db: no device or variable defined.. skipping update ...
INDIGOplotD Error Error in plugin execution MenuAction:
Traceback (most recent call last):
File "plugin.py", line 1440, in inpResetDeviceConfigurationParameters
File "plugin.py", line 2078, in doInitData
<type 'exceptions.AttributeError'>: 'Plugin' object has no attribute 'gnuORmat'
INDIGOplotD Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 7058, in runConcurrentThread
File "plugin.py", line 7449, in removeDeletedIndigoPlots
<type 'exceptions.AttributeError'>: 'Plugin' object has no attribute 'PLOT'
INDIGOplotD Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
===========
Re: INDIGOplotD -- a plot tool for indigo
https://www.dropbox.com/s/zfexwzrw9yd5w ... 3.zip?dl=0 v 3-7-33
could you try this one.
I see where the error is but I don't understand why. But this one should fix it.
Karl
May be someone can help me out understanding: why is "self.indigoPNGdir" empty.
I thought that if in self.pluginPrefs.get("property", default value) "property" does not exist i.e. when you first start with nothing defined, it should take the default value.?
could you try this one.
I see where the error is but I don't understand why. But this one should fix it.
Karl
May be someone can help me out understanding:
Code: Select all
INDIGOPLOT ="indigoplotd"
userName = pwd.getpwuid( os.getuid() )[ 0 ]
self.indigoPlotDir = "/Users/"+userName+"/Documents/"+INDIGOPLOT+"/" # this is the main directory
self.indigoPNGdir = self.pluginPrefs.get("indigoPNGdir",self.indigoPlotDir) # this is the plot directory
I thought that if in self.pluginPrefs.get("property", default value) "property" does not exist i.e. when you first start with nothing defined, it should take the default value.?
Re: INDIGOplotD -- a plot tool for indigo
CrazyFin, you should try the restore feature! it should repopulate all settings, Karl
Re: INDIGOplotD -- a plot tool for indigo
Ok but I can't use the restore feature since I did a CLEAN install of Indigo 6. That would just restore plots for devices that do not exist anymore.
Should I remove the IndigoPlotD-folder completely to get rid of all old plot settings and plot database since it seems to have references to device ID:s that do not exist anymore?
If so, how do I remove all traces of INDIGOplotD?
===
EDIT 1:
I stopped Indigo6 and then removed IndigoPlugin from disabled plugins and I also removed the IndigoPlotD preference-settings file.
However, when I start Indigo the IndigoPlotD is still shown in the plugin list (disabled though)?
====
Doing a disable/enable and/or a reload I get the same message indicating vector being erroneous:
INDIGOplotD Error Error in plugin execution startup:
Traceback (most recent call last):
File "plugin.py", line 364, in startup
<type 'exceptions.IndexError'>: string index out of range
INDIGOplotD Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 7054, in runConcurrentThread
<type 'exceptions.AttributeError'>: 'Plugin' object has no attribute 'dataColumnCount'
INDIGOplotD Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Should I remove the IndigoPlotD-folder completely to get rid of all old plot settings and plot database since it seems to have references to device ID:s that do not exist anymore?
If so, how do I remove all traces of INDIGOplotD?
===
EDIT 1:
I stopped Indigo6 and then removed IndigoPlugin from disabled plugins and I also removed the IndigoPlotD preference-settings file.
However, when I start Indigo the IndigoPlotD is still shown in the plugin list (disabled though)?
====
Doing a disable/enable and/or a reload I get the same message indicating vector being erroneous:
INDIGOplotD Error Error in plugin execution startup:
Traceback (most recent call last):
File "plugin.py", line 364, in startup
<type 'exceptions.IndexError'>: string index out of range
INDIGOplotD Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 7054, in runConcurrentThread
<type 'exceptions.AttributeError'>: 'Plugin' object has no attribute 'dataColumnCount'
INDIGOplotD Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Re: INDIGOplotD -- a plot tool for indigo
Ah sorry Karl, I missed that you had written that I should try 3.7.33.
I did that now and the errors are gone.
Puih! Thaaaanks!
Now I have just to verify that I am able to get the cool plotting to work again...
I did that now and the errors are gone.
Now I have just to verify that I am able to get the cool plotting to work again...
Re: INDIGOplotD -- a plot tool for indigo
Aaah! Can confirm that plotting works fine now as well when I am running on 3.7.33.
The plotting tool itself is soooo cool! Took me only few minutes to create a BUNCH of new crazy plots...
The plotting tool itself is soooo cool! Took me only few minutes to create a BUNCH of new crazy plots...
INDIGOplotD -- Changing PostgreSQL username
Folks -
I recently switched my logging to go into a PostgreSQL DB and as such, IndigoPlotD also had to go fetch the logging data from that same database. The initial switch to PostgreSQL went smooth and was a matter of installing PostgreSQL and subsequently telling the SQL Logger plugin to use PostgreSQL instead of SQLite. Final step was to also tell IndigoPlotD to use the PostgreSQL database, instead of SQLite (at the bottom of the plugin config page). So far so good.
I however spent several hours figuring out how I could change the database user from (the default) postgres user to my chosen indigo user, so wanted to post here how I resolved this:
With the help from Karl, I changed the username in use by IndigoPlotD to be indigo, by adding the following to my postgre command string field on the config page:
/Library/PostgreSQL/9.4/bin/psql indigo_history indigo
These are:
a) the path to my PostgreSQL server install (/Library/PostgreSQL/9.4/bin/psql - make sure this path is correct for your set-up!),
b) the name of the Indigo history database (indigo_history)
c) the DB username which I want to use (indigo).
That only left the password to be configured, and this was resolved in the following manner:
PostgreSQL leverages a file called .pgpass which by default you can find in your server's home directory (/Users/Ronald/.pgpass in my case). the file is hidden so if you do not see it at first, do a ls -al from a terminal prompt. In this .pgpass file, you can specify a username&password for your DB server(s) and database(s), in the following format: <server ip>:<port>:<database name>:<username>:<password>. My .pgpass looked as follows:
localhost:5432:*:postgres:difficult_password_here
10.0.3.11:5432:*:postgres:difficult_password_here
So, I added the user indigo to this file, limiting it for use with the indigo_history database only:
10.0.3.11:5432:indigo_history:indigo:another_difficult_password_here
I however kept getting database access errors from IndigoPlotD plugin, but also when I tried logging in to the database from the command prompt, it was prompting me to enter the password manually (instead of retrieving it from the .pgpass file). I eventually resolved my problem by adding te same access parameters also with the localhost setting:
locahost:5432:indigo_history:indigo:<password>
I don't really understand why the actual IP address isn't sufficient. My DB server is configured to listen to both localhost as well as 10.0.3.11 (as I want to remotely query my database) and my reasoning was that since I can ping my server using 10.0.3.11, both outside the server, as well as from a terminal session running on the server itself, the localhost line would not be required. So it took me some time to give it a try, without expecting it to be the resolution. Adding that line however turned out to be my resolution.
Hopefully this will save someone some trouble-shooting hours
Ronald
I recently switched my logging to go into a PostgreSQL DB and as such, IndigoPlotD also had to go fetch the logging data from that same database. The initial switch to PostgreSQL went smooth and was a matter of installing PostgreSQL and subsequently telling the SQL Logger plugin to use PostgreSQL instead of SQLite. Final step was to also tell IndigoPlotD to use the PostgreSQL database, instead of SQLite (at the bottom of the plugin config page). So far so good.
I however spent several hours figuring out how I could change the database user from (the default) postgres user to my chosen indigo user, so wanted to post here how I resolved this:
With the help from Karl, I changed the username in use by IndigoPlotD to be indigo, by adding the following to my postgre command string field on the config page:
/Library/PostgreSQL/9.4/bin/psql indigo_history indigo
These are:
a) the path to my PostgreSQL server install (/Library/PostgreSQL/9.4/bin/psql - make sure this path is correct for your set-up!),
b) the name of the Indigo history database (indigo_history)
c) the DB username which I want to use (indigo).
That only left the password to be configured, and this was resolved in the following manner:
PostgreSQL leverages a file called .pgpass which by default you can find in your server's home directory (/Users/Ronald/.pgpass in my case). the file is hidden so if you do not see it at first, do a ls -al from a terminal prompt. In this .pgpass file, you can specify a username&password for your DB server(s) and database(s), in the following format: <server ip>:<port>:<database name>:<username>:<password>. My .pgpass looked as follows:
localhost:5432:*:postgres:difficult_password_here
10.0.3.11:5432:*:postgres:difficult_password_here
So, I added the user indigo to this file, limiting it for use with the indigo_history database only:
10.0.3.11:5432:indigo_history:indigo:another_difficult_password_here
I however kept getting database access errors from IndigoPlotD plugin, but also when I tried logging in to the database from the command prompt, it was prompting me to enter the password manually (instead of retrieving it from the .pgpass file). I eventually resolved my problem by adding te same access parameters also with the localhost setting:
locahost:5432:indigo_history:indigo:<password>
I don't really understand why the actual IP address isn't sufficient. My DB server is configured to listen to both localhost as well as 10.0.3.11 (as I want to remotely query my database) and my reasoning was that since I can ping my server using 10.0.3.11, both outside the server, as well as from a terminal session running on the server itself, the localhost line would not be required. So it took me some time to give it a try, without expecting it to be the resolution. Adding that line however turned out to be my resolution.
Hopefully this will save someone some trouble-shooting hours
Ronald
Re: INDIGOplotD -- a plot tool for indigo
@Karl
Most of my plots works fine now but I have some plots that either:
1. Do not refresh at all of any of the minute, hour or daily plots. If I delete the plot files no new files are created. I have tried with Refresh All Plots-command no success. I have tried with re-importing all data and also tried with reloading the plugin but still no success. Even if I create a completely new plot but with same device (like Outdoor temp) the file is created once but then no new refreshing and if I delete the plot files no new files appear when doing refresh or on the automatic refresh period.
2. On another plot (energy plots) I do get updates on the minute and hourly charts but not on the daily chart. Same here as above, if I delete the three plot files only the hourly and minute plot files are created again.
Note that for point 1 above, I do get other graphs for the same device updating regularly, for example signal strength and battery level for the outdoor sensor (and other temp/humid sensors as well) so it does not look like a problem with the devices.
Most of my plots works fine now but I have some plots that either:
1. Do not refresh at all of any of the minute, hour or daily plots. If I delete the plot files no new files are created. I have tried with Refresh All Plots-command no success. I have tried with re-importing all data and also tried with reloading the plugin but still no success. Even if I create a completely new plot but with same device (like Outdoor temp) the file is created once but then no new refreshing and if I delete the plot files no new files appear when doing refresh or on the automatic refresh period.
2. On another plot (energy plots) I do get updates on the minute and hourly charts but not on the daily chart. Same here as above, if I delete the three plot files only the hourly and minute plot files are created again.
Note that for point 1 above, I do get other graphs for the same device updating regularly, for example signal strength and battery level for the outdoor sensor (and other temp/humid sensors as well) so it does not look like a problem with the devices.
Re: INDIGOplotD -- a plot tool for indigo
CrazyFin,
which version are you using?
and could you send me the output of
print/log/ device
and when you are using MATPLOt also the ..../matplot/matplot.log file
best is to email: karlwachs at me com
Karl
which version are you using?
and could you send me the output of
print/log/ device
and when you are using MATPLOt also the ..../matplot/matplot.log file
best is to email: karlwachs at me com
Karl
Re: INDIGOplotD -- a plot tool for indigo
1. I have tested with both 3.7.33 and the latest one 3.8.1kw123 wrote:CrazyFin,
which version are you using?
and could you send me the output of
print/log/ device
and when you are using MATPLOt also the ..../matplot/matplot.log file
best is to email: karlwachs at me com
Karl
2. Outputs and matplot.log file emailed to you.
I could see in the log output from "print/log states" a lot of message like "not usable". Is this causing the problems?
I can also see the following in matplot.log file:
===========
Traceback (most recent call last):
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/INDIGOplotD.indigoPlugin/Contents/Server Plugin/indigoMPplot.py", line 1538, in <module>
main()
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/INDIGOplotD.indigoPlugin/Contents/Server Plugin/indigoMPplot.py", line 96, in main
plotNow(fNamesToPlot,d0)
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/INDIGOplotD.indigoPlugin/Contents/Server Plugin/indigoMPplot.py", line 663, in plotNow
splineParams, fp,ier,msg= scipy.interpolate.splrep (xx1, theColumnValues, k=3, s=smooth , full_output=1) # smooth factor 50 least smoothing
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/scipy/interpolate/fitpack.py", line 421, in splrep
raise TypeError('m > k must hold')
TypeError: m > k must hold
===========
I also see two matplot log files: matplot.log and matplot1.log
Re: INDIGOplotD -- a plot tool for indigo
It is the smoother in MATLOG that stops ungracefully.
could you try without smoothing?
I have no control over the smoother. Normally if the smoother does not like it it stops gracefully and does not error out. Will catch that error in the next release
Karl
Code: Select all
traceback (most recent call last):
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/INDIGOplotD.indigoPlugin/Contents/Server Plugin/indigoMPplot.py", line 1538, in <module>
main()
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/INDIGOplotD.indigoPlugin/Contents/Server Plugin/indigoMPplot.py", line 96, in main
plotNow(fNamesToPlot,d0)
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/INDIGOplotD.indigoPlugin/Contents/Server Plugin/indigoMPplot.py", line 663, in plotNow
splineParams, fp,ier,msg= scipy.interpolate.splrep (xx1, theColumnValues, k=3, s=smooth , full_output=1) # smooth factor 50 least smoothing
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/scipy/interpolate/fitpack.py", line 421, in splrep
raise TypeError('m > k must hold')
TypeError: m > k must hold
I have no control over the smoother. Normally if the smoother does not like it it stops gracefully and does not error out. Will catch that error in the next release
Karl
Re: INDIGOplotD -- a plot tool for indigo
this option just lists all states in the devices you are using. Some of them can be used (i.e. they are numbers ) others not (they e.g. text = "normal") can not be used for plotting."print/log states" a lot of message like "not usable". Is this causing the problems?
This is "For Your Info" only, just in case you wanted to know what else is available