2019-11-11 21:14:34 +00:00
|
|
|
"""Python interface for TP-Link's smart home devices.
|
2017-05-26 14:11:03 +00:00
|
|
|
|
|
|
|
All common, shared functionalities are available through `SmartDevice` class::
|
|
|
|
|
|
|
|
x = SmartDevice("192.168.1.1")
|
|
|
|
print(x.sys_info)
|
|
|
|
|
2019-11-11 21:14:34 +00:00
|
|
|
For device type specific actions `SmartBulb`, `SmartPlug`, or `SmartStrip`
|
|
|
|
should be used instead.
|
2017-05-26 14:11:03 +00:00
|
|
|
|
|
|
|
Module-specific errors are raised as `SmartDeviceException` and are expected
|
|
|
|
to be handled by the user of the library.
|
|
|
|
"""
|
2020-05-12 10:11:47 +00:00
|
|
|
from importlib_metadata import version # type: ignore
|
2019-12-18 08:11:18 +00:00
|
|
|
from kasa.discover import Discover
|
2020-05-27 17:02:09 +00:00
|
|
|
from kasa.exceptions import SmartDeviceException
|
2019-12-18 08:11:18 +00:00
|
|
|
from kasa.protocol import TPLinkSmartHomeProtocol
|
|
|
|
from kasa.smartbulb import SmartBulb
|
2020-05-27 17:02:09 +00:00
|
|
|
from kasa.smartdevice import DeviceType, EmeterStatus, SmartDevice
|
2020-04-18 21:35:39 +00:00
|
|
|
from kasa.smartdimmer import SmartDimmer
|
2020-07-19 20:32:17 +00:00
|
|
|
from kasa.smartlightstrip import SmartLightStrip
|
2019-12-18 08:11:18 +00:00
|
|
|
from kasa.smartplug import SmartPlug
|
|
|
|
from kasa.smartstrip import SmartStrip
|
2019-11-11 18:26:06 +00:00
|
|
|
|
2020-05-12 10:11:47 +00:00
|
|
|
__version__ = version("python-kasa")
|
|
|
|
|
|
|
|
|
2019-11-11 18:26:06 +00:00
|
|
|
__all__ = [
|
|
|
|
"Discover",
|
|
|
|
"TPLinkSmartHomeProtocol",
|
|
|
|
"SmartBulb",
|
|
|
|
"DeviceType",
|
|
|
|
"EmeterStatus",
|
|
|
|
"SmartDevice",
|
|
|
|
"SmartDeviceException",
|
|
|
|
"SmartPlug",
|
|
|
|
"SmartStrip",
|
2020-04-18 21:35:39 +00:00
|
|
|
"SmartDimmer",
|
2020-07-19 20:32:17 +00:00
|
|
|
"SmartLightStrip",
|
2019-11-11 18:26:06 +00:00
|
|
|
]
|