Smart reply for voice with parameters

  • Just was wondering if there is a way to have a voice reply for different parameters sent in.

    Let's say I have a batch that can accept on, off, or no parameter. It would be cool to have the reply say something different for each one of these situations.

    "Ok Google, Ask TriggerCMD to run Plex with parameter on"
    Voice Reply: Turned on the plex server

    "Ok Google, Ask TriggerCMD to run Plex with parameter off"
    Voice Reply: Turned off the plex server


    if "%1"=="on" "Plex Media Server.exe"
    if "%1"=="" "Plex Media Server.exe"
    if "%1"=="off" taskkill /IM "Plex Media Server.exe"

    Now I can just have two different triggers and call the correct one for on/off control but I also have smartthings and have them hooked up there. The Device Handler for that is defaulted to a switch with on/off states. If I have two Virtual Switches on Smartthings I think that could get very confusing. I think I can modify the DTH to be a button or something, but I like the idea of a state being reported to my screens.

    Anyway short of it is is there or can we have a way to have a more intelligent reply based on what parameter is passed in.

    Thanks!!! Having a blast with this, can't wait to subscribe so I can really have fun with it :) Just have to wait until after christmas, every dollar counts!

  • administrators

    @mysticnynja, that's a good idea, and I don't think it would be too difficult. I'd have to let you put a placeholder like {{param}} in the voice reply field. I'll add this to my todo list.

  • @russ
    Did this ever get implemented? It would be useful to me.

  • administrators

    @colegl, thanks for the reminder. I did it just now, and it's awesome!

    @mysticnynja, thanks for the suggestion.

    Now you can use these placeholders in your Voice Reply field:

    • {{trigger}}
    • {{computer}}
    • {{params}}

    Voice Reply Placeholders

  • I just saw this!! Awesome I'll try it out today and let you know!

Log in to reply

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