How do I run a .py file on my RaspberryPi through TriggerCMD?
-
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?
-
@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.
-
T tuicemen moved this topic from Instructions on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login