Skip to main content

Sonoff control library through coolkit/ewelink cloud

Project description

# ewelink-sonoff-coolkit-client
Client for Sonoff devices using eWeLink access

Inspired by https://github.com/peterbuga/HASS-sonoff-ewelink

## Usage example
```
#!/usr/bin/env python
import asyncio

from coolkit_client import CoolkitSession, CoolkitDevicesRepository
from coolkit_client.device_control import CoolkitDeviceControl
from coolkit_client.discover import CoolkitDevicesDiscovery


async def start():
await CoolkitSession.login(
username='my@email.com',
password='IDoNotTellYou!',
region='eu'
)

await CoolkitDevicesRepository.get_device('1000012345').switches[0].state(True)
await asyncio.sleep(1)
await CoolkitDevicesRepository.get_device('1000012345').switches[0].state(False)

await CoolkitDevicesDiscovery.discover()
CoolkitDeviceControl.start_daemon()

while True:
await asyncio.sleep(3600)

if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(start())

```


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coolkit-client-phoenix-1.0.2.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coolkit_client_phoenix-1.0.2-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file coolkit-client-phoenix-1.0.2.tar.gz.

File metadata

  • Download URL: coolkit-client-phoenix-1.0.2.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.2

File hashes

Hashes for coolkit-client-phoenix-1.0.2.tar.gz
Algorithm Hash digest
SHA256 e224f2f9c3da4b851610ec858400a6f6f6fac58275e53897c66f74b18f61989a
MD5 5ec9cce719c46b12bb7c25dd3ad7b267
BLAKE2b-256 ae6e14cd8cfbd3e434e8323350adca4279714a67d4ebca1c52be04cabd8d86e7

See more details on using hashes here.

File details

Details for the file coolkit_client_phoenix-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: coolkit_client_phoenix-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.2

File hashes

Hashes for coolkit_client_phoenix-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 204a4fbb7a85f4f57305029678ac6009140f4199592a91a148554bf03a560600
MD5 2c254b809c65995cc5ffb6da06ee1ebb
BLAKE2b-256 d2264bb835ab566e7ed82065c54b9cfec86578c8fdb89dbc3b7ef2a47a0481dd

See more details on using hashes here.

Supported by

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