Nev Posted December 31, 2015 Share Posted December 31, 2015 (edited) Hi, I want to trigger the SmartThings workflow script in the background from an applescript. Please help! This will allow me to better my current setup which is Siri telling Indigo (using HomeBridge 2.0 plugin) running my current applescript to tell Alfred 2 to turn the lights on or off etc. Its current working well, BUT it can only process using the GUI and it slow due to this. I'd like it to run in the background. I've added an external trigger (st_Device_Command) to the SmartThings workflow and the applescript that runs it is below. tell application "Alfred 2" run trigger "st_Device_Command" in workflow "com.smartthings.alfred" with argument "Outside Side Light on" delay 2 tell application "System Events" to key code 36 end tell Link to Smartthings workflow https://github.com/PhysicalGraph/SmartThings-Alfred Edited December 31, 2015 by Nev Link to comment
deanishe Posted December 31, 2015 Share Posted December 31, 2015 If you want to run a workflow script without Alfred's GUI, you shouldn't be running it via Alfred… Try calling the script directly. Also, the slowness is probably not due to Alfred. AppleScript is the more likely culprit. Link to comment
Nev Posted January 2, 2016 Author Share Posted January 2, 2016 If you want to run a workflow script without Alfred's GUI, you shouldn't be running it via Alfred… Try calling the script directly. Also, the slowness is probably not due to Alfred. AppleScript is the more likely culprit. Yea I tried calling it directly, but my scripting skills are not so strong so i couldn't get it to work. I need it to work in Alfred because Alfred has many other component which this action required (login to SmartThings, retrieve a list of devices...). Thest only part I want to change from the Alfred SmartThings workflow is not using the Device Collector part, so I can send the specific command or argument (eg. st Back yard lights on) to the workflow script directly from an apple script. I'd like to do this for many devices at a time and using the GUI makes it slow as it does one at a time. I don't think i need to touch the script, I just need to learn how to pass the argument (eg. st Back yard lights on) to the variable which the script uses to process the command. Thanks in advance for any help! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now