Module to communicate to the Robonect API
Project description
aiorobonect
Asynchronous library to communicate with the Robonect API
API Example
"""Test for aiorobonect."""
from aiorobonect import RobonectClient
import asyncio
import json
import aiohttp
async def main():
host = "10.0.0.99" ## The Robonect mower IP
username = "USERNAME" ## Your Robonect username
password = "xxxxxxxx" ## Your Robonect password
tracking = [ ## Commands to query
"battery",
"wlan",
"version",
"timer",
"hour",
"error"
]
client = RobonectClient(host, username, password)
try:
status = await client.async_cmd("status")
print(status)
tracking = await client.async_cmds(tracking)
print(json.dumps(tracking, indent=2))
except Exception as exception:
if isinstance(exception, aiohttp.ClientResponseError):
print(exception)
await client.session_close()
asyncio.run(main())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aiorobonect-1.0.1.tar.gz
(5.2 kB
view hashes)
Built Distribution
Close
Hashes for aiorobonect-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fffe5e8ca2955efc4d06bcd91805b2e7084b12c56d7c9ea30ae151cacec1d1a1 |
|
MD5 | 8a85afde66a70269546325428811df09 |
|
BLAKE2b-256 | de9c2934777ad29879f41f62c9adfb57abed802fa27c6a6dbd11f5aa7e8212ad |