Skip to content

feat: support legacy Tuya Cloud RoboVacs (verified on T2266) - #164

Open
alaraun wants to merge 1 commit into
jeppesens:mainfrom
alaraun:feat/legacy-tuya-cloud-support
Open

alaraun wants to merge 1 commit into
jeppesens:mainfrom
alaraun:feat/legacy-tuya-cloud-support

Conversation

@alaraun

@alaraun alaraun commented Aug 14, 2026

Copy link
Copy Markdown

Add a third device protocol alongside novel (protobuf) and scalar: "legacy"
plain-value Tuya Cloud devices, verified on the T2266 (X8 Pro Hybrid).

  • Fetch each device's Tuya DPS schema and drive commands/parsing from it, so
    per-model enum spellings (suction levels, work modes) are used instead of
    hard-coded guesses.
  • Commands: start/pause/resume/stop/return/find, schema-gated fan speed, and
    DPS 124 map operations (room_clean, fast_mapping) with the required
    timestamped envelope.
  • State: work/task status, battery, error, cleaning stats, consumables
    (DPS 116) and map id (DPS 125).
  • Local Tuya: auto-detect and persist the protocol version, and tolerate
    benign per-frame receive errors instead of dropping the session.
  • Sensors: cleaning-stats for every protocol, and per-model legacy accessory
    "remaining" sensors (T2266 lifespans measured against the app).

Protocol details captured in docs/T2266_TUYA_MAP_P2P.md.

All 612 tests pass.

Add a third device protocol alongside novel (protobuf) and scalar: "legacy"
plain-value Tuya Cloud devices, verified on the T2266 (X8 Pro Hybrid).

- Fetch each device's Tuya DPS schema and drive commands/parsing from it, so
  per-model enum spellings (suction levels, work modes) are used instead of
  hard-coded guesses.
- Commands: start/pause/resume/stop/return/find, schema-gated fan speed, and
  DPS 124 map operations (room_clean, fast_mapping) with the required
  timestamped envelope.
- State: work/task status, battery, error, cleaning stats, consumables
  (DPS 116) and map id (DPS 125).
- Local Tuya: auto-detect and persist the protocol version, and tolerate
  benign per-frame receive errors instead of dropping the session.
- Sensors: cleaning-stats for every protocol, and per-model legacy accessory
  "remaining" sensors (T2266 lifespans measured against the app).

Protocol details captured in docs/T2266_TUYA_MAP_P2P.md.
@alaraun

alaraun commented Aug 14, 2026

Copy link
Copy Markdown
Author

@m11tch can you please review. Thanks.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant