Skip to content

Validate firmware installation on supported hardware #22

Open

Description

@Repsay

Current status — PR #44

PR #44 persists the exact target/task and baseline before firmware confirmation. HA reload/startup resumes without replay; transport uncertainty remains pending; unrelated tasks and stale pre-retry failures cannot finish a new request. Installed-version readback remains authoritative. Automated reload, uncertain-write, task-identity and completion coverage passes on current and minimum HA.

APK transport investigation traced the realtime flow to native Android JPush (XjCore::jpInit, creation 0xbeb424, handler registration 0xbeb478, phone-token endpoint 0xbeb630). This is not a verified HA-compatible WebSocket/MQTT stream. The integration deliberately retains HTTP polling and never overwrites a phone push registration or invents percentage progress.

  • Restart-persistent pending task tracking and protection against replay.
  • Exact-task correlation and stale failure handling.
  • Determine the native realtime transport and document the supported polling boundary.
  • Validate install/reboot/offline/failure lifecycle on supported hardware when the backend offers a real update. A fresh live check still offers none.

Use scripts/validate_firmware.py and scripts/monitor_firmware.py when an offer exists. See docs/remaining-validation.md. Native push support would require a separately established vendor-compatible transport; no such subscription is claimed.

Previous audit and validation history

Current remaining work (17 October 2026)

Firmware availability, explicit eligible-task installation, full notes and Boolean pending-target tracking are implemented. The owner device currently offers no update. validate_firmware.py and monitor_firmware.py provide installation/read-only lifecycle evidence, with completion based on installed-version readback and bounded resumable script observation. HA realtime-event subscription and restart-persistent HA progress remain unimplemented; the monitor does not claim to add them.

Implementation/validation coverage is documented in merged PR #43, docs/validation-coverage.md and #42. This issue remains open for the specific remaining work above.

Original audit and development history

Upgrade information is collected and flattened into generic sensor fields, and a confirmation endpoint is listed internally. There is no Home Assistant update entity with installed/latest versions, progress or an explicit install action.

APK evidence

view/tabs/device/device_setting/version_upgrade/version_upgrade_controller.dart: checkUpdate uses /device/check_upgrade/ (0xbecde0); confirmUpdate uses /device/confirm_upgrade (0xcc532c).

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

api.py at commit 9b1b7c3.

Acceptance criteria

  • Trace supported versions/status/progress fields and required confirmation payload.
  • Add read-only update availability first; expose installation only when its contract and device support are established.
  • Make installation an explicit user action and handle in-progress, failed and offline devices.
  • Test state transitions with synthetic responses and document which device models were validated.

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.

Adds explicit fresh-task confirmation, full release notes and Boolean tracking of this HA session's requested target until installed-version readback or reported failure/cancellation. Missing/busy/unknown tasks, foreign versions, offline/shared devices and backup requests are rejected. No measured percentage, restart persistence or subscription to the app's separate realtime firmware events is claimed. Keep open for supported-model/live installation and realtime lifecycle 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

  1. changed the title [-]Add a firmware update entity using NOTTY upgrade status and confirmation[/-] [+]Validate firmware installation and extend progress/restart tracking[/+] on Oct 16, 2026
  2. changed the title [-]Validate firmware installation and extend progress/restart tracking[/-] [+]Validate firmware installation on supported hardware[/+] on Oct 17, 2026
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions