@Carl I can tell you how I'm doing it, but I have no way of knowing if it is the "correct" way since I have very little coding knowledge. That being said here goes.
Step 1Follow the directions at the beginning of this thread.
Step 2Open the send-alexa-command.js file located in the Alexa folder on your Desktop.
Change the part under
// Change the sendCommand call below to send a command to one or more of your Alexa devices. to the following:
- Code: Select all
sendCommand("speak", 70, "This is a test. Hello World!");
Then save the file. MAKE SURE THAT THE FILE IS SAVED AS PLAIN TEXT NOT RTF!
Step 3Create a script by simply creating an empty TextEdit document and insert the following:
- Code: Select all
#!/bin/bash
cd Desktop/Alexa
node ./send-alexa-command.js
Save the file as
test.sh inside the Alexa folder. (MAKE SURE THAT THE FILE IS SAVED AS PLAIN TEXT NOT RTF)
Step 4
In indigo create a new action in Action Groups.
Under
Type select
Server Actions >>
Script and File Actions >>
Run Shell Script.
In the popup window delete what's inside the field
Full path to file on server.
Locate the
test.sh file you just created and drag it on top of the empty
Full path to file on server field.
Save the action.
You can then try the action by selecting
Execute Actions Only located at the bottom right of the Indigo Home Screen.
The reason I'm doing it this way is because it does things in the background and doesn't require me to open the Terminal app. Initially, I wanted a way to call the node ./send-alexa-command.js directly from within Indigo but couldn't figure out how to do it. Hope this helps, but remember that you get what you pay for
.