Skip to main content

roombapy-prime-tools

Diagnostic and field-test tooling for roombapy-prime.

These scripts move a real robot. That is why they are a separate distribution: the library itself is installed into Home Assistant setups via ha_roomba_plus, and robot-moving commands have no business on the PATH of every one of those installations. Installing the library alone gives you no console scripts at all.

What this is for

Almost everything this project knows about the Prime/V4 protocol came from someone running one of these against their own robot and reporting back. If you own a Prime robot, that is by far the most useful thing you can do — and the read-only stages cannot change anything, so it costs you nothing but a few minutes.

Install

One command; it pulls the library in as a dependency:

python3 -m venv ~/roombapy-test-venv
source ~/roombapy-test-venv/bin/activate

pip install "roombapy-prime-tools@git+https://github.com/johnnyh1975/roombapy-prime.git@v0.3.0b10#subdirectory=tools"

Requires Python 3.11+. You will need to re-run the source line each time you open a new terminal.

These are not part of Home Assistant. They run on your own computer, outside HA entirely. HACS does not install them and does not need to.

Account details

Set these once per terminal rather than retyping a 32-character BLID on every command — every script reads them:

export ROOMBAPY_PRIME_USERNAME="you@example.com"
export ROOMBAPY_PRIME_BLID="YOUR_ROBOT_BLID"
export ROOMBAPY_PRIME_COUNTRY="US"      # your own: DE, FR, IT, ES ...

The country code matters — it selects which regional endpoint you authenticate against, and the default is US.

The password is deliberately not a command-line argument: it would end up in your shell history and in any terminal output you paste into an issue. Set ROOMBAPY_PRIME_PASSWORD for unattended runs, or let it prompt.

Any of these can be overridden per-run with --username/--blid/ --country-code.

Start here

roombapy-prime-validate

Read-only. Logs in, reads state, shadows, favorites, maps and mission history, then prints a report. Sends nothing to the robot. Its output alone answers several currently open questions.

Add --dump-config diagnose.json to save the raw responses. Review that file before sharing it — redaction catches the known cases, but cannot guarantee every surprise in an unfamiliar response shape.

The staged safety model

Every script that can change something follows the same pattern:

  1. Stage 0 — reconnaissance. Reads only, sends nothing, needs no flag.
  2. Stage 1+ — each requires an explicit --i-understand-this-... flag and an interactive confirmation showing the exact payload before anything is sent.

Start at stage 0. A stage-0 result is a genuinely useful contribution on its own — several findings in this project came from nothing more.

Everything validates before asking for your password, so an incomplete command tells you what is missing without making you type credentials first.

The scripts

Command What it does
roombapy-prime-validate Full read-only validation run. Start here.
…-verify-named-shadows Dumps all nine device shadows. The single richest source of protocol data.
…-verify-commands Basic mission commands (start/stop/dock/…) with before/after state.
…-verify-mission-timeline Watches the live mission/event topics. Read-only unless --start-mission.
…-verify-region-commands Room-specific cleaning, staged. Confirmed working — see below. --list-rooms shows rooms and zones, with the source of each name.
…-verify-region-commands-session The above as one guided session — one login, prompts between stages.
…-verify-map-edit Renames one room and reverts it.
…-verify-favorite-write Create/update/delete saved routines.
…-verify-schedule-write Resend and disable schedules.
…-verify-virtual-wall-write Keep-out zones and virtual walls. Writes work — the HTTP 500 was solved before 0.2.0b1. Untested: a write carrying a changed list.
…-name-clean-zone Names a clean zone. Full-list rewrite — anything omitted is deleted. Dry run by default.
…-verify-settings-write Child lock, eco charge, schedule hold, … Writes confirmed; most effects untested.

Every script has --help, and it is worth reading before a first run.

The last two are the easiest way to contribute something genuinely new — both start read-only.

Region commands: solved, and worth re-running

Room-specific cleaning works. It took three rounds to establish, and two things were required that are not obvious:

  • initiator is mandatory. A stored favorite does not carry one, so resending one unchanged is accepted, acknowledged and silently ignored.
  • The wire keys are start and region_id, not clean and id.
roombapy-prime-verify-region-commands-session \
    --i-understand-this-will-move-my-robot \
    --i-understand-this-is-experimental-and-unconfirmed

It lists your eligible favorites and you pick one by number. Watch the robot while it runs. The fastest stop is the real iRobot app or the button on the robot.

Two notes from the sessions that got this working:

  • A favorite made from specific rooms tells you far more than a whole-home one. If the robot cleans everything, you have only learned that the command arrived.
  • Check the delivery confirmation in the output. Every stage that received one started a mission; every stage that did not got nothing. A "nothing happened" without a confirmation says nothing about the payload.

Virtual walls: reads work, writes do not

Stage 0 (--list-maps, then --list-walls) works and is read-only. It is how the zone types were confirmed against real data.

--update-unchanged works. The HTTP 500 this paragraph described was solved before 0.2.0b1 — virwall starts with a COUNT of the walls — and confirmed on two accounts, including the write / re-read / write round trip that separates "accepted" from "stored".

What is still untested: a write carrying a CHANGED list. Every confirmed write resent its zones unchanged, and set_virtual_wall replaces the whole shared list — anything omitted is deleted.

Developing from an unreleased checkout

The pin above names a git tag, which does not exist yet while a version is still in development. From a checkout, install the core editable first and skip dependency resolution here:

pip install -e .                     # from the repository root
pip install -e ./tools --no-deps

Without --no-deps, pip fetches a second, unrelated copy of the core from GitHub and shadows your editable one — which then fails in ways that look like a code bug rather than an install problem. The CI does exactly this, for exactly this reason.

Versioning

This distribution pins an exact core version. The scripts reach deep into the library, so a mismatched pair fails confusingly rather than cleanly — scripts/check_version_pin.py in the repository root enforces that the two stay in step.

Download files

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

Source Distribution

roombapy_prime_tools-0.3.1.tar.gz (206.5 kB view details)

Uploaded Source

Built Distribution

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

roombapy_prime_tools-0.3.1-py3-none-any.whl (142.8 kB view details)

Uploaded Python 3

File details

Details for the file roombapy_prime_tools-0.3.1.tar.gz.

File metadata

  • Download URL: roombapy_prime_tools-0.3.1.tar.gz
  • Upload date:
  • Size: 206.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for roombapy_prime_tools-0.3.1.tar.gz
Algorithm Hash digest
SHA256 544e974d975db5aa186df9e6a8e47f32e11a5106c2383f56209b00906e888856
MD5 ee14be509f03b2b487ce34f059ad883d
BLAKE2b-256 f3f269dd0c9ea1dc6fa48074dc36b3751b1f68b0612076b220f02864755a897b

See more details on using hashes here.

Provenance

The following attestation bundles were made for roombapy_prime_tools-0.3.1.tar.gz:

Publisher: release.yml on johnnyh1975/roombapy-prime

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

File details

Details for the file roombapy_prime_tools-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for roombapy_prime_tools-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 47eebb98b307b0a12118d4f6956b962f4fd6dc8b000c3e1e7461ad9527f34a33
MD5 1eeb83634bd8fbd47d016d9d2fbc191f
BLAKE2b-256 ea63c3f8c38c9e6102a9048627ce837d572dea6ce153f98dd428cb52ada38dcc

See more details on using hashes here.

Provenance

The following attestation bundles were made for roombapy_prime_tools-0.3.1-py3-none-any.whl:

Publisher: release.yml on johnnyh1975/roombapy-prime

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

Release history Release notifications | RSS feed

0.3.2

2 files

This release

0.3.1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page