I’ve added a new project page titled Home Automation with Indigo (Indigo Domotics), which focuses on my home automation projects that involve Indigo. It has some tips as well as links to various blog posts related to this project.
The Indigo Smart Home platform supports plugin development. In addition to the built-in plugins, my setup also has a few custom plugins developed by third-parties. Every now and then the plugins need to be restarted (reloaded). I decided to setup a scheuled proces to restart a plugin and fortunately, this can easily be one via scripting within Indigo.
For security reasons it is only possible to reload an active plugin. One cannot load a plugin that isn’t already enabled.
The python script required to do this is very simple, within Indigo.
plugin = indigo.server.getPlugin("uk.co.greensky.flux") if plugin.isEnabled(): plugin.restart()
In this example I’m restarting the FLUX LED plugin. You’ll need to replace uk.co.greensky.flux with the appropriate plugin ID. I wasn’t able to find the plugin IDs directly within Indigo but they can be obtained by looking at the plugin filenames located in /Library/Application Support/Perceptive Automation/Indigo 7/Preferences/Plugins/ and leaving off the “.indiPref” file extension.