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

Google assistant say the Raspberry Pi temperature

Raspberry Pi
3
6
1.0k
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.
  • H
    hm123
    last edited by Feb 2, 2020, 9:35 AM

    I put my Rasberry Pi in a handmade box and I am concerned about it's temperature. So I created this trigger to be able to check the Pi temperature using google assistant.

    {"trigger":"Pi temperature","command":"python3 /home/pi/temperature.py","ground":"background","voice":"system temperature","voiceReply":"The pi temperature is {{result}} degrees","allowParams": "false"}
    

    The Python3 script

    #!/usr/bin/env python3
    
    import subprocess
    import os
    
    reply = str(subprocess.check_output(['vcgencmd', 'measure_temp']))
    result = reply[reply.find('=') + 1: reply.find('C')- 1]
    os.system('~/.TRIGGERcmdData/sendresult.sh ' + result)
    
    R T 2 Replies Last reply Feb 2, 2020, 4:02 PM Reply Quote 1
    • R
      Russ @hm123
      last edited by Feb 2, 2020, 4:02 PM

      @hm123, that is awesome. Thanks for sharing it.

      Russell VanderMey

      1 Reply Last reply Reply Quote 0
      • T
        tuicemen @hm123
        last edited by Jan 11, 2022, 2:35 PM

        @hm123, I love this idea!
        I have a pi zero with extra USB hat mounted inside a X10 CM15 controller.zwave_cm15.jpg

        I have a script to display several system stats (including CPU temperature) in my HomeGenie server.
        RPi Tools.png
        Although this has been running fine, monitoring temperature for this PI via voice would be a welcome addition.

        I'm having a problem testing this and that may be due to the fact that I've not subscribed yet. perhaps @Russ could confirm.
        I don't get a reply back from my Google mini so I assume it counts as two calls in under a min.
        Would this work with Alexa as well?

        1 Reply Last reply Reply Quote 0
        • T
          tuicemen
          last edited by tuicemen Jan 11, 2022, 6:22 PM Jan 11, 2022, 6:19 PM

          I think figured it out was trying with the smarthome skill verses Trigger command. Glad it works with Alexa too. To bad all TRIGGERcmd actions couldn't all be combined into 1 skill.

          R 1 Reply Last reply Jan 12, 2022, 2:51 AM Reply Quote 0
          • T tuicemen referenced this topic on Jan 11, 2022, 9:50 PM
          • T tuicemen referenced this topic on Jan 11, 2022, 9:52 PM
          • T tuicemen referenced this topic on Jan 11, 2022, 9:59 PM
          • R
            Russ @tuicemen
            last edited by Russ Jan 12, 2022, 2:52 AM Jan 12, 2022, 2:51 AM

            @tuicemen, I agree. The TRIGGERcmd Smart Home skill recognizes your words the best, but it doesn't have this feature to have your Alexa say things that your command outputs.

            Your question gave me an idea of how I might be able to make that work though. I'm thinking I could do something similar to what Voice Monkey did.

            In the meantime you could use Voice Monkey. You can call their API with a curl command and provide what you want your Alexa to say, like this:

            curl "https://api.voicemonkey.io/trigger?access_token=(voice_monkey_token)&monkey=(your_monkey_name)&announcement=The temp is 60 degrees"
            

            Russell VanderMey

            T 1 Reply Last reply Jan 12, 2022, 12:26 PM Reply Quote 0
            • T
              tuicemen @Russ
              last edited by Jan 12, 2022, 12:26 PM

              @russ thanks for that suggestion though I may wait to see what you come up with.
              The TRIGGERcmd Command does work, even if a bit clunky but maybe I'm just not using it correctly.
              In any case I don't plan to use this temperature call often as I do have the read out in HomeGenie.

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