<?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[Run a Google Routine]]></title><description><![CDATA[<p dir="auto">Ia am trying to run a Google Routine the same way that we can run Alexa Routines, but when I am creating the Routine I can't use de TriggerCMD command as an activator, I can see it in my device list, but it doesn't show on the valid devices to use as an Activator.</p>
<p dir="auto">I want to do the same you did with de Lamp example (<a href="https://www.youtube.com/watch?v=nrqj-OwDpGE" rel="nofollow ugc">https://www.youtube.com/watch?v=nrqj-OwDpGE</a>), but with Google Routines, how can this be done please??</p>
]]></description><link>https://www.triggercmd.com/forum/topic/2828/run-a-google-routine</link><generator>RSS for Node</generator><lastBuildDate>Wed, 17 Jun 2026 22:36:12 GMT</lastBuildDate><atom:link href="https://www.triggercmd.com/forum/topic/2828.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 14 Mar 2024 14:57:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Run a Google Routine on Tue, 29 Oct 2024 19:18:00 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> Ty.. works for me.. Now, I will try turn off this.. lol</p>
]]></description><link>https://www.triggercmd.com/forum/post/8295</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/8295</guid><dc:creator><![CDATA[Bruno Oliveira 0]]></dc:creator><pubDate>Tue, 29 Oct 2024 19:18:00 GMT</pubDate></item><item><title><![CDATA[Reply to Run a Google Routine on Sun, 27 Oct 2024 00:50:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://www.triggercmd.com/forum/uid/23927">@Bruno-Oliveira-0</a> said in <a href="/forum/post/8288">Run a Google Routine</a>:</p>
<blockquote>
<p dir="auto">"Ok Google, run ligar abajur</p>
</blockquote>
<p dir="auto">Thank you for the screenshots.</p>
<p dir="auto">I think I see the problem.  When you say this, you're not running your command with the <strong>on</strong> parameter.<br />
"Ok Google, run ligar abajur"</p>
<p dir="auto">You should do 2 things:</p>
<ul>
<li>Change <strong>Permitir Parametros</strong> to <strong>true</strong> so it will accept the <strong>on</strong> and <strong>off</strong> parameters.</li>
<li>Say, "Ok Google, turn on <strong>ligar abajur</strong>" so Google will send <strong>on</strong> as the parameter.</li>
</ul>
<p dir="auto">Actually, you should change the Trigger and Voice fields to just "abajur" because "ligar" means turn on, but then you'll also need to update your Automation code to use "abajur - PC" as your device under starters instead of "ligar abajur - PC".  Then say, "Ok Google, ligar abajur" to run your abajur command with the <strong>on</strong> parameter which is what your Automation's starter will be looking for.</p>
]]></description><link>https://www.triggercmd.com/forum/post/8290</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/8290</guid><dc:creator><![CDATA[Russ]]></dc:creator><pubDate>Sun, 27 Oct 2024 00:50:02 GMT</pubDate></item><item><title><![CDATA[Reply to Run a Google Routine on Sat, 26 Oct 2024 18:53:29 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 />
Yes, I use this</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1729967464662-55d46036-9821-46ac-93db-cc787f8c407c-image.png" alt="55d46036-9821-46ac-93db-cc787f8c407c-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">And, if I say "Ok Google, run ligar abajur" message pop-up show in my PC ok. But don't light my lamp..<br />
<strong>Abajur do Escritório</strong> is the lamp and work fine in google home</p>
<p dir="auto">And this is my PC - Google Home<br />
<img src="/forum/assets/uploads/files/1729967358631-2d9148b7-afc0-45a2-9261-90eeeffc5a03-image.png" alt="2d9148b7-afc0-45a2-9261-90eeeffc5a03-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Code screenshot<br />
<img src="/forum/assets/uploads/files/1729968805958-35f62eaf-5f5e-4541-9668-e6c33f1317f3-image.png" alt="35f62eaf-5f5e-4541-9668-e6c33f1317f3-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://www.triggercmd.com/forum/post/8288</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/8288</guid><dc:creator><![CDATA[Bruno Oliveira 0]]></dc:creator><pubDate>Sat, 26 Oct 2024 18:53:29 GMT</pubDate></item><item><title><![CDATA[Reply to Run a Google Routine on Fri, 25 Oct 2024 23:38:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://www.triggercmd.com/forum/uid/23927">@Bruno-Oliveira-0</a>, please confirm these things:</p>
<ul>
<li>The <strong>ligar abajur</strong> TRIGGERcmd device is in the <strong>PC</strong> room in Google Home.</li>
<li>The <strong>Abajur do Escritório</strong> device is in the <strong>Escritório</strong> room in Google Home.</li>
<li>You can turn on the <strong>Abajur do Escritório</strong> device from your Google Home app.</li>
<li>You can run the <strong>ligar abajur</strong> command by saying, "Hey Google, turn on ligar abajur" or by toggling it on from virtual device in the Google Home app.</li>
<li>You want your Automation to turn on the <strong>Abajur do Escritório</strong> device (the action) when you run the <strong>ligar abajur</strong> command via TRIGGERcmd with parameter <strong>on</strong> (the starter), if <strong>Abajur do Escritório</strong> is currently off (the condition).</li>
</ul>
<p dir="auto">Also, how are you running the <strong>ligar abajur</strong> command via TRIGGERcmd with parameter <strong>on</strong>?  Are you using the TRIGGERcmd website?</p>
<p dir="auto">I suggest you test using the orange Parameters button where you can enter your <strong>on</strong> parameter:</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1729894387118-21f60b12-d1dc-481c-bb94-e5874fd980e4-image.png" alt="21f60b12-d1dc-481c-bb94-e5874fd980e4-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Also, please send me a screenshot of your Automation code.  I'm curious if it shows a red underline like this or not.  If it does, your device is probably not in a room.<br />
<img src="/forum/assets/uploads/files/1729894985296-b3c01e3e-823a-462e-a1f2-53524890313d-image.png" alt="b3c01e3e-823a-462e-a1f2-53524890313d-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Also, please confirm the automation is activated.<br />
<img src="/forum/assets/uploads/files/1729895057591-407f94a1-9ffb-4b92-977e-750b6ee26fa1-image.png" alt="407f94a1-9ffb-4b92-977e-750b6ee26fa1-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">I just tested this myself.  At first my TRIGGERcmd command's device wasn't showing up in the list because it wasn't in a room.  It has to be in a room before it will work.  If you change certain things about the command, you'll have to re-add it to the room because the virtual device will get deleted and re-created.</p>
]]></description><link>https://www.triggercmd.com/forum/post/8278</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/8278</guid><dc:creator><![CDATA[Russ]]></dc:creator><pubDate>Fri, 25 Oct 2024 23:38:27 GMT</pubDate></item><item><title><![CDATA[Reply to Run a Google Routine on Fri, 25 Oct 2024 16:52:21 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>
<pre><code class="language-metadata:">  name: ligar abajur auto
  description: When ligar abajur
automations:
  starters:
    - type: device.state.OnOff
      state: on
      is: true
      device: ligar abajur - PC
  condition:
    type: device.state.OnOff
    state: on
    is: false
    device: Abajur do Escritório - Escritório
  actions:
    - type: device.command.OnOff
      devices: Abajur do Escritório - Escritório
      on: true

</code></pre>
<p dir="auto">I use this, I really don't know what could be happening</p>
]]></description><link>https://www.triggercmd.com/forum/post/8277</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/8277</guid><dc:creator><![CDATA[Bruno Oliveira 0]]></dc:creator><pubDate>Fri, 25 Oct 2024 16:52:21 GMT</pubDate></item><item><title><![CDATA[Reply to Run a Google Routine on Fri, 25 Oct 2024 01:03:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://www.triggercmd.com/forum/uid/23927">@Bruno-Oliveira-0</a>, I just added the code for the <strong>notepad on -&gt; lamp on</strong> example from the video.  I hope that helps.</p>
]]></description><link>https://www.triggercmd.com/forum/post/8275</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/8275</guid><dc:creator><![CDATA[Russ]]></dc:creator><pubDate>Fri, 25 Oct 2024 01:03:24 GMT</pubDate></item><item><title><![CDATA[Reply to Run a Google Routine on Thu, 24 Oct 2024 21:31:27 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> Sorry, I just signed up so I could add more computers. But I have no knowledge of how to create the script to make this work.<br />
Could you make yours available so we can copy and change it on our devices? I tried a few ways, but none of them worked for me to get the app on my PC to do this. Even though I adjusted everything as explained in the video. I think it might have been something in the code.</p>
]]></description><link>https://www.triggercmd.com/forum/post/8274</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/8274</guid><dc:creator><![CDATA[Bruno Oliveira 0]]></dc:creator><pubDate>Thu, 24 Oct 2024 21:31:27 GMT</pubDate></item><item><title><![CDATA[Reply to Run a Google Routine on Fri, 25 Oct 2024 01:01:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://www.triggercmd.com/forum/uid/16907">@Marcos-Raldes</a>, sorry you're right - I see that now.  I'm still not sure why the TRIGGERcmd devices don't show up in Home app as a routine (aka Automation) starter option, but you can create routines that work with TRIGGERcmd using Google's <a href="https://home.google.com/automations" rel="nofollow ugc">script editor</a>, then after it's created you can edit it in the Home app.</p>
<p dir="auto">I made this video to demonstrate it: <a href="https://youtu.be/aP3FAuh291s" rel="nofollow ugc">https://youtu.be/aP3FAuh291s</a></p>
<p dir="auto">Here's my test routine that works for me:</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1711159954321-8b09248a-485f-4dd5-b8bf-3c3d559fcd25-image.png" alt="8b09248a-485f-4dd5-b8bf-3c3d559fcd25-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">The editor makes it easy to select your devices.  You just start typing the name and it brings up a list of your devices that contain those letters.</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1711160283849-9c8a7613-f7e8-4e23-8c9f-1838ed56748b-image.png" alt="9c8a7613-f7e8-4e23-8c9f-1838ed56748b-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Your TRIGGERcmd commands will only show up as Google devices if they have the voice field filled in.  The computer also needs the voice field filled in, unless it's your default computer (set in your profile).</p>
<p dir="auto">You'll also need to add your command's Google device to a home and a room before it will work.  Long-press the device, then tap the gear in the upper-right, then tap Home (Add to a home).</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1711160610860-42573e39-77eb-4da6-b772-a4f419697eef-image.png" alt="42573e39-77eb-4da6-b772-a4f419697eef-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Notice you specify whether the routine should run when the TRIGGERcmd device is flipped <strong>on</strong> or <strong>off</strong>.  That's different from Alexa where triggering a command is like a doorbell press that runs the routine.</p>
<p dir="auto">The state defaults to <strong>on</strong> unless you send <strong>off</strong> as the parameter, so you can run Google routines without having to send a parameter when you trigger your commands.</p>
<p dir="auto">You can also create a routine (aka Automation) that triggers a command.  You can use TRIGGERcmd device as a <strong>starter</strong> or an <strong>action</strong> but either way, you have to use the script editor to create the routine, not the Google Home app on your phone.</p>
<p dir="auto">EDIT 10/24/24:<br />
Here's the code for the <strong>notepad on -&gt; lamp on</strong> example:</p>
<pre><code>metadata:
  name: notepad on -&gt; lamp on # Choose a short name that summarizes important starters and actions, like “Sunset lights”.
  description: Turn on lamp switch when notepad TRIGGERcmd command is triggered with parameter on

automations:
  starters:
    - type: device.state.OnOff # The basic on and off functionality for any device that has binary on and off, including plugs and switches as well as many future devices.
      state: on
      # Whether a device with an on/off switch is on or off. &lt;code&gt;true&lt;/code&gt; if the device is on, &lt;code&gt;false&lt;/code&gt; if the device is off. [available operators: is, isNot]
      is: true
      device: notepad - Office

  condition:
    type: device.state.OnOff # The basic on and off functionality for any device that has binary on and off, including plugs and switches as well as many future devices.
    state: on
    # Whether a device with an on/off switch is on or off. &lt;code&gt;true&lt;/code&gt; if the device is on, &lt;code&gt;false&lt;/code&gt; if the device is off. [available operators: is, isNot]
    is: false
    device: lamp - Office

  actions:
    - type: device.command.OnOff # Turn the device on or off.
      # Whether to turn the device on or off.
      on: true
      devices: lamp - Office
</code></pre>
]]></description><link>https://www.triggercmd.com/forum/post/7765</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/7765</guid><dc:creator><![CDATA[Russ]]></dc:creator><pubDate>Fri, 25 Oct 2024 01:01:12 GMT</pubDate></item><item><title><![CDATA[Reply to Run a Google Routine on Thu, 21 Mar 2024 16:04:20 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> Thank you very much for your quick response!!</p>
<p dir="auto">Google Assistant actually offers that ability, I have many routines triggered when a light or a Smartplug turns on, that's why I am trying to do this. There must be something that is missing from the Object that the TriggerCMD Command creates for the GA to recognice, maybe you can inquire about it, I am sure many other users will find it very usefull.</p>
<p dir="auto">In the meantime I will have to learn the basics of Phyton as a workarround.</p>
<p dir="auto">Thaks again!! Hope that you find the solution to this</p>
]]></description><link>https://www.triggercmd.com/forum/post/7764</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/7764</guid><dc:creator><![CDATA[Marcos Raldes]]></dc:creator><pubDate>Thu, 21 Mar 2024 16:04:20 GMT</pubDate></item><item><title><![CDATA[Reply to Run a Google Routine on Mon, 25 Mar 2024 12:18:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://www.triggercmd.com/forum/uid/16907">@Marcos-Raldes</a>, <s>unfortunately Google Assistant does not offer the ability to activate a routine when something like a doorbell button is pressed.  Alexa does, and that's why you're able to run an Alexa routine when one of your TRIGGERcmd commands is triggered.</s>  <strong>&lt;- Correction, I was wrong about this.  You can create routines but you have to use the <a href="https://home.google.com/automations" rel="nofollow ugc">script editor</a>.  See post below.</strong></p>
<p dir="auto">That said, you could run a routine from a python script on your computer if you wanted.  I asked the AI Script Assistant to generate a script to do that.  This is what it gave me:</p>
<p dir="auto">AI Prompt: <strong>python</strong> script on <strong>Windows</strong> to <strong>run a google assistant routine</strong></p>
<p dir="auto">To run a Google Assistant routine on Windows using Python, you can use the google-auth and google-assistant-sdk libraries. Here’s an example script:</p>
<pre><code>import os
import json
import google.auth.credentials
from google.assistant.library import Assistant
from google.assistant.library.event import EventType
from google.assistant.library.file_helpers import existing_file

# Set the path to your credentials file
credentials_file = 'path/to/credentials.json'

# Load the credentials from the file
with open(credentials_file, 'r') as f:
    credentials = google.auth.credentials.Credentials.from_authorized_user_info(json.load(f))

# Define the routine you want to run
routine = 'Good morning'

# Create an Assistant instance
with Assistant(credentials) as assistant:
    # Start the conversation
    assistant.start_conversation()
    
    # Send a text query to trigger the routine
    response = assistant.send_text_query(routine)
    
    # Print the response
    print(response)
</code></pre>
<p dir="auto">Make sure to replace path/to/credentials.json with the actual path to your credentials file. You can create a credentials file by following the instructions in the Google Assistant SDK documentation.</p>
<p dir="auto">To run the script, open a command prompt or PowerShell window and navigate to the directory where the script is saved. Then, run the command python script_name.py, replacing script_name.py with the actual name of your script file.</p>
]]></description><link>https://www.triggercmd.com/forum/post/7754</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/7754</guid><dc:creator><![CDATA[Russ]]></dc:creator><pubDate>Mon, 25 Mar 2024 12:18:41 GMT</pubDate></item></channel></rss>