Looking for feedback - Should I add to the Alexa voice interface?

  • administrators

    The one-shot method ("Alexa, ask TRIGGERcmd to run X on Y) is ideal to quickly run a command, but Alexa often misunderstands, even though people can select their own words for Alexa to hear.

    So I'm wondering if people would find it useful to hear a numbered list of computers, then hear a list of numbered commands on that computer they select by saying the number for that computer.

    For security, I'm thinking I'd have Alexa only list the computers and commands with voice words. I imagine people might not want certain commands to be runnable by voice.

    I see people use Alexa the most, but the same question goes for the Google Assistant and Cortana (coming soon) interfaces.

  • @Russ PLEX has a nice system, whereby you can tell Alexa to run on a specific PC, or you can set a default that it will run all commands on unless otherwise specified, you could do something like:

    "Alexa, ask TRIGGERcmd to Set Default PC"

    "Which PC would you like to set as your default?

    1. Work
    2. Home
    3. Kitchen
    4. TV"


    "Default PC set to TV"

    "Alexa, ask TRIGGERcmd to run Notepad"

    "Running Notepad on TV"

    "Alexa, ask TRIGGERcmd to run Notepad on Work"

    "Running Notepad on Work"

  • administrators

    @Stefan-Green, good idea. You can already set your default PC under your Profile, but I could also let you set it with your voice like that.

    BTW, 2 notes about using the default computer functionality:

    1. Use your computer name not the voice name for it.
    2. You use it by saying "run X" and not the "on Y" part of the sentence.

  • I thnk it would be pretty useful to pass parameters from Alexa.

    ME: "Alexa, open Trigger Command and run netflix with one parameter."
    Alexa: Okay, what would you like your parameter to be?
    ME: Stranger Things
    Alexa: Okay, running Netflix trigger with Stranger Things parameter.

    Couldn't we then try to find a way to open netflix, run a search and enter the movie? That would be pretty awesome! This is pretty cool by the way. I've really enjoyed playing around with it. I'm a web developer and about to dive into learning node.js myself.

  • administrators

    @dlaugh14, I like this idea and it's on the top of my list to implement.

    I was thinking you'd say something like this:
    Alexa, ask TRIGGERcmd to run Netflix on Downstairs with parameter Stranger Things

    I don't know yet how well Alexa and Google will be able to parse that sentence, but I think it's important to allow the "one-shot" voice command rather than a prompt in the middle. If that doesn't work very well I'll probably use your method.

    In the meantime, here's the command to play Stranger Things:

    start https://www.netflix.com/watch/80077368

  • Yeah I like the idea of making it simple and quick like that. I was just thinking of the possibility of adding multiple parameters which I think then you'd need to split the command up. It would be more back and forth, but you'd be able to do a lot that way. I'm very glad to hear that you've already thought of that, because in my opinion that will make this way more powerful.

    I'm learning how to write batch scripts, so I did get stranger things to work, but I went the long route of having the script run a search for "stranger things" and running tabs and enter to select the first option.

    If you were to add parameters and pair this with automation scripts for web we could get a whole lot done. Like I tested an automation script signing in to netflix and selecting a show and having javascript wait for elements to load on the page and clicking on them when expected elements load. Its pretty cool and exciting stuff. Bravo! :clap:

  • administrators

    @dlaugh14, if you wouldn't mind publishing your code or a how-to for what you've done, I bet some of us would be interested in it.

    Over the weekend I added the code to the Alexa integration to support one parameter like this: "Alexa, ask TRIGGERcmd to run Netflix on Downstairs with parameter Stranger Things." We just have to wait for Amazon to approve it before you can try it. It's a relatively major change so they might take a couple days.

    EDIT: Correction, it just went live with those changes this morning.

  • Id be glad to post some of my stuff in here. I'll do that soon.

    Very glad to hear the parameters are working now with Alexa! Question though. Can you give me a good example for windows of getting the parameter and using it. currently I'm using vbsScript and starting that from my command.

  • administrators

    @dlaugh14, here's an example vbs script to stop or start the print spooler service. It takes a parameter "start" or "stop".

    You would run it with one of these:

    • cscript spooler.vbs stop
    • cscript spooler.vbs start
    arg = WScript.Arguments.Item(0)
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    Set colServiceList = objWMIService.ExecQuery _
    ("Select * from Win32_Service where Name='Spooler'")
    For Each objService in colServiceList
      If arg = "start" Then
        WScript.Echo "Starting " + objService.Name
      End If
      If arg = "stop" Then
        WScript.Echo "Stopping " + objService.Name
      End If

    Here's what mine looks like in the GUI Editor:

    Now I can say these to stop or start my Print Spooler service:

    • Alexa, ask TRIGGERcmd to run print on family with parameter stop
    • Alexa, ask TRIGGERcmd to run print on family with parameter start

  • Russ, or anyone interested seeing this discussion - Please see https://www.triggercmd.com/forum/topic/115/open-specific-netflix-movie-with-alexa if you're interested in using Alexa to open netflix movie as discussed above.

  • administrators

    @dlaugh14, your example is way cooler than mine.

Log in to reply

Looks like your connection to TRIGGERcmd Forum was lost, please wait while we try to reconnect.