Skip to content

lufke/SonoffBasic

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SonoffBasic

SonoffBasic allows to control Sonoff switches via the Ewelink cloud, with a very basic features.

⚠️ Project was tested on sonoff basic only. Other devices will be tested and adjust in the future.

requirements

How to use ✨

  • Create an instance of Sonoff with ewelink. available params (all values in string format):

    • username - email address (required)
    • password (required)
    • region (optional) default 'us'
    • timezone (optional) default 'US/Pacific'
    >>> from SonoffBasic.sonoff import Sonoff
    >>> sonoff = Sonoff(username='[email protected]',
                        password='my_pass',
                        timezone='US/Pacific',
                        region='us')
  • Search the required device

    >>> print(sonoff.devices)
    [{'name': 'taco', 'deviceid': '1000157898', 'outletid': 0, 'status': 'on'}, 
    {'name': 'Irrigation', 'deviceid': '100015b23r', 'outletid': 0, 'status': 'off'}]
  • Control the device

    >>> sonoff.change_device_status(deviceid = '1000157898',
                                    new_status = 'off',
                                    outletid = 0
                                    )            
    deviceid: 1000157898 status successfully changed to off

Special Thanks

Thanks to @AlexxIT. cloud connection to eWeLink was inspired by SonoffLAN project.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%