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

    Passing numbers as parameters from alexa

    Scheduled Pinned Locked Moved General Discussion
    3 Posts 2 Posters 823 Views 1 Watching
    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.
    • F Offline
      fennectech
      last edited by

      { trigger: 'volume', id: '5fb025388293770019882f6f', params: 'five' }
      Running trigger: volume  Command: xboxvol five
      Reported: Command Ran
      { trigger: 'volume', id: '5fb025388293770019882f6f', params: 'twelve' }
      Running trigger: volume  Command: xboxvol twelve
      Reported: Command Ran
      { trigger: 'volume', id: '5fb025388293770019882f6f', params: 'twelve' }
      Running trigger: volume  Command: xboxvol twelve
      Reported: Command Ran
      { trigger: 'volume', id: '5fb025388293770019882f6f', params: 'eight' }
      Running trigger: volume  Command: xboxvol eight
      

      Ive figured out how to get triggercmd working but the parameters are being sent as words which is not usable for what I'm trying to do

      RussR 1 Reply Last reply Reply Quote 0
      • RussR Offline
        Russ @fennectech
        last edited by

        @fennectech, we're at the mercy of what Alexa hears and sends to the TRIGGERcmd servers. You could use a script that does word-to-number conversion for you, something this:

        #!/bin/bash
        
        case $1 in
            "one" )
                NUMBER=1 ;;
            "two" )
                NUMBER=2 ;;
            "three" )
                NUMBER=3 ;;
            "four" 
                NUMBER=4 ;;
            "five" )
                NUMBER=5 ;;
            "six" )
                NUMBER=6 ;;
            "seven" )
                NUMBER=7 ;;
            "eight" )
                NUMBER=8 ;;
            "nine" )
                NUMBER=9 ;;
            "ten" )
                NUMBER=10 ;;
        esac
        
        xboxvol $NUMBER
        

        Russell VanderMey

        1 Reply Last reply Reply Quote 0
        • F Offline
          fennectech
          last edited by

          Thats delightfuly simple Ill just toss that in my xboxvol script Thanks

          1 Reply Last reply Reply Quote 1

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post