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

    E L

    @Erin Leiker

    0
    Reputation
    96
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Erin Leiker Unfollow Follow

    Latest posts made by Erin Leiker

    • RE: Raspberry Pi setup

      @russ whew, i think i figured it out! if i'm right, it all comes down to users.

      the instructions for installing on a raspberry pi are based on running all the commands/installations as a root user. the "chromuim-browser" command does not work when executed as the root user, only the default "pi" user. so i switched the command from "chromium-browser" to "xdg-open", which does essentially the same thing for my purposes, and it worked! well, almost.

      i'm trying to launch an html file, and the mime type is "text/html" which opens with chromium by default for the pi user (yay!), but with the geany text editor for root (boo). i solved this by tweaking the command to run under the pi user, and it works as expected!

      {"trigger":"myTriggerName","command":"su - pi -c 'xdg-open /home/pi/myFile.html'","ground":"foreground","voice":"myTriggerName","allowParams":"false"}

      the only downside is that there is a noticeable delay in triggering this command. and i also have to open a terminal window, switch to the root user, and then run "triggercmdagent" before i can successfully trigger it. with this info, do you happen to know if/how i can:

      1. auto run triggercmdagent on boot? the install instructions seem to state that it will launch in the background on boot, so i changed the command to "background" but no dice. still have to run triggercmdagent from terminal as root.

      2. run/install triggercmdagent under the pi user instead of root? i think that would help speed up the execution of the command significantly.

      thank you so much!

      posted in Raspberry Pi
      E
      Erin Leiker
    • RE: Raspberry Pi setup

      @russ thank you for the tips! i did some googling on x windows, and it sounds like it's a way to access or view the pi remotely. do i still need x windows if i have the pi booting to the desktop and i have a screen on it so i can access it directly?

      i updated the trigger to "foreground" and tried running triggercmdagent from the cli, but still i just see the log of the command having been run instead of the results of the command (opening that html file).

      posted in Raspberry Pi
      E
      Erin Leiker
    • RE: Raspberry Pi setup

      hello! my end goal is to launch an html file on my raspberry pi 3b+ using IFTTT (i have a small display plugged into my pi on which i'm expecting to see the file). i'm fairly sure i've gotten everything set up correctly in that i can see evidence of the command having run in IFTTT, my TRIGGERcmd dashboard, and in the CLI when i run "systemctl status triggercmdagent".

      i have almost no native idea what i am doing, but i'm a pretty good tinkerer and an excellent copy-and-paster so the command i cobbled together is:
      {"trigger":"myTriggerName","command":"chromium-browser file:///home/pi/myFile.html","ground":"background","voice":"myTriggerName","allowParams":"false"}

      when i try to trigger that command via IFTTT or my TRIGGERcmd Triggers list, nothing actually happens other than the three locations i mention above showing some acknowledgement that the command was run. but when i run "chromium-browser file:///home/pi/myFile.html" via the CLI, the file opens in chromium exactly as i expect, so this all leads me to believe i have formatted the command incorrectly somehow.

      any help here would be much appreciated!

      posted in Raspberry Pi
      E
      Erin Leiker