Matplotlib Plugin for Indigo 7 - New!

Posted on
Tue Mar 14, 2017 8:32 pm
Professor Falken offline
User avatar
Posts: 289
Joined: Mar 29, 2015

Re: Matplotlib Plugin for Indigo 7 - New!

Dave,

Any idea why I get this error with any addition to the CVS engine device? I've tried both variables and device states, and all give this same error.

Code: Select all
Matplotlib Warning              Error adding column. 'tuple' object has no attribute 'iteritems'


I have yet to successfully add an item.

All of the items I've tried are normal trackable (numeric) data points, and I have filled in all 3 items when attempting to create a new a item. I did delete any "none" items as mentioned earlier in this thread.

Read through this whole thread and don't think I've seen this issue listed. Sorry if I missed it. Running Indigo 7.03 and v0.4.03 of the plugin

Thanks.

Posted on
Wed Mar 15, 2017 5:53 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib Plugin for Indigo 7 - New!

Professor Falken wrote:
Any idea why I get this error with any addition to the CVS engine device?

The smart alec answer is because tuples don't have iteritem attributes. :D

The honest answer is because I introduced new code to try to do some automated cleanup of the CSV list and I fumbled it. I've found the problem code and will push an update after I test it out.

Sorry for the hassle. Please hang tight for a little bit. Thanks for trying the plugin.
Dave

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

[My Plugins] - [My Forums]

Posted on
Wed Mar 15, 2017 7:47 am
roussell offline
User avatar
Posts: 1108
Joined: Aug 18, 2008
Location: Alabama

Re: Matplotlib Plugin for Indigo 7 - New!

DaveL17 wrote:
The smart alec answer is because tuples don't have iteritem attributes. :D


IndigoTrek, episode 44: The trouble with tuples

:lol:

Posted on
Wed Mar 15, 2017 8:11 am
Professor Falken offline
User avatar
Posts: 289
Joined: Mar 29, 2015

Re: Matplotlib Plugin for Indigo 7 - New!

Ha thanks. I just assumed it was me.

Looking forward to getting it working. One danger of indigo is it can lead to Data Addiction. Do I really need a chart of the temperature in my house all day (or my internet speed, or the outside humidity)... of course not. will it be really cool on a control page? Absolutely!

Posted on
Wed Mar 15, 2017 8:21 am
jay (support) offline
Site Admin
User avatar
Posts: 18215
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Matplotlib Plugin for Indigo 7 - New!

roussell wrote:
IndigoTrek, episode 44: The trouble with tuples


:twisted:

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

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

Re: Matplotlib Plugin for Indigo 7 - New!

roussell wrote:
IndigoTrek, episode 44: The trouble with tuples

:lol:

You won the Internet with that one. :D

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

[My Plugins] - [My Forums]

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

Re: Matplotlib Plugin for Indigo 7 - New!

Professor Falken wrote:
Ha thanks. I just assumed it was me.

Looking forward to getting it working. One danger of indigo is it can lead to Data Addiction. Do I really need a chart of the temperature in my house all day (or my internet speed, or the outside humidity)... of course not. will it be really cool on a control page? Absolutely!

I should be posting the new matplotlib plugin release today.

Regarding data, I'm utterly biased. I'm an analyst by trade and live 60 hours a week knee deep in data. My opinion is that, no....you don't really need a chart of the temperature in your house all day. But why not have it available? I have my charts on a couple pages of their own. I can go to those pages and instantly tell if something's amiss (data out of range, device not responding, battery low/dead). I agree that it's not necessary, and it's completely cool!

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

[My Plugins] - [My Forums]

Posted on
Thu Mar 16, 2017 10:49 am
johnpolasek offline
Posts: 911
Joined: Aug 05, 2011
Location: Aggieland, Texas

Re: Matplotlib Plugin for Indigo 7 - New!

DaveL17 wrote:
Regarding data, I'm utterly biased. I'm an analyst by trade and live 60 hours a week knee deep in data. My opinion is that, no....you don't really need a chart of the temperature in your house all day. But why not have it available? I have my charts on a couple pages of their own. I can go to those pages and instantly tell if something's amiss (data out of range, device not responding, battery low/dead). I agree that it's not necessary, and it's completely cool!


+1 on that; I have OSI transmitters in my freezer and freezing compartment of my refrigerator because several years ago we had a (different) refrigerator which had a bad bearing that caused it to sometimes fail to start, go into thermal trip, and then successfully start up a few minutes later. We only noticed it because I happened to hear the buzzzzz CLICK once and got it replaced before it locked up completely (Murphies law, says: while the whole family was out of town for a week)... But now that I have a little 48 hour plot up in the corner of my master control page, that I pull up 2 or 3 times per day, at a glance I can tell if those two regular sawtooth waves (compressor off, temp goes up, compressor kicks in and temp goes down) suddenly start missing some teeth or getting bigger ones, a whole lot quicker...

Posted on
Thu Mar 16, 2017 1:28 pm
Professor Falken offline
User avatar
Posts: 289
Joined: Mar 29, 2015

Re: Matplotlib Plugin for Indigo 7 - New!

+1 on that; I have OSI transmitters in my freezer and freezing compartment of my refrigerator because several years ago we had a (different) refrigerator which had a bad bearing that caused it to sometimes fail to start, go into thermal trip, and then successfully start up a few minutes later. We only noticed it because I happened to hear the buzzzzz CLICK once and got it replaced before it locked up completely (Murphies law, says: while the whole family was out of town for a week)... But now that I have a little 48 hour plot up in the corner of my master control page, that I pull up 2 or 3 times per day, at a glance I can tell if those two regular sawtooth waves (compressor off, temp goes up, compressor kicks in and temp goes down) suddenly start missing some teeth or getting bigger ones, a whole lot quicker...


Ha Ha. Oh yeah, I was just kidding abut the data addiction being a bad thing. I love all the stuff Indigo collects and collates (and hopefully soon charts) for me.

I'd like to know about these temp sensors you mention. I was looking for something (preferably inexpensive) that I could put in my attic, garage, and crawlspace.

Are these something that works in concert with a weather station you have?

Posted on
Thu Mar 16, 2017 7:49 pm
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib Plugin for Indigo 7 - New!

Oh, I knew you were kidding. I'm always looking for ways to make large data sets easy to understand and charts are an obvious choice.

Having all this data available in Indigo is a match made in heaven as far as I'm concerned.

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

[My Plugins] - [My Forums]

Posted on
Fri Mar 17, 2017 8:02 pm
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib Plugin for Indigo 7 - New!

I have posted an update to the plugin to address the null device error in CSV validation.

Hopefully, this will solve the problem. Sorry for the delay; real world got in the way.

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

[My Plugins] - [My Forums]

Posted on
Fri Mar 17, 2017 8:19 pm
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib Plugin for Indigo 7 - New!

Professor Falken wrote:
I'd like to know about these temp sensors you mention.

I know this question wasn't directed at me, but I wanted to let you know about one option that I think is worthwhile.

The Embedded Data Systems 1-Wire Server is a great tool where wired temperature sensors are an option. The server is about $100US, and it works with DS18B20 sensors that are dirt cheap. You can find them on Amazon and eBay for about $1.00US in small bulk (sometimes less). The chips work on three wires (1-wire refers to the data channel) and are very accurate. The key to value is when many sensors are used (prices don't include cable):

1 sensor = $101 avg
2 sensors = $51 avg
4 sensors = $25 avg
22 sensors = $6 avg

Each server can support 1,000 of cable and up to 22 sensors. There are other 1-Wire options like the RPi, but I prefer the EDS because it's self-contained and has pre-built web configuration, and a RESTful API built in. Supports many other types of sensors, too. I have no connection to the company other than being a big fan.

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

[My Plugins] - [My Forums]

Posted on
Fri Mar 17, 2017 9:33 pm
Professor Falken offline
User avatar
Posts: 289
Joined: Mar 29, 2015

Re: Matplotlib Plugin for Indigo 7 - New!

Thanks, I'll definitely look into those sensors.

I updated the plugin and sorta have it working. I first created a few items in the CSV engine, then started making some line charts.

My first question is, when I review the logs, it seems to be creating a new data log entry about every 11 seconds. Is this correct behavior?

I quickly disabled the CSV instance tied to the speedtest plugin device states (upload and download speed), because I certainly didn't want to be running 5-6 speedtests per minute! I don't know what my ISP's data caps are, but I don't want to find out either. I think if I tie these instead to a variable (which I had to create anyway to convert to integers for for display purposes), that would keep the CSV engine from constantly forcing an update (and thus triggering) the speedtest device, right?

But even on the other one tied to my thermostat, should I be polling those every 11 seconds? Or maybe Indigo is doing this already and I'm just pulling the data from Indigo every 11 seconds? I wouldn't think the goal would be to create logs tens of thousands of items long.

Thanks.
Last edited by Professor Falken on Fri Mar 17, 2017 10:35 pm, edited 2 times in total.

Posted on
Fri Mar 17, 2017 10:14 pm
Professor Falken offline
User avatar
Posts: 289
Joined: Mar 29, 2015

Re: Matplotlib Plugin for Indigo 7 - New!

Well, I don't know exactly what I did, but after polling at those 11 second intervals for an hour or so, it suddenly settled down and is now doing so at the expected 15 minutes (which is how I've had the configuration set from the beginning).

I think the only substitutive change I made was, as I mentioned in my previous post, to change one of the CSV engine monitored items from a speedtest device state to instead a variable of that same value. Maybe something about that device state was causing the constant repolling. I have no idea really, but 4 data points an hour seems much more reasonable than 5 a minute.

Posted on
Sat Mar 18, 2017 8:21 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Matplotlib Plugin for Indigo 7 - New!

If the plugin was refreshing every 11 seconds, it was most likely the plugin restarting due to a known memory leak in Matplotlib. I will be making adjustments to control for that before taking it out of beta.

There's no need to worry about the plugin causing a new speed test every 11 seconds (unless you have done something really creative). The plugin merely reads device states and variable values and writes those to the CSV files before plotting. It has no effect on the underlying source of the data--for example, it doesn't call for a device status request before plotting--it works off the CSV files only. One thing to note, however, is that a plugin restart will likely cause another observation to be written to the CSV files--so you may have some data in your files that are every 11 seconds during that time.

Please let me know how you like the plugin (now that we've been able to get it working for you).

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

[My Plugins] - [My Forums]

Who is online

Users browsing this forum: No registered users and 3 guests