Segway Navimow

Alexa is a good start, I just hope they create an actual API for it that we can use to integrate into HA.

FWIW, how I have mine set up is using HA’s schedule utility to match the scheduled jobs in Navimow, while it’s not perfect it does let me have automation run at the times when I know the mower will be running - and since I also have a good idea of how long each zone takes to complete, I can almost nail the stop time on the head.

What I’m missing and really want is the ability to start and stop the mower using automation - like knowing if it rained in the past X hours so it doesn’t mow. I know I can toggle the power to the dock to prevent it from launching but it’s not ideal.

2 Likes

In fact, now we can control the robot with Alexa intgration: GitHub - alandtse/alexa_media_player: This is a custom component to allow control of Amazon Alexa devices in Home Assistant using the unofficial Alexa API. (You have to enable the Alexa skill)

We can use those sentences :

  • Alexa, demande à robot segway de commencer à tondre.
  • Alexa, demande à robot segway d’arrêter la tondeuse.
  • Alexa, demande à robot segway de retourner à la station de charge.
  • Alexa, demande à robot segway quel est le statut actuel.
  • Alexa, demande à robot segway quel est le niveau de batterie.
    Dependent to your country : Amazon.fr: Segway Navimow : Alexa Skills
action: media_player.play_media
target:
  entity_id: media_player.bureau
data:
  media_content_type: custom
  media_content_id: Alexa, demande à robot segway de retourner à la station de charge.

Something that inspirate me : HA_Addons/alexa_shopping_list_scraper at main · thiagobruch/HA_Addons · GitHub

There are a new Navimow app that now allow also use Google Assistant.
Maybe we can use in HomeAssistant. Does anybody test?

Yes, after installing Google Assistant SDK we can control Navimow:

action: google_assistant_sdk.send_text_command
data:
command: “start Navimow i108”

action: google_assistant_sdk.send_text_command
data:
command: “park Navimow i108”

just tested by me.

5 Likes

This is good news. Is there are way to obtain info from your i108 (eg: status, battery level) through the Google Assistant SDK ?

1 Like

Yes it would begreat if you could share the functionalities that are offered via google assistant? (commands, status,…)

To get status information from Navimow, you need to install the “Google Assistant SDK Custom” add-on instead of the standard “Google Assistant SDK”. I guess this is because the responses come as HTML, and the core add-on is not allowed to parse HTML.

NOTE: Google Assistant API’s rate limit is 500 calls per 24 hours.

Here’s what seems to work so far (thanks Szumol):

COMMANDS:

  • start Navimow i108
  • park Navimow i108

QUERIES:

  • what is Navimow i108 battery level
    => Navimow i 108 has 87 percent battery.
  • is Navimow i108 docked (not fully explored yet)
    => Navimow i 108 isn’t docked.
    => Navimow i 108 is docked.
  • is Navimow i108 running (not fully explored yet)
    => Navimow i 108 isn’t running.
    => Navimow i 108 is paused.

If you find other working commands/queries, let us know! :smiley:

4 Likes

Thank you!
So if I understand correctly this is a rate limited cloud pull solution?
For example if I would want to update the status of my navimow every 5 minutes during the day hours (let’s say 8-20 so 12 hours) it would require to make 12 requests per hour (60 minutes / 5) times 12 hours = 144 requests.
And since it’s then 1 request for the battery, 1 request for docked and 1 request for running I have to make 3 requests every 5 minutes which gives a total of 432 per day, which means I’d be near the limit.

Very welcome!

Yes. In the meantime I’ve discovered that “docked” is useless (redundant) so the canonical requests would be:

- [DEPRECATED, USE THE ONE BELOW] Navimow i105 battery level
- what is Navimow i105 battery level
- is Navimow i105 running

I’ve started with a 5-minute interval, along with a condition on sun elevation, as the mower won’t do anything when it’s dark anyways. Something like:

condition: numeric_state
entity_id: sun.sun
attribute: elevation
above: -15

Currently running this, and it works fine so far.

Now regarding the commands that I send out, the relevant ones are:

  • start
  • dock
  • pause
  • resume

