plugp100 5.0.0.dev4__tar.gz → 5.0.0.dev5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {plugp100-5.0.0.dev4/plugp100.egg-info → plugp100-5.0.0.dev5}/PKG-INFO +1 -1
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/__init__.py +1 -1
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/discovery/__init__.py +2 -2
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/discovery/discovered_device.py +29 -12
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/child_device_list.py +1 -1
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5/plugp100.egg-info}/PKG-INFO +1 -1
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/tests/integration/test_power_strip.py +2 -2
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/tests/integration/test_tapo_discovery.py +2 -2
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/tests/unit/test_hub.py +6 -1
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/LICENSE +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/MANIFEST.in +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/README.md +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/api/__init__.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/api/light_effect.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/api/light_effect_preset.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/api/requests/__init__.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/api/requests/handshake_params.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/api/requests/internal/__init__.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/api/requests/internal/snowflake_id.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/api/requests/login_device.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/api/requests/secure_passthrough_params.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/api/requests/set_device_info/__init__.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/api/requests/set_device_info/play_alarm_params.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/api/requests/set_device_info/set_light_color_info_params.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/api/requests/set_device_info/set_light_info_params.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/api/requests/set_device_info/set_plug_info_params.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/api/requests/set_device_info/set_trv_info_params.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/api/requests/tapo_request.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/api/requests/trigger_logs_params.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/api/tapo_client.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/common/__init__.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/common/credentials.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/common/functional/__init__.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/common/functional/tri.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/common/utils/__init__.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/common/utils/http_client.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/common/utils/json_utils.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/discovery/cloud_client.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/discovery/rsa_session.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/discovery/tapo_discovery.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/encryption/__init__.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/encryption/helpers.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/encryption/key_pair.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/encryption/tp_link_cipher.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/example.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/__init__.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/child/__init__.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/child/tapohubchildren.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/child/tapostripsocket.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/components/__init__.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/components/alarm_component.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/components/battery_component.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/components/device_component.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/components/energy_component.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/components/hub_children_component.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/components/humidity_component.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/components/light_component.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/components/light_effect_component.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/components/motion_sensor_component.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/components/on_off_component.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/components/overheat_component.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/components/report_mode_component.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/components/smart_door_component.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/components/socket_children_component.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/components/temperature_component.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/components/temperature_humidity_records.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/components/trigger_log_component.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/components/water_leak_component.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/device_factory.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/device_type.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/errors/__init__.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/errors/invalid_authentication.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/event_polling/__init__.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/event_polling/event_subscription.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/event_polling/poll_tracker.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/event_polling/state_tracker.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/hub_device_tracker.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/tapobulb.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/tapodevice.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/tapohub.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/tapoplug.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/protocol/__init__.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/protocol/klap/__init__.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/protocol/klap/klap_handshake_revision.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/protocol/klap/klap_protocol.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/protocol/passthrough_protocol.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/protocol/securepassthrough_transport.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/protocol/tapo_protocol.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/__init__.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/alarm_type_list.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/components.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/device_state.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/device_usage_info.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/energy_info.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/hub_childs/__init__.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/hub_childs/hub_child_base_info.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/hub_childs/ke100_device_state.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/hub_childs/leak_device_state.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/hub_childs/s200b_device_state.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/hub_childs/switch_child_device_state.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/hub_childs/t100_device_state.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/hub_childs/t110_device_state.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/hub_childs/t31x_device_state.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/hub_childs/trigger_log_response.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/power_info.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/tapo_exception.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/tapo_response.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/temperature_unit.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/time_info.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100.egg-info/SOURCES.txt +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100.egg-info/dependency_links.txt +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100.egg-info/requires.txt +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100.egg-info/top_level.txt +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/pyproject.toml +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/requirements-dev.txt +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/requirements.txt +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/setup.cfg +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/setup.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/tests/integration/__init__.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/tests/integration/tapo_test_helper.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/tests/integration/test_button_t310.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/tests/integration/test_hub.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/tests/integration/test_ledstrip.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/tests/integration/test_light.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/tests/integration/test_plug.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/tests/integration/test_sensor_s200b.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/tests/unit/__init__.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/tests/unit/hub_child/__init__.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/tests/unit/hub_child/test_button.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/tests/unit/hub_child/test_temp_hum_sensor.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/tests/unit/hub_child/test_trv_ke100.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/tests/unit/test_bulb.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/tests/unit/test_discovery.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/tests/unit/test_klap_protocol.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/tests/unit/test_plug.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/tests/unit/test_plug_strip.py +0 -0
- {plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/tests/unit/test_utils.py +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from .discovered_device import DiscoveredDevice,
|
|
1
|
+
from .discovered_device import DiscoveredDevice, EncryptionSchema
|
|
2
2
|
from .tapo_discovery import TapoDiscovery
|
|
3
3
|
|
|
4
|
-
__all__ = ["TapoDiscovery", "DiscoveredDevice", "
|
|
4
|
+
__all__ = ["TapoDiscovery", "DiscoveredDevice", "EncryptionSchema"]
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import dataclasses
|
|
2
|
+
import logging
|
|
2
3
|
from typing import Optional, Any
|
|
3
4
|
|
|
4
5
|
import aiohttp
|
|
@@ -14,7 +15,7 @@ class DiscoveredDevice:
|
|
|
14
15
|
device_model: str
|
|
15
16
|
ip: str
|
|
16
17
|
mac: str
|
|
17
|
-
mgt_encrypt_schm: "
|
|
18
|
+
mgt_encrypt_schm: Optional["EncryptionSchema"]
|
|
18
19
|
|
|
19
20
|
device_id: Optional[str] = None
|
|
20
21
|
owner: Optional[str] = None
|
|
@@ -25,6 +26,10 @@ class DiscoveredDevice:
|
|
|
25
26
|
|
|
26
27
|
@staticmethod
|
|
27
28
|
def from_dict(values: dict[str, Any]) -> "DiscoveredDevice":
|
|
29
|
+
if enc_schema_info := values.get("mgt_encrypt_schm", None):
|
|
30
|
+
encryption_schema = EncryptionSchema(**enc_schema_info)
|
|
31
|
+
else:
|
|
32
|
+
encryption_schema = None
|
|
28
33
|
return DiscoveredDevice(
|
|
29
34
|
device_type=values.get("device_type", values.get("device_type_text")),
|
|
30
35
|
device_model=values.get("device_model", values.get("model")),
|
|
@@ -36,7 +41,7 @@ class DiscoveredDevice:
|
|
|
36
41
|
is_support_iot_cloud=values.get("is_support_iot_cloud", None),
|
|
37
42
|
obd_src=values.get("obd_src", None),
|
|
38
43
|
factory_default=values.get("factory_default", None),
|
|
39
|
-
mgt_encrypt_schm=
|
|
44
|
+
mgt_encrypt_schm=encryption_schema,
|
|
40
45
|
)
|
|
41
46
|
|
|
42
47
|
@property
|
|
@@ -56,25 +61,37 @@ class DiscoveredDevice:
|
|
|
56
61
|
"encrypt_type": self.mgt_encrypt_schm.encrypt_type,
|
|
57
62
|
"http_port": self.mgt_encrypt_schm.http_port,
|
|
58
63
|
"lv": self.mgt_encrypt_schm.lv,
|
|
59
|
-
}
|
|
64
|
+
}
|
|
65
|
+
if self.mgt_encrypt_schm is not None
|
|
66
|
+
else None,
|
|
60
67
|
}
|
|
61
68
|
|
|
62
69
|
async def get_tapo_device(
|
|
63
70
|
self, credentials: AuthCredential, session: Optional[aiohttp.ClientSession] = None
|
|
64
71
|
) -> TapoDevice:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
72
|
+
if encrypt_schema := self.mgt_encrypt_schm:
|
|
73
|
+
config = DeviceConnectConfiguration(
|
|
74
|
+
host=self.ip,
|
|
75
|
+
port=encrypt_schema.http_port,
|
|
76
|
+
credentials=credentials,
|
|
77
|
+
device_type=self.device_type,
|
|
78
|
+
encryption_type=encrypt_schema.encrypt_type,
|
|
79
|
+
encryption_version=encrypt_schema.lv,
|
|
80
|
+
)
|
|
81
|
+
else:
|
|
82
|
+
logging.warning(
|
|
83
|
+
"No encryption schema found for discovered device {}, {}",
|
|
84
|
+
self.ip,
|
|
85
|
+
self.device_type,
|
|
86
|
+
)
|
|
87
|
+
config = DeviceConnectConfiguration(
|
|
88
|
+
host=self.ip, port=80, device_type=self.device_type
|
|
89
|
+
)
|
|
73
90
|
return await connect(config, session)
|
|
74
91
|
|
|
75
92
|
|
|
76
93
|
@dataclasses.dataclass
|
|
77
|
-
class
|
|
94
|
+
class EncryptionSchema:
|
|
78
95
|
"""Base model for encryption scheme of discovery result."""
|
|
79
96
|
|
|
80
97
|
is_support_https: Optional[bool] = None
|
|
@@ -52,7 +52,7 @@ class ChildDeviceList(object):
|
|
|
52
52
|
)
|
|
53
53
|
|
|
54
54
|
def get_next_index(self) -> int:
|
|
55
|
-
return self.start_index + len(self.child_device_list)
|
|
55
|
+
return self.start_index + len(self.child_device_list)
|
|
56
56
|
|
|
57
57
|
def has_next(self) -> bool:
|
|
58
58
|
return self.get_next_index() < self.sum
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import unittest
|
|
2
2
|
|
|
3
3
|
from plugp100.new.device_factory import connect
|
|
4
|
-
from plugp100.new.
|
|
4
|
+
from plugp100.new.tapoplug import TapoPlug
|
|
5
5
|
from tests.integration.tapo_test_helper import (
|
|
6
6
|
_test_expose_device_info,
|
|
7
7
|
get_test_config,
|
|
@@ -14,7 +14,7 @@ class PowerStripTest(unittest.IsolatedAsyncioTestCase):
|
|
|
14
14
|
|
|
15
15
|
async def asyncSetUp(self) -> None:
|
|
16
16
|
connect_config = await get_test_config(device_type="power_strip")
|
|
17
|
-
self._device:
|
|
17
|
+
self._device: TapoPlug = await connect(connect_config)
|
|
18
18
|
await self._device.update()
|
|
19
19
|
|
|
20
20
|
async def asyncTearDown(self):
|
|
@@ -6,7 +6,7 @@ import unittest
|
|
|
6
6
|
from cryptography.hazmat.primitives import serialization, hashes
|
|
7
7
|
from cryptography.hazmat.primitives.asymmetric import padding
|
|
8
8
|
|
|
9
|
-
from plugp100.discovery.discovered_device import DiscoveredDevice,
|
|
9
|
+
from plugp100.discovery.discovered_device import DiscoveredDevice, EncryptionSchema
|
|
10
10
|
from plugp100.discovery.tapo_discovery import (
|
|
11
11
|
TapoDiscovery,
|
|
12
12
|
_build_packet_for_payload_json,
|
|
@@ -88,7 +88,7 @@ class TapoDiscoveryTest(unittest.TestCase):
|
|
|
88
88
|
device_model="P105(IT)",
|
|
89
89
|
ip="192.168.1.3",
|
|
90
90
|
mac="9C-53-22-A7-C8-35",
|
|
91
|
-
mgt_encrypt_schm=
|
|
91
|
+
mgt_encrypt_schm=EncryptionSchema(
|
|
92
92
|
is_support_https=False, encrypt_type="KLAP", http_port=80, lv=2
|
|
93
93
|
),
|
|
94
94
|
device_id="26d9887af76f0d5facf8febeb20f6ec9",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from plugp100.new.device_type import DeviceType
|
|
2
2
|
from plugp100.new.tapohub import TapoHub
|
|
3
|
-
from tests.conftest import hub
|
|
3
|
+
from tests.conftest import hub, hub_lot_devices
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
@hub
|
|
@@ -40,3 +40,8 @@ async def test_get_alarm_tones(device: TapoHub):
|
|
|
40
40
|
if device.has_alarm:
|
|
41
41
|
tones = (await device.get_supported_alarm_tones()).get_or_raise()
|
|
42
42
|
assert len(tones.tones) > 0
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@hub_lot_devices
|
|
46
|
+
async def test_should_get_all_children(device: TapoHub):
|
|
47
|
+
assert len(device.children) == 17
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/api/requests/secure_passthrough_params.py
RENAMED
|
File without changes
|
{plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/api/requests/set_device_info/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/components/hub_children_component.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/components/light_effect_component.py
RENAMED
|
File without changes
|
{plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/components/motion_sensor_component.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/components/report_mode_component.py
RENAMED
|
File without changes
|
|
File without changes
|
{plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/components/socket_children_component.py
RENAMED
|
File without changes
|
{plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/components/temperature_component.py
RENAMED
|
File without changes
|
{plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/components/temperature_humidity_records.py
RENAMED
|
File without changes
|
{plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/components/trigger_log_component.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/new/event_polling/event_subscription.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/protocol/klap/klap_handshake_revision.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/protocol/securepassthrough_transport.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/hub_childs/hub_child_base_info.py
RENAMED
|
File without changes
|
{plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/hub_childs/ke100_device_state.py
RENAMED
|
File without changes
|
{plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/hub_childs/leak_device_state.py
RENAMED
|
File without changes
|
{plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/hub_childs/s200b_device_state.py
RENAMED
|
File without changes
|
|
File without changes
|
{plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/hub_childs/t100_device_state.py
RENAMED
|
File without changes
|
{plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/hub_childs/t110_device_state.py
RENAMED
|
File without changes
|
{plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/hub_childs/t31x_device_state.py
RENAMED
|
File without changes
|
{plugp100-5.0.0.dev4 → plugp100-5.0.0.dev5}/plugp100/responses/hub_childs/trigger_log_response.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|