Skip to content

fix(cloud import): fetch the device plugin catalog for string product ids - #258

Closed
jipjan wants to merge 1 commit into
Python-roborock:mainfrom
jipjan:fix/cloud-import-string-product-ids
Closed

jipjan wants to merge 1 commit into
Python-roborock:mainfrom
jipjan:fix/cloud-import-string-product-ids

Conversation

@jipjan

@jipjan jipjan commented Nov 14, 2026

Copy link
Copy Markdown

What

Newer products (a226, a296, ...) are listed in home_data with a string product id only. _plugin_product_ids() only accepted ints, so the cloud import sent no ids to /api/v1/appplugin and stored "no product ids available". The app then has no device plugin for these robots. Sending the string itself does not work: appplugin answers code 1002 "parameter error".

The cloud still has a numeric id for each model. When home_data contains a string product id, the import now reads GET /api/v5/product, maps each string id to its model's numeric id, and asks appplugin for those. Accounts with only numeric ids behave exactly as before; the extra request is only made when a string id is present.

Testing

  • Unit tests in tests/test_plugin_product_ids.py (numeric ids unchanged, string ids mapped through the catalog, unmapped strings left out, nested catalog shapes).
  • Full suite passes.
  • Checked against the EU cloud with a Saros 20 Neo (roborock.vacuum.a296): its string id maps to 257, appplugin answers plugin version 7052, and the official app loads the device page through the local server. This has been running on my install since.

Refs #221 (the string-id half only; the per-platform plugin part of that issue is not touched).

🤖 Generated with Claude Code

… ids

Newer products (a226, a296, ...) are listed in home_data with a string
product id only. _plugin_product_ids() only accepted ints, so the import
sent no ids and stored "no product ids available" for appplugin. Sending
the string itself does not help: /api/v1/appplugin answers code 1002
"parameter error".

The cloud still has a numeric id per model. When home_data has a string
product id, the import now reads GET /api/v5/product, maps each string
id to its model's numeric id and asks appplugin for those.

Checked against the EU cloud with a Saros 20 Neo (roborock.vacuum.a296):
its string id maps to 257, and appplugin answers plugin version 7052.

Refs Python-roborock#221 (the string-id half; per-platform plugins are not touched).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jipjan jipjan closed this Nov 14, 2026
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