<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Help with Home Assistant Command]]></title><description><![CDATA[<p dir="auto">Re: <a href="/forum/topic/193/how-to-run-commands-from-home-assistant">How to run commands from Home Assistant</a></p>
<p dir="auto">I've inserted this line into my <em>Home Assistant</em> 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.</p>
<p dir="auto">The title of my trigger, in TRIGGERcmd is "calculator", and it does work, when executed via TRIGGERcmd.</p>
<p dir="auto">Any suggestions what I've done wrong here:</p>
<pre><code>rest_command:
  triggercmd_calculator:
    url: 'https://www.triggercmd.com/api/run/triggerSave'
    method: "post"
    content_type: "application/x-www-form-urlencoded"
    payload: "trigger=calculator&amp;token=(MYTOKEN)"
</code></pre>
]]></description><link>https://www.triggercmd.com/forum/topic/2141/help-with-home-assistant-command</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Jul 2026 15:05:17 GMT</lastBuildDate><atom:link href="https://www.triggercmd.com/forum/topic/2141.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 07 May 2022 15:39:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Help with Home Assistant Command on Sun, 08 May 2022 18:43:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://www.triggercmd.com/forum/uid/14401">@dean-mcnaughton</a>, that's awesome!  I'm always interested in use-cases like this.  Thanks for sharing.</p>
]]></description><link>https://www.triggercmd.com/forum/post/5847</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/5847</guid><dc:creator><![CDATA[Russ]]></dc:creator><pubDate>Sun, 08 May 2022 18:43:42 GMT</pubDate></item><item><title><![CDATA[Reply to Help with Home Assistant Command on Sun, 08 May 2022 18:48:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://www.triggercmd.com/forum/uid/1">@russ</a><br />
Thanks.  Really loving this app.</p>
<p dir="auto">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.</p>
<p dir="auto">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.</p>
<p dir="auto">So, this was the workaround:</p>
<ol>
<li>Home Assistant presence sensor with an on/off boolean (toggle) sends command to TRIGGERcmd as follows:
<ul>
<li>HA present (toggle on) --&gt; TRIGGERcmd to <em><strong>arm</strong></em></li>
<li>HA away (toggle off) --&gt; TRIGGERcmd to <em><strong>disarm</strong></em></li>
</ul>
</li>
<li>UI.Vision web extension configured on an always on VM receives the appropriate trigger, from TRIGGERcmd.
<ul>
<li>An <em><strong>arm</strong></em> trigger executes a UI.Vision autorun html file that logs in and arms the system.</li>
<li>A <em><strong>disarm</strong></em> trigger executes a UI.Vision autorun html file that logs in and disarms the system.</li>
</ul>
</li>
</ol>
]]></description><link>https://www.triggercmd.com/forum/post/5846</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/5846</guid><dc:creator><![CDATA[Dean McNaughton]]></dc:creator><pubDate>Sun, 08 May 2022 18:48:22 GMT</pubDate></item><item><title><![CDATA[Reply to Help with Home Assistant Command on Sun, 08 May 2022 18:07:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://www.triggercmd.com/forum/uid/14401">@dean-mcnaughton</a>, awesome.  Nice job.</p>
]]></description><link>https://www.triggercmd.com/forum/post/5843</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/5843</guid><dc:creator><![CDATA[Russ]]></dc:creator><pubDate>Sun, 08 May 2022 18:07:19 GMT</pubDate></item><item><title><![CDATA[Reply to Help with Home Assistant Command on Sun, 08 May 2022 17:57:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://www.triggercmd.com/forum/uid/1">@russ</a></p>
<p dir="auto">Thank u!  It is working now.  Using the post method, this was the payload line that ended up working (no parenthesis were used):</p>
<p dir="auto"><code>payload: "computer=DAM-UBUVM&amp;trigger=calculator&amp;token=MYTOKEN"</code></p>
]]></description><link>https://www.triggercmd.com/forum/post/5842</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/5842</guid><dc:creator><![CDATA[Dean McNaughton]]></dc:creator><pubDate>Sun, 08 May 2022 17:57:09 GMT</pubDate></item><item><title><![CDATA[Reply to Help with Home Assistant Command on Sun, 08 May 2022 17:23:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://www.triggercmd.com/forum/uid/14401">@dean-mcnaughton</a>, sorry I wasn't clear.  Parenthesis are not necessary.  I think either of these should work:</p>
<pre><code>rest_command:
  triggercmd_calculator:
    url: 'https://www.triggercmd.com/api/run/triggerSave'
    method: "post"
    content_type: "application/x-www-form-urlencoded"
    payload: "computer=laptop&amp;trigger=calculator&amp;token=xyz....abc"
</code></pre>
<pre><code>rest_command:
  triggercmd_calculator:
    url: 'https://www.triggercmd.com/api/run/triggerSave?computer=laptop&amp;trigger=calculator&amp;token=xyz....abc'
    method: "get"
    content_type: "application/x-www-form-urlencoded"
</code></pre>
<p dir="auto">Also, the token can come from the token.tkn file on your computer or the Instructions page - either should work.</p>
<p dir="auto">You could also test with curl like this:</p>
<pre><code>curl "https://www.triggercmd.com/api/run/triggerSave?computer=laptop&amp;trigger=calculator&amp;token=asdf"
</code></pre>
]]></description><link>https://www.triggercmd.com/forum/post/5839</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/5839</guid><dc:creator><![CDATA[Russ]]></dc:creator><pubDate>Sun, 08 May 2022 17:23:00 GMT</pubDate></item><item><title><![CDATA[Reply to Help with Home Assistant Command on Sun, 08 May 2022 13:46:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://www.triggercmd.com/forum/uid/1">@russ</a></p>
<p dir="auto">Still not working.  I tried it with and without a parenthesis around the trigger word - <em><strong>calculator</strong></em> (see below).  Neither work.</p>
<p dir="auto">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.</p>
<p dir="auto">I've confirmed I'm using the same token that's on file at the DAM-UBUVM computer.  Do you have any other thoughts?</p>
<p dir="auto">Tried <em><strong>with parenthesis</strong></em>, as follows:</p>
<pre><code>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)&amp;trigger=(calculator)&amp;token=(MYTOKEN)"
</code></pre>
<p dir="auto">Tried <em><strong>without parenthesis</strong></em>, as follows:</p>
<pre><code>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)&amp;trigger=calculator&amp;token=(MYTOKEN)"
</code></pre>
]]></description><link>https://www.triggercmd.com/forum/post/5838</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/5838</guid><dc:creator><![CDATA[Dean McNaughton]]></dc:creator><pubDate>Sun, 08 May 2022 13:46:08 GMT</pubDate></item><item><title><![CDATA[Reply to Help with Home Assistant Command on Sat, 07 May 2022 18:57:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://www.triggercmd.com/forum/uid/14401">@dean-mcnaughton</a> ,</p>
<p dir="auto">I think all you need to do is include one more parameter in your payload line:</p>
<pre><code>payload: "computer=(MYCOMPUTER)&amp;trigger=calculator&amp;token=(MYTOKEN)"
</code></pre>
]]></description><link>https://www.triggercmd.com/forum/post/5833</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/5833</guid><dc:creator><![CDATA[Russ]]></dc:creator><pubDate>Sat, 07 May 2022 18:57:01 GMT</pubDate></item></channel></rss>