Passing numbers as parameters from alexa
-
{ 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 eightIve 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
-
@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 -
Thats delightfuly simple Ill just toss that in my xboxvol script Thanks
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