Skip to content

Decode per-room Custom-mode schedule packed-int format #1

Description

@malard

Background

The cleaning schedule string at siid 8 piid 2 is bimodal even within Custom mode:

  • Custom (global) — single packed int in field 8 covers all selected rooms with one config. Layout fully decoded — see SCHEDULE_FIELD8 in src/miot-spec.ts (route / mode / suction / cycle count, plus 0xC249 middle bits still unexplained).
  • Custom (per-room) — field 8 = 0, and field 9 becomes a comma-separated list of packed ints, ONE PER ROOM, each embedding both the segment ID and that room's per-room settings.

The per-room layout is not yet decoded.

What we observed

When the user switched to per-room custom config with two rooms set up, the schedule string became:

1-1-22:00-1111111-1-1-0-0-1126240519,2198016259
                         ^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
                         | | comma-list of per-room packed ints
                         | field 8 = 0 (global config disabled)
                         field 7 = 0 (wetness moves into per-room)
1126240519 = 0x431B7587
2198016259 = 0x830DAB43

Both per-room ints have 0x_8_ and 0x_4_ digits in similar positions — possibly suggesting a shared prefix encoding the segment ID, with settings packed in the remaining bits. Without more variations we can't tell the layout.

Decoding methodology (proven approach)

Same as we used for the global Custom-mode int (see notes/feature-discovery-session.md):

  1. Set both rooms identically → identifies which bits are "common settings" vs "segment ID".
  2. Vary one setting on one room at a time → isolates which bits encode that field.
  3. Swap which rooms are selected (without touching settings) → identifies the segment-ID bits.
  4. Cross-reference the segment IDs against the known map segment list (we saw 7, 4, 2, 3 in CleanGenius mode).

The examples/log-events.ts logger captures everything — restart it, run the methodology in the app, post-process the JSONL diffs.

Why this matters

Without this we can't write a proper setSchedule() API for per-room schedules. Right now node-dreame can fully read/write CleanGenius schedules and Custom-global schedules, but per-room schedules can only be read, not constructed.

Acceptance criteria

  • Bit layout of the per-room packed int documented in src/miot-spec.ts (analogous to SCHEDULE_FIELD8).
  • How segment ID is embedded (which bits, encoding format).
  • How wetness (1-32) appears in the per-room int (field 7 of the schedule string is 0 in per-room mode, so wetness must move inside the per-room packed int).
  • Verification across at least 3 rooms with varied settings.
  • Findings appended to notes/feature-discovery-session.md.
  • (Stretch) Helper exported from the lib that builds/parses a per-room schedule.

Related

  • src/miot-spec.tsSCHEDULE_PROP, SCHEDULE_FIELD8, ScheduleRoute, ScheduleCleaningMode
  • notes/feature-discovery-session.md — full session log + bimodal format docs

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