Reload, enable, disable plugin via trigger action / script?

Forum rules

This is a legacy forum which is locked for new topics. New topics should be started in one of the other forums under Extending Indigo

Posted on
Wed Jan 02, 2013 8:23 pm
neilgreene offline
Posts: 32
Joined: Nov 29, 2012

Re: Reload, enable, disable plugin via trigger action / scri

Could someone help me with a script that would reload the ELK plugin? Thanks in advance

Posted on
Thu Jan 03, 2013 10:40 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Reload, enable, disable plugin via trigger action / scri

Try:

Code: Select all
plugin = indigo.server.getPlugin("com.elkplug.indigoplugin.elkm1g")
if plugin.isEnabled():
   plugin.restart()

Image

Posted on
Wed Mar 20, 2013 11:25 pm
thedon offline
Posts: 246
Joined: Apr 01, 2011

Re: Reload, enable, disable plugin via trigger action / scri

Hello,

I tried to use this script but cannot find the plugin ID for the vera plugin.
Look through documentation but couldn't find a way to get it.

I am going to schedule the plugin to reload every 2 hours as it works but some communication gets lost in the plugin over time I've noticed.
Reloading it show fix this

Posted on
Thu Mar 21, 2013 5:54 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Reload, enable, disable plugin via trigger action / scri

Its plugin ID is:

Code: Select all
com.homeautomationplugins.vera

Image

Posted on
Wed May 15, 2013 1:13 am
c64 offline
User avatar
Posts: 53
Joined: Oct 28, 2012
Location: Germany

Re: Reload, enable, disable plugin via trigger action / scri

So the only control over a Plugin is that you can restart it using Python? I am trying to work out how to disable a running Plugin, (then change an .indiPref file outside of Indigo), and then restart the Plugin. Is there a trick to doing that? Thank you.

Posted on
Thu May 16, 2013 9:15 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Reload, enable, disable plugin via trigger action / scri

c64 wrote:
So the only control over a Plugin is that you can restart it using Python? I am trying to work out how to disable a running Plugin, (then change an .indiPref file outside of Indigo), and then restart the Plugin. Is there a trick to doing that? Thank you.

Correct. Out of security/usability concerns we only allow plugins to be restarted (but not started) via scripting.

Perhaps there is another way to accomplish what you need. Can you provide more details on what that is?

Image

Who is online

Users browsing this forum: No registered users and 1 guest