{"id":24458,"library":"python-roborock","title":"python-roborock","description":"An async Python package to control Roborock vacuums and mops. Version 5.9.0 supports Python >=3.11 and <4. Released under GPL-3.0. Active development with frequent releases.","status":"active","version":"5.9.0","language":"python","source_language":"en","source_url":"https://github.com/python-roborock/python-roborock","tags":["roborock","vacuum","iot","async","home-automation"],"install":[{"cmd":"pip install python-roborock","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"RoborockClient is at the top-level roborock module, not a submodule.","wrong":"from roborock.api import RoborockClient","symbol":"RoborockClient","correct":"from roborock import RoborockClient"},{"note":"Typed info object for discovered devices.","symbol":"RoborockDeviceInfo","correct":"from roborock import RoborockDeviceInfo"},{"note":"Exceptions are in the submodule roborock.exceptions in v5.","wrong":"from roborock import RoborockException","symbol":"RoborockException","correct":"from roborock.exceptions import RoborockException"}],"quickstart":{"code":"import asyncio\nfrom roborock import RoborockClient\n\nasync def main():\n    client = RoborockClient(username=\"your_email\", password=\"your_password\")\n    devices = await client.get_devices()\n    for device in devices:\n        print(f\"Device: {device.name}, IP: {device.ip}\")\n    await client.close()\n\nasyncio.run(main())","lang":"python","description":"Authenticate with Roborock cloud credentials and list all devices."},"warnings":[{"fix":"pip install \"protobuf>=6\"","message":"In v5, the library switched to protobuf 6.x required runtime. Ensure you have protobuf>=6.0.0 installed.","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Upgrade Python to >=3.11.","message":"Python 3.11 minimum; Python 3.10 and below are no longer supported.","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Use a context manager or ensure cleanup in finally block.","message":"Always call `await client.close()` after finishing to avoid hanging connections.","severity":"gotcha","affected_versions":"all"},{"fix":"Check `device.supported_schema_ids()` before accessing schema-specific attributes.","message":"Some device status fields are only available when a specific schema code is active (e.g., dock state). Accessing missing fields may raise KeyError or return None.","severity":"gotcha","affected_versions":">=5.4.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"from roborock import RoborockClient","cause":"Wrong import path; RoborockClient is at top-level roborock.","error":"ImportError: cannot import name 'RoborockClient' from 'roborock.api'"},{"fix":"Verify credentials and internet connectivity. If using two-factor auth, use an app password if available.","cause":"Invalid username/password or network issue.","error":"roborock.exceptions.RoborockException: Authentication failed"},{"fix":"pip install \"protobuf>=6\"","cause":"Protobuf runtime version mismatch; library requires protobuf 6.x.","error":"google.protobuf.message.DecodeError: Error parsing message"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}