Restarting an Active Plugin in Indigo 7 – Python Scripting

Standard

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.

 

 

UPS Battery Indicator In OS X Restarts Continuously After Launching VMWare Fusion

Standard

The Short Version: The UPS’s USB connection had been inadvertently shared with the virtual machine. Setting it to only be accessible by the host OS (OS X) solved the problem.

Recently I noticed my virtual machine instance under VMWare Fusion (3.1.3) seemed to be running unusually slow on my Mac. Yesterday I noticed that the status indicator for my battery backup kept appearing and disappearing in the menu bar.

While inspecting the energy settings for both OS X (Lion) and Windows 7 (VM) I decided to check the connected USB devices for the virtual machine. Sure enough, my CyberPower UPS was showing as connected to to the Windows 7 guest OS. I have no idea how this happened. There’s no reason I would have intentionally connected the USB interface for the my UPS to to the VM. Perhaps I clicked on it when intending to connect a different device at some point.

Regardless, as soon as I disconnected the UPS from the VM both systems started functioning at a more normal speed and the status indicator stayed in the menu bar instead of restarting.