Skip to main content

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 now ip_address()
  • d is now coap_d
  • s is now coap_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 details)

Uploaded Source

Built Distribution

aioshelly-0.4.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file aioshelly-0.4.0.tar.gz.

File metadata

  • Download URL: aioshelly-0.4.0.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for aioshelly-0.4.0.tar.gz
Algorithm Hash digest
SHA256 7ab2f83e5c07b3c40c62b6aacfaf7b20286d1917a40551a02e318b4d88e288e4
MD5 1908c1a2afad7e0f91dcefaef2807b34
BLAKE2b-256 52e367cad38893070716a5bcc15e501c1dfa1057bba5ba96b4ab86a5dc5ad49a

See more details on using hashes here.

File details

Details for the file aioshelly-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: aioshelly-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for aioshelly-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 14ade4017f759d889ece9bd8ff222f28900e31cb8ccf51b94dfabe7a19fb9fdd
MD5 99b3adf04df4f1f0f75275882dc66208
BLAKE2b-256 a07c57628b8fdefb21c7cb51ffa06ed6bb85262d3d4a5ee860b96981de03d716

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page