Matplotlib Plugin for Indigo 7 - New!

Posted on
Sun Nov 27, 2016 7:32 am
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: Matplotlib Plugin for Indigo 7 - New!

Hi Dave, just FYI - still getting these after upgrading to version 0.2.02

Code: Select all
Nov 27, 2016, 4:49:16 AM
   Error                           plugin "Matplotlib 0.2.02" (pid 4277) unexpectedly stopped -- restarting in 5 seconds
   Reloading plugin "Matplotlib 0.2.02"
   Starting plugin "Matplotlib 0.2.02" (pid 4282)
   Started plugin "Matplotlib 0.2.02
"

_______
Norm

Posted on
Sun Nov 27, 2016 9:47 am
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib Plugin for Indigo 7 - New!

Thanks for letting me know. Can you tell me what your Indigo Server hardware looks like?

Mine is: Late 2009 iMac, 3.06 GHz Core 2 Duo, 12 GB Ram, OS X 10.11.6, Indigo 7.0.2

These seem to be occurring during the time when the plugin is asleep between refreshes. I don't see anything in my console log at the last time mine restarted--other than a message regarding a LogMeIn launch agent--which I really need to sort because I don't use LogMeIn anymore.

These restarts won't hurt anything, but with a broader install base maybe we can figure out what's causing them.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sun Nov 27, 2016 10:07 am
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: Matplotlib Plugin for Indigo 7 - New!

Sure - see below - BTW, no worries just wanted to let you know....
Attachments
2016-11-27_08-06-33.jpeg
2016-11-27_08-06-33.jpeg (17.14 KiB) Viewed 3291 times

_______
Norm

Posted on
Sun Nov 27, 2016 1:35 pm
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib Plugin for Indigo 7 - New!

norcoscia wrote:
Sure - see below - BTW, no worries just wanted to let you know....

Thanks!

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sun Nov 27, 2016 8:12 pm
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib Plugin for Indigo 7 - New!

Moved to a new subforum.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue Nov 29, 2016 2:14 pm
richo offline
Posts: 158
Joined: Nov 25, 2014
Location: Pomorskie, Poland

Re: Matplotlib Plugin for Indigo 7 - New!

Hi Dave,

I was trying to use a Multiline Chart just with variables and it couldn't be created with an error:
Code: Select all
   Matplotlib Critical Error       Chart multiline WU message: Check the structure of the CSV file ('key name 64570591 not found in database')


Have looked into log file and source of plugin.py and it seems that there is an error in line 1360 - there is no int() function for variable text conversion - after adding it the chart is created w/o problem :o
Could you please verify it... here is a working code

Code: Select all
                    text_to_plot = unicode(indigo.variables[int(p_dict['thing'])].value)

Ryszard

Posted on
Tue Nov 29, 2016 4:46 pm
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib Plugin for Indigo 7 - New!

richo wrote:
Hi Dave,

I was trying to use a Multiline Chart just with variables and it couldn't be created with an error:
Code: Select all
   Matplotlib Critical Error       Chart multiline WU message: Check the structure of the CSV file ('key name 64570591 not found in database')


Have looked into log file and source of plugin.py and it seems that there is an error in line 1360 - there is no int() function for variable text conversion - after adding it the chart is created w/o problem :o
Could you please verify it... here is a working code

Code: Select all
                    text_to_plot = unicode(indigo.variables[int(p_dict['thing'])].value)

See? Now that's what I'm talking about. A bug report with a fix built right in!

Thanks so much for reporting (and fixing) my mistake. I've already included your fix--which will be in the next version.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Wed Nov 30, 2016 6:46 am
rvarela offline
Posts: 81
Joined: Oct 16, 2012

Re: Matplotlib Plugin for Indigo 7 - New!

Hi,

