Hi all.
I want to control a device linked on google home. Is it possible? I found info only about how to control node red controlled devices via google home.
This is mainly because I used to control a xiomi vacuum cleaner no longer availble via ip/token.
I didn't think Google had an api that allowed 3rd party control of other other devices, but I see docs for it, but it appeared to be Android/Apple only (e.g. with binary SDK blob).
At home, I use all above 3 techniques. I send commands to and get alerts from my Xiaomi devices (e.g. security cameras) using Home Assistant which has out of the box adaptors (using my Xiaomi account credentials), which I then automate with HA's embedded Node-red add-on.
I use Google Home to control my IoTech boiler directly. It supports Google Home API out of the box, and I wrote 3 "hello world" automation scripts (written in YAML), for turning the boiler on, off and for a set period of 45 minutes, which works from my mobile phone and PC browser
# ------------------------------------------------------------------------------------------ #
# Lines starting with “#” are comments and will be ignored by the automation.
# Indentation determines hierarchy within the script.
# Visit g.co/home/script-editor-docs for full documentation.
# ------------------------------------------------------------------------------------------ #
metadata:
name: Boiler 45 # Choose a short name that summarizes important starters and actions, like “Sunset lights”.
description: Scripted automation # Write a detailed description that includes everything the automation does, like “At sunset, on weekdays, close blinds, turn on lights to 50%, and play the sunset playlist on certain speakers.”
automations:
# “starters” and “actions” are required; “conditions” are optional.
# Use Ctrl + Space to see autocomplete suggestions.
# ---- STARTERS ---- #
# Starters describe events that will start the automation.
# To add more than one starter, duplicate the "- type" section under "starters".
# If you add multiple starter events, any one of them happening will start the automation.
starters:
- type: assistant.event.OkGoogle
eventData: query
is: boiler 45
# ---- ACTIONS ---- #
# Actions will start when a starter event takes place and all conditions are met.
# Actions will start in the order they appear in the script and with any delay specified.
# To add more than one action, duplicate the "- type" section under "actions".
actions:
- type: device.command.OnOff # Turn the device on or off.
# Whether to turn the device on or off.
on: true
devices: Boiler - Hallway
- type: time.delay
# Adjust duration as needed. Supported units: sec, min, hour
for: 1min
- type: device.command.OnOff # Turn the device on or off.
# Whether to turn the device on or off.
on: false
devices: Boiler - Hallway