Skip to content

Python library for interfacing with konke smart appliances

License

Notifications You must be signed in to change notification settings

jedmeng/python-konkeio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This library (and its accompanying cli tool) is used to interface with Konke remote-control devices.

Supported Devices

  • Mini K
  • Mini Pro
  • Smart Plug K(untested)
  • K2 Pro(untested)

Install

pip install pykoneio

API Reference

  • class Switch (ip) create a instance of a switch
  • check() get switch's status
  • turn_on() turn on the switch
  • turn_off() turn off the switch

Demo:

from pykonkeio import Switch

switch = Switch('192.168.0.222')

if switch.status == 'open':
    switch.turn_off()
elif switch.status == 'close':
    switch.turn_on()
elif switch.status == 'offline':
    print('switch is off line')

CLI Command

  • search device

    koneio search
  • check device status

    koneio check -a [device ip address]
  • turn on switch

    koneio open -a [device ip address]
  • turn off switch

    koneio close -a [device ip address]

About

Python library for interfacing with konke smart appliances

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages