Proliphix™ Plugin Discussion

Posted on
Mon Jun 25, 2012 12:51 pm
matt (support) offline
Site Admin
User avatar
Posts: 20016
Joined: Jan 27, 2003
Location: Texas

Re: Proliphix™ Plugin Discussion

I think that discussion was just about increasing the delay between retries after consecutive failures.

But other than that the plugin needs to handle/fix the situation since there is no way for Indigo to know if it is a transient issue that might go away (network or hardware connectivity problem), or a bug that will just repeat indefinitely.

Image

Posted on
Mon Jun 25, 2012 1:02 pm
berkinet offline
User avatar
Posts: 3404
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Proliphix™ Plugin Discussion

Well, in the specific case of the Proliphix plugin, it is clearly a bug because of an unanticipated state. Since the beta testers all had conforming tstats, and I forgot to code for the possibility, there is a bug.

So, are you suggesting that a plugin could (should?) watch for something like being called to often and find a way to die gracefully - with some appropriate messaging to the log? I think the was also another discussion a few months back about allowing a plugin to just exit. But, the issue was with Indigo trying to restart it. How would you go aout this?

Posted on
Mon Jun 25, 2012 1:18 pm
matt (support) offline
Site Admin
User avatar
Posts: 20016
Joined: Jan 27, 2003
Location: Texas

Re: Proliphix™ Plugin Discussion

You should add exception handlers around the contents of your entire runConcurrentThread code, and handle all exceptions there appropriately.

The plugin isn't catching the exceptions apparently so it is throwing out of that function and all Indigo can do is hope that it is a temporarily problem and restart it. If you handle the exceptions in the plugin you can decide in the handlers what should happen: silently retry, log an error, disable the plugin, etc. But that is 100% the plugins responsibility since it is the only one that can know how to properly handle the errors.

If you do have a fatal exception and want to catch it and stop the plugin, then to do so you can use this method:

Code: Select all
self.stopPlugin("had to stop the plugin because something bad happened!", isError=True)

But be careful that you don't call it for transient problems since plugins should try to auto-recover from those. For example, you wouldn't want a plugin to be stopped just because your ISP connectivity goes down for a few minutes.

Image

Posted on
Mon Jun 25, 2012 5:08 pm
jay (support) offline
Site Admin
User avatar
Posts: 16264
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Proliphix™ Plugin Discussion

The main issue with the plugin is that it seems to assume that there's one or more devices. That of course is a bad assumption - when the plugin first starts up there definitely won't be a device. That causes the first while loop in runConcurrentThread to spin forever. It looks like it shouldn't be logging the "Creating Proliphix Thermostat device list" since I didn't change anything in the plugin config (and i think it's supposed to default to 0) so there's another little buglet there of some type.

In fact, I'm really unclear what that while loop is accomplishing - it seems rather useless since it won't get called for devices that get added after the plugin starts up...

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Jul 09, 2012 10:51 pm
ds10 offline
Posts: 6
Joined: Jun 27, 2012

Re: Proliphix™ Plugin Discussion

I'm using the beta plugin. I have two NT-20e thermostats and one NT-10e. Several issues seen:

1) as others reported, upon enabling the plugin the event log shows a constant: "Proliphix Plugin Creating Proliphix Thermostat device list".

2) I try to add a thermostat device. Fill out the Create New Device. Upon completion, I get a beep when hitting OK. Seems odd, no message to go with the beep. Log shows: " Proliphix Thermostat Control Debug Validate: The tstat address is: http://192.168.5.32:80/get?OID1.2=&OID2.7.1=
Proliphix Thermostat Control Debug Validate: OIDs returned... raw: 1.2=upstairs&2.7.1=NT20&, processed: ['1.2', 'upstairs', '2.7.1', 'NT20', '']
" which looks OK.

3) Hit OK one more time. Device now added, but showing no useful data (all dashes or zeros). And this in the logs:


Proliphix Thermostat Control Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 247, in runConcurrentThread
<type 'exceptions.KeyError'>: key ShowCoolHeatEquipmentStateUI not found in dict

Proliphix Thermostat Control Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Proliphix Thermostat Control Debug Starting concurrent thread
Proliphix Plugin Creating Proliphix Thermostat device list
Proliphix Thermostat Control Debug Added device Id 1825110916 to device list
Proliphix Thermostat Control Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 247, in runConcurrentThread
<type 'exceptions.KeyError'>: key ShowCoolHeatEquipmentStateUI not found in dict

Proliphix Thermostat Control Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Proliphix Thermostat Control Debug Starting concurrent thread

repeats forever.

Could use some help on what to do from here. Happy to test new code if desired.

Posted on
Wed Jul 11, 2012 12:51 pm
berkinet offline
User avatar
Posts: 3404
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Proliphix™ Plugin Discussion

ds10 wrote:
Could use some help on what to do from here. Happy to test new code if desired.

It is going to be a few days until I can get to this. I am out of the US for a while and do not have access to my regular development setup. However, it sounds like a problem in the Python dictionary in the app which contains the Proliphix MIB.

Posted on
Wed Nov 07, 2012 10:07 pm
ds10 offline
Posts: 6
Joined: Jun 27, 2012

Re: Proliphix™ Plugin Discussion

berkinet wrote:
ds10 wrote:
Could use some help on what to do from here. Happy to test new code if desired.

It is going to be a few days until I can get to this. I am out of the US for a while and do not have access to my regular development setup. However, it sounds like a problem in the Python dictionary in the app which contains the Proliphix MIB.


Just curious if you'll be getting back at this code.

Posted on
Thu Nov 29, 2012 12:18 pm
berkinet offline
User avatar
Posts: 3404
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Proliphix™ Plugin Discussion

@ds10 can you verify you are running v 1.9.2. If not, please update. The plugin is available on dropbox.

Posted on
Mon Mar 11, 2013 2:47 pm
asw24b offline
Posts: 222
Joined: Dec 30, 2007
Location: Los Altos Hills, CA

Re: Proliphix™ Plugin Discussion

berkinet wrote:
@ds10 can you verify you are running v 1.9.2. If not, please update. The plugin is available on dropbox.



By any chance have you had a chance to add any more features ?

I wanted to check before I implemented fan control myself....

Thanks !!!

Mike

Posted on
Mon Mar 11, 2013 3:15 pm
berkinet offline
User avatar
Posts: 3404
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Proliphix™ Plugin Discussion

I have not used the fan control since my heating system does not support it. But, it should work. I an look at this in a week when I am back from traveling.

Posted on
Sun Mar 24, 2013 6:32 pm
ethanw offline

Re: Proliphix™ Thermostat plugin V2.0 teaser

Hey berkinet I have this Proliphix™ Thermostat plugin installed but this is not the same view I get? Same view as your picture.
Any ideas?




berkinet wrote:
Now that Matt and Jay have released Indigo 5.0.3, I am in the process of upgrading the Proliphix plugin to provide complete support of the Indigo Thermostat UI. I.e. just like a Venstar (but better).

I have a solid alpha working here and just need to tweak a few things before releasing this as a 2.0 beta. In the meantime, pictures speak louder than words, so...
ss1.png

ss2.png

Posted on
Sun Mar 24, 2013 7:24 pm
berkinet offline
User avatar
Posts: 3404
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Proliphix™ Plugin Discussion

Make sure you are using the latest beta 2.b1. It is available on dropbox.

Posted on
Mon Mar 25, 2013 9:11 am
asw24b offline
Posts: 222
Joined: Dec 30, 2007
Location: Los Altos Hills, CA

Re: Proliphix™ Plugin Discussion

berkinet wrote:
Make sure you are using the latest beta 2.b1. It is available on dropbox.



When I click on your link, it downloads v. 1.9.1. Is the version string just incorrect ?

Thanks !


Mike

Posted on
Mon Mar 25, 2013 9:33 am
Dewster35 offline
Posts: 1029
Joined: Jul 06, 2010
Location: Petoskey, MI

Re: Proliphix™ Plugin Discussion

berkinet wrote:
Make sure you are using the latest beta 2.b1. It is available on dropbox.



Indigo doesn't like the "b" in the plugin name. You have to do a lot of work around to get it to update to the latest plugin version. Simply double clicking on the file doesn't install it properly.

Posted on
Mon Mar 25, 2013 9:55 am
asw24b offline
Posts: 222
Joined: Dec 30, 2007
Location: Los Altos Hills, CA

Re: Proliphix™ Plugin Discussion

Dewster35 wrote:
berkinet wrote:
Make sure you are using the latest beta 2.b1. It is available on dropbox.



Indigo doesn't like the "b" in the plugin name. You have to do a lot of work around to get it to update to the latest plugin version. Simply double clicking on the file doesn't install it properly.





Yes.


I just opened the bundle and read the release notes; It says that 1.9.1 == 2.0bx



2 fixes needed:

line 247:

self.thermCap[tstat.id] = {'NumHumidityInputs': tstat.pluginProps["NumHumidityInputs"], 'NumTemperatureInputs': tstat.pluginProps["NumTemperatureInputs"], 'ShowCoolHeatEquipmentStateUI': tstat.pluginProps["ShowCoolHeatEquipmentStateUI"]}


Throws an error because ShowCoolHeatEquipmentStateUI is commented out of the devices.xml file.


and


line 528:


actionStr = _lookupActionStrFromHvacMode(actionMode)


needs to be:

actionStr = _lookupActionStrFromHvacMode(action.actionMode)



Thanks !

Mike

Who is online

Users browsing this forum: No registered users and 2 guests