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.

Files for coolkit-client-phoenix, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size coolkit_client_phoenix-1.0.2-py3-none-any.whl (9.5 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size coolkit-client-phoenix-1.0.2.tar.gz (5.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page