applescript to indigo interface

Posted on
Fri Aug 07, 2015 4:04 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

applescript to indigo interface

as applescript has problems interfacing to indigo would anyone be interested in an easy to use interface to send commands from applescript to indigo and read variables or device states

idea:
- in indigo a plugin runs that checks (every x seconds) a file (/users/yourid/documents/indigocommands/toIndigo) with commands from applescript to indigo
-- if the file is new or has a new line the plugin reads it and executes the requested command i.e. set variable to xx or dimmer etc.
-- write to file /users/yourid/documents/indigocommands/toApple the response from indigo
-- reset the file and wait for next command


in applescript:
- write requested commands to a file like this:
Code: Select all
   do shell script 'echo "set variable xx to yy"          >> /users/yourid/documents/indigocommands/toIndigo'
   do shell script 'echo "set device xx  state yy to zz"      >> /users/yourid/documents/indigocommands/toIndigo'
   do shell script 'echo "get variable xx"                  >> /users/yourid/documents/indigocommands/toIndigo'
   do shell script 'echo "get device xx state yy"         >> /users/yourid/documents/indigocommands/toIndigo'

- read back result
Code: Select all
   set responseFromIndigo to do shell script 'cat  /users/yourid/documents/indigocommands/toApple'


this concept bypasses the security issues with the applescript -> indigo interface.



Karl

Posted on
Fri Aug 07, 2015 12:01 pm
Korey offline
User avatar
Posts: 811
Joined: Jun 04, 2008
Location: Henderson, NV

Re: applescript to indigo interface

I'd be interested!

:D

--
Korey

Posted on
Tue Aug 11, 2015 2:01 am
davinci offline

Re: applescript to indigo interface

I think it is a good idea.

Something that Indigo should do!

Posted on
Tue Aug 11, 2015 10:07 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: applescript to indigo interface

I will start working on it next week.
First read/ write variables and device/states
Then actions
And then listen to changes in variables and devices.


Sent from my iPhone using Tapatalk

Posted on
Tue Aug 11, 2015 10:47 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: applescript to indigo interface

Not sure if Watchdog will help?
so thought I would share the link - Watchdog :)

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests