• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
TRIGGERcmd
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Multiple parameters

General Discussion
2
7
296
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    Steve Lee
    last edited by Aug 19, 2023, 11:08 AM

    Commands can take a parameter and there are examples of how to invoke in alexa and how to process in the command.

    But can we supply multiple parameters? A recent example command cmd file had several %n parameters which made me think you can.

    I previously tried guessing the correct incantation but didn't get it to work.

    thanks

    R 1 Reply Last reply Aug 19, 2023, 12:03 PM Reply Quote 0
    • R
      Russ @Steve Lee
      last edited by Aug 19, 2023, 12:03 PM

      @Steve-Lee, yes, you can pass multiple parameters, but not with the TRIGGERcmd Smart Home Alexa skill. That will only pass on, off, a number, or a color as the parameter.

      There are other ways to run your commands though, like the original TRIGGERcmd Alexa skill, or the simplest way is to use this Parameters button for the command on the website:
      def4b1ac-5d35-40f5-a044-795c6f06a7f9-image.png

      You can enter any number of parameters there:
      f93d22e7-c259-4470-af40-f17aea4ff627-image.png

      Russell VanderMey

      S 2 Replies Last reply Aug 19, 2023, 2:11 PM Reply Quote 0
      • S
        Steve Lee @Russ
        last edited by Aug 19, 2023, 2:11 PM

        @Russ thanks for the confirmation.

        "Ask TC to run Thing with parameter foo"

        But what do I say for multiple parameters. I tried things like:

        "Ask TC to run solo with parameters two and on"

        Steve

        R 1 Reply Last reply Aug 19, 2023, 2:56 PM Reply Quote 0
        • R
          Russ @Steve Lee
          last edited by Russ Aug 19, 2023, 6:31 PM Aug 19, 2023, 2:56 PM

          @Steve-Lee, sortof correct. You could say:

          Ask TC to run Thing with parameter kung foo"
          

          Then you'll see an entry like this in the Thing command's runs list:

          Trigger sent from Alexa params = kung foo
          

          In other words, your command would run with 2 parameters:

          1. kung
          2. foo

          More examples:
          01f0b5a2-adfc-4078-a9f0-00ddc572af8d-image.png

          Russell VanderMey

          S 1 Reply Last reply Aug 19, 2023, 5:02 PM Reply Quote 0
          • S
            Steve Lee @Russ
            last edited by Aug 19, 2023, 5:02 PM

            @Russ it was another of those pesky Ss then lol. Didn't think of that. Thanks

            1 Reply Last reply Reply Quote 0
            • S
              Steve Lee @Russ
              last edited by Aug 24, 2023, 12:45 PM

              @Russ said in Multiple parameters:

              but not with the TRIGGERcmd Smart Home Alexa skill. That will only pass on, off, a number, or a color as the parameter

              Exploring Home Skill parameters a bit with notepad i find

              • doesn't work with a colour, just get error "having trouble accessing your skill". Is the skill not set for colours?. In the alexa docs I see lots of optional default intents for home (eg on and off for power) - perhaps they could be configurable in the command settings?
              • percent just passes the number with no indication it is a percentage. I assume that's Alexa be a bit rubbish
              • "negative" or "minus" prefix don't work - is there a way

              Any thoughts?

              S 1 Reply Last reply Aug 24, 2023, 1:21 PM Reply Quote 0
              • S
                Steve Lee @Steve Lee
                last edited by Steve Lee Aug 24, 2023, 1:21 PM Aug 24, 2023, 1:21 PM

                @Steve-Lee said in Multiple parameters:

                doesn't work with a colour, just get error

                but "alexa turn notepad green" gets notepad to open green.txt 🙂

                1 Reply Last reply Reply Quote 0
                3 out of 7
                • First post
                  3/7
                  Last post