Asynchronous library to control Shelly devices.
Project description
Aioshelly
Asynchronous library to control Shelly
This library is under development.
Requires Python 3 and uses asyncio, aiohttp and aiocoap.
import asyncio
from pprint import pprint
import aiocoap
import aiohttp
import aioshelly
async def main():
options = aioshelly.ConnectionOptions("192.168.1.165", "username", "password")
coap_context = await aiocoap.Context.create_client_context()
async with aiohttp.ClientSession() as session:
device = await aioshelly.Device.create(session, options)
for block in device.blocks:
print(block)
pprint(block.current_values())
print()
await coap_context.shutdown()
if __name__ == "__main__":
asyncio.run(main())
Breaking changes for 0.3.3+
Due to the code quality checks, we changed a few methods/properties:
ip()
is nowip_address()
d
is nowcoap_d
s
is nowcoap_s
Contribution guidelines
Object hierarchy and property/method names should match the Shelly API.
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
aioshelly-0.4.0.tar.gz
(9.2 kB
view hashes)
Built Distribution
Close
Hashes for aioshelly-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14ade4017f759d889ece9bd8ff222f28900e31cb8ccf51b94dfabe7a19fb9fdd |
|
MD5 | 99b3adf04df4f1f0f75275882dc66208 |
|
BLAKE2b-256 | a07c57628b8fdefb21c7cb51ffa06ed6bb85262d3d4a5ee860b96981de03d716 |