Skip to content

Support NOTTY notification-category preferences #24

Closed

Description

@Repsay

Current status (17 October 2026)

Account-scoped litter category switches/actions and exact Boolean block requests are implemented. A live category toggle appeared in readback and was restored. validate_notifications.py supports comparison with independently supplied app values; scope, categories and failure/unknown cases are tested.

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 integration reads some messages and unread counts, but it does not expose the app's category-blocking preferences. These are cloud notification preferences, not automatically Home Assistant notification settings.

APK evidence

view/tabs/device/device_setting/message_setting/message_setting_controller.dart: getMessageList uses /message/get_type_block_stats_list (0xc0a3a8); blockedMsg uses /message/block_type (0xcc7ce8).

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 category identifiers, block/unblock encoding and whether preferences are account-wide or device-specific.
  • Expose supported preferences with their real scope stated in the entity/action UI.
  • Keep event reading and Home Assistant notifications separate from cloud preference writes.
  • Test scope, category handling, request payloads and readback with synthetic fixtures.

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 native account-level notification switches and notty.notification_preferences list/block/unblock actions. APK and live reads establish litter message_group_id=3; POST contains only message_type_id and Boolean block. Account scope is stated in the UI, separate from HA notifications. Read-only production checks found five categories. Toggle writes remain unverified live.

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.

Live API update (2026-10-17)

One owner-authorized notification-category toggle appeared in API readback. Restoring the original block state produced matching baseline readback. Phone-app preference agreement is still pending. Separate scripts, private evidence and app-comparison templates are provided in PR #40. Raw captures remain ignored and private. No empty or motor command was sent.

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