Voice/IFTTT

You can use these instructions to control your DscServer with voice commands. This IFTTT support uses your IFTTT account and your google account to which only you have access.

The instructions here focus on Alexa and Google Home (Google Assistant), note that any trigger can be used for the Google Drive Action, and other services that support Google Drive insert row actions (e.g. Stringify) can be used.

You can use IFTTT integration using IFTTT notifications, over Google Drive, or both.

IFTTT Integration via IFTTT Notifications

Requires the DscServer running on Android 4.4 or later:

Note - this approach only works with a single IFTTT account which limits voice support to one user for google or alexa so it's best to use a dedicated/shared account.

Requirements:

  • Google Home or Amazon Alexa (with accounts)
  • IFTTT account connected to your google and/or alexa account
  • Best practice is to dedicate an account to IFTTT/DscServer integration
  • DscServer running on an android phone or tablet, properly connected to your envisalink
  • IFTTT app installed on the tablet/phone running the DscServer

Setup:

The DscServer monitors the text of android notifications for the string $DSC followed by one or more (comma separated) DSC commands (see below).

When a $DSC command is found by the DscServer the notification is removed once processed. Check the runtime log for execution results. If you have any doubt that the notification is being received you can send an non-$DSC notification (try using an IFTTT button for the THIS).

    1. Touch the DscServer widget to open the DscServer management app on your server device
    2. Touch Preferences > Server
    3. Touch the text under "Notifications" and enable DSC_NotificationListener to access android notifications
    4. Create an applet in IFTTT where the "THAT" action is to send a notification. The text of the notification should be $DSC followed by one (or if more comma separated) DSC Commands.

IMPORTANT: On many android systems every IFTTT or AutomationManager app update requires the android device to be restarted to re-enable notification processing.

IFTTT Integration via Google Drive (advanced)

Requirements:

    • Google Home / Google Assistant or Amazon Alexa / Echo/ Dot / FireTV
    • IFTTT account connected to your google account and amazon account (for dot/echo)
    • DscServer running on an android phone or tablet, properly connected to your envisalink
    • Google Drive Actions enabled (see below)

Google Home Setup

    1. Enable the DscServer for Google Drive logging: Web (Google Drive) Access. You MUST use the same google account for the DscServer as you used for Google Home.
    2. Open IFTTT and log into your account if necessary.
    3. Select "My Applets" then "New Applet".
    4. In the "If" section search services for Google and select "Google Assistant"
    5. Select the desired option, for example use "Say a simple phrase" to arm the system
    6. Configure the phrase, e.g. "Arm Security System"
    7. Configure a response, e.g. "Ok arming security system"
    8. Skip to "Google Drive Actions"

Alexa Setup

This is very similar to the Google Home setup, but of course use the Alexa service. Note that IFTTT triggers are fired using the phrase "Alexa, trigger blah blah blah" to trigger your action that's been associated with the phrase "blah blah blah".

Setup Google Drive Actions

Create a new IFTTT applet for your voice device as described above, or any other trigger you wish to use.

In the IFTTT "That" services section search for Google and select "Google Sheets"

Use "Append row to spreadsheet"

Use the same spreadsheet name to match your DscServer panel location name (as set when you enabled DscServer Drive Logging). You must be using the same google account! For example, if your location name is "DscServer" (and the log file is "DscServer.log") name the spreadsheet "DscServer". Google/IFTTT must create it's own file, do not reuse an existing file.

In the formatted row add a single cell that is the command you wish to have executed (see below). Numeric values must be in quotes.

Use any drive folder path you wish.

Test (and create the spreadsheet) by issuing the command to your voice device.

Open Google Drive in a web browser (log in with your account).

Find the spreadsheet created by IFTTT and double click to open it. You should see your first command in the sheet, delete it if you don't want it to be applied.

Under "tools" open the script editor, replace the entire contents with:

function onChangeTrigger(e) {
  DscServerFirebase.onChangeTrigger(e);
}
function setup() {
  ScriptApp.newTrigger('onChangeTrigger')
  .forSpreadsheet(SpreadsheetApp.getActive())
  .onChange()
  .create();
}
function test() {
  onChangeTrigger({source: SpreadsheetApp.getActive()});
}

and save.

Rename the project. Your location name would be a good choice.

In the script page under "Resources" pick "Libraries". In "Find a Library" enter (using copy/paste!):

1OagUT-_HGJa9QOlsRMCiMfdW6aIpdeLuzIGO1X-LJFMMqCs0GX6rlpvR

and touch "Select"

You should see the "DscServerFirebase" as an added library. Select the latest version from the dropdown (don't enable Development Mode), save, and accept any permission requests.

Back on the script page, select the "setup" function from the dropdown, and then touch the run (triangular) button.

Accept any requested permissions.

Test your command by entering a command in the spreadsheet.

Test it by executing a voice command.

If you have problems, when viewing the script page use "View" then "logs" or "execution transcript" to see if there are any errors. Feel free to email me for support if you get stuck.

Google Drive Commands

See DSC Commands

Troubleshooting

Open Google Drive to find the spreadsheet created by your IFTTT applet.

Add an entry "0711*2". If the trigger is executing the command will be sent and removed and the trouble light will flash for a short time. Add "0711#" to clear the trouble light. If your command is all digits (no letters or special characters) it must be enclosed in quotes.

Observe the the spreadsheet when you issue a voice command you'll see the command appear and then disappear when processed.

Use the DscServer log view to confirm your command was submitted and processed.

To find your script:

Confirm the folder and name of the spreadsheet in that applet.

Use the "tools" menu to launch the "script editor".

When viewing the script use "View", then "logs" or "execution transcript" to see if there are any errors. Feel free to email me for support if you get stuck.

Common Problems

      • Incorrect spreadsheet name (must match your DscServer location)
      • Script or onChange event trigger not defined for spreadsheet.
      • Incorrect folder (point your action at the folder with your spreadsheet)
      • Incorrect google id
      • Downlevel DscServerFirebase library. Update as per the above.