Skip to content

Establish all cleaning-mode mappings and enable verified mode changes #19

Closed

Description

@Repsay

Current status (17 October 2026)

All three centralized APK mode values are implemented with fresh identity/current-state checks and enabled-plan prerequisite for Scheduled. Live Auto, Scheduled and Soft stool readbacks passed with restoration. Unknown-mode handling and invalid/prerequisite cases are tested. Actual scheduled physical firing and broader model acceptance remain in #42.

Delivered: implementation/contracts and dedicated validation tooling. PR #43 consolidates the fixes, 666 passing tests on HA 2026.10.1/2026.3.0, strict mypy/Ruff and the coverage guide. This implementation ticket closes on merge; outstanding external acceptance is explicitly retained in #42, with #21/#22/#41 covering their separate work. Closing this ticket does not certify unperformed physical/app tests.

Historical audit and earlier development notes

The mode select intentionally blocks every write. Raw mode 1 is already supported as Auto for readback, but remaining labels and supported write behavior have not been established.

APK evidence

LitterBoxController::changeMode constructs mode (0xcecd14) and user_device_id (0xcecd38) and POSTs /device/litter_box/set_mode (0xcecd50, 0xcecd5c). UI callbacks in litter_box_view.dart call this method with values 1, 2 and 3; labels and tagged/unboxed value handling still require tracing.

Evidence source: NOTTY Smart Pet 1.1.30, SHA-256 3b6dc21037f2802e92233ecd9f685e76b03a79afa2d82dd52a5dfcd689a18e6a, decoded locally with Blutter. These are inspected request-construction paths, not just URL-string matches. Decoded app files and private captures remain outside the public repository.

Integration baseline

select.py at commit 9b1b7c3.

Acceptance criteria

  • Trace each UI label to the actual numeric request value; preserve the owner-observed mode 1 = Auto mapping.
  • Establish mode-specific prerequisites, including scheduled cleaning and automatic delay.
  • Enable only verified options and centralize their mapping across entities/actions.
  • Retain numeric fallback for unknown modes and add independent contract fixtures before owner-observed live checks.

Follow-up to closed #9, which fixed the observed label and added the write guard. Related command-contract validation: #4.

Validation boundary

This is missing integration functionality backed by an app code path. Exact schemas, model support and live behavior still need verification before exposing writes.

No hardware actions or cloud-setting changes were performed while creating this issue.

Implementation update (2026-10-17)

Implemented in PR #39.

Auto=1, Scheduled=2 and Soft stool=3 are centralized from traced UI callers. The select and action now write only known values after fresh matching physical-device/current-mode readback; Scheduled requires a fresh enabled plan. Numeric unknown-mode fallback is retained. Live mode changes, scheduling behavior and model acceptance still require owner validation.

Validation: 607 synthetic/mocked tests pass on HA 2026.10.1 and the exact minimum HA 2026.3.0; Ruff and strict mypy pass, including scripts. APK addresses and read/write boundaries are documented in docs/apk-pet-maintenance.md and docs/apk-firmware.md. No new cloud write, hardware operation, firmware install or statistics deletion was performed for this batch. Implementation is separate from live acceptance; this issue remains open for the outstanding validation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions