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

Can you feed back information to Alexa

General Discussion
sendresult
3
6
1.5k
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
    snantz
    last edited by Russ Feb 12, 2022, 12:42 AM Jan 3, 2019, 4:40 AM

    Hello

    Can you feed back information to Alexa?

    For excample I could pick up a value from my linux box and I want Alexa to tell me.

    for excample:

    1. Alexa - what is the Temo
    2. run script which retrieves a sensor value
    3. Alexa tell me the value

    Best regards
    Stefan

    R 1 Reply Last reply Jan 3, 2019, 10:57 PM Reply Quote 0
    • R
      Russ @snantz
      last edited by Jan 3, 2019, 10:57 PM

      @snantz, this is the second request for something like this. I've been thinking about how I would implement that.

      I'm thinking I could give an option you could enable on each command to tell Alexa or Google Assistant to wait a few seconds for a response from the computer. If the computer sends a response, then Alexa or Google Assistant would speak the text in the response. I'm thinking the response could be sent with a curl or tcmd command.

      What do you think?

      Russell VanderMey

      1 Reply Last reply Reply Quote 0
      • S
        snantz
        last edited by Jan 6, 2019, 11:03 PM

        @Russ, How would I tell alexa to wait for and out put? Or does it by itself?

        R 1 Reply Last reply Jan 6, 2019, 11:34 PM Reply Quote 0
        • R
          Russ @snantz
          last edited by Russ Jan 6, 2019, 11:48 PM Jan 6, 2019, 11:34 PM

          @snantz, I haven't added that voice response feature yet, but when I do, this is how it will work:

          If you put {{result}} in the Voice Reply field of your command (like this), Alexa or Google Assistant will wait up to 5 seconds for a result to be sent from the computer, and include it in the voice response.

          If you upgrade to the latest version of the agent (as of 1/6/19), you'll now find a new sendresult.bat or sendresult.sh file depending on your computer's operating system. You can send the result of your triggered script by adding this to the end of it:

          Windows:

          %USERPROFILE%\.TRIGGERcmdData\sendresult.bat "My command result"
          

          Linux or Mac:

          sh ~\.TRIGGERcmdData\sendresult.sh "My command result"
          

          Today the sendresult script just logs your result in the command's Runs list, but this is the ground-work for this voice feed back feature you asked for.

          Russell VanderMey

          1 Reply Last reply Reply Quote 0
          • G
            GNetDevelopment
            last edited by Jan 31, 2019, 9:39 PM

            Still learning when it comes to using TriggerCMD and this trigger sounds like a great idea as I've been wanting to find ways to have Alexa provide me information about different things - mostly all pertaining to status and data for home automation system. Can anyone provide any examples of what they're doing with this and what feedback they're using. What feedback can be given anyway? For example could you run an sudo apt update command and have Alexa tell you how many packages were updated?

            R 1 Reply Last reply Jan 31, 2019, 11:39 PM Reply Quote 0
            • R
              Russ @GNetDevelopment
              last edited by Russ Jan 31, 2019, 11:42 PM Jan 31, 2019, 11:39 PM

              @gnetdevelopment, so far I've only implemented the ability to send feedback to the Runs history for each command.

              Now that that's done, I'm planning to add the ability to have Alexa or Google Assistant wait a few seconds for a result to be sent back, then say the result.

              Let's say you wanted to know how many packages can be upgraded on your Raspberry Pi. You could add a command that would run this script:

              #!/bin/bash
              export UPGRADABLE_COUNT=$(apt list --upgradable | grep upgradable | wc | cut -f 6 -d " ")
              sh ~/.TRIGGERcmdData/sendresult.sh "${UPGRADABLE_COUNT} packages could be upgraded."
              

              It would look like this in the website, and when I get the Alexa and Google Assistant work done, you could have the result spoken when you run it by voice.
              Upgrade Check Result

              Russell VanderMey

              1 Reply Last reply Reply Quote 0
              • R Russ referenced this topic on Sep 27, 2022, 11:06 PM
              • First post
                Last post