Well, I'm affraid that this is simply a problem report, with no fix included :D
First of all, thanks very much for the plugin, it is awesome and works very well for such an early release number. My question is whether there is a limit in the number of devices we can monitor in a single csv engine. In my enthusiasm, I added 10 devices. When I try to add the 11th, it substitutes one of the existing devices. No specific message at the event log, at least at the default log level specified. Is it as such, or can I do something to fix/increase that number?

Thanks again,

Posted on
Wed Nov 30, 2016 7:13 am
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib Plugin for Indigo 7 - New!

rvarela wrote:
Hi,

Well, I'm affraid that this is simply a problem report, with no fix included :D
First of all, thanks very much for the plugin, it is awesome and works very well for such an early release number. My question is whether there is a limit in the number of devices we can monitor in a single csv engine. In my enthusiasm, I added 10 devices. When I try to add the 11th, it substitutes one of the existing devices. No specific message at the event log, at least at the default log level specified. Is it as such, or can I do something to fix/increase that number?

Thanks again,

Thanks for the kind words! It's something that I had been wanting to do for a while and Indigo 7 was just the kick in the pants I needed to start writing the thing in earnest.

We're going to have to dig a little deeper to see what might be going on. I have one CSV Engine device supporting 23 elements with no apparent issues. There may be a theoretical limit to the number of elements that the device can support but whatever that limit is I expect it would be quite large.

To explain what's happening in the plugin: When you add a data element to the engine, the plugin saves the field data (name, id, value source) into a Python dictionary and then saves that dictionary to a device property called 'columnDict'. It looks like this:
Code: Select all
     columnDict : {u'k13': (u'energy clamp 2', u'990930915', u'accumEnergyTotal'), u'k12': (u'garage humidity', u'250023431', u'sensorValue')...}

The dictionary keys (k13, k12) are assigned automatically. The plugin should not be creating a key that already exists--it just finds the highest number and adds 1 to it for the next key. It should never go back to reuse keys that may have been used in the past.

Please run a print of the CSV Engine dict and post your 'columnDict' property (or PM it to me if it contains private data) and we'll see if that tells us anything.
Code: Select all
indigo.server.log(unicode(indigo.devices[CSV_ENGINE_ID]))

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Wed Nov 30, 2016 7:19 am
rvarela offline
Posts: 81
Joined: Oct 16, 2012

Re: Matplotlib Plugin for Indigo 7 - New!

Thanks. Coming back from work in the afternoon I'll post it


Sent from my iPhone using Tapatalk

Posted on
Wed Nov 30, 2016 8:10 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Matplotlib Plugin for Indigo 7 - New!

I don't see any mention of prerequisites for this. Are any non-indigo modules like GNUPLOT required for this?

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Wed Nov 30, 2016 8:33 am
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib Plugin for Indigo 7 - New!

Different Computers wrote:
I don't see any mention of prerequisites for this. Are any non-indigo modules like GNUPLOT required for this?

The only prerequisites for using the plugin are Indigo 7 and Python 2.7. Otherwise, everything you need to run the plugin is either already available in Apple's Python install or shipped within the plugin package.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Wed Nov 30, 2016 9:37 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Matplotlib Plugin for Indigo 7 - New!

DaveL17 wrote:
The only prerequisites for using the plugin are Indigo 7 and Python 2.7. Otherwise, everything you need to run the plugin is either already available in Apple's Python install or shipped within the plugin package.


Which really means the only prerequisite is Indigo 7, since I7 itself requires Python 2.7. ;)

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Nov 30, 2016 12:03 pm
rvarela offline
Posts: 81
Joined: Oct 16, 2012

Re: Matplotlib Plugin for Indigo 7 - New!

Well, here is a quick dump of what shows in the log. Hope that helps.

