Skip to main content

Robomow BLE protocol library

Project description

Robomow-BLE

Robomow-BLE is a standalone Python library for talking to Robomow mowers over Bluetooth Low Energy (BLE).

It provides a reusable BLE protocol layer for Robomow mowers and can be used directly in Python applications.

Currently it only supports RT models. Support for other models may be added in the future if there is demand and access to devices for testing.

API Overview

Please refer to the API documentation for details.

How to use

Install

Install from PyPI:

python -m pip install Robomow-BLE

Create a device client

Create a RobomowDevice with:

  • mainboard_serial: mower mainboard serial used during authentication.
  • update_callback (optional): called for each update as RobomowUpdate(key, value).
from robomow_ble_lib import RobomowDevice

mower = RobomowDevice(
    mainboard_serial="12345678901234",
)

How to find mainboard_serial:

  1. Log in to myrobomow.robomow.com.
  2. Open your browser's Developer Tools (F12).
  3. Go to the Network tab.
  4. Reload the page.
  5. Look for a request ending in /api/customer/products.
  6. Click the request and open the Response tab.
  7. In the JSON response, find the field named MainboardSerial. This value is the actual mainboard serial number.

Connect and authenticate

Discover a BLE device with Bleak, then connect:

from bleak import BleakScanner

ble_device = await BleakScanner.find_device_by_address(address, timeout=15.0)
if ble_device is None:
    raise RuntimeError("Mower not found")

await mower.async_connect(ble_device)

Receive updates

Pass a callback to receive state changes:

from robomow_ble_lib import RobomowUpdate, EntityKey


def on_update(update: RobomowUpdate) -> None:
    if update.key == EntityKey.BATTERY_LEVEL:
        print(f"Battery: {update.value}%")
    else:
        print(f"{update.key}: {update.value}")

Send commands

Common control methods:

  • await mower.async_start_mowing(duration_minutes=30)
  • await mower.async_start_mowing_edge()
  • await mower.async_stop_mowing()
  • await mower.async_return_to_home()

Common settings methods:

  • await mower.async_enable_schedule() / await mower.async_disable_schedule()
  • await mower.async_set_schedule(schedule)
  • await mower.async_enable_anti_theft() / await mower.async_disable_anti_theft()
  • await mower.async_enable_child_lock() / await mower.async_disable_child_lock()
  • await mower.async_set_wire_signal_type(wire_signal_type)

Read state

Example state properties:

  • Identity/version: family, model, mainboard_version, software_version
  • Live values: operating_state, message, battery_level, rssi
  • Status: schedule_enabled, next_departure, expected_duration

Disconnect cleanly

Always disconnect in a finally block:

try:
    ...
finally:
    await mower.async_disconnect()

Minimal example

import asyncio

from bleak import BleakScanner
from robomow_ble_lib import RobomowDevice, RobomowUpdate, EntityKey


def on_update(update: RobomowUpdate) -> None:
    if update.key == EntityKey.BATTERY_LEVEL:
        print(f"Battery: {update.value}%")
    else:
        print(f"{update.key}: {update.value}")


async def main() -> None:
    # Replace these with your mower details
    address = "AA:BB:CC:DD:EE:FF"
    mainboard_serial = "12345678901234"

    ble_device = await BleakScanner.find_device_by_address(address, timeout=15.0)
    if ble_device is None:
        raise RuntimeError("Mower not found")

    mower = RobomowDevice(
        mainboard_serial=mainboard_serial,
        update_callback=on_update,
    )

    await mower.async_connect(ble_device)
    try:
        await mower.async_start_mowing(duration_minutes=30)
        await asyncio.sleep(5)
        print("State:", mower.operating_state)
    finally:
        await mower.async_disconnect()


if __name__ == "__main__":
    asyncio.run(main())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robomow_ble-1.1.0.tar.gz (25.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

robomow_ble-1.1.0-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

Details for the file robomow_ble-1.1.0.tar.gz.

File metadata

  • Download URL: robomow_ble-1.1.0.tar.gz
  • Upload date:
  • Size: 25.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for robomow_ble-1.1.0.tar.gz
Algorithm Hash digest
SHA256 4e61b6f421470c845490cbc05d96e7de2f348aa0fc3b548479564c389fd6938e
MD5 c169af34938c00bd139a4bcb7389f735
BLAKE2b-256 b9ff9f1ac8d79fec9ed5ec4810469ce808aad204c98f48b23fc0963ac40dc3ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for robomow_ble-1.1.0.tar.gz:

Publisher: release.yml on arjanmels/robomow_ble

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file robomow_ble-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: robomow_ble-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 28.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for robomow_ble-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f9214ff267e26c5826f69995840a6f46e50cb47bfa869f5e51e6884a25cfd28
MD5 9c2491ac2d31a89a71e65a9a1f167470
BLAKE2b-256 a1a0bb0c65a97e48826e398c5cfe0195613a831936545de8acff6f4557559dfd

See more details on using hashes here.

Provenance

The following attestation bundles were made for robomow_ble-1.1.0-py3-none-any.whl:

Publisher: release.yml on arjanmels/robomow_ble

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page