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

    Posts made by Dean McNaughton

    • RE: Help with Home Assistant Command

      @russ
      Thanks. Really loving this app.

      In case you're interested, the final application was to automate arming/disarming a home security system for when people arrive or leave the home.

      My particular vendor (A-tech security) does not allow integration with home automation systems, like Home Assistant (HA) or SmartThings, but they do allow users to log into their account online to arm/disarm their system.

      So, this was the workaround:

      1. Home Assistant presence sensor with an on/off boolean (toggle) sends command to TRIGGERcmd as follows:
        • HA present (toggle on) --> TRIGGERcmd to arm
        • HA away (toggle off) --> TRIGGERcmd to disarm
      2. UI.Vision web extension configured on an always on VM receives the appropriate trigger, from TRIGGERcmd.
        • An arm trigger executes a UI.Vision autorun html file that logs in and arms the system.
        • A disarm trigger executes a UI.Vision autorun html file that logs in and disarms the system.
      posted in Instructions
      Dean McNaughtonD
      Dean McNaughton
    • RE: Help with Home Assistant Command

      @russ

      Thank u! It is working now. Using the post method, this was the payload line that ended up working (no parenthesis were used):

      payload: "computer=DAM-UBUVM&trigger=calculator&token=MYTOKEN"

      posted in Instructions
      Dean McNaughtonD
      Dean McNaughton
    • RE: Help with Home Assistant Command

      @russ

      Still not working. I tried it with and without a parenthesis around the trigger word - calculator (see below). Neither work.

      It looks like the triggercmdagent never gets the order to run; when I review the run count for the trigger, it never changes after I call the service in Home Assistant.

      I've confirmed I'm using the same token that's on file at the DAM-UBUVM computer. Do you have any other thoughts?

      Tried with parenthesis, as follows:

      rest_command:
        triggercmd_calculator:
          url: 'https://www.triggercmd.com/api/run/triggerSave'
          method: "post"
          content_type: "application/x-www-form-urlencoded"
          payload: "computer=(DAM-UBUVM)&trigger=(calculator)&token=(MYTOKEN)"
      

      Tried without parenthesis, as follows:

      rest_command:
        triggercmd_calculator:
          url: 'https://www.triggercmd.com/api/run/triggerSave'
          method: "post"
          content_type: "application/x-www-form-urlencoded"
          payload: "computer=(DAM-UBUVM)&trigger=calculator&token=(MYTOKEN)"
      
      posted in Instructions
      Dean McNaughtonD
      Dean McNaughton
    • Help with Home Assistant Command

      Re: How to run commands from Home Assistant

      I've inserted this line into my Home Assistant config.yaml file (below), and it does not appear to be running the command at all. The triggercmd agent, running in terminal, doesn't indicate any command is received / executed. I suspect the problem is in the payload line. Of course my actual token is inserted where it should be, indicated by MYTOKEN in the script below.

      The title of my trigger, in TRIGGERcmd is "calculator", and it does work, when executed via TRIGGERcmd.

      Any suggestions what I've done wrong here:

      rest_command:
        triggercmd_calculator:
          url: 'https://www.triggercmd.com/api/run/triggerSave'
          method: "post"
          content_type: "application/x-www-form-urlencoded"
          payload: "trigger=calculator&token=(MYTOKEN)"
      
      posted in Instructions
      Dean McNaughtonD
      Dean McNaughton
    • RE: Help with Trigger for Ubuntu

      @russ

      I'm using chrome and it worked with the following:

      google-chrome /home/dmcnaugh/Downloads/Alarm_Arm.html
      

      Thank you, Russ!

      posted in Linux
      Dean McNaughtonD
      Dean McNaughton
    • Help with Trigger for Ubuntu

      I'm trying to run a file titled, "Alarm_Arm.html" inside my "Downloads" folder. Nothing is happening. I can confirm the triggercmd agent is open and running, and able to run other triggers/commands. So, I really do believe the problem must be in the structure of this line of code. Any suggestions what may be wrong?

      {"trigger":"Arm","command":"/home/dmcnaugh/Downloads/Alarm_Arm.html","ground":"foreground","voice":"Arm_the_alarm","allowParams": "false"}
      
      posted in Linux
      Dean McNaughtonD
      Dean McNaughton
    • RE: Windows script to prep SD card for Raspberry Pi with TRIGGERcmd agent

      @Russ
      I think the batch file wrote info to the card, but can't remember for sure. I'm hesitant to repeat the experiment right now because the SSD card is configured and running Raspberry Pi OS.

      As far as I'm concerned, this is not an active issue for me anymore because I installed it a different way; I should have followed up to let you know. Thank you for looking into it and responding though!

      posted in Instructions
      Dean McNaughtonD
      Dean McNaughton
    • RE: I can't create triggers on the raspberry pi

      I've got this working now.

      Instead of installing using the instructions at "Raspberry Pi Setup", I went to the "Instructions" page and downloaded the deb file and token there. The deb installed the agent to /usr/share/triggercmdagent and the .TRIGGERcmdData folder was placed in /home/pi. Now I can add/edit the commands.json file inside the .TRIGGERcmdData folder and everything works as it should.

      posted in Raspberry Pi
      Dean McNaughtonD
      Dean McNaughton
    • RE: I can't create triggers on the raspberry pi

      After a brief foray with Ubuntu, I'm back to Raspberry Pi OS.

      Attempted a Raspberry Pi OS installation loaded with triggercmd, using the method described here: Windows script to prep SD card for Raspberry Pi with TRIGGERcmd agent. But it didn't get past the boot screen.

      So, reinstalled triggercmdagent from scratch using original instructions here: Raspberry Pi setup.

      Followed those instructions verbatim and triggers still aren't working. In fact, the calculator trigger doesn't work anymore.

      I'm stumped.

      posted in Raspberry Pi
      Dean McNaughtonD
      Dean McNaughton
    • RE: Windows script to prep SD card for Raspberry Pi with TRIGGERcmd agent

      @russ
      Not sure if this is expected to work anymore. My setup gets stuck at the boot screen.

      IMG_0072(1).jpg

      posted in Instructions
      Dean McNaughtonD
      Dean McNaughton
    • RE: I can't create triggers on the raspberry pi

      @russ
      I'm going a different route... replacing Raspian with Ubuntu. There are other programs that may work better with that OS as well.

      posted in Raspberry Pi
      Dean McNaughtonD
      Dean McNaughton
    • RE: I can't create triggers on the raspberry pi

      @russ

      Thank you for the recommendations! Still no success. 😞

      1. Regarding the full path:

      Should have mentioned I did try the full path and it did not work. It was structured as follows:

      {"trigger":"chromium","command":"/usr/share/applications/chromium-browser.desktop","ground":"foreground","voice":"chromium","allowParams": "false"}
      

      2. Regarding the url link:
      I also tried your suggestion to use the xdg-open command with the url. It did not work.

      3. Regarding X-windows
      I am curious about the X-windows advice; I have no experience with X-windows, but did read over your original "Raspberry Pi Setup" post and noticed you discussed it there, then read a little more on it, but still really don't understand what it is. I use PuTTy to ssh and VNC Viewer to view. My ignorance on X-windows could be the root of the problem. Not sure.

      4. Regarding xhost +

      Continuing from #3 (above), I thought... "Maybe X-windows is running and I don't even know it. So, I'll just try the xhost + commands." Those results are as follows:

      4a. Entering xhost from PuTTy:
      When entering xhost + as user in PuTTy this is the response:

      pi@raspberrypi:~ $ xhost +
      xhost:  unable to open display ""
      

      4a. Entering xhost from Terminal on RPi:
      When entering xhost + as user in terminal on the RPi, this is the response:

      pi@raspberrypi:~ $ xhost +
      access control disabled, clients can connect from any host
      

      I really do appreciate the help you've given, and any other quick thoughts you might have. Also don't want to waste too much of your time, so please don't feel too compelled to solve my problems. They are... my problems. 🙂

      posted in Raspberry Pi
      Dean McNaughtonD
      Dean McNaughton
    • RE: I can't create triggers on the raspberry pi

      @dean-mcnaughton

      To summarize, with the following commands.json file:

      [
      {"trigger":"Reboot","command":"shutdown -r","ground":"background","voice":"reboot","allowParams": "false"},
      {"trigger":"Gnome Editor","command":"gedit","ground":"foreground","voice":"edit","allowParams": "false"},
      {"trigger":"yum update","command":"yum -y update","ground":"background","voice":"yum update","allowParams": "false"},
      {"trigger":"apt update","command":"apt-get -y update","ground":"background","voice":"update","allowParams": "false"},
      {"trigger":"calculator","command":"galculator","ground":"foreground","voice":"calculator","allowParams": "false"},
      {"trigger":"chromium","command":"chromium-browser","ground":"foreground","voice":"chromium","allowParams": "false"}
      ]

      Calculator works
      Gnome does not work
      Chromium does not work

      posted in Raspberry Pi
      Dean McNaughtonD
      Dean McNaughton
    • RE: I can't create triggers on the raspberry pi

      @dean-mcnaughton

      Weird. I made some edits (can't retrace my steps) and the calculator started working. Now having the same problem trying to make another foreground command using "chromium-browser" as the command.

      So, to summarize, with the following commads.json file:

      [
      {"trigger":"Reboot","command":"shutdown -r","ground":"background","voice":"reboot","allowParams": "false"},
      {"trigger":"Gnome Editor","command":"gedit","ground":"foreground","voice":"edit","allowParams": "false"},
      {"trigger":"yum update","command":"yum -y update","ground":"background","voice":"yum update","allowParams": "false"},
      {"trigger":"apt update","command":"apt-get -y update","ground":"background","voice":"update","allowParams": "false"},
      {"trigger":"calculator","command":"galculator","ground":"foreground","voice":"calculator","allowParams": "false"},
      {"trigger":"chromium","command":"chromium-browser","ground":"foreground","voice":"chromium","allowParams": "false"}
      ]

      Calculator: works
      Gnome: does not work
      Chromium: does not work

      posted in Raspberry Pi
      Dean McNaughtonD
      Dean McNaughton
    • RE: I can't create triggers on the raspberry pi

      Love the app. Great work you're doing! Works like a charm on my mac and PC.

      Having problems getting commands to run in the foreground on RPi4. Wondering if you can spot a quick reason.

      I've installed the triggercmdagent as root. It's in my list of computers. Triggers get sent and I can see they are "ran" with a triggercmdagent instance open in PuTTy.

      The specific command I'm trying to run is one I added to the /root/.TRIGGERCmdData/commands-.json file, as follows:

      {"trigger":"calculator","command":"galculator","ground":"foreground","voice":"calculator","allowParams": "false"}

      With this command, I'd expect to see the calculator open in the foreground, but nothing visible happens on the screen, despite triggercmdagent indicating it ran via PuTTy.

      posted in Raspberry Pi
      Dean McNaughtonD
      Dean McNaughton