Indigo Script Library

Looking for information on using Indigo with a thermostat or sprinkler system? Want to integrate your home automation with other software (iTunes, iCal, Salling Clicker, etc.)? Need to see some example Indigo AppleScripts to help you get started?

Below are some great scripts for integrating Indigo home automation with different devices and software. Additionally, these scripts are excellent tutorials-by-example, so fire up your Script Editor application (inside your Applications/AppleScript/ folder) and see how they work. If you write a script that might be useful for others, then please submit it.

Disclaimer: Perceptive Automation, LLC. does not guarantee the usefulness, quality, or safety of any scripts on this page. We have personally used quite a few of these scripts, but be careful and use common sense when installing and using any software or scripts.

Accessibility and Assistive Automation

  Accessibility and Assistive Automation
Overview   These two attachment scripts define a suite of AppleScript functions that are callable from Indigo Actions (or other Applications) to sequentially target and control Devices and Actions Groups. This allows users to easily, and with only a couple of actions, select any Device or Action Group as a target. The targeted Device can then be controlled (on/off/dim/brighten), and the targeted Action Group can be executed.
Installation   Installed by Indigo into:
   /Library/Application Support/Perceptive Automation/Indigo 2/Scripts/Attachments/
   device target attachment.scpt
and group target attachment.scpt
Usage   TargetFirstDevice(), TargetNextDevice(), TargetPreviousDevice(), TurnOnTargetedDevice(), TurnOffTargetedDevice(), ToggleTargetedDevice(), BrightenTargetedDevice(), DimTargetedDevice()
    -- and --
TargetFirstGroup(), TargetNextGroup(), TargetPreviousGroup(), ExecuteTargetedGroup()

iCal

  iCal
Overview   Visit Greg Smith's web site for information on his iCal integration script, which lets you log Indigo events (lights on/off, motion, etc.) into iCal.

IndigoServer Administration

  Indigo Server Stop
download
Overview   This shell command script will terminate the Indigo Server (and built-in Indigo web server). It will also disable the "auto start on user login and auto relaunch if crash" behaviour. This will allow you to prevent the auto relaunch of the server if it ever starts misbehaving for any reason.
Installation   Double-click on the indigostop.command file. The terminal will launch and try multiple techniques to shut down and disable the server. To renable the server, run the Indigo client application on the server machine and choose the Indigo 2->Start Local Server... menu item.

iTunes

  iTunes
Overview   The iTunes attachment script defines several AppleScript functions for controlling iTunes from Indigo. These functions can be called from Indigo Execute AppleScript Actions or from within any AppleScript tell app "IndigoServer" block.

The script also listens for X10 A/V commands (stop, play, vol+, vol-, etc.) from the MR26 or W800RF32 and passes on the commands to iTunes. This functionality requires an X10 "Entertainment Anywhere" remote control, like the UR81, and a MR26 or W800RF32 RF receiver interface.
Installation   Installed by Indigo into:    /Library/Application Support/Perceptive Automation/Indigo 2/Scripts/Attachments/
   iTunes attachment.scpt

Usage   Call the AppleScript functions as shown in the script, or press the buttons on the remote to control iTunes.

jscripts

Maxi Controller

  Maxi Controller
download
Overview   Maxi Controller is an application (not a script) that displays a working GUI of the Maxi Controller transmitter. It was written by Frank Nicholas in AppleScript Studio and uses Indigo to transmit the X10 addresses and commands. The source project is also available for download and is a great example of using AppleScript Studio to extend Indigo.
Installation   After downloading, drag the Maxi Controller application into your Applications folder and double click to launch it.

Miscellaneous

  Dimming System
download    more info
Overview   This attachment script from Greg Scherrer allows you to set up soft-fade dimming scenes with just a few simple AppleScript commands. Using the methods in the attachment script, you can easily start dimming, stop dimming, control how fast the dimming should occur, and optionally execute an action group upon completion.
Installation   After downloading, drag the dimming system attachment.scpt file into:
   /Library/Application Support/Perceptive Automation/Indigo 2/Scripts/Attachments/
Next, follow the configuration instructions outlined in the comments at the top of the script file.
Usage   Examples and instructions are provided in comments at the top of the script file and in this forum post.

  Garage Door Notification
download
Overview   This attachment script from John Conrader notifies the user of an opened and closed garage door event. The script, as written, requires growl 0.6 or later and a Stanley Garage Door Indicator. It could also be modified for other setups.
Installation   After downloading, drag the garage door attachment.scpt file into:
   /Library/Application Support/Perceptive Automation/Indigo 2/Scripts/Attachments/
Usage   Read the script comments and create the needed devices and variables in Indigo. Restart Indigo or reload the attachments. Open and close your garage door and see the notifications.

When the garage door goes up, it will send a notification through growl at a priority of 2. When the garage door is closed it sends it at a priority of -2. Of course, these priorities can all be changed in the script.

  Time Stamp Attachment Script
Overview   This attachment script by J. Rick Adams, M.D. provides an easy way to determine when Indigo last received an X10 command for a particular address (ex: A5) or device (ex: office light).
Installation   Installed by Indigo into:
   /Library/Application Support/Perceptive Automation/Indigo 2/Scripts/Attachments/
   time stamp attachment.scpt

Usage   GetTimeStampForAddress(addressString), GetTimeStampForDevice(deviceString)

  X10 Scenes Attachment Script
Overview   The scenes attachment script defines AppleScript functions to easily program scenes on SwitchLinc, LampLinc, and ApplianceLinc modules.
Installation   Installed by Indigo into:
   /Library/Application Support/Perceptive Automation/Indigo 2/Scripts/Attachments/
   scenes attachment.scpt

Usage   See comments at top of script file for documentation and examples.

  X10 Set the Scene Assistant
download
Overview   This script application from Neil Evans is a step-by-step assistant for defining SwitchLinc (and LampLinc/ToggleLinc) scenes. The application will quickly walk you through the entire process of defining scenes, without having to manually send code sequences with a MaxiController. Additionally, it has options for quickly programming other SwitchLinc options, such as ramp rate, default on-levels, etc.
Installation   After downloading, see the included ReadMe file for installation and usage instructions.

Remote Access

  Ovolab Phlink Scripts
download    more info
Overview   Use these scripts along with Ovolab's Phlink Telephone Adapter for remote control of your house anywhere over a touch tone phone. Hear the on/off/brightness of any Device, control Devices, and even execute Action Groups (macros). Also includes an Indigo attachment script for easily making outbound calls using the Phlink. Great for emergency notification of motion detection, power failures, pipes freezing, etc.

  Salling Clicker Scripts
   more info
Overview   Use these scripts along with the Salling Clicker application for home control from your Bluetooth-enabled mobile phone or PDA. Easily change and view the on/off/brightness state of Devices and execute Action Groups (macros).
Installation   Follow the instructions on the Clicker scripts page (more info link above).

Reporting

  Dump Database Scripts (for printing)
download
Overview   These four scripts allow you to easy dump the database information for Devices, Action Groups, Time Date Actions, and Trigger Actions into the Event Log window. This is useful for copying and pasting from the Event Log window into a text editor application for printing.
Installation   After downloading, drag all the script files into:
   /Library/Application Support/Perceptive Automation/Indigo 2/Scripts/
The scripts will then be available to run via Indigo's Script menu.

  Indigo Database Report
Overview   Indigo Database Report is Paul Roomberg's great new free utility. It creates a browser-viewable (and printable!) report of your entire Indigo home database. It is definitely worth checking out, especially if you have several devices or actions.

Security

  Battery Dead Notify Attachment
download
Overview   This attachment script from Norman Laskey tracks and logs the "I Am Alive" RF messages from some battery operated security modules and automatically sends a warning email if it looks like the battery needs to be replaced.
Installation   After downloading, drag the battery dead notify attachment.scpt file into:
   /Library/Application Support/Perceptive Automation/Indigo 2/Scripts/Attachments/
Usage   Read the script comments and create a repeating Time/Date Action for every four hours to call the calcInterval() function. Restart Indigo or reload the attachments.

  Security Sample Attachment
Overview   Sample security attachment script shows how to receive the special X10 RF commands from security modules (motion detectors, remotes, door/window sensors). Note only the W800RF32 RF and CM15A interfaces can receive the X10 RF security commands.
Installation   Installed by Indigo into the disabled Attachments folder. Move the file:
   /Library/Application Support/Perceptive Automation/Indigo 2/Scripts/Attachments (Disabled)/
   security sample.scpt

into:
   /Library/Application Support/Perceptive Automation/Indigo 2/Scripts/Attachments/
Usage   This example prints all of the security commands to the log window. Insert your own AppleScript code into the script to trigger actions based on your security modules.

Serial Bridge

  Jandy Pool and Spa Control
download
Overview   This set of scripts from Jim Yergey provide Serial Bridge and Indigo support for Jandy Pool and Spas.
Installation   After downloading, drag the individual script files into the folder:
   /Library/Application Support/Perceptive Automation/Indigo 2/Scripts/

Usage   You can execute these individual script files to control your Jandy Pool and Spa lights, valves, and heat. Your Serial Bridge connection name for the Jandy serial controller should be: Jandy Aqualink RS Serial Adaptor. You should create the following Indigo Variables before executing the scripts: foo1, foo2, foo3. The Variables will be updated each time you run one of the scripts.

  Ocelot to Indigo
download
Overview   This set of scripts from Martijn Heeroma provide basic Ocelot support from Indigo. Once installed you can use the Ocelot for sending IR and X10 commands and you can read Ocelot's sensor inputs.
Installation   After downloading, drag the Ocelot to Indigo folder into:
   /Library/Application Support/Perceptive Automation/Serial Bridge/
Next, double-click the Serial Bridge connection settings.sbDb file inside that folder. Lastly, to install the Action Groups inside Indigo for sending commands to the Ocelot, run the AppleScript Install into Indigo.scpt.
Usage   Once installed, you will have several Ocelot Action Groups defined inside your Indigo database file. You can execute these to send commands to the Ocelot. Additionally, several Indigo Variables will be defined that contain the arguments for commands to be sent to the Ocelot as well as return data from the Ocelot.

Sprinkler Automation

  Rain8M Set Address
download
Overview   The Rain8M Set Address application allows you to automatically send the X10 command sequence to the Rain8M for setting the unit's house code. This lets you to set the Rain8M house code without needing a USB to serial adapter to connect it to your computer.
Installation   After downloading, drag the Rain8M Set Address application into your Applications folder and double click to launch it.

Thermostat and Temperature

  RCS Thermostat Attachment Script
Overview   The RCS thermostat attachment script by Bob Easterday provides 2-way communication between Indigo and the RCS TX15/16 thermostat.
Installation   Installed by Indigo into the disabled Attachments folder. Move the file:
   /Library/Application Support/Perceptive Automation/Indigo 2/Scripts/Attachments (Disabled)/
   RCS attachment.scpt

into:
   /Library/Application Support/Perceptive Automation/Indigo 2/Scripts/Attachments/
Usage   See comments at top of script file RCS example.scpt for documentation and examples.

  TempLinc Attachment Script
Overview   The TempLinc attachment script provides 2-way communication between Indigo and the TempLinc.
Installation   Installed by Indigo into the disabled Attachments folder. Move the file:
   /Library/Application Support/Perceptive Automation/Indigo 2/Scripts/Attachments (Disabled)/
   templinc attachment.scpt

into:
   /Library/Application Support/Perceptive Automation/Indigo 2/Scripts/Attachments/
Usage   See comments at top of script file for documentation and examples.

  TempLinc Data Logger
download
Overview   This script from Hunter Chisholm logs the temperature values from a TempLinc. The TempLinc data is logged to a HTML file for easy remote viewing. Here is a working example of how the logged data is displayed.
Installation   After downloading, drag the script file into:
   /Library/Application Support/Perceptive Automation/Indigo 2/Scripts/
Next, see the documentation in the script on how to configure the variables.
Lastly, create a Time/Date Action to periodically (ex: every 10 minutes) call the script.
Usage   See comments at top of script file for documentation and examples.

_Older Scripts_ (pre-Indigo 2.0)

  Indigator
download
Overview   This Konfabulator Widget from J. Rick Adams, M.D. gives you an attractive remote front-end for controlling Indigo. With Indigator you can have remote access (LAN or WAN) to Indigo Devices, Action Groups, Variables and Scripts. I do not believe Indigator is currently compatible with Indigo 2.0. Indigo 2.0 users should consider trying the Indigo Widget instead.
Installation   Install Konfabulator (free demo is available) and copy the Indigator.widget file into your Widgets folder. To enable remote access, turn on Remote Apple Events inside the Sharing System Preferences panel on the Mac running Indigo. Double click the widget to launch and configure its settings.

  Sprinkler Script1
download
Overview   This sprinkler attachment script by Dr. Scott Buchanan lets you easily setup and run multiple watering schedules. Indigo 2.0 users should not use this script since 2.0 includes built-in UI for controlling sprinkler devices.
Installation   After downloading, drag the sprinkler schedule attachment.scpt file into:
   ~/Documents/ Indigo User Data/ Scripts/ Attachments/
See comments at top of script file for documentation and examples.

  Sprinkler Script2
Overview   Visit Greg Smith's web site to download his powerful sprinkler script. It supports several parameters including watering types and adjustments based on weather data. Note as of the most recent update to this index page, Greg's script was not updated to use Indigo 2.0's new sprinkler actions.

  Sprinkler Script3
download
Overview   J. Rick Adams, M.D. has provided this complete suite of sprinkler scripts. Includes zone duration adjustments based on both wet time (calculated from a Rain Clik sensor) and average temperature for your zip code (calculated from data retrieved by a SOAP-based web service). Note this script has not yet been updated to use Indigo 2.0's new sprinkler actions.
Installation   After downloading, drag the sprinkler attachment.scpt and weather attachment.scpt files into:
   ~/Documents/ Indigo User Data/ Scripts/ Attachments/
and drag the start timed sprinklers.scpt and stop sprinklers.scpt files into:
   ~/Documents/ Indigo User Data/ Scripts/
Open the script files and adjust the properties defined at the top to set the zone duration, Rain8 house code, and your zip code. Next, create a Time/Date Action that executes the start timed sprinklers.scpt every day.

  Sprinkler Script4
download
Overview   This sprinkler attachment script by Perceptive Automation requires minimal setup (no script editing) and can handle multiple Rain8s. Now modified to be compatible with 2-Way Rain8s. Indigo 2.0 users should not use this script since 2.0 includes built-in UI for controlling sprinkler devices.
Installation   After downloading, drag the sprinkler attachment.scpt file into:
   ~/Documents/ Indigo User Data/ Scripts/ Attachments/
See comments at top of script file for example usage.

  Web ACGI Interface
download    more info
Overview   This script, along with the ACGI Dispatcher Application and Mac OS X's Personal File Sharing (Apache web server), gives you a web front-end for controlling Indigo. Included is an ACGI script to allow control and monitoring of RCS thermostats. Indigo 2.0 users should not use this script since 2.0 includes a built-in web server.

  Web PHP Interface
download    more info
Overview   These scripts, along with Mac OS X's Personal File Sharing (Apache web server), give you a web front-end for controlling Indigo. Indigo 2.0 users should not use this script since 2.0 includes a built-in web server.

Script Resources
visit these great web sites for AppleScript tutorials and references:
MacScripter
Apple Site
MacCentral Primer
Doug's iTune Scripts
ScriptWeb

Online User Forum
visit the online support forum for help, tips, and announcements

Indigo Essentials

Control Hardware