If you have any questions let me know :wink:

PS: here’s what it currently looks like:

4 Likes

Nicely done!
I understand there’s no way to instruct the Navimow which zone it should start to mow right?
One use-case I would have for integrating the Navimow into Home Assistant would be that it only mows my front garden when we’re home (to reduce the risk of theft).

Thanks!

No this is not implemented (or not yet), as far as I know.
This is aligned with what I see in the “Mower” device in Google Home app.

What I know though, is that they’re ironing out some bugs. A couple days ago the docking status was not consistent, and the latest firmware upgrade fixed it.

Maybe a feature request for zones and progress indicator would help? :wink:

1 Like

Do you add the mower to your google home app first?

Where do you find the custom google sdk addon? I see only the depreciated version.

And can you share your scripts/templates for the queries?

Hi,

Yes I’ll be happy to share my scripts and everything :blush:

The Google Assistant SDK Integration (the one that can successfully receive text responses from Google Assistant) is there:

The integration between Navimow and Google Assistant is very straightforward, IIRC you can trigger the linkage from the Navimow app itself. That part is easy really. Once it’s done, you’ll see the device in the Google Home app (which I had never used before that day) :grin:

You don’t need to use (not even launch) the Google Assistant app.

Definition of Navimow sensors triggered by a custom event (in configuration.yaml):

template:
(...)
  - trigger:
      platform: event
      event_type: set_navimow_i105_state
    sensor:
      - name: "Navimow i105: Battery level"
        unique_id: "navimow_i105_battery_level"
        device_class: battery
        state_class: measurement
        unit_of_measurement: "%"
        state: "{{ trigger.event.data.battery_level }}"

      - name: "Navimow i105: Status"
        unique_id: "navimow_i105_status"
        icon: "mdi:robot-mower"
        state: |
          {{
            {
              "is running": "Running",
              "isn't docked": "Running",
              "is paused": "Paused",
              "is docked": "Parked",
              "isn't running": "Parked"
            }[trigger.event.data.status] | default('unknown')
          }}

Automation to periodically poll Navimow data through Google Assistant API, and push them to the sensors through the custom event:

alias: "Navimow i105: Get state"
description: >-
  Notes:

  * Google Assistant API rate limit: 500 requests per 24 hours (seems to reset
  at 7:00am UTC).

  * Quota status:
  https://console.cloud.google.com/apis/api/embeddedassistant.googleapis.com/quotas?...
triggers:
  - trigger: time_pattern
    minutes: /5
  - trigger: homeassistant
    event: start
conditions:
  - condition: numeric_state
    entity_id: sun.sun
    attribute: elevation
    above: -15
actions:
  - action: google_assistant_sdk_custom.send_text_command
    metadata: {}
    data:
      command:
        - what is Navimow i105 battery level
        - what is Navimow i105 doing
    response_variable: result
  - event: set_navimow_i105_state
    event_data:
      battery_level: >-
        {{ result.responses[0].text | regex_replace(find='.* ([0-9]+)
        percent.*', replace='\\1', ignorecase=True) }}
      status: >-
        {{ result.responses[1].text | regex_replace(find='.*Navimow i 105
        (.*)\.', replace='\\1', ignorecase=True) }}
mode: restart

IMHO the only (slightly) annoying part is the step to enable Google Assistant SDK in Google Cloud Console - but it only needs to be done once, and the steps are rather well documented in Home Assistant’s documentation:

Feedback welcome :smiley:

6 Likes

Many thanks!! This works fine

You can add “Clogged” to the list :slight_smile:

Hi @djfanatix ,
Awesome ! Pleasure :blush:

Do you mean Google Assistant may respond “Navimow iXXX is clogged” as per below ?

state: |
          {{
            {
              "is running": "Running",
              "is paused": "Paused",
              "is clogged": "Clogged",
              "isn't running": "Parked"

Nevermind clogged, it only returns this when trying to start when it is stuck, not as a status

Oh ok, good to know!
FYI currently I don’t take the return statuses (for commands) into account, but in principle we could :wink:

Can you share your code of your UI, because that looks very nice!

Many thanks

Sure @djfanatix ! Here it is. Nothing particularly fancy, except for the hack to launch the mobile app with a single tap:

type: grid
cards:
  - type: heading
    icon: ""
    heading_style: subtitle
    badges:
      - type: entity
        show_state: true
        show_icon: true
        entity: binary_sensor.constant_true
        state_content: name
        name: Click to open the Navimow app
        tap_action:
          action: perform-action
          perform_action: script.launch_mobile_app
          target: {}
          data:
            app_package_name: com.segway.mower
        icon: mdi:chevron-right
  - type: heading
    icon: mdi:robot-mower
    heading: Navimow i105E
    heading_style: title
    badges:
      - type: entity
        show_state: true
        show_icon: true
        entity: sensor.navimow_i105_status
        tap_action:
          action: more-info
        state_content:
          - state
          - last_changed
        icon: mdi:information-outline
      - type: entity
        show_state: true
        show_icon: true
        entity: sensor.navimow_i105_battery_level
        color: state
        tap_action:
          action: more-info
  - type: tile
    features_position: bottom
    vertical: false
    entity: automation.navimow_i105_get_status
    tap_action:
      action: perform-action
      perform_action: automation.trigger
      target:
        entity_id: automation.navimow_i105_get_status
      data:
        skip_condition: true
    icon_tap_action:
      action: perform-action
      perform_action: automation.trigger
      target:
        entity_id: automation.navimow_i105_get_status
      data:
        skip_condition: true
    icon: mdi:refresh
    grid_options:
      columns: full
    name: Latest update (tap to refresh)
    hide_state: false
    state_content: last_triggered
    color: primary
  - show_name: true
    show_icon: true
    type: button
    tap_action:
      action: perform-action
      perform_action: script.navimow_i105_send_command
      target: {}
      data:
        command: start Navimow i105
    entity: binary_sensor.constant_false
    icon: mdi:robot-mower
    name: Start
  - show_name: true
    show_icon: true
    type: button
    tap_action:
      action: perform-action
      perform_action: script.navimow_i105_send_command
      target: {}
      data:
        command: dock Navimow i105
    entity: binary_sensor.constant_false
    icon: mdi:home-import-outline
    name: Dock
  - show_name: true
    show_icon: true
    type: button
    tap_action:
      action: perform-action
      perform_action: script.navimow_i105_send_command
      target: {}
      data:
        command: pause Navimow i105
    entity: binary_sensor.constant_false
    icon: mdi:pause
    name: Pause
  - show_name: true
    show_icon: true
    type: button
    tap_action:
      action: perform-action
      perform_action: script.navimow_i105_send_command
      target: {}
      data:
        command: resume Navimow i105
    entity: binary_sensor.constant_false
    icon: mdi:play
    name: Resume

And the script (navimow_i105_send_command) simply sends the command and forces a state refresh shortly after (to mitigate the fact that we normally only refresh the state every 5 minutes):

sequence:
  - action: google_assistant_sdk_custom.send_text_command
    metadata: {}
    data:
      command: "{{ command }}"
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - action: automation.trigger
    metadata: {}
    data:
      skip_condition: true
    target:
      entity_id: automation.navimow_i105_get_status
alias: Navimow i105 - Send command
description: ""
mode: restart
fields:
  command:
    selector:
      text: null
    name: command
    description: Command
    required: true

Edit 2025-04-24: and here’s the definition for the “constant_true” / “constant_false” template binary sensors. They act as simple placeholders that help make a button’s icon appear constantly “on” (yellow) or “off” (blue):

template:
  (...)
  - binary_sensor:
      - name: "Constant: True"
        unique_id: constant_true
        state: "on"
      
      - name: "Constant: False"
        unique_id: constant_false
        state: "off"
3 Likes

This is really promising progress on integration with HA! When you start a job, have you figured out how to tell it which map to use or which parts of the map to use? That would be my last real obstacle to overcome since I often only want to do one zone on a map or a mix-and-match.