2019-11-11 22:14:34 +01:00
|
|
|
"""Python interface for TP-Link's smart home devices.
|
2017-05-26 16:11:03 +02:00
|
|
|
|
|
|
|
All common, shared functionalities are available through `SmartDevice` class::
|
|
|
|
|
|
|
|
x = SmartDevice("192.168.1.1")
|
|
|
|
print(x.sys_info)
|
|
|
|
|
2019-11-11 22:14:34 +01:00
|
|
|
For device type specific actions `SmartBulb`, `SmartPlug`, or `SmartStrip`
|
|
|
|
should be used instead.
|
2017-05-26 16:11:03 +02:00
|
|
|
|
|
|
|
Module-specific errors are raised as `SmartDeviceException` and are expected
|
|
|
|
to be handled by the user of the library.
|
|
|
|
"""
|
2023-05-17 20:33:02 +02:00
|
|
|
from importlib.metadata import version
|
2021-03-18 19:22:10 +01:00
|
|
|
|
2023-09-13 14:46:38 +01:00
|
|
|
from kasa.credentials import Credentials
|
2019-12-18 09:11:18 +01:00
|
|
|
from kasa.discover import Discover
|
2021-09-23 17:58:19 +02:00
|
|
|
from kasa.emeterstatus import EmeterStatus
|
2023-09-13 14:46:38 +01:00
|
|
|
from kasa.exceptions import (
|
|
|
|
AuthenticationException,
|
|
|
|
SmartDeviceException,
|
|
|
|
UnsupportedDeviceException,
|
|
|
|
)
|
2019-12-18 09:11:18 +01:00
|
|
|
from kasa.protocol import TPLinkSmartHomeProtocol
|
2022-10-27 17:40:54 +02:00
|
|
|
from kasa.smartbulb import SmartBulb, SmartBulbPreset, TurnOnBehavior, TurnOnBehaviors
|
2021-09-23 17:58:19 +02:00
|
|
|
from kasa.smartdevice import DeviceType, SmartDevice
|
2020-04-18 23:35:39 +02:00
|
|
|
from kasa.smartdimmer import SmartDimmer
|
2020-07-19 22:32:17 +02:00
|
|
|
from kasa.smartlightstrip import SmartLightStrip
|
2019-12-18 09:11:18 +01:00
|
|
|
from kasa.smartplug import SmartPlug
|
|
|
|
from kasa.smartstrip import SmartStrip
|
2019-11-11 19:26:06 +01:00
|
|
|
|
2020-05-12 12:11:47 +02:00
|
|
|
__version__ = version("python-kasa")
|
|
|
|
|
|
|
|
|
2019-11-11 19:26:06 +01:00
|
|
|
__all__ = [
|
|
|
|
"Discover",
|
|
|
|
"TPLinkSmartHomeProtocol",
|
|
|
|
"SmartBulb",
|
2022-10-23 00:15:47 +02:00
|
|
|
"SmartBulbPreset",
|
2022-10-27 17:40:54 +02:00
|
|
|
"TurnOnBehaviors",
|
|
|
|
"TurnOnBehavior",
|
2019-11-11 19:26:06 +01:00
|
|
|
"DeviceType",
|
|
|
|
"EmeterStatus",
|
|
|
|
"SmartDevice",
|
|
|
|
"SmartDeviceException",
|
|
|
|
"SmartPlug",
|
|
|
|
"SmartStrip",
|
2020-04-18 23:35:39 +02:00
|
|
|
"SmartDimmer",
|
2020-07-19 22:32:17 +02:00
|
|
|
"SmartLightStrip",
|
2023-09-13 14:46:38 +01:00
|
|
|
"AuthenticationException",
|
|
|
|
"UnsupportedDeviceException",
|
|
|
|
"Credentials",
|
2019-11-11 19:26:06 +01:00
|
|
|
]
|