Navigation

    TRIGGERcmd
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. Instructions
    3. Raspberry Pi
    Log in to post
    • Newest to Oldest
    • Oldest to Newest
    • Most Posts
    • Most Votes
    • Most Views
    • Russ

      Raspberry Pi setup
      raspberry pi • • Russ

      31
      0
      Votes
      31
      Posts
      11566
      Views

      Russ

      @George-Hatzisymeon, sorry I never responded to this. I just noticed it because someone upvoted it.

      I just verified that the offCommand commands.json value is supported in the current version of the Raspberry Pi agent. If you were using that version and it didn't work, then maybe you were missing this part:

      "allowParams":"true"

      Here's an example entry I just tested. It turns my led strip off if the parameter was off, and if the parameter was on, it turns the strip on and makes the leds green.

      { "trigger":"Green", "command":"\/root\/killrun.sh leds.py green", "offCommand": "\/root\/killrun.sh leds.py off", "ground":"background", "voice":"green", "allowParams":"true" },
    • Russ

      Run remote commands with an old VCR remote and a Raspberry Pi Zero W
      • Russ

      1
      1
      Votes
      1
      Posts
      2423
      Views

      No one has replied

    • Russ

      TRIGGERcmd projects on hackster.io
      • Russ

      1
      0
      Votes
      1
      Posts
      1355
      Views

      No one has replied

    • J

      Adding Parameter to raspberry pi commands
      • js

      4
      0
      Votes
      4
      Posts
      944
      Views

      Russ

      Ok @js, you could change your commands.json to this:

      [ {"trigger":"Monitor","command":"/root/monitor.sh","ground":"background","voice":"Monitor","allowParams": "true"} ]

      And put this in your /root/monitor.sh script:

      #!/bin/bash if [ "$1" = "on" ] ; then echo Turning it on vcgencmd display_power 1 fi if [ "$1" = "off" ] ; then echo Turning it off vcgencmd display_power 0 fi

      And say this to Alexa or Google Assistant:

      ask TRIGGERcmd to run monitor with parameter on

      Or use the TRIGGERcmd Smart Home Alexa skill or the SmartThings integration with Google Assistant, and say this:

      turn on monitor
    • P

      Can't add command with raspberry pi 3b+
      • Phuong Dinh

      9
      0
      Votes
      9
      Posts
      725
      Views

      P

      Okay, the command lines you provided work, and I also changed my command word to just "shut" so Alexa can recognize it better. Overall, thanks a lot for helping me, TriggerCMD is definitely a great tool for the raspberry pi.

    • Russ

      Raspberry Pi relay wiring photos
      raspberry pi • • Russ

      1
      0
      Votes
      1
      Posts
      214
      Views

      No one has replied

    • Jack Bailey

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

      2
      -1
      Votes
      2
      Posts
      163
      Views

      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.
    • Alfredo Guzman

      hi, when i try to edit /root/.TRIGGERcmdData/commands.json raspberry pi says this -bash: /root/.TRIGGERcmdData/commands.json: Permiso denegado i`m novice and sorry for my bad english please help!
      • Alfredo Guzman

      2
      0
      Votes
      2
      Posts
      59
      Views

      Russ

      @Alfredo-Guzman, you have to switch yourself to the root user before you can edit that file.

      This command will switch to root:

      sudo su -
    • Russ

      Enable or disable ads with Pi-hole on a Raspberry Pi
      • Russ

      8
      0
      Votes
      8
      Posts
      727
      Views

      Furkan Cevik

      @Russ Works now, thanks!

    • P

      Off Command for Raspberry
      • Pr0k0

      3
      0
      Votes
      3
      Posts
      65
      Views

      P

      @Russ Thnx for the information i' will give it a go as soon as i will have alexa dot....still waiting due to the whole situation. But I understand what you are trying to say so i will test it and i have have an issue i will post it here. Thnxx again man.

    • Scott Barton

      How do you install TRIGGERcmd on Raspberry pi with OpenWRT?
      • Scott Barton

      19
      0
      Votes
      19
      Posts
      291
      Views

      Scott Barton

      I just updated the scripts that TRIGGERcmd runs to have full paths, and now it works, thanks!

    • Sébastien Pineau

      Installation error on Raspberry PI 3
      • Sébastien Pineau

      7
      0
      Votes
      7
      Posts
      92
      Views

      Russ

      Very cool. Thanks @Sébastien-Pineau. I'll let you know if I get this working.

    • Andy Kutruff

      Raspbery Pi docker / docker-compose
      • Andy Kutruff

      2
      0
      Votes
      2
      Posts
      34
      Views

      Russ

      @Andy-Kutruff, try this one. I just pushed it:

      docker pull rvmey/triggercmdagent:arm

      You'll need to create an actual computer record in your account and get the ID for it from your browser's address bar after you click view triggers.

    • Steve Porter

      Command format on Raspi
      • Steve Porter

      32
      0
      Votes
      32
      Posts
      244
      Views

      tuicemen

      @steve-porter yep that will mess things up. I remember reading another post about that so that isn't something that you alone have experienced. I found a couple times the file didn't update for me for different errors in command lines.
      I've gotten into the habit of double checking if it saves.

    • ZeD MaSteR

      installing triggercmd on a raspberry pi router that has openWRT
      • ZeD MaSteR

      2
      0
      Votes
      2
      Posts
      47
      Views

      Russ

      @zed-master, if you can install nodejs on it, you should be able to run the agent.js with a command like this:

      node agent.js --console

      You can find the agent code at https://github.com/rvmey/TRIGGERcmdAgent

    • Celso Santos

      I can't create triggers on the raspberry pi
      • Celso Santos

      12
      0
      Votes
      12
      Posts
      208
      Views

      Russ

      @dean-mcnaughton, nice. Good job getting it working.

    • Pé de Pano

      i can't add trigger on my raspberry pi
      • Pé de Pano

      7
      0
      Votes
      7
      Posts
      56
      Views

      Pé de Pano

      It all worked out! Thank you very much Russ, you helped me a lot.@russ

    Copyright © 2016 NodeBB Forums | Contributors