[ANSWERED] Chance of extending plugin's trigger capability?

Posted on
Sat Apr 19, 2014 6:12 pm
matlock offline
Posts: 41
Joined: Apr 17, 2009
Location: Atlanta Georgia

[ANSWERED] Chance of extending plugin's trigger capability?

Is there any chance this plugin can be enhanced to be able to trigger on an entire log entry, or at least the first part of one? A problem I'm starting to run into is many plugin authors don't seem to be logging errors properly, so I can't trigger an action based on the type being set right.

Example is the Hue Plugin (I let Nathan know about this; hopefully he'll fix it in his code, but this is happening with a lot of different plugins)... It doesn't log errors differently than normal actions.. and since I can only match on the "typestr", it means I can't trigger an action that'd restart the Hue hub if there's a network error. (example attached).

I haven't opened up the SQL Logger package/code yet, but I'm sure I could figure out how to make it match both the typestr and message fields, but I don't like the idea of messing with "built in" plugins or other peoples' code, since it'll just get overwritten on updates.

2014-04-19_20-04-09.png
example of how error messages and normal update messages are being saved in the database
2014-04-19_20-04-09.png (57.8 KiB) Viewed 1300 times


edit: also, where is typeval being defined? is that in the internal indigo sqlite database?

Thanks!
/justin

Posted on
Tue Apr 22, 2014 7:25 am
matt (support) offline
Site Admin
User avatar
Posts: 18458
Joined: Jan 27, 2003
Location: Texas

Re: Any chance of extending plugin's trigger capability?

I will add it to the feature request list, but it won't be something we can add in the immediate to near future.

However, this thread describes how a plugin can receive the Event Log messages as they occur (it is what the SQL Logger uses) and this post has the details about typeval.

Image

Posted on
Thu May 01, 2014 9:46 pm
matlock offline
Posts: 41
Joined: Apr 17, 2009
Location: Atlanta Georgia

Re: Any chance of extending plugin's trigger capability?

matt (support) wrote:
I will add it to the feature request list, but it won't be something we can add in the immediate to near future.

However, this thread describes how a plugin can receive the Event Log messages as they occur (it is what the SQL Logger uses) and this post has the details about typeval.


That works for me. :)

Also, Nathan tweaked his Hue his plugin to actually register errors with the error log type, so I've been able to "fix" my Hue Hub lockups with an ApplianceLinc restart. Still trying to track down what is actually going on; I'm betting there's a bad ethernet cable somewhere, but I only have an end-to-end continuity tester and not a full ethernet cable tester, and it'd be cost prohibitive to replace all of the ethernet cables, it's a fun bout of "trial and error" to find what's causing both my Hue and SmartThings hubs to randomly lose their minds.

(Side note: I've now moved almost every light to Hue from INSTEON.. I'm now 100% dependent on Indigo -- I literally can't turn on/off lights if Indigo loses contact with the Hue Hub -- I've rewired all of my INSTEON switches to always send power to the lights, capping off the red line. I'm really loving how tightly integrated the Hue bulbs are with Indigo: y'all did an amazing job with the plugin architecture -- it blows away anything else I've seen commercially on Windows, Linux, or Mac. And it's forced me to learn Python... which I had been resisting for years ... and now I love Python ... which has helped me advance quite a bit in my "real world" job.)

Posted on
Fri May 02, 2014 10:54 am
matt (support) offline
Site Admin
User avatar
Posts: 18458
Joined: Jan 27, 2003
Location: Texas

Re: Any chance of extending plugin's trigger capability?

matlock wrote:
y'all did an amazing job with the plugin architecture -- it blows away anything else I've seen commercially on Windows, Linux, or Mac.

Thanks! We spent a significant amount of time on it (we started working on it over 4 years ago). We still aren't done with it by any means, but we are thrilled to see the Indigo community creating all of these fantastic plugins.

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest