360 S6 vacuum robot

Okay so i hope i can explain it well.

If not, don’t hesitate to tell me it’s not working.:smiley:

The Custom Google SDK integration [tronikos] mentioned above can not only send questions in text form but also retrieve the answers from google assistant.
I tried to work with that and i must say after a bit of tinkering it works pretty good.

So here is how i did it:

1st. You need those 2 Integrations:

grafik
the one on the right you can get from the official integrations the one on the left is the one [tronikos] mentioned above.
Install it according to the instruction in those 2 URLs:

Official → “Google Assistant SDK - Home Assistant
Custom → “GitHub - tronikos/google_assistant_sdk_custom: Patches Google Assistant SDK integration to allow getting responses from commands to Google Assistant.

First the Official then the Custom one!

Spoiler :smiley: : For the Custom one you need to add the repository given in the Github URL to HACS.

When you have configured them both…

2nd. Helper and Automation:

Go to Settings → Devices & Services → Helper
There, create a “Text” Helper.
Only change the Name to something like “vacuumstatus” and leave everything default.

Ok when you did this, go to
Settings → Automation & Scenes → Create New automation

Go to the 3 Dots on the right corner and “Edit in YAML”
Copy the whole Automation in there and replace what i marked with → !!!REPLACE!!!
You can STRG + F and search for it in the Automation Text.

alias: "360 Vaccum: status"
description: Gets the status of an 360 Robot via Google Custom SDK
trigger:
  - platform: time_pattern
    minutes: "10"
    id: time
  - platform: event
    event_type: google_assistant_sdk_custom_event
    event_data:
      request:  !!!!REPLACE!!!! *What is the Status of the Vaccum*(In your set Google SDK language)
    id: status
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id: time
        sequence:
          - service: google_assistant_sdk.send_text_command
            data:
              command: !!!!REPLACE!!!! *What is the Status of the Vaccum*(In your set Google SDK language)
      - conditions:
          - condition: trigger
            id: status
        sequence:
          - service: input_text.set_value
            data:
              value: "{{ trigger.event.data.response }}"
            target:
              entity_id:  !!!!REPLACE!!!! input_text.YOUR_Text_Helper
mode: queued
max: 10

Ok, when you did that, your Text Helper is updating every 10 Minutes with the Vacuum Status.
You can also trigger the update manually, I show you how.

3rd: Make a GUI

Go to the Dashboard and make a new card where ever you like.
Choose manual and copy this into the card:

Don’t forget to replace what I marked with → !!!REPLACE!!!

type: vertical-stack
cards:
  - type: markdown
    content: >-
      <ha-alert alert-type="info">{{ states('!!!!REPLACE!!!! input_text.YOUR_Text_Helper')
      }}</ha-alert>
    title: 360 Robot
  - square: true
    columns: 3
    type: grid
    cards:
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: call-service
          service: google_assistant_sdk.send_text_command
          data:
            command: Start Vacuum Robot(In your set Google SDK language) !!!!REPLACE!!!!
          target: {}
        name: Start
        icon: mdi:play
        hold_action:
          action: none
        show_state: false
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: call-service
          service: google_assistant_sdk.send_text_command
          data:
            command: Stop Vacuum Robot(In your set Google SDK language) !!!!REPLACE!!!!
          target: {}
        name: Stop
        icon: mdi:stop
        hold_action:
          action: none
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: call-service
          service: google_assistant_sdk.send_text_command
          data:
            command: Vacuum Robot back to charging station(In your set Google SDK language) !!!!REPLACE!!!!
          target: {}
        icon: mdi:ev-station
        hold_action:
          action: none
        name: charge
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: call-service
          service: google_assistant_sdk.send_text_command
          data:
            command: !!!!REPLACE!!!! with the same sentence you have defined in your automnation
          target: {}
        icon: mdi:sync
        name: get status

It should work now and look something like this.
grafik

Final Thoughts

It is way too complicated, and 360 should be ashamed of themselves for not just letting us use an API and make our own integration.
But it works pretty good! Sometimes it has a delay of up to 20 seconds or something, but I guess that’s ok for a robot vacuum.

Hope it works for you
Cheers :beers:

1 Like