Matplotlib Plugin for Indigo 7 - New!

Posted on
Mon Feb 20, 2017 5:03 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: Matplotlib Plugin for Indigo 7 - New!

I write out the info as a Json and the external py program continuously reads that json ( every 10 secs) and if anything new : make new plots


Sent from my iPhone using Tapatalk

Posted on
Mon Feb 20, 2017 5:17 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib Plugin for Indigo 7 - New!

Busta999 wrote:
At the risk of over reporting :-)

If I use a Scatter Chart and select Pixel for entries then I get the following Critical Error on trying to Redraw Graph

Code: Select all
   Matplotlib Critical Error       Chart - Test - scatter: Check path to CSV file (Unrecognized marker style PIX)
   Matplotlib Critical Error       ValueError: ordinal must be >= 1

Not at all! This is is a great find; I'm surprised it's taken this long to surface. I've found and repaired the bug and the fix will be available in the next version. Until I upload the new version, this bug will affect Pixel, Triangle Left, and Triangle Right marker styles for scatter charts only.

By the way discovering some really useful info on power usage around the house and how to reduce it.

Nice. Glad to hear that you're finding the plugin useful!

Dave

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

[My Plugins] - [My Forums]

Posted on
Mon Feb 20, 2017 5:18 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib Plugin for Indigo 7 - New!

kw123 wrote:
I write out the info as a Json and the external py program continuously reads that json ( every 10 secs) and if anything new : make new plots


Sent from my iPhone using Tapatalk

Thanks Karl.

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

[My Plugins] - [My Forums]

Posted on
Mon Feb 20, 2017 9:24 am
Busta999 offline
User avatar
Posts: 714
Joined: Mar 30, 2016
Location: Wales UK

Re: Matplotlib Plugin for Indigo 7 - New!

Now feel free to say if I am getting greedy/over ambitious.

The historical data graphing is great and allows for some very useful analysis, loving what i can do with it.

But, is there a way I can also just capture the last 3 or 5 readings and create a very small little graph to indicate trend - i.e.

20 º C / or 20 º C\ or 20 º C -- for trending up, down or staying static

So instead of the / , \ -- actually have a small graph with the trend.

This could then be inserted into overview Control Page

I have tried creating a second CSV Engine with just retain last 5 entries but not sure how to plug into it, if you can.

Posted on
Mon Feb 20, 2017 10:07 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib Plugin for Indigo 7 - New!

Busta999 wrote:
Now feel free to say if I am getting greedy/over ambitious.

The historical data graphing is great and allows for some very useful analysis, loving what i can do with it.

But, is there a way I can also just capture the last 3 or 5 readings and create a very small little graph to indicate trend - i.e.

20 º C / or 20 º C\ or 20 º C -- for trending up, down or staying static

So instead of the / , \ -- actually have a small graph with the trend.

This could then be inserted into overview Control Page

I have tried creating a second CSV Engine with just retain last 5 entries but not sure how to plug into it, if you can.

Not greedy at all, but it's getting a bit wide of the original intent of the plugin (to create simple, uniform graphical charts for control pages). Probably the simplest approach to create what you're after is to create the CSV data outside the plugin and save that data to the same folder that the plugin uses. In that way, the "smaller" CSV files will be available within the plugin for charting just like the rest. I hope that makes sense! :D

I'll add a TODO list item to consider ways to make variable CSV data file lengths or user settings to vary the number of observations shown.

Please keep the ideas and bug reports coming. I really do appreciate it.
Dave

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

[My Plugins] - [My Forums]

Posted on
Mon Feb 20, 2017 11:39 am
Busta999 offline
User avatar
Posts: 714
Joined: Mar 30, 2016
Location: Wales UK

Re: Matplotlib Plugin for Indigo 7 - New!

DaveL17 wrote:
Busta999 wrote:
Now feel free to say if I am getting greedy/over ambitious.

The historical data graphing is great and allows for some very useful analysis, loving what i can do with it.

But, is there a way I can also just capture the last 3 or 5 readings and create a very small little graph to indicate trend - i.e.

20 º C / or 20 º C\ or 20 º C -- for trending up, down or staying static

So instead of the / , \ -- actually have a small graph with the trend.

This could then be inserted into overview Control Page

I have tried creating a second CSV Engine with just retain last 5 entries but not sure how to plug into it, if you can.

Not greedy at all, but it's getting a bit wide of the original intent of the plugin (to create simple, uniform graphical charts for control pages). Probably the simplest approach to create what you're after is to create the CSV data outside the plugin and save that data to the same folder that the plugin uses. In that way, the "smaller" CSV files will be available within the plugin for charting just like the rest. I hope that makes sense! :D

I'll add a TODO list item to consider ways to make variable CSV data file lengths or user settings to vary the number of observations shown.

Please keep the ideas and bug reports coming. I really do appreciate it.
Dave



Makes sense

At the moment I am using the graphs as interim diagnostic tools to identify energy usage around the house and look closer at things that are draining a disproportionate amount of energy on standby.

i.e. swapped out a 42" TV that was using 200W in use and 40W in standby with a 32" TV that uses 41W in use and 5W in standby - as it is the screen I just have a fake fire burning in the fireplace managed to make a significant dent in it's running costs.

Actually the fake fire really makes you feel much warmer - the warm glows and gentle crackle in the background has a real affect.

Since putting it in the thermostat is set permanently to 19.5 C for the house and no longer keeps getting turned up when I am not looking :-)

Posted on
Mon Feb 20, 2017 11:46 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib Plugin for Indigo 7 - New!

Busta999 wrote:
Makes sense

At the moment I am using the graphs as interim diagnostic tools to identify energy usage around the house and look closer at things that are draining a disproportionate amount of energy on standby.

i.e. swapped out a 42" TV that was using 200W in use and 40W in standby with a 32" TV that uses 41W in use and 5W in standby - as it is the screen I just have a fake fire burning in the fireplace managed to make a significant dent in it's running costs.

Actually the fake fire really makes you feel much warmer - the warm glows and gentle crackle in the background has a real affect.

Since putting it in the thermostat is set permanently to 19.5 C for the house and no longer keeps getting turned up when I am not looking :-)

That's great! I'm glad the plugin is helping you to save some money. It's too hard to come by.

Dave

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

[My Plugins] - [My Forums]

Posted on
Tue Feb 28, 2017 6:32 am
Busta999 offline
User avatar
Posts: 714
Joined: Mar 30, 2016
Location: Wales UK

Re: Matplotlib Plugin for Indigo 7 - New!

Hi

I have upgraded to 4.02

I am getting these errors

Code: Select all
  Reloading plugin "Matplotlib 0.4.02"
   Stopping plugin "Matplotlib 0.4.02" (pid 9048)
   Stopped plugin "Matplotlib 0.4.02"
   Starting plugin "Matplotlib 0.4.02" (pid 9879)
   Started plugin "Matplotlib 0.4.02"
   Matplotlib Warning              Found CSV Data element with missing source ID. Please check to ensure all CSV sources are properly configured.
   Matplotlib Warning              Invalid CSV definition. local variable 'state_to_write' referenced before assignment
   Matplotlib Warning              Found CSV Data element with missing source ID. Please check to ensure all CSV sources are properly configured.
   Matplotlib Warning              Invalid CSV definition. local variable 'state_to_write' referenced before assignment
   Matplotlib Warning              Chart - Daily Power Usage: X axis label is suppressed to make room for the chart legend.
   Matplotlib Warning              Chart - Daily Power Usage Mac Mini and Internet: X axis label is suppressed to make room for the chart legend.


I have gone through all the source ID one by one and all are good.

All the data is being collected and graphs are working.

With debug on :-

Code: Select all
Started plugin "Matplotlib 0.4.02"
   Matplotlib                     
   Matplotlib                      ======================= Initializing New Plugin Session ========================
   Matplotlib                      Indigo version:                 7.0.3
   Matplotlib                      Matplotlib version:             1.3.1
   Matplotlib                      Numpy version:                  1.8.0rc1
   Matplotlib                      Matplotlib Plugin version:      0.4.02
   Matplotlib                      Matplotlib RC Path:             /Library/Application Support/Perceptive Automation/Indigo 7/Plugins/matplotlib.indigoPlugin/Contents/Server Plugin/matplotlibrc
   Matplotlib                      Matplotlib Plugin log location: /Library/Application Support/Perceptive Automation/Indigo 7/Logs/com.fogbert.indigoplugin.matplotlib
   Matplotlib Debug                Log Level =                     10
   Matplotlib                      Updating device properties.
   Matplotlib Debug                Starting device: Chart - Daily Power Usage
   Matplotlib Debug                Starting device: Chart - Daily Power Usage Mac Mini and Internet
   Matplotlib Debug                Starting device: Chart - Freezer Power and Temperature
   Matplotlib Debug                Starting device: Chart - Fridge Power and Temperature
   Matplotlib Debug                Starting device: Chart - Total Daily Power Usage
   Matplotlib Debug                Starting device: Chart - Upstairs Temperature
   Matplotlib Debug                Starting device: CSV Engine
   Matplotlib                      ======================== Initializing Concurrent Thread ========================
   Matplotlib Debug                *********** Refresh the CSV ************
   Matplotlib Warning              Found CSV Data element with missing source ID. Please check to ensure all CSV sources are properly configured.
   Matplotlib Warning              Invalid CSV definition. local variable 'state_to_write' referenced before assignment
   Matplotlib Warning              Found CSV Data element with missing source ID. Please check to ensure all CSV sources are properly configured.
   Matplotlib Warning              Invalid CSV definition. local variable 'state_to_write' referenced before assignment
   Matplotlib                      CSV data updated successfully.
   Matplotlib Debug               


Still unable to find why it is complaining.

The only thing I can think of is the two TFA remote temp sensors. They need 'tweaking' by the Adapters Plugin to get the temperature right.

They are configured as 'Custom Formula Adapter (numeric result)

Code: Select all
Timestamp   Kitchen - Fridge Temperature
23:07.1   5.5
27:09.8   5.6
27:09.9   5.6
29:12.8   5.6
29:12.8   5.6
44:14.3   5.2
59:16.0   5.2
14:17.5   5.7
29:19.0   5
44:20.8   5.3
58:45.8   5.7
13:47.2   4.9
20:03.7   4.8
35:05.2   6
50:06.5   6.5
05:07.8   4.2
20:09.2   4.4


The csv, above, looks ok

Posted on
Tue Feb 28, 2017 6:45 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib Plugin for Indigo 7 - New!

Hi Busta999 - sorry that you're having trouble. Unless I'm mistaken, I haven't made a change to that part of the code in a long time. The error you're seeing is because there appears to be something amiss in the CSV Engine definition for one or two of your devices. Please do me a favor and run the following code in an Indigo script window (or via the Indigo scripting shell) and post the result.

Code: Select all
dev = indigo.devices[CSV Engine Device ID Goes Here]
indigo.server.log(unicode(dev))

Be sure to enter the ID of your CSV Engine device in the code above.

Dave

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

[My Plugins] - [My Forums]

Posted on
Fri Mar 03, 2017 8:18 am
Busta999 offline
User avatar
Posts: 714
Joined: Mar 30, 2016
Location: Wales UK

Re: Matplotlib Plugin for Indigo 7 - New!

DaveL17 wrote:
Hi Busta999 - sorry that you're having trouble. Unless I'm mistaken, I haven't made a change to that part of the code in a long time. The error you're seeing is because there appears to be something amiss in the CSV Engine definition for one or two of your devices. Please do me a favor and run the following code in an Indigo script window (or via the Indigo scripting shell) and post the result.

Code: Select all
dev = indigo.devices[CSV Engine Device ID Goes Here]
indigo.server.log(unicode(dev))

Be sure to enter the ID of your CSV Engine device in the code above.

Dave


Ok took me a while, sorry.

Code: Select all
   Interactive Shell               address :
batteryLevel : None
buttonGroupCount : 0
configured : True
description :
deviceTypeId : csvEngine
displayStateId : onOffState
displayStateImageSel : SensorOn
displayStateValRaw : True
displayStateValUi : Updated
enabled : True
energyAccumBaseTime : None
energyAccumTimeDelta : None
energyAccumTotal : None
energyCurLevel : None
errorState :
folderId : 1131037178
globalProps : MetaProps : (dict)
     com.fogbert.indigoplugin.matplotlib : (dict)
          addItemFieldsCompleted : false (bool)
          addKey :  (string)
          addSource :  (string)
          addState :  (string)
          addValue :  (string)
          bar1Color : #FFFFFF (string)
          bar1ColorOther : #FFFFFF (string)
          bar1Source : None (string)
          bar2Color : #FFFFFF (string)
          bar2ColorOther : #FFFFFF (string)
          bar2Source : None (string)
          bar3Color : #FFFFFF (string)
          bar3ColorOther : #FFFFFF (string)
          bar3Source : None (string)
          bar4Color : #FFFFFF (string)
          bar4ColorOther : #FFFFFF (string)
          bar4Source : None (string)
          chartTitle : Test (string)
          columnDict : {u'k12': (u'Oregon 3', u'131776949', u'temperature'), u'k11': (u'', u'', u''), u'k10': (u'', u'', u''), u'k17': (u'Fridge Daily Power Usage', u'499925431', u'accumEnergyTotal'), u'k16': (u'Freezer Daily Power Usage', u'503227130', u'accumEnergyTotal'), u'k15': (u'Netatmo Remote Sensor', u'1590917963', u'Temperature'), u'k14': (u'Oregon 4', u'1141290228', u'temperature'), u'k19': (u'Lounge Fireplace', u'1021086169', u'accumEnergyTotal'), u'k18': (u'AV Daily Power Usage', u'1793706057', u'accumEnergyTotal'), u'k2': (u'Freezer Power', u'503227130', u'curEnergyLevel'), u'k7': (u'Kitchen Freezer Temperature', u'1758125628', u'sensorValue'), u'k4': (u'Oregon1', u'181303829', u'temperature'), u'k9': (u'Oregon 2', u'1286868394', u'temperature'), u'k8': (u'Freezer Ambient Temperature', u'449027158', u'sensorValue'), u'k22': (u'Kitchen - Fridge Temperature', u'1572626410', u'sensorValue'), u'k23': (u'Power Monitor - Breadmaker', u'21851346', u'curEnergyLevel'), u'k20': (u'FirePlace TV Power Monitor', u'720368130', u'accumEnergyTotal'), u'k21': (u'Fridge Current Power', u'499925431', u'curEnergyLevel'), u'k26': (u'Outdoors Temp Sensor 4', u'1748344969', u'sensorValue'), u'k27': (u'Study Temp Sensor 3', u'971616575', u'sensorValue'), u'k24': (u'Daily Total Power Monitor - Breadmaker', u'21851346', u'accumEnergyTotal'), u'k25': (u'Mac Mini and Internet', u'794988578', u'accumEnergyTotal')} (string)
          columnList :  (string)
          customAxisLabelX : X Axis (string)
          customAxisLabelY : Y Axis (string)
          customLineSegments : None (string)
          customLineStyle : - (string)
          customSizeChart : false (bool)
          customSizeFont : false (bool)
          customSizeHeight : None (string)
          customSizeWidth : None (string)
          customTickFontSize :  (string)
          customTicksLabelY :  (string)
          customTicksY :  (string)
          customTitleFontSize :  (string)
          editKey :  (string)
          editSource :  (string)
          editState :  (string)
          editValue :  (string)
          enableCustomLineSegmentsSetting : false (bool)
          fileName : Test1.png (string)
          isColumnSelected : true (bool)
          line1Annotate : false (bool)
          line1Color : #FFFFFF (string)
          line1ColorOther : #FFFFFF (string)
          line1Fill : false (bool)
          line1Legend :  (string)
          line1Marker : None (string)
          line1MarkerColor : #FFFFFF (string)
          line1MarkerColorOther : #FFFFFF (string)
          line1Source : None (string)
          line1Style : None (string)
          line2Annotate : false (bool)
          line2Color : #FFFFFF (string)
          line2ColorOther : #FFFFFF (string)
          line2Fill : false (bool)
          line2Legend :  (string)
          line2Marker : None (string)
          line2MarkerColor : #FFFFFF (string)
          line2MarkerColorOther : #FFFFFF (string)
          line2Source : None (string)
          line2Style : None (string)
          line3Annotate : false (bool)
          line3Color : #FFFFFF (string)
          line3ColorOther : #FFFFFF (string)
          line3Fill : false (bool)
          line3Legend :  (string)
          line3Marker : None (string)
          line3MarkerColor : #FFFFFF (string)
          line3MarkerColorOther : #FFFFFF (string)
          line3Source : None (string)
          line3Style : None (string)
          line4Annotate : false (bool)
          line4Color : #FFFFFF (string)
          line4ColorOther : #FFFFFF (string)
          line4Fill : false (bool)
          line4Legend :  (string)
          line4Marker : None (string)
          line4MarkerColor : #FFFFFF (string)
          line4MarkerColorOther : #FFFFFF (string)
          line4Source : None (string)
          line4Style : None (string)
          lineLabel1 : true (bool)
          lineLabel2 : true (bool)
          lineLabel3 : false (bool)
          lineLabel4 : false (bool)
          numLinesToKeep : 10000 (string)
          plotLine1Max : true (bool)
          plotLine1Min : true (bool)
          plotLine2Max : false (bool)
          plotLine2Min : false (bool)
          plotLine3Max : false (bool)
          plotLine3Min : false (bool)
          plotLine4Max : false (bool)
          plotLine4Min : false (bool)
          previousKey : k27 (string)
          rectWide : false (bool)
          showLegend : false (bool)
          showxAxisGrid : true (bool)
          showyAxisGrid : false (bool)
          xAxisBins : daily (string)
          xAxisLabel : true (bool)
          xAxisLabelFormat : %A (string)
          yAxisLabel : true (bool)
          yAxisMax : None (string)
          yAxisMin : None (string)
          yAxisPrecision : 0 (string)
          yMirrorValues : false (bool)
