Someone pointed out that Indigo can't launch a plugin from a trigger or a schedule and, after research, they're absolutely right! So that's one good idea out of the window
So as an alternative there are probably only two approaches to make this work.
The simplest would be to simply set a trigger to remind you to start the plugin on the morning of the 23rd December - email, sms, etc...
However there is an alternative but it's a bit involved:
- 1. Run the plugin in test mode until it completes with Santa back at the North Pole and Resting. The plugin then goes into sleep mode waiting for you to disable it - but don't on this occasion!
- Code: Select all
import indigo
trackerId = "com.corporatechameleon.santaTrack" # supplied by the documentation
trackerPlugin = indigo.server.getPlugin(trackerId)
if trackerPlugin.isEnabled():
trackerPlugin.restart(waitUntilDone=False)
2. Update the Santa Tracker configuration and uncheck the two test options at the bottom of the configuration dialog (Plugins/Santa Tracker/Config...)
3. Save the configuration
4. Create a schedule trigger for 23rd December at 1am
5. Now add an action that executes a script. On the Actions tab this is a Server Action>File and Script Action>Execute Script and add the following code as an embedded Python script:
You should see something like this:
6. Now save the schedule trigger and wait until the 23rd December
The important parts of these instructions are: a) You must leave the plugin in an enabled but sleeping state by running in test mode to the end and b) Don't forget to uncheck the Run in Test Mode and Run in Real Mode (and adjust Local Time to Calculated Start) before saving the configuration.
Of course, you can run the plugin in Real Mode right now and it will wait until the right time to start anyway (and you could put a cool countdown clock on your Control Page anyway). I don't think it will consume much processor power so I doubt that you'll even notice it's running
Regards
Mike