Group Details Private

administrators

Member List

  • RE: Linux VM - TriggerCMD shows messages like it's working, but commands don't actually execute

    @Joe, I can explain why you're only seeing Gnome Editor.

    The foreground agent only runs, adds, and removes foreground commands. Gnome Editor is a foreground command. You're only running the foreground agent.

    You seem to have run the foreground agent under root too, which would have added a second computer with a different computer ID. You can see the ID in ~/.TRIGGERcmdData/computerid.cfg. Then you installed the background agent under root using root's home directory by running installdaemon.sh as root.

    You should delete the /root/.TRIGGERcmdData directory and the corresponding computer record in your account, so all you have is the /home/jhupcey/.TRIGGERcmdData/computerid.cfg computer. Then, while logged in as jhupcey, I think if you run this, it will install the background agent and configure it to use /home/jhupcey/.TRIGGERcmdData:

    sudo /usr/share/triggercmdagent/resources/app/src/removedaemon.sh
    sudo sh /usr/share/triggercmdagent/resources/app/src/installdaemon.sh
    

    I don't have time to test this right now - I can later today though. I realize I need to do that and produce some better documentation on this. Sorry about that.

    posted in General Discussion
  • RE: SmartApps

    @mikeraineri, it's hard to say what the problem is.

    If you log in at https://account.smartthings.com and click the Live Logging tab while you reproduce the error, it might give us a clue.

    You could also verify that both the SmartApp, and particularly the Device Handler are both saved and published.

    posted in General Discussion
  • RE: Raspberry Pi set commands

    @Oliver-Oßwald, awesome.

    posted in General Discussion
  • RE: SmartApps

    @mikeraineri, I assume you're talking about the SmartThings TRIGGERcmd SmartApp? Please confirm that, but I assume you are.

    In case you're using your Twitter, Facebook or Google account to log into TRIGGERcmd, I want to make sure you know you have to set a password in your profile to use in the SmartApp login.

    Has this ever worked for you or is this the first time you're setting it up?

    Did you go through all the instructions here?

    posted in General Discussion
  • RE: Turn on a computer

    @Wesley-Correa, awesome. I'm glad that worked out.

    posted in Raspberry Pi
  • RE: Turn on a computer

    @Wesley-Correa, when you switch your command from foreground to background, you can't tell which agent added it just by looking at the website. I suggest adding something to your trigger name to specify background, like this:

    {"trigger": "idrac background", "command": "/usr/bin/idrac.sh", "ground": "background", "voice": "power on", "allowParams":"false"},
    

    Then use systemctl status triggercmdagent to see that the background agent added it.

    BTW, I got rid of some extra spaces you had in your json entry that might have caused a problem.

    posted in Raspberry Pi
  • RE: Turn on a computer

    @Wesley-Correa, to capture the output of a command, you can make the command direct "standard out" and "standard error" to a text file like this:

    yourcommand &>> /tmp/commandlog.txt
    

    Use a single > if you want to over-write the txt file every time instead of appending to it.

    Please explain what you mean by "first or second".

    posted in Raspberry Pi
  • RE: Turn on a computer

    @Wesley-Correa, the foreground agent adds/removes/runs foreground commands, and the background agent adds/removes/runs background commands. So I think the background agent isn't running.

    To install the background agent on the Pi, you'll need to do this:

    sudo su -
    /usr/share/triggercmdagent/app/src/installdaemon.sh
    

    Then you can check its status like this:

    systemctl status triggercmdagent
    
    posted in Raspberry Pi
  • RE: Raspberry Pi set commands

    @Oliver-Oßwald, I see this in your output:

    Failed while trying add a trigger.

    I suspect you deleted the computer referenced in /root/.TRIGGERcmdData/computerid.cfg from your account, so the agent can't add commands to it. Assuming that's the case, I recommend these steps:

    sudo su -
    systemctl stop triggercmdagent
    cp /root/.TRIGGERcmdData/commands.json /root
    rm -rf /root/.TRIGGERcmdData
    triggercmdagent   
    # (enter your token)
    # CTRL-C to exit the foreground agent
    systemctl start triggercmdagent
    systemctl status triggercmdagent
    # Test it
    
    posted in General Discussion
  • RE: Linux VM - TriggerCMD shows messages like it's working, but commands don't actually execute

    @Joe, I enjoy doing this - I don't mind doing it on a holiday.

    Here are the steps I think should be adequate to start from scratch:

    sudo su -
    systemctl stop triggercmdagent
    /usr/share/triggercmdagent/resources/app/src/removedaemon.sh
    yum remove triggercmdagent
    rm -rf /usr/share/triggercmdagent
    rm -rf /root/.TRIGGERcmdData
    rm -rf /home/(your user)/.TRIGGERcmdData
    
    posted in General Discussion