id : 393909832
lastChanged : 2017-03-03 14:14:55
lastSuccessfulComm : 2017-03-03 14:14:55
model : CSV Engine
name : CSV Engine
ownerProps : com.fogbert.indigoplugin.matplotlib : (dict)
     addItemFieldsCompleted : false (bool)
     addKey :  (string)
     addSource :  (string)
     addState :  (string)
     addValue :  (string)
     bar1Color : #FFFFFF (string)
     bar1ColorOther : #FFFFFF (string)
     bar1Source : None (string)
     bar2Color : #FFFFFF (string)
     bar2ColorOther : #FFFFFF (string)
     bar2Source : None (string)
     bar3Color : #FFFFFF (string)
     bar3ColorOther : #FFFFFF (string)
     bar3Source : None (string)
     bar4Color : #FFFFFF (string)
     bar4ColorOther : #FFFFFF (string)
     bar4Source : None (string)
     chartTitle : Test (string)
     columnDict : {u'k12': (u'Oregon 3', u'131776949', u'temperature'), u'k11': (u'', u'', u''), u'k10': (u'', u'', u''), u'k17': (u'Fridge Daily Power Usage', u'499925431', u'accumEnergyTotal'), u'k16': (u'Freezer Daily Power Usage', u'503227130', u'accumEnergyTotal'), u'k15': (u'Netatmo Remote Sensor', u'1590917963', u'Temperature'), u'k14': (u'Oregon 4', u'1141290228', u'temperature'), u'k19': (u'Lounge Fireplace', u'1021086169', u'accumEnergyTotal'), u'k18': (u'AV Daily Power Usage', u'1793706057', u'accumEnergyTotal'), u'k2': (u'Freezer Power', u'503227130', u'curEnergyLevel'), u'k7': (u'Kitchen Freezer Temperature', u'1758125628', u'sensorValue'), u'k4': (u'Oregon1', u'181303829', u'temperature'), u'k9': (u'Oregon 2', u'1286868394', u'temperature'), u'k8': (u'Freezer Ambient Temperature', u'449027158', u'sensorValue'), u'k22': (u'Kitchen - Fridge Temperature', u'1572626410', u'sensorValue'), u'k23': (u'Power Monitor - Breadmaker', u'21851346', u'curEnergyLevel'), u'k20': (u'FirePlace TV Power Monitor', u'720368130', u'accumEnergyTotal'), u'k21': (u'Fridge Current Power', u'499925431', u'curEnergyLevel'), u'k26': (u'Outdoors Temp Sensor 4', u'1748344969', u'sensorValue'), u'k27': (u'Study Temp Sensor 3', u'971616575', u'sensorValue'), u'k24': (u'Daily Total Power Monitor - Breadmaker', u'21851346', u'accumEnergyTotal'), u'k25': (u'Mac Mini and Internet', u'794988578', u'accumEnergyTotal')} (string)
     columnList :  (string)
     customAxisLabelX : X Axis (string)
     customAxisLabelY : Y Axis (string)
     customLineSegments : None (string)
     customLineStyle : - (string)
     customSizeChart : false (bool)
     customSizeFont : false (bool)
     customSizeHeight : None (string)
     customSizeWidth : None (string)
     customTickFontSize :  (string)
     customTicksLabelY :  (string)
     customTicksY :  (string)
     customTitleFontSize :  (string)
     editKey :  (string)
     editSource :  (string)
     editState :  (string)
     editValue :  (string)
     enableCustomLineSegmentsSetting : false (bool)
     fileName : Test1.png (string)
     isColumnSelected : true (bool)
     line1Annotate : false (bool)
     line1Color : #FFFFFF (string)
     line1ColorOther : #FFFFFF (string)
     line1Fill : false (bool)
     line1Legend :  (string)
     line1Marker : None (string)
     line1MarkerColor : #FFFFFF (string)
     line1MarkerColorOther : #FFFFFF (string)
     line1Source : None (string)
     line1Style : None (string)
     line2Annotate : false (bool)
     line2Color : #FFFFFF (string)
     line2ColorOther : #FFFFFF (string)
     line2Fill : false (bool)
     line2Legend :  (string)
     line2Marker : None (string)
     line2MarkerColor : #FFFFFF (string)
     line2MarkerColorOther : #FFFFFF (string)
     line2Source : None (string)
     line2Style : None (string)
     line3Annotate : false (bool)
     line3Color : #FFFFFF (string)
     line3ColorOther : #FFFFFF (string)
     line3Fill : false (bool)
     line3Legend :  (string)
     line3Marker : None (string)
     line3MarkerColor : #FFFFFF (string)
     line3MarkerColorOther : #FFFFFF (string)
     line3Source : None (string)
     line3Style : None (string)
     line4Annotate : false (bool)
     line4Color : #FFFFFF (string)
     line4ColorOther : #FFFFFF (string)
     line4Fill : false (bool)
     line4Legend :  (string)
     line4Marker : None (string)
     line4MarkerColor : #FFFFFF (string)
     line4MarkerColorOther : #FFFFFF (string)
     line4Source : None (string)
     line4Style : None (string)
     lineLabel1 : true (bool)
     lineLabel2 : true (bool)
     lineLabel3 : false (bool)
     lineLabel4 : false (bool)
     numLinesToKeep : 10000 (string)
     plotLine1Max : true (bool)
     plotLine1Min : true (bool)
     plotLine2Max : false (bool)
     plotLine2Min : false (bool)
     plotLine3Max : false (bool)
     plotLine3Min : false (bool)
     plotLine4Max : false (bool)
     plotLine4Min : false (bool)
     previousKey : k27 (string)
     rectWide : false (bool)
     showLegend : false (bool)
     showxAxisGrid : true (bool)
     showyAxisGrid : false (bool)
     xAxisBins : daily (string)
     xAxisLabel : true (bool)
     xAxisLabelFormat : %A (string)
     yAxisLabel : true (bool)
     yAxisMax : None (string)
     yAxisMin : None (string)
     yAxisPrecision : 0 (string)
     yMirrorValues : false (bool)