Interactive Shell address :
batteryLevel : None
buttonGroupCount : 0
configured : True
description : Motor de creación de archivos CSV
deviceTypeId : csvEngine
displayStateId : onOffState
displayStateImageSel : SensorOn
displayStateValRaw : True
displayStateValUi : Enabled
enabled : True
energyAccumBaseTime : None
energyAccumTimeDelta : None
energyAccumTotal : None
energyCurLevel : None
errorState :
folderId : 1053995722
globalProps : MetaProps : (dict)
com.fogbert.indigoplugin.matplotlib : (dict)
addItemFieldsCompleted : false (bool)
addKey : (string)
addSource : (string)
addState : (string)
addValue : (string)
columnDict : {u'k10': (u'Temperatura comedor', u'778518613', u'sensorValue'), u'k3': (u'Enchufe cocina', u'649404856', u'curEnergyLevel'), u'k2': (u'Energia total instantanea', u'291116577', u'curEnergyLevel'), u'k1': (u'Temperatura hall', u'1740076819', u'sensorValue'), u'k7': (u'Enchufe nevera', u'550111876', u'curEnergyLevel'), u'k6': (u'Enchufe microondas', u'409151887', u'curEnergyLevel'), u'k5': (u'Enchufe lavavajillas', u'2682102', u'curEnergyLevel'), u'k4': (u'Enchufe sala', u'861645316', u'curEnergyLevel'), u'k9': (u'Temperatura bajo', u'643746878', u'sensorValue'), u'k8': (u'Enchufe caldera', u'824166665', u'curEnergyLevel')} (string)
columnList : (string)
editKey : (string)
editSource : (string)
editState : (string)
editValue : (string)
isColumnSelected : false (bool)
numLinesToKeep : 1000 (string)
previousKey : (string)
id : 801537558
lastChanged : 2016-11-30 18:49:06
lastSuccessfulComm : 2016-11-30 18:49:06
model : CSV Engine
name : CSV Engine
ownerProps : com.fogbert.indigoplugin.matplotlib : (dict)
addItemFieldsCompleted : false (bool)
addKey : (string)
addSource : (string)
addState : (string)
addValue : (string)
columnDict : {u'k10': (u'Temperatura comedor', u'778518613', u'sensorValue'), u'k3': (u'Enchufe cocina', u'649404856', u'curEnergyLevel'), u'k2': (u'Energia total instantanea', u'291116577', u'curEnergyLevel'), u'k1': (u'Temperatura hall', u'1740076819', u'sensorValue'), u'k7': (u'Enchufe nevera', u'550111876', u'curEnergyLevel'), u'k6': (u'Enchufe microondas', u'409151887', u'curEnergyLevel'), u'k5': (u'Enchufe lavavajillas', u'2682102', u'curEnergyLevel'), u'k4': (u'Enchufe sala', u'861645316', u'curEnergyLevel'), u'k9': (u'Temperatura bajo', u'643746878', u'sensorValue'), u'k8': (u'Enchufe caldera', u'824166665', u'curEnergyLevel')} (string)
columnList : (string)
editKey : (string)
editSource : (string)
editState : (string)
editValue : (string)
isColumnSelected : false (bool)
numLinesToKeep : 1000 (string)
previousKey : (string)
pluginId : com.fogbert.indigoplugin.matplotlib
pluginProps : emptyDict : (dict)
protocol : Plugin
remoteDisplay : True
states : States : (dict)
csvLastUpdated : 2016-11-30 18:49:06.060094 (string)
onOffState : true (bool)
onOffState.ui : Enabled (string)
subModel :
supportsAllLightsOnOff : False
supportsAllOff : False
supportsStatusRequest : False
version : None

Posted on
Wed Nov 30, 2016 4:48 pm
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib Plugin for Indigo 7 - New!

rvarela wrote:
Well, here is a quick dump of what shows in the log. Hope that helps.

Well, it does show that the dict looks healthy. However, I can reproduce your problem now so let me dig into it a bit further. Something obviously changed since I created my 23 devices.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Page 5 of 19 1, 2, 3, 4, 5, 6, 7, 8 ... 19

Who is online

Users browsing this forum: No registered users and 5 guests