• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
TRIGGERcmd
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  1. Home
  2. hm123
  3. Posts
H
  • Profile
  • Following 0
  • Followers 0
  • Topics 2
  • Posts 3
  • Best 1
  • Controversial 0
  • Groups 0

Posts made by hm123

  • Google assistant say the Raspberry Pi temperature

    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)
    
    posted in Raspberry Pi
    H
    hm123
    Feb 2, 2020, 9:35 AM
  • RE: foreground triggers not working

    Obviously I can not run GUI programs as root. Background triggers work fine and do the job anyway. Thank you

    posted in General Discussion
    H
    hm123
    Jan 30, 2020, 10:10 PM
  • foreground triggers not working

    Raspberry Pi 4 with Raspbian Buster. Installed Triggercmd following the instructions. Background trigger "reboot" works fine but the foreground are not. Like this one working when I try it in terminal, but not working triggered by Triggercmd:

    {"trigger":"Gnome Editor","command":"gedit","ground":"foreground","voice":"edit","allowParams": "false"}

    I am new to linux so I may me missing something

    posted in General Discussion
    H
    hm123
    Jan 30, 2020, 11:59 AM