Disable (not restart) a plugin programmatically

Posted on
Wed Sep 15, 2021 2:00 pm
Grognard offline
User avatar
Posts: 52
Joined: May 17, 2011
Location: Seabrook, TX

Disable (not restart) a plugin programmatically

First off, thanks for another great upgrade with Indigo2021. Lots of great new features! I've been using Indigo for I don't know how many years (apparently I created this ID 10 years ago) and it continues to allow me to extend the functionality of my home automation system while maintaining a high SAR (Spousal Approval Rating) due to it's rock solid stability.

In an effort to reduce problems when the system is running while my wife and I are away for extended periods, I've been trying to add more robust "hands-off" error handling via triggers that respond to the various "Error in Event Log" messages from the SQL Logger plugin. Often times these are related either to a "rogue" plugin or a hardware failure. Restarting the offending plugin works great in the former case, but I've had a few times where I've lost a piece of hardware (most recently a network switch with some IP cameras on it), and the resultant deluge of error messages in the log makes deciphering log files the system emails to me a real pain. We do a lot of camping with extremely spotty or non-existent cell reception, so I tend to rely on emails I get when we do have reception to let me know there is a problem, and figure out a plan of action.

It would be great in cases like these to be able to simply disable the related plugin via a trigger action, analogous to how I currently restart such plugins, but it seems this feature does not exist?

If it does, my apologies for not searching thoroughly enough (I stopped when I found viewtopic.php?f=98&t=15254#p107232 - I figured it Karl didn't know about it, it probably didn't exist).

If I'm correct and such a function does not exist, I'm hoping you guys would consider adding it. The post I reference above would seem to be another use case for such a capability.

Posted on
Wed Sep 15, 2021 4:11 pm
jay (support) offline
Site Admin
User avatar
Posts: 18185
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Disable (not restart) a plugin programmatically

This is intentional primarily from a security standpoint - you don't want a rogue script/plugin or a hacker to find an action to execute that might disable some of your automation.

If the plugin is spewing that many errors into the event log, perhaps discuss with the plugin's developer how to reduce the amount of logging? In our plugins, we attempt to log a bunch at first failure, but then try to cut back on repeated error logging so as to not flood the event log. We're certainly not perfect at it either, but it is something that we keep in mind.

The link above is about the SQL Logger plugin, not about event logging in general...

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests