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

How do I run a .py file on my RaspberryPi through TriggerCMD?

Raspberry Pi
2
2
471
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.
  • J
    Jack Bailey
    last edited by Apr 29, 2020, 8:31 PM

    Looking to have a button on my phone, through IFTTT, linked to TriggerCMD, which will run "python3 steam.py" on my RaspberryPi, how would I go about doing this?

    R 1 Reply Last reply Apr 30, 2020, 1:12 PM Reply Quote -1
    • R
      Russ @Jack Bailey
      last edited by Russ Apr 30, 2020, 1:14 PM Apr 30, 2020, 1:12 PM

      @Jack-Bailey, what will steam.py do? Anyway here are some steps you'll need to do. Let me know if you get stuck on any of them.

      • Create your steam.py file and test it.
      • Install the TRIGGERcmd agent on your Raspberry Pi and test it using one of the built-in commands.
      • Run this to install the background service so it starts when your Raspberry Pi boots:
        /usr/share/triggercmdagent/app/src/installdaemon.sh
      • Add your python3 steam.py command to your /root/.TRIGGERcmdData/commands.json file. Something like this:
        {"trigger":"steam","command":"python3 \/root\/steam.py","ground":"background","voice":"steam","allowParams": "false"},
      • Test it using the green Trigger button on the TRIGGERcmd website.
      • Go to ifttt.com and create your Button widget / TRIGGERcmd applet that runs your command.
      • Long-press the IFTTT app icon and select Widgets, and place your button widget on your home screen.

      Russell VanderMey

      1 Reply Last reply Reply Quote 0
      • T tuicemen moved this topic from Instructions on Jan 30, 2022, 7:53 PM
      1 out of 2
      • First post
        1/2
        Last post