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
    458
    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.
    • Jack BaileyJ
      Jack Bailey
      last edited by

      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?

      RussR 1 Reply Last reply Reply Quote -1
      • RussR
        Russ @Jack Bailey
        last edited by Russ

        @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
        • tuicemenT tuicemen moved this topic from Instructions on
        • First post
          Last post