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

    Google home to return the outcome of a command

    General Discussion
    2
    5
    1.2k
    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.
    • G
      gutopa
      last edited by

      Hello...

      I'm still testing the application with my raspberry pi and so far everything looks amazing and working really well.
      But I have a funny question: Has anyone tried, somehow to run a command and return the outcome of it to google? I know trigger cmd will not do it, but I could for example put the result in a dropbox file? I know it will require some ifttt work as well..
      What I'm trying to do at the moment is to run a script that reads the temperature and humidity from the raspi thermometer and somehow get those results with voice or a dropbullet, worst case scenario.

      Cheers

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

        @gutopa, here's one suggestion for you. It's not as ideal as having Google or Alexa reply with the results of the command, but it might be adequate.

        Also, can you send a link to that "dropbullet" you referred to? I googled it and none of the results seem to fit.

        The idea is to have your Raspberry Pi run a curl command that would have your Windows computer say the temperature and humidity out loud using nircmd.

        curl -X POST https://www.triggercmd.com/api/run/triggerSave -H "authorization: Bearer `cat ~/.TRIGGERcmdData/token.tkn`" -d "trigger=speak&computer=ds&params=\"Temp 32\""
        

        Or you could use the tcmd go client, but then you need to use %20's instead of spaces. So you could write out your sentence in a text file, then read it into an environment variable with %20's instead of spaces, then use that variable in your tcmd command like this:

        echo "Temperature is 32 degrees and Humidity is 70" > /tmp/saythis.txt
        export SAY_THIS=$(cat /tmp/saythis.txt | sed -e 's/ /%20/g')
        ./tcmd -computer ds -trigger speak -params "\"${SAY_THIS}\""
        

        0_1545937396904_69ff25e7-898d-42cf-9427-9c856a31aa7c-image.png

        Russell VanderMey

        1 Reply Last reply Reply Quote 0
        • G
          gutopa
          last edited by

          Thank you Russ.
          I'll give a go another day. My idea is still use everything from one raspberry pi and avoid having to create different clients.
          Do you have any example of passing parameters?
          Like. If I want to read the temperature in different RPI but with the same command?
          IE, Temperature + PiKitchen or PiBedroom

          I meant push bullet, sorry. 🙂
          https://www.pushbullet.com/

          Cheers

          RussR 2 Replies Last reply Reply Quote 0
          • RussR
            Russ @gutopa
            last edited by

            @gutopa, if all of your Pi's are on your network, you could use authorized_keys to allow one Pi to run remote commands on the other Pi's using ssh. The original Pi could capture the output of those commands. Then you could compile all of the output and send it to yourself via pushbullet or email. Just brainstorming here..

            Russell VanderMey

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

              @gutopa, I've been thinking about your question and how I'd implement a solution. Please look here for what I'm thinking.

              Russell VanderMey

              1 Reply Last reply Reply Quote 0
              • First post
                Last post