pluginId : com.fogbert.indigoplugin.matplotlib
pluginProps : emptyDict : (dict)
protocol : Plugin
remoteDisplay : True
states : States : (dict)
     csvLastUpdated : 2017-03-03 14:14:55.446466 (string)
     onOffState : true (bool)
     onOffState.ui : Updated (string)
subModel :
supportsAllLightsOnOff : False
supportsAllOff : False
supportsStatusRequest : False
version : None

Posted on
Fri Mar 03, 2017 9:57 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib Plugin for Indigo 7 - New!

That's helpful. The important bit in this instance is this (which I've adjusted for readability):

Code: Select all
columnDict :
{
u'k12': (u'Oregon 3', u'131776949', u'temperature'),
u'k11': (u'', u'', u''),
u'k10': (u'', u'', u''),
u'k17': (u'Fridge Daily Power Usage', u'499925431', u'accumEnergyTotal'),
u'k16': (u'Freezer Daily Power Usage', u'503227130', u'accumEnergyTotal'),
u'k15': (u'Netatmo Remote Sensor', u'1590917963', u'Temperature'),
u'k14': (u'Oregon 4', u'1141290228', u'temperature'),
u'k19': (u'Lounge Fireplace', u'1021086169', u'accumEnergyTotal'),
u'k18': (u'AV Daily Power Usage', u'1793706057', u'accumEnergyTotal'),
u'k2': (u'Freezer Power', u'503227130', u'curEnergyLevel'),
u'k7': (u'Kitchen Freezer Temperature', u'1758125628', u'sensorValue'),
u'k4': (u'Oregon1', u'181303829', u'temperature'),
u'k9': (u'Oregon 2', u'1286868394', u'temperature'),
u'k8': (u'Freezer Ambient Temperature', u'449027158', u'sensorValue'),
u'k22': (u'Kitchen - Fridge Temperature', u'1572626410', u'sensorValue'),
u'k23': (u'Power Monitor - Breadmaker', u'21851346', u'curEnergyLevel'),
u'k20': (u'FirePlace TV Power Monitor', u'720368130', u'accumEnergyTotal'),
u'k21': (u'Fridge Current Power', u'499925431', u'curEnergyLevel'),
u'k26': (u'Outdoors Temp Sensor 4', u'1748344969', u'sensorValue'),
u'k27': (u'Study Temp Sensor 3', u'971616575', u'sensorValue'),
u'k24': (u'Daily Total Power Monitor - Breadmaker', u'21851346', u'accumEnergyTotal'),
u'k25': (u'Mac Mini and Internet', u'794988578', u'accumEnergyTotal')
}

