iMessage/Messages/Siri Indigo Control Script

Posted on
Sun Nov 09, 2014 8:33 pm
DVDDave offline
Posts: 470
Joined: Feb 26, 2006
Location: San Jose, CA

Re: iMessage/Messages/Siri Indigo Control Script

I think I've narrowed the issue to an old problem discussed in the archived thread viewtopic.php?t=8650&f=3

It looks like this problem has reared its ugly head again. I'm getting an Application not Running error -600 from any external script I execute. I can temporarily stop the error by repairing disk permissions but it comes back eventually or sooner if I restart the server. Reinstalling Indigo did not help. Starting IndigoServer from the finder was temporarily helping but not any more. Other actions may stop the error temporarily too but I have not gotten a good handle on this, and nothing fixes it permanently. I really miss this function since I use Applescripts from the Messages app to allow Siri to control Indigo.

The timeout error was probably related to the fact I was calling Indigo multiple times in the script.

I'm using Indigo 6.018 and OS 10.10.

--Dave

Posted on
Sun Nov 09, 2014 9:00 pm
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: iMessage/Messages/Siri Indigo Control Script

That error happens most often when there are multiple copies of the IndigoServer.app on your hard drives. Like, for instance, previous versions. So, if you have Indigo 5 still installed remove it and see if that works.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sun Nov 09, 2014 9:41 pm
DVDDave offline
Posts: 470
Joined: Feb 26, 2006
Location: San Jose, CA

Re: iMessage/Messages/Siri Indigo Control Script

I had already moved the old versions off the disk and renamed the server app. However, I now deleted them completely.

Then, when I stopped the server and started it again, it worked. However when I then tried the Restart Sever button after turning one of the checkboxes on and off to enable the button, it stopped working. I often do this in my tests to restart. Could that be the culprit?

--Dave

Posted on
Mon Nov 10, 2014 12:36 pm
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: iMessage/Messages/Siri Indigo Control Script

DVDDave wrote:
Then, when I stopped the server and started it again, it worked. However when I then tried the Restart Sever button after turning one of the checkboxes on and off to enable the button, it stopped working. I often do this in my tests to restart. Could that be the culprit?e


Spent all morning on this...

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Nov 10, 2014 12:44 pm
DVDDave offline
Posts: 470
Joined: Feb 26, 2006
Location: San Jose, CA

Re: iMessage/Messages/Siri Indigo Control Script

Argh, sorry about that. This obviously has implications beyond my little script. Thanks so much for giving it so much attention.

I've also done lots more testing. The scripting worked throughout the night which is longer than before. However, in testing a separate problem that Matt is working on, I started the server once more and the scripting failed. I then repaired permissions, started the server, and it's been working for the short time since.

Really seems to me like it has something to do with the way Indigo starts the server process, especially when the Restart button is used, that confuses the OS as to the status of the process. Of course, you probably know this and much more by now.

Good luck!

--Dave

Posted on
Mon Nov 10, 2014 2:36 pm
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: iMessage/Messages/Siri Indigo Control Script

The underlying calls that are made when the restart button is pressed are identical to a stop/start pair. My testing didn't show any difference between the two. There is a subtle OS bug here that we're triggering somehow, but given that the exact same steps (in terms of starting/stopping the server) results in different behavior it's beyond us what it is.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Nov 10, 2014 3:01 pm
DVDDave offline
Posts: 470
Joined: Feb 26, 2006
Location: San Jose, CA

Re: iMessage/Messages/Siri Indigo Control Script

Hmm. I wonder if it's timing related since the Restart button would probably restart the process faster than the user doing the start separately. Likewise, maybe the repair permissions step is a red herring and it is just waiting a while before starting IndigoServer again that fixes things. I'll do some further testing to check out my theory.

Were you able to see the problem?

Thanks for trying, Jay.

--Dave

Posted on
Mon Nov 10, 2014 3:40 pm
DVDDave offline
Posts: 470
Joined: Feb 26, 2006
Location: San Jose, CA

Re: iMessage/Messages/Siri Indigo Control Script

After more testing, I think it is more random than I reported earlier. The problem was triggered sometimes by stopping the server, quitting Indigo, and starting the server again. Conversely, I was able to do a Restart of the server and not trigger the problem.

Once the problem occurred, waiting to start it up again did not seem to make any difference. Also, I tried stopping and starting the server several times and eventually the scripts started working again.

Therefore, while doing the restart seems to trigger the problem more often, it does not seem so cut and dried as I reported before. Sorry if I led you astray, but since the problem happens so randomly, it is easy to get confused. :?

Since it's working now, even without repairing permissions, I'll leave it alone for a while and see if it keeps working. If it stops working, I'll try to decipher what happened since the last time I saw it work.

--Dave

Posted on
Mon Nov 10, 2014 4:11 pm
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: iMessage/Messages/Siri Indigo Control Script

Thought it might be fun to try out this method but am not seeing a Messages folder in the Library/Scripts or an Alerts tab in the Messages app prefs, or anywhere else.
I'm running 10.9.5.

Maybe something else to install first?

Thanks,

Carl

Posted on
Mon Nov 10, 2014 4:25 pm
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: iMessage/Messages/Siri Indigo Control Script

DVDDave wrote:
Were you able to see the problem?


viewtopic.php?f=4&t=12857

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Nov 10, 2014 5:29 pm
DVDDave offline
Posts: 470
Joined: Feb 26, 2006
Location: San Jose, CA

Re: iMessage/Messages/Siri Indigo Control Script

Great writeup, Jay, on a really frustrating and confusing problem.

For future reference, note that the problem always corrected itself when I repaired disk permissions. Could be a coincidence but I did it successfully about 4 or 5 times and the simple server stop/start has not been that reliable.

I've got an script running that sends a message to Indigo every 10 minutes and will let you know if I see any spontaneous failures.

Thanks!!!!

--Dave

Posted on
Mon Dec 22, 2014 6:05 pm
DVDDave offline
Posts: 470
Joined: Feb 26, 2006
Location: San Jose, CA

Re: iMessage/Messages/Siri Indigo Control Script

FYI, with the help of my son, I've implemented this same functionality with my new Amazon Echo. Fun! You can see my posting at

viewtopic.php?f=84&t=12840&p=88956#p88956

although I have not posted any scripts yet since this is more complicated and experimental.

--Dave

Posted on
Fri Jan 02, 2015 1:31 pm
Empyreal offline
Posts: 12
Joined: Dec 08, 2012

Re: iMessage/Messages/Siri Indigo Control Script

I also am running into the dreaded error -1708. Has anyone found a fix? I'm running OSX 10.9.

--><-- this close to having a pretty cool "Wife Approved" solution.

Thanks!

Posted on
Wed Jan 14, 2015 2:45 am
MaartenT offline
Posts: 20
Joined: Jan 12, 2015

Re: iMessage/Messages/Siri Indigo Control Script

I'm working with Yosimite and Indigo 6.0.20

I also am running into the dreaded error -1708.

i would love to use this functionality but i'm a little lost if it will ever work with my configuration and if so what are the steps that i need to follow.

Posted on
Wed Jan 14, 2015 3:21 am
GlennNZ offline
User avatar
Posts: 1555
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: iMessage/Messages/Siri Indigo Control Script

viewtopic.php?f=4&t=2927&start=15

Probably posted in the wrong older forum. But above is my modification of the first script for Yosemite that acts on received messages via iMessage and enables execution of action groups etc. Have updated it since this post enabling two way communication which is quite handy - ie. After an hours absence indigo sends a imessage listing on devices and asking if I want to turn them off - a yes reply turns them all off. Happy to post that - but a few triggers and variables with that one - if interested.

There appears to be a Yosemite issue with apple scripting which I though I had but appeared to be changes in Yosemite to imessaging given lack of defined alerts etc - anyhow the above script is for Yosemite and works really well so far.

Glenn

Who is online

Users browsing this forum: No registered users and 2 guests