iMessage/Messages/Siri Indigo Control Script  (Script)

Contributed by: leinerd

Overview

This sample script demonstrates how to control Indigo from Siri utilizing iMessage on the iPhone and Messages on the Mac. Please consider this a proof of concept, since I'm not a programmer capable of making a polished app. However, it works great in my setup and most of the functions are generally useful in other installations.

I've only tested the solution in Indigo 5 since I haven't tried Indigo 6 yet. However, assuming Indigo 6 still works with Applescript, there should not be any problem there.

This is my first submission so I hope it's complete enough to be useful.

Installation

1. Add names of authorized users to the script and customize it as necessary with desired commands per your specific devices, action groups, etc. I have done a few things specific to my setup like converting device names to title case, since Indigo devices seem to be case sensitive and mine are all title case. These specifics should be very easy to change as necessary.

2. Put the script in the Library/Scripts/Messages folder in your user directory.

3. In the Alerts tab of the Messages preferences, select the script run an Applescript for Message Received.

4. Create a new Apple ID with a new or otherwise unused email address and enable it in Messages.

5. Create a contact called "Indigo" and assign the above email address to it.

Usage

If all went well, you will now be able to send iMessages to the contact "Indigo" to initiate contol of devices, execution of action groups, and much more. The cool thing about this is that you can tell Siri things like "Text Indigo to turn on the family room light" or "Tell Siri to execute action Start Vacation." If you set up Siri correctly on your iPhone, it will provide voice feedback so you can do this over a headset without touching your phone.

Also, I'm not sure how secure this solution is. The name of the sender as specified in the script must be in your contacts for it to work. However, I'm not sure if this is possible to spoof by someone who knows your Indigo email address and sends a text using your name. Therefore, please be careful how you use the solution. I'm certainly interested in any insights you may have about this issue and other ideas to make it more secure and useful.