@Marcos-Raldes, 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.
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:
AI Prompt: python script on Windows to run a google assistant routine
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:
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)
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.
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.