I believe that the issue is definitions 'k10' and 'k11' which don't have valid entries. When you look at the CSV Engine device configuration, do you see something like this (showing blank lines)?
Screen Shot 2017-03-03 at 9.53.15 AM.png
Screen Shot 2017-03-03 at 9.53.15 AM.png (21.97 KiB) Viewed 3347 times

If so, go to the Edit Data Item panel in the CSV Engine, click each blank line in turn, and click Delete Item--and then Save. This *should* clear those errors. I'll add some additional safety checks to the code to help keep this type of thing from happening in the future.

Please let me know how you get on.
Dave

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

[My Plugins] - [My Forums]

Posted on
Fri Mar 03, 2017 11:51 am
Busta999 offline
User avatar
Posts: 714
Joined: Mar 30, 2016
Location: Wales UK

Re: Matplotlib Plugin for Indigo 7 - New!

CSV Capture.jpeg
CSV Capture.jpeg (50.84 KiB) Viewed 3331 times


That was it!!!

But not to indicate a blank one just two blank spaces that I had not noticed.

Many thanks for all your help.

This allowed me to track a 2 year old Fridge in Extra Eco mode which as using way too much power.

Bought a new fridge that will cost £100 a year less to run and is bigger!!

Posted on
Fri Mar 03, 2017 12:39 pm
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib Plugin for Indigo 7 - New!

I'm glad that solved it. I will definitely do some work to tighten that up so that it won't happen going forward (and probably add some internal logic to automatically delete these empty entries).

I'm also glad that the plugin helped you to find a way to save some money. I'm hearing more and more stories like that, which is fantastic. Maybe I should start charging a commission! :D

Matplotlib Plugin for Indigo -- it's great for the planet!™

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

[My Plugins] - [My Forums]

Posted on
Thu Mar 09, 2017 3:29 am
Busta999 offline
User avatar
Posts: 714
Joined: Mar 30, 2016
Location: Wales UK

Re: Matplotlib Plugin for Indigo 7 - New!

DaveL17 wrote:
I'm glad that solved it. I will definitely do some work to tighten that up so that it won't happen going forward (and probably add some internal logic to automatically delete these empty entries).

I'm also glad that the plugin helped you to find a way to save some money. I'm hearing more and more stories like that, which is fantastic. Maybe I should start charging a commission! :D

Matplotlib Plugin for Indigo -- it's great for the planet!™


Thanks for the update 0.4.03 and the six notifications in 3 hours reminding me of it.

Boy, are you keen for people to upgrade :-)
Last edited by Busta999 on Thu Mar 09, 2017 7:00 am, edited 1 time in total.

Posted on
Thu Mar 09, 2017 6:40 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib Plugin for Indigo 7 - New!

Busta999 wrote:
Thanks for the update 0.4.03 and the six notifications in 3 hours reminding me of it.


Heh, sorry about that. It's likely due to the memory leak issue in Matplotlib. If you have a chance, please take a look at the log and see if there were plugin restarts around that time. The notifier should only run once until the next version is released, but this requires saving some information to Indigo about the last notification. If that's not saved successfully, it will repeat--as you found out. :wink:

I'll address the restarts before pulling the plugin out of beta.

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

[My Plugins] - [My Forums]

Page 14 of 19 1 ... 11, 12, 13, 14, 15, 16, 17 ... 19

Who is online

Users browsing this forum: No registered users and 4 guests