INDIGO plot --> see new version INDIGOplotD

Posted on
Sun Apr 06, 2014 8:03 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: INDIGO plot

https://www.dropbox.com/s/txl17tj22tv6x8g/INDIGOplot-2-3-1.zip v2-3-1

2-3-0 to 2-3-1: Only change for MATPLOT graphing package, not for GNUPLOT

- Yes, there was a BIG memory leak, could get it down from ~40Mbyte per loop(=minute) to ~ 0.6MByte per minute/loop.
In order to fix that for the time being it restarts itself now once an hour. The memory usage goes between ~ 80Mb and 120Mbyte, then it restarts and uses again ~ 80Mbyte -- that depends on how many plots lines and how much smoothing is selected.

dduff617: could you be so kind and test it?
thanks for your help.


[EDIT] memory leak seems to be gone with fixes. Memory usage goes up to 109 MB over 20 loops and then stays constant.
Karl

Posted on
Mon Apr 07, 2014 4:51 am
Vaillant offline
Posts: 105
Joined: Nov 06, 2011
Location: Belgium

Re: INDIGO plot

Hi,

Updated to the latest version and getting this error repeated.
Was working fine before.
Last version I used was a couple updates before (before matplot).

Greetings,
Adrian

Code: Select all
  indigoplot                       initialized
  indigoplot                      Updating device/property from SQL database: 0:00:00.000049 Temperatuur CV Aanvoer / temperature/average   ...
  indigoplot Error                Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 2804, in runConcurrentThread
  File "plugin.py", line 3054, in getSQLdata
<type 'exceptions.TypeError'>: unsupported operand type(s) for -: 'str' and 'int'

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

Posted on
Mon Apr 07, 2014 7:28 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: INDIGO plot

https://www.dropbox.com/s/wqv6j6l0ynljdhz/INDIGOplot-2-3-2.zip v 2-3-2

Adrian : which version do you use? the line numbers of the error message change as there are more or fewer lines in the code.
if you used 2-3-x this one should fix the issue. Was a problem if there was no data in the sql database for this device / variable
thanks for testing

Karl

Posted on
Mon Apr 07, 2014 9:43 am
Vaillant offline
Posts: 105
Joined: Nov 06, 2011
Location: Belgium

Re: INDIGO plot

Not exactly sure which version I was using.
Thanks for the quick fix.
Updated and the error is gone.

I did notice the 'no records returned'.
I use existing devices and variables and SQL so history must be available.
Am I missing something?

Greetings,
Adrian

Code: Select all
  indigoplot                      Updating device/property from SQL database: 0:00:00.089054 Temp_C_Werkkamer / Temp_C_Werkkamer/average   ...
  indigoplot                      Updating device/property from SQL database: 0:00:00.094422 Temp_C_Woonkamer / Temp_C_Woonkamer/average   ...
  indigoplot                      Updating device/property from SQL database: 0:00:00.097756 CV / onOffState/count   ...
  indigoplot                      Updating device/property from SQL database: 0:00:00.100596 CV / onOffState/count   ...
  indigoplot                                                                    no records returned from database, skipping     ...
  indigoplot                      Updating                 from SQL database: 0:00:00.700860 ... finished
  indigoplot                       initialized


Posted on
Mon Apr 07, 2014 10:25 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: INDIGO plot

ok this fix avoided bad math i.e. no record ID returned (="" instead of a number), now we have to understand why there are no records:

this is a bit complicated, but could you do:
open terminal copy and paste:
cd '/Library/Application Support/Perceptive Automation/Indigo 6/Logs'
sqlite3 -header -column indigo_history.sqlite "SELECT * FROM device_history_xxxxx LIMIT 1;"

replace xxxxx with the device id of "CV". You can get it by right clicking on the device in the indigo home screen and select copy ID

could you get me the output?

Thanks

Karl
[EDITED the SQL command less output ...]
Last edited by kw123 on Mon Apr 07, 2014 9:28 pm, edited 2 times in total.

Posted on
Mon Apr 07, 2014 10:28 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: INDIGO plot

dduff617: could you get me a screen shot of the configuration not able to save error. I tried many things to get your error, but failed..

thanks

Karl

Posted on
Mon Apr 07, 2014 6:09 pm
dduff617 offline
Posts: 660
Joined: Jul 05, 2006
Location: Massachusetts, USA

Re: INDIGO plot

trying to post config dialog captured via grab.app.
Attachments
indigoplot-config-error.png
indigoplot-config-error.png (145.23 KiB) Viewed 4416 times

Posted on
Mon Apr 07, 2014 8:33 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: INDIGO plot

ok I accept you see it, But I don't know how its created..
Code: Select all
########################################
   def validatePrefsConfigUi(self,  valuesDict=None, typeId="", targetId=0):
      if self.removeThisDevice > 0: self.removeDevice()
      
      if self.indigoCommand != "initData": self.indigoCommand = "redoParameters"
      self.debugEnable                        = valuesDict["debugEnable"]
      self.indigoInitialized                  = True
      valuesDict["text1-1"]                     = " "
      valuesDict["text2-1"]                     = " "
      valuesDict["text3-1"]                     = " "
      valuesDict["selectedExistingOrNewDevice"]   = 0
      valuesDict["selectedExistingOrNewPlot"]      = 0
      valuesDict["selectedExistingOrNewLine"]      = 0
      valuesDict["selectDevicePropsOK"]         = False
      valuesDict["selectLinesOK"]               = False
      valuesDict["Experts"]                  = False
      valuesDict["ExpertsAndDevices"]            = False
      valuesDict["ExpertsAndPlots"]            = False
      valuesDict["ExpertsAndLines"]            = False
      valuesDict["DefineDevicesAndNew"]         = False
      valuesDict["DefineDevicesAndOld"]         = False
      self.pluginPrefs["plotFname"]            = ""
      self.pluginPrefs["plotTitleText"]         = "None"
      self.plotNow(theText="plot Now")

      if self.devicesAdded == 1:self.devicesAdded = 2
      self.waitWithPlotting                  = False
      
      return (True, valuesDict)


question for Matt and or Jay: with attached code, how can this error message as posted by dduff617 after clicking the <save> button happen?
I though the error message appears ONLY with "return (False ..."


Karl

Posted on
Mon Apr 07, 2014 11:50 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: INDIGO plot

dduff617: do you have any indigo plot message in the log file when you get the red error message?

Posted on
Tue Apr 08, 2014 4:50 am
Vaillant offline
Posts: 105
Joined: Nov 06, 2011
Location: Belgium

Re: INDIGO plot

Hi,

ok this fix avoided bad math i.e. no record ID returned (="" instead of a number), now we have to understand why there are no records:

this is a bit complicated, but could you do:
open terminal copy and paste:
cd '/Library/Application Support/Perceptive Automation/Indigo 6/Logs'
sqlite3 -header -column indigo_history.sqlite "SELECT * FROM device_history_xxxxx LIMIT 1;"

replace xxxxx with the device id of "CV". You can get it by right clicking on the device in the indigo home screen and select copy ID

could you get me the output?


It returned 'Error: database disk image is malformed'.
Searched for the error in the forum and it turns out that my database is corrupt.
Deleted the SQL-file and the database is rebuild.

So it is not IndigoPlot.
Thanks for pointing me in the right direction.
Had no idea (no error messages) that I had a corrupt database.

Greetings,
Adrian

Posted on
Tue Apr 08, 2014 7:06 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: INDIGO plot

ok thanks, You should check why it was corrupt. Did you have crashes?
I would do a disk check with disk utility, there might be more surprises. These things come seldom alone. .. and as usual: make a complete disk backup, with e.g. superduper, there is a free version you can download.

Karl

Posted on
Thu Apr 10, 2014 5:05 am
Vaillant offline
Posts: 105
Joined: Nov 06, 2011
Location: Belgium

Re: INDIGO plot

@Karl,

Used disk utility and all is ok. Why it corrupted I do not know. Will monitor. Thanks for the tips.
Greetings,
Adrian

Posted on
Mon Apr 14, 2014 6:21 am
haavarda offline
User avatar
Posts: 702
Joined: Aug 18, 2012
Location: Norway

Re: INDIGO plot

Hi,
I am new to this plugin and I am trying to install it.
When I enable the plugin I get the following error in the log:

Code: Select all
 indigoplot                      initializing  ... 2-3-2
  indigoplot Error                Error in plugin execution startup:

Traceback (most recent call last):
  File "plugin.py", line 54, in startup
<type 'exceptions.AttributeError'>: 'ServerInfo' object has no attribute 'getInstallFolderPath'

  indigoplot Error                Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 2724, in runConcurrentThread
<type 'exceptions.AttributeError'>: 'Plugin' object has no attribute 'maxColumns'

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


Anyone have any idea of what is wrong?
Hope someone can point me in the right direction.

regrads

Håvard

Posted on
Mon Apr 14, 2014 9:45 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: INDIGO plot

haavarda: do you see the log file entry: "initializing ... 2-3-2"?

Matt, Jay: this is the section that creates the error:
Code: Select all
   def startup(self):
      version="2-3-2"
      self.indigoInitialized          =   False
      self.logMessage(u"initializing  ... "+version,1)
      self.indigoPath = indigo.server.getInstallFolderPath()  #<====== error


Any Idea why this would create the error message.



Karl

Posted on
Mon Apr 14, 2014 10:29 am
jay (support) offline
Site Admin
User avatar
Posts: 18216
Joined: Mar 19, 2008
Location: Austin, Texas

Re: INDIGO plot

Seems likely he's using an Indigo version that predates the addition of the getInstallFolderPath() method call. It was introduced in API version 1.10 which shipped with Indigo 6 b11. Your plugin should specify (via the ServerApiVersion key in the Info.plist) the minimum API version required for it to function.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Who is online

Users browsing this forum: No registered users and 1 guest