Switching on a device on google home

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.

Thankyou

Stefano

No, Google do not provide an API to control a device that is also linked to Google Assistant/Home

You need to talk to the device (or it's service) directly

ehm... oook. How can I manage in this? Do I have a node for this?

Thankyou

Not sure I understand the question.
You can either:

  • Check for an existing Node-red node which supports your vacuum cleaner, to control it directly.
  • Check if it's supported on Home Assistant, and automate it there with Node-red
  • Check if it's supported by Google Home API

I control IoTech electric boilers with full automation scripts using Google home API, while completely bypassing Node-red.

@omrid can you explain the last bit please

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

Here's an example of one of my routines:

# ------------------------------------------------------------------------------------------ #
# 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

OK, that is not making API calls to Google Home, that is using the Google Home App (and web app).