pyworxcloud

raw JSON →
6.3.6 verified Fri May 01 auth: no python

Python library for interacting with the Positec/Landroid cloud API. Provides asynchronous control of Landroid robotic lawn mowers. Current version 6.3.6, supports Python 3.9+ with <4.0.

pip install pyworxcloud
error RuntimeError: asyncio.run() cannot be called from a running event loop
cause Running asyncio.run() inside an event loop (e.g., in Jupyter or IPython).
fix
Use 'await main()' if already in an event loop, or nest with 'asyncio.get_event_loop().run_until_complete(main())'.
error AttributeError: 'WorxCloud' object has no attribute 'mowers'
cause Upgrading to v6.x where 'mowers' was renamed to 'products'.
fix
Replace cloud.mowers with cloud.products.
error Invalid credentials: HTTP 403
cause Password uses special characters incorrectly encoded, or region mismatch.
fix
URL-encode password or switch region: WorxCloud(email, password, region='EU'). Also ensure you use the exact email for the Positec account.
breaking WorxCloud is now an async context manager (async with). You must use async/await; synchronous usage is removed.
fix Use 'async with WorxCloud(...) as cloud' instead of WorxCloud(...) without async.
gotcha Region selection is automatic but may delay login. If you know your region, set it explicitly to avoid extra API calls.
fix WorxCloud(email, password, region='EU'). Common regions: 'EU', 'US', 'CN'.
deprecated The 'mowers' attribute was renamed to 'products' to support non-mower devices (e.g., vacuums).
fix Use cloud.products instead of cloud.mowers.

Initializes WorxCloud and lists mowers.

import asyncio
import os
from pyworxcloud import WorxCloud

async def main():
    email = os.environ.get('EMAIL', '')
    password = os.environ.get('PASSWORD', '')
    async with WorxCloud(email, password) as cloud:
        # List all mowers
        for product in cloud.products:
            print(f"Mower: {product.name}, serial: {product.serial_number}")

asyncio.run(main())