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
|
2021-03-18 18:22:10 +00:00
|
|
|
|
2019-12-18 08:11:18 +00:00
|
|
|
from kasa.discover import Discover
|
2021-09-23 15:58:19 +00:00
|
|
|
from kasa.emeterstatus import EmeterStatus
|
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
|
2022-10-27 15:40:54 +00:00
|
|
|
from kasa.smartbulb import SmartBulb, SmartBulbPreset, TurnOnBehavior, TurnOnBehaviors
|
2021-09-23 15:58:19 +00:00
|
|
|
from kasa.smartdevice import DeviceType, 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",
|
2022-10-22 22:15:47 +00:00
|
|
|
"SmartBulbPreset",
|
2022-10-27 15:40:54 +00:00
|
|
|
"TurnOnBehaviors",
|
|
|
|
"TurnOnBehavior",
|
2019-11-11 18:26:06 +00:00
|
|
|
"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
|
|
|
]
|