Applescript, Blue Phone Elite and Indigo

Posted on
Thu Feb 01, 2007 1:28 pm
FaTMax offline
Posts: 134
Joined: Feb 01, 2007
Location: Haugesund, Norway

Applescript, Blue Phone Elite and Indigo

Hello!

I´m new to home automation and applescript, so hopefully someone in here will be able to help me with my "problem".

Although remote controls and automatic triggers are fine in homa automation, I´m looking to do something to take my comfort level even higher.

I use a program called Blue Phone elite (www.mirasoftware.com) to control my mobile phone. This program allows me to run applescripts upon events such as when my phone is available and beiing automaticly connected to my mac. My thought here is to write a Applescript that communicates with indigo to turn on devices of my choice.

It would be something like this:

I´m coming home from work and as i approach my apartment my bluetooth phone connects to my mac thru Blue Phone Elite. BPE then runs a applescript that tells Indigo to turn on the hallway lights, turn on coffemachine, turn on livningroom and kitchenlights and so on. Then, i unlock my door and step inside the already lit hallway. You get my point ?

Is this possible?

- FatMax

Posted on
Thu Feb 01, 2007 2:46 pm
macpro offline
User avatar
Posts: 765
Joined: Dec 29, 2005
Location: Third byte on the right

(No subject)

Yes it is.
Salling Clicker offers the same functionality by setting 3 variables in Indigo bases upon phone events.
1 variable is set when the phone enters proximity.
2 others are set with caller information when the phone rings.

You could write your own AppleScripts for Blue Phone Elite to set some variables in Indigo. Then you can use triggers in Indigo that react on these variables.

Posted on
Thu Feb 01, 2007 3:09 pm
FaTMax offline
Posts: 134
Joined: Feb 01, 2007
Location: Haugesund, Norway

(No subject)

I also have and run salling clicker. Blue Phone Elite is a sms and call managing program, not a multi-remote-control like clicker.

I´m trying to write Applescripts to turn on a device, but all examples found here wont work.

For example

tell app "Indigo 2"
turn on "Kaffemaskin"
end tell

I get a error message saying variable Kaffemaskin is noe defined or something...

Any thoughts on this ? For the record, I have tried "IndigoServer" as well..

Posted on
Thu Feb 01, 2007 3:47 pm
macpro offline
User avatar
Posts: 765
Joined: Dec 29, 2005
Location: Third byte on the right

(No subject)

You should use "IndigoServer" instead of "Indigo 2". The latter is the client application that you use to control the server.

You might try to write your AppleScript code in Indigo first and test it there. If it works, move it Blue Phone Elite and embed it in the tell-end tell statements.

Posted on
Thu Feb 01, 2007 4:09 pm
FaTMax offline
Posts: 134
Joined: Feb 01, 2007
Location: Haugesund, Norway

(No subject)

Yes, realised "IndigoServer" was the right one. After fiddling with this for some hours now, I think I´m getting closer to the answer. In the Varible list in Indigo i have made a variable bluetoothEnabled with value false. I´ve made ready a trigger that should work when this variable is changed to true.

I realise that there is a simple applescript for doing this, but im struggling non the less. This is what I THINK would work, but obviously won´t:

tell app "IndigoServer
set bluetoothEnabled "true"
end tell

Any tips on how to tell Indigo to change this variable?

The reason that I´m using BPE to trigger this is that clicker is not able to load itself on my phone when enter proximity. BPE does this flawlessly.

Posted on
Thu Feb 01, 2007 4:25 pm
FaTMax offline
Posts: 134
Joined: Feb 01, 2007
Location: Haugesund, Norway

(No subject)

Ok, I´ve gotten this far:

tell application "IndigoServer"
set bluetoothEnabled to value of variable "bluetoothEnabled" as boolean
set value of variable "bluetoothEnabled" to true
end tell

This then triggers the action that I have specified, but it also changes the variable to true. Then this is a onetime only script, which is not helpful at all. How do I change the varible back to false ?

Posted on
Thu Feb 01, 2007 4:46 pm
FaTMax offline
Posts: 134
Joined: Feb 01, 2007
Location: Haugesund, Norway

(No subject)

Yes, the newbie got it!!

1. feb. 2007 23.43.44
Trigger Action Bluetooth enabler (BPE triggers Indigo)
Action Group Ganglys på
Action Group Kjøkkenlys på
Action Group Stuelys på
Trigger Action Bluetooth changer (Indigo change the variable to false on its own)
Sent (offline) "Gang Sone 1" on
Sent (offline) "Gang Sone 2" on
Sent (offline) "Gang Sone 3" on
Sent (offline) "Gang Sone 4" on
Sent (offline) "Bryter Kjøkken 1" on
Sent (offline) "Bryter Kjøkken 2" on
Sent (offline) "Stue Sone 1" on
Sent (offline) "Stue Sone 2" on
Sent (offline) "Stue Sone 3" on
Sent (offline) "Stue Sone 4" on
Sent (offline) "Kaffemaskin" on

1. feb. 2007 23.44.02
Time/Date Action _delayed_action_2

Hurray for me!! :)

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 8 guests