mirror of
https://github.com/python-kasa/python-kasa.git
synced 2026-04-17 13:27:46 +00:00
Move tests folder to top level of project (#1242)
This commit is contained in:
@@ -1,142 +0,0 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import sys
|
||||
import warnings
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
from kasa import (
|
||||
DeviceConfig,
|
||||
SmartProtocol,
|
||||
)
|
||||
from kasa.protocol import BaseTransport
|
||||
|
||||
from .device_fixtures import * # noqa: F403
|
||||
from .discovery_fixtures import * # noqa: F403
|
||||
|
||||
# Parametrize tests to run with device both on and off
|
||||
turn_on = pytest.mark.parametrize("turn_on", [True, False])
|
||||
|
||||
|
||||
async def handle_turn_on(dev, turn_on):
|
||||
if turn_on:
|
||||
await dev.turn_on()
|
||||
else:
|
||||
await dev.turn_off()
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def dummy_protocol():
|
||||
"""Return a smart protocol instance with a mocking-ready dummy transport."""
|
||||
|
||||
class DummyTransport(BaseTransport):
|
||||
@property
|
||||
def default_port(self) -> int:
|
||||
return -1
|
||||
|
||||
@property
|
||||
def credentials_hash(self) -> str:
|
||||
return "dummy hash"
|
||||
|
||||
async def send(self, request: str) -> dict:
|
||||
return {}
|
||||
|
||||
async def close(self) -> None:
|
||||
pass
|
||||
|
||||
async def reset(self) -> None:
|
||||
pass
|
||||
|
||||
transport = DummyTransport(config=DeviceConfig(host="127.0.0.123"))
|
||||
protocol = SmartProtocol(transport=transport)
|
||||
with patch.object(protocol, "BACKOFF_SECONDS_AFTER_TIMEOUT", 0):
|
||||
yield protocol
|
||||
|
||||
|
||||
def pytest_configure():
|
||||
pytest.fixtures_missing_methods = {}
|
||||
|
||||
|
||||
def pytest_sessionfinish(session, exitstatus):
|
||||
if not pytest.fixtures_missing_methods:
|
||||
return
|
||||
msg = "\n"
|
||||
for fixture, methods in sorted(pytest.fixtures_missing_methods.items()):
|
||||
method_list = ", ".join(methods)
|
||||
msg += f"Fixture {fixture} missing: {method_list}\n"
|
||||
|
||||
warnings.warn(
|
||||
UserWarning(msg),
|
||||
stacklevel=1,
|
||||
)
|
||||
|
||||
|
||||
def pytest_addoption(parser):
|
||||
parser.addoption(
|
||||
"--ip", action="store", default=None, help="run against device on given ip"
|
||||
)
|
||||
parser.addoption(
|
||||
"--username", action="store", default=None, help="authentication username"
|
||||
)
|
||||
parser.addoption(
|
||||
"--password", action="store", default=None, help="authentication password"
|
||||
)
|
||||
|
||||
|
||||
def pytest_collection_modifyitems(config, items):
|
||||
if not config.getoption("--ip"):
|
||||
print("Testing against fixtures.")
|
||||
# pytest_socket doesn't work properly in windows with asyncio
|
||||
# fine to disable as other platforms will pickup any issues.
|
||||
if sys.platform == "win32":
|
||||
for item in items:
|
||||
item.add_marker(pytest.mark.enable_socket)
|
||||
else:
|
||||
print("Running against ip %s" % config.getoption("--ip"))
|
||||
requires_dummy = pytest.mark.skip(
|
||||
reason="test requires to be run against dummy data"
|
||||
)
|
||||
for item in items:
|
||||
if "requires_dummy" in item.keywords:
|
||||
item.add_marker(requires_dummy)
|
||||
else:
|
||||
item.add_marker(pytest.mark.enable_socket)
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True, scope="session")
|
||||
def asyncio_sleep_fixture(request): # noqa: PT004
|
||||
"""Patch sleep to prevent tests actually waiting."""
|
||||
orig_asyncio_sleep = asyncio.sleep
|
||||
|
||||
async def _asyncio_sleep(*_, **__):
|
||||
await orig_asyncio_sleep(0)
|
||||
|
||||
if request.config.getoption("--ip"):
|
||||
yield
|
||||
else:
|
||||
with patch("asyncio.sleep", side_effect=_asyncio_sleep):
|
||||
yield
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True, scope="session")
|
||||
def mock_datagram_endpoint(request): # noqa: PT004
|
||||
"""Mock create_datagram_endpoint so it doesn't perform io."""
|
||||
|
||||
async def _create_datagram_endpoint(protocol_factory, *_, **__):
|
||||
protocol = protocol_factory()
|
||||
transport = MagicMock()
|
||||
try:
|
||||
return transport, protocol
|
||||
finally:
|
||||
protocol.connection_made(transport)
|
||||
|
||||
if request.config.getoption("--ip"):
|
||||
yield
|
||||
else:
|
||||
with patch(
|
||||
"asyncio.BaseEventLoop.create_datagram_endpoint",
|
||||
side_effect=_create_datagram_endpoint,
|
||||
):
|
||||
yield
|
||||
@@ -1,492 +0,0 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import AsyncGenerator
|
||||
|
||||
import pytest
|
||||
|
||||
from kasa import (
|
||||
Credentials,
|
||||
Device,
|
||||
DeviceType,
|
||||
Discover,
|
||||
)
|
||||
from kasa.experimental.smartcamera import SmartCamera
|
||||
from kasa.iot import IotBulb, IotDimmer, IotLightStrip, IotPlug, IotStrip, IotWallSwitch
|
||||
from kasa.smart import SmartDevice
|
||||
|
||||
from .fakeprotocol_iot import FakeIotProtocol
|
||||
from .fakeprotocol_smart import FakeSmartProtocol
|
||||
from .fakeprotocol_smartcamera import FakeSmartCameraProtocol
|
||||
from .fixtureinfo import (
|
||||
FIXTURE_DATA,
|
||||
ComponentFilter,
|
||||
FixtureInfo,
|
||||
filter_fixtures,
|
||||
idgenerator,
|
||||
)
|
||||
|
||||
# Tapo bulbs
|
||||
BULBS_SMART_VARIABLE_TEMP = {"L530E", "L930-5"}
|
||||
BULBS_SMART_LIGHT_STRIP = {"L900-5", "L900-10", "L920-5", "L930-5"}
|
||||
BULBS_SMART_COLOR = {"L530E", *BULBS_SMART_LIGHT_STRIP}
|
||||
BULBS_SMART_DIMMABLE = {"L510B", "L510E"}
|
||||
BULBS_SMART = (
|
||||
BULBS_SMART_VARIABLE_TEMP.union(BULBS_SMART_COLOR)
|
||||
.union(BULBS_SMART_DIMMABLE)
|
||||
.union(BULBS_SMART_LIGHT_STRIP)
|
||||
)
|
||||
|
||||
# Kasa (IOT-prefixed) bulbs
|
||||
BULBS_IOT_LIGHT_STRIP = {"KL400L5", "KL430", "KL420L5"}
|
||||
BULBS_IOT_VARIABLE_TEMP = {
|
||||
"LB120",
|
||||
"LB130",
|
||||
"KL120",
|
||||
"KL125",
|
||||
"KL130",
|
||||
"KL135",
|
||||
"KL430",
|
||||
}
|
||||
BULBS_IOT_COLOR = {"LB130", "KL125", "KL130", "KL135", *BULBS_IOT_LIGHT_STRIP}
|
||||
BULBS_IOT_DIMMABLE = {"KL50", "KL60", "LB100", "LB110", "KL110"}
|
||||
BULBS_IOT = (
|
||||
BULBS_IOT_VARIABLE_TEMP.union(BULBS_IOT_COLOR)
|
||||
.union(BULBS_IOT_DIMMABLE)
|
||||
.union(BULBS_IOT_LIGHT_STRIP)
|
||||
)
|
||||
|
||||
BULBS_VARIABLE_TEMP = {*BULBS_SMART_VARIABLE_TEMP, *BULBS_IOT_VARIABLE_TEMP}
|
||||
BULBS_COLOR = {*BULBS_SMART_COLOR, *BULBS_IOT_COLOR}
|
||||
|
||||
|
||||
LIGHT_STRIPS = {*BULBS_SMART_LIGHT_STRIP, *BULBS_IOT_LIGHT_STRIP}
|
||||
BULBS = {
|
||||
*BULBS_IOT,
|
||||
*BULBS_SMART,
|
||||
}
|
||||
|
||||
|
||||
PLUGS_IOT = {
|
||||
"HS100",
|
||||
"HS103",
|
||||
"HS105",
|
||||
"HS110",
|
||||
"EP10",
|
||||
"KP100",
|
||||
"KP105",
|
||||
"KP115",
|
||||
"KP125",
|
||||
"KP401",
|
||||
}
|
||||
# P135 supports dimming, but its not currently support
|
||||
# by the library
|
||||
PLUGS_SMART = {
|
||||
"P100",
|
||||
"P110",
|
||||
"P115",
|
||||
"KP125M",
|
||||
"EP25",
|
||||
"P125M",
|
||||
"TP15",
|
||||
}
|
||||
PLUGS = {
|
||||
*PLUGS_IOT,
|
||||
*PLUGS_SMART,
|
||||
}
|
||||
SWITCHES_IOT = {
|
||||
"HS200",
|
||||
"HS210",
|
||||
"KS200M",
|
||||
}
|
||||
SWITCHES_SMART = {
|
||||
"KS205",
|
||||
"KS225",
|
||||
"KS240",
|
||||
"S500D",
|
||||
"S505",
|
||||
"S505D",
|
||||
}
|
||||
SWITCHES = {*SWITCHES_IOT, *SWITCHES_SMART}
|
||||
STRIPS_IOT = {"HS107", "HS300", "KP303", "KP200", "KP400", "EP40"}
|
||||
STRIPS_SMART = {"P300", "P304M", "TP25", "EP40M"}
|
||||
STRIPS = {*STRIPS_IOT, *STRIPS_SMART}
|
||||
|
||||
DIMMERS_IOT = {"ES20M", "HS220", "KS220", "KS220M", "KS230", "KP405"}
|
||||
DIMMERS_SMART = {"HS220", "KS225", "S500D", "P135"}
|
||||
DIMMERS = {
|
||||
*DIMMERS_IOT,
|
||||
*DIMMERS_SMART,
|
||||
}
|
||||
|
||||
HUBS_SMART = {"H100", "KH100"}
|
||||
SENSORS_SMART = {"T310", "T315", "T300", "T100", "T110", "S200B", "S200D"}
|
||||
THERMOSTATS_SMART = {"KE100"}
|
||||
|
||||
WITH_EMETER_IOT = {"HS110", "HS300", "KP115", "KP125", *BULBS_IOT}
|
||||
WITH_EMETER_SMART = {"P110", "P115", "KP125M", "EP25", "P304M"}
|
||||
WITH_EMETER = {*WITH_EMETER_IOT, *WITH_EMETER_SMART}
|
||||
|
||||
DIMMABLE = {*BULBS, *DIMMERS}
|
||||
|
||||
ALL_DEVICES_IOT = (
|
||||
BULBS_IOT.union(PLUGS_IOT).union(STRIPS_IOT).union(DIMMERS_IOT).union(SWITCHES_IOT)
|
||||
)
|
||||
ALL_DEVICES_SMART = (
|
||||
BULBS_SMART.union(PLUGS_SMART)
|
||||
.union(STRIPS_SMART)
|
||||
.union(DIMMERS_SMART)
|
||||
.union(HUBS_SMART)
|
||||
.union(SENSORS_SMART)
|
||||
.union(SWITCHES_SMART)
|
||||
.union(THERMOSTATS_SMART)
|
||||
)
|
||||
ALL_DEVICES = ALL_DEVICES_IOT.union(ALL_DEVICES_SMART)
|
||||
|
||||
IP_MODEL_CACHE: dict[str, str] = {}
|
||||
|
||||
|
||||
def parametrize_combine(parametrized: list[pytest.MarkDecorator]):
|
||||
"""Combine multiple pytest parametrize dev marks into one set of fixtures."""
|
||||
fixtures = set()
|
||||
for param in parametrized:
|
||||
if param.args[0] != "dev":
|
||||
raise Exception(f"Supplied mark is not for dev fixture: {param.args[0]}")
|
||||
fixtures.update(param.args[1])
|
||||
return pytest.mark.parametrize(
|
||||
"dev",
|
||||
sorted(list(fixtures)),
|
||||
indirect=True,
|
||||
ids=idgenerator,
|
||||
)
|
||||
|
||||
|
||||
def parametrize_subtract(params: pytest.MarkDecorator, subtract: pytest.MarkDecorator):
|
||||
"""Combine multiple pytest parametrize dev marks into one set of fixtures."""
|
||||
if params.args[0] != "dev" or subtract.args[0] != "dev":
|
||||
raise Exception(
|
||||
f"Supplied mark is not for dev fixture: {params.args[0]} {subtract.args[0]}"
|
||||
)
|
||||
fixtures = []
|
||||
for param in params.args[1]:
|
||||
if param not in subtract.args[1]:
|
||||
fixtures.append(param)
|
||||
return pytest.mark.parametrize(
|
||||
"dev",
|
||||
sorted(fixtures),
|
||||
indirect=True,
|
||||
ids=idgenerator,
|
||||
)
|
||||
|
||||
|
||||
def parametrize(
|
||||
desc,
|
||||
*,
|
||||
model_filter=None,
|
||||
protocol_filter=None,
|
||||
component_filter: str | ComponentFilter | None = None,
|
||||
data_root_filter=None,
|
||||
device_type_filter=None,
|
||||
ids=None,
|
||||
):
|
||||
if ids is None:
|
||||
ids = idgenerator
|
||||
return pytest.mark.parametrize(
|
||||
"dev",
|
||||
filter_fixtures(
|
||||
desc,
|
||||
model_filter=model_filter,
|
||||
protocol_filter=protocol_filter,
|
||||
component_filter=component_filter,
|
||||
data_root_filter=data_root_filter,
|
||||
device_type_filter=device_type_filter,
|
||||
),
|
||||
indirect=True,
|
||||
ids=ids,
|
||||
)
|
||||
|
||||
|
||||
has_emeter = parametrize(
|
||||
"has emeter", model_filter=WITH_EMETER, protocol_filter={"SMART", "IOT"}
|
||||
)
|
||||
no_emeter = parametrize(
|
||||
"no emeter",
|
||||
model_filter=ALL_DEVICES - WITH_EMETER,
|
||||
protocol_filter={"SMART", "IOT"},
|
||||
)
|
||||
has_emeter_iot = parametrize(
|
||||
"has emeter iot", model_filter=WITH_EMETER_IOT, protocol_filter={"IOT"}
|
||||
)
|
||||
no_emeter_iot = parametrize(
|
||||
"no emeter iot",
|
||||
model_filter=ALL_DEVICES_IOT - WITH_EMETER_IOT,
|
||||
protocol_filter={"IOT"},
|
||||
)
|
||||
|
||||
plug = parametrize("plugs", model_filter=PLUGS, protocol_filter={"IOT", "SMART"})
|
||||
plug_iot = parametrize("plugs iot", model_filter=PLUGS, protocol_filter={"IOT"})
|
||||
wallswitch = parametrize(
|
||||
"wall switches", model_filter=SWITCHES, protocol_filter={"IOT", "SMART"}
|
||||
)
|
||||
wallswitch_iot = parametrize(
|
||||
"wall switches iot", model_filter=SWITCHES, protocol_filter={"IOT"}
|
||||
)
|
||||
strip = parametrize("strips", model_filter=STRIPS, protocol_filter={"SMART", "IOT"})
|
||||
dimmer_iot = parametrize("dimmers", model_filter=DIMMERS, protocol_filter={"IOT"})
|
||||
lightstrip_iot = parametrize(
|
||||
"lightstrips", model_filter=LIGHT_STRIPS, protocol_filter={"IOT"}
|
||||
)
|
||||
|
||||
# bulb types
|
||||
dimmable_iot = parametrize("dimmable", model_filter=DIMMABLE, protocol_filter={"IOT"})
|
||||
non_dimmable_iot = parametrize(
|
||||
"non-dimmable", model_filter=BULBS - DIMMABLE, protocol_filter={"IOT"}
|
||||
)
|
||||
variable_temp = parametrize(
|
||||
"variable color temp",
|
||||
model_filter=BULBS_VARIABLE_TEMP,
|
||||
protocol_filter={"SMART", "IOT"},
|
||||
)
|
||||
non_variable_temp = parametrize(
|
||||
"non-variable color temp",
|
||||
model_filter=BULBS - BULBS_VARIABLE_TEMP,
|
||||
protocol_filter={"SMART", "IOT"},
|
||||
)
|
||||
color_bulb = parametrize(
|
||||
"color bulbs", model_filter=BULBS_COLOR, protocol_filter={"SMART", "IOT"}
|
||||
)
|
||||
non_color_bulb = parametrize(
|
||||
"non-color bulbs",
|
||||
model_filter=BULBS - BULBS_COLOR,
|
||||
protocol_filter={"SMART", "IOT"},
|
||||
)
|
||||
|
||||
color_bulb_iot = parametrize(
|
||||
"color bulbs iot", model_filter=BULBS_IOT_COLOR, protocol_filter={"IOT"}
|
||||
)
|
||||
variable_temp_iot = parametrize(
|
||||
"variable color temp iot",
|
||||
model_filter=BULBS_IOT_VARIABLE_TEMP,
|
||||
protocol_filter={"IOT"},
|
||||
)
|
||||
variable_temp_smart = parametrize(
|
||||
"variable color temp smart",
|
||||
model_filter=BULBS_SMART_VARIABLE_TEMP,
|
||||
protocol_filter={"SMART"},
|
||||
)
|
||||
|
||||
bulb_smart = parametrize(
|
||||
"bulb devices smart",
|
||||
device_type_filter=[DeviceType.Bulb, DeviceType.LightStrip],
|
||||
protocol_filter={"SMART"},
|
||||
)
|
||||
bulb_iot = parametrize(
|
||||
"bulb devices iot", model_filter=BULBS_IOT, protocol_filter={"IOT"}
|
||||
)
|
||||
bulb = parametrize_combine([bulb_smart, bulb_iot])
|
||||
|
||||
strip_iot = parametrize(
|
||||
"strip devices iot", model_filter=STRIPS_IOT, protocol_filter={"IOT"}
|
||||
)
|
||||
strip_smart = parametrize(
|
||||
"strip devices smart", model_filter=STRIPS_SMART, protocol_filter={"SMART"}
|
||||
)
|
||||
|
||||
plug_smart = parametrize(
|
||||
"plug devices smart", model_filter=PLUGS_SMART, protocol_filter={"SMART"}
|
||||
)
|
||||
switch_smart = parametrize(
|
||||
"switch devices smart", model_filter=SWITCHES_SMART, protocol_filter={"SMART"}
|
||||
)
|
||||
dimmers_smart = parametrize(
|
||||
"dimmer devices smart", model_filter=DIMMERS_SMART, protocol_filter={"SMART"}
|
||||
)
|
||||
hubs_smart = parametrize(
|
||||
"hubs smart", model_filter=HUBS_SMART, protocol_filter={"SMART"}
|
||||
)
|
||||
sensors_smart = parametrize(
|
||||
"sensors smart", model_filter=SENSORS_SMART, protocol_filter={"SMART.CHILD"}
|
||||
)
|
||||
thermostats_smart = parametrize(
|
||||
"thermostats smart", model_filter=THERMOSTATS_SMART, protocol_filter={"SMART.CHILD"}
|
||||
)
|
||||
device_smart = parametrize(
|
||||
"devices smart", model_filter=ALL_DEVICES_SMART, protocol_filter={"SMART"}
|
||||
)
|
||||
device_iot = parametrize(
|
||||
"devices iot", model_filter=ALL_DEVICES_IOT, protocol_filter={"IOT"}
|
||||
)
|
||||
device_smartcamera = parametrize("devices smartcamera", protocol_filter={"SMARTCAMERA"})
|
||||
camera_smartcamera = parametrize(
|
||||
"camera smartcamera",
|
||||
device_type_filter=[DeviceType.Camera],
|
||||
protocol_filter={"SMARTCAMERA"},
|
||||
)
|
||||
hub_smartcamera = parametrize(
|
||||
"hub smartcamera",
|
||||
device_type_filter=[DeviceType.Hub],
|
||||
protocol_filter={"SMARTCAMERA"},
|
||||
)
|
||||
|
||||
|
||||
def check_categories():
|
||||
"""Check that every fixture file is categorized."""
|
||||
categorized_fixtures = set(
|
||||
dimmer_iot.args[1]
|
||||
+ strip.args[1]
|
||||
+ plug.args[1]
|
||||
+ bulb.args[1]
|
||||
+ wallswitch.args[1]
|
||||
+ lightstrip_iot.args[1]
|
||||
+ bulb_smart.args[1]
|
||||
+ dimmers_smart.args[1]
|
||||
+ hubs_smart.args[1]
|
||||
+ sensors_smart.args[1]
|
||||
+ thermostats_smart.args[1]
|
||||
+ camera_smartcamera.args[1]
|
||||
+ hub_smartcamera.args[1]
|
||||
)
|
||||
diffs: set[FixtureInfo] = set(FIXTURE_DATA) - set(categorized_fixtures)
|
||||
if diffs:
|
||||
print(diffs)
|
||||
for diff in diffs:
|
||||
print(
|
||||
f"No category for file {diff.name} protocol {diff.protocol}, add to the corresponding set (BULBS, PLUGS, ..)"
|
||||
)
|
||||
raise Exception(f"Missing category for {diff.name}")
|
||||
|
||||
|
||||
check_categories()
|
||||
|
||||
|
||||
def device_for_fixture_name(model, protocol):
|
||||
if protocol in {"SMART", "SMART.CHILD"}:
|
||||
return SmartDevice
|
||||
elif protocol == "SMARTCAMERA":
|
||||
return SmartCamera
|
||||
else:
|
||||
for d in STRIPS_IOT:
|
||||
if d in model:
|
||||
return IotStrip
|
||||
|
||||
for d in PLUGS_IOT:
|
||||
if d in model:
|
||||
return IotPlug
|
||||
for d in SWITCHES_IOT:
|
||||
if d in model:
|
||||
return IotWallSwitch
|
||||
|
||||
# Light strips are recognized also as bulbs, so this has to go first
|
||||
for d in BULBS_IOT_LIGHT_STRIP:
|
||||
if d in model:
|
||||
return IotLightStrip
|
||||
|
||||
for d in BULBS_IOT:
|
||||
if d in model:
|
||||
return IotBulb
|
||||
|
||||
for d in DIMMERS_IOT:
|
||||
if d in model:
|
||||
return IotDimmer
|
||||
|
||||
raise Exception("Unable to find type for %s", model)
|
||||
|
||||
|
||||
async def _update_and_close(d) -> Device:
|
||||
await d.update()
|
||||
await d.protocol.close()
|
||||
return d
|
||||
|
||||
|
||||
async def _discover_update_and_close(ip, username, password) -> Device:
|
||||
if username and password:
|
||||
credentials = Credentials(username=username, password=password)
|
||||
else:
|
||||
credentials = None
|
||||
d = await Discover.discover_single(ip, timeout=10, credentials=credentials)
|
||||
return await _update_and_close(d)
|
||||
|
||||
|
||||
async def get_device_for_fixture(fixture_data: FixtureInfo) -> Device:
|
||||
# if the wanted file is not an absolute path, prepend the fixtures directory
|
||||
|
||||
d = device_for_fixture_name(fixture_data.name, fixture_data.protocol)(
|
||||
host="127.0.0.123"
|
||||
)
|
||||
if fixture_data.protocol in {"SMART", "SMART.CHILD"}:
|
||||
d.protocol = FakeSmartProtocol(fixture_data.data, fixture_data.name)
|
||||
elif fixture_data.protocol == "SMARTCAMERA":
|
||||
d.protocol = FakeSmartCameraProtocol(fixture_data.data, fixture_data.name)
|
||||
else:
|
||||
d.protocol = FakeIotProtocol(fixture_data.data)
|
||||
|
||||
discovery_data = None
|
||||
if "discovery_result" in fixture_data.data:
|
||||
discovery_data = {"result": fixture_data.data["discovery_result"]}
|
||||
elif "system" in fixture_data.data:
|
||||
discovery_data = {
|
||||
"system": {"get_sysinfo": fixture_data.data["system"]["get_sysinfo"]}
|
||||
}
|
||||
|
||||
if discovery_data: # Child devices do not have discovery info
|
||||
d.update_from_discover_info(discovery_data)
|
||||
|
||||
await _update_and_close(d)
|
||||
return d
|
||||
|
||||
|
||||
async def get_device_for_fixture_protocol(fixture, protocol):
|
||||
finfo = FixtureInfo(name=fixture, protocol=protocol, data={})
|
||||
for fixture_info in FIXTURE_DATA:
|
||||
if finfo == fixture_info:
|
||||
return await get_device_for_fixture(fixture_info)
|
||||
|
||||
|
||||
def get_fixture_info(fixture, protocol):
|
||||
finfo = FixtureInfo(name=fixture, protocol=protocol, data={})
|
||||
for fixture_info in FIXTURE_DATA:
|
||||
if finfo == fixture_info:
|
||||
return fixture_info
|
||||
|
||||
|
||||
@pytest.fixture(params=filter_fixtures("main devices"), ids=idgenerator)
|
||||
async def dev(request) -> AsyncGenerator[Device, None]:
|
||||
"""Device fixture.
|
||||
|
||||
Provides a device (given --ip) or parametrized fixture for the supported devices.
|
||||
The initial update is called automatically before returning the device.
|
||||
"""
|
||||
fixture_data: FixtureInfo = request.param
|
||||
dev: Device
|
||||
|
||||
ip = request.config.getoption("--ip")
|
||||
username = request.config.getoption("--username")
|
||||
password = request.config.getoption("--password")
|
||||
if ip:
|
||||
model = IP_MODEL_CACHE.get(ip)
|
||||
d = None
|
||||
if not model:
|
||||
d = await _discover_update_and_close(ip, username, password)
|
||||
IP_MODEL_CACHE[ip] = model = d.model
|
||||
|
||||
if model not in fixture_data.name:
|
||||
pytest.skip(f"skipping file {fixture_data.name}")
|
||||
dev = d if d else await _discover_update_and_close(ip, username, password)
|
||||
else:
|
||||
dev = await get_device_for_fixture(fixture_data)
|
||||
|
||||
yield dev
|
||||
|
||||
await dev.disconnect()
|
||||
|
||||
|
||||
def get_parent_and_child_modules(device: Device, module_name):
|
||||
"""Return iterator of module if exists on parent and children.
|
||||
|
||||
Useful for testing devices that have components listed on the parent that are only
|
||||
supported on the children, i.e. ks240.
|
||||
"""
|
||||
if module_name in device.modules:
|
||||
yield device.modules[module_name]
|
||||
for child in device.children:
|
||||
if module_name in child.modules:
|
||||
yield child.modules[module_name]
|
||||
@@ -1,280 +0,0 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import copy
|
||||
from dataclasses import dataclass
|
||||
from json import dumps as json_dumps
|
||||
|
||||
import pytest
|
||||
|
||||
from kasa.xortransport import XorEncryption
|
||||
|
||||
from .fakeprotocol_iot import FakeIotProtocol
|
||||
from .fakeprotocol_smart import FakeSmartProtocol, FakeSmartTransport
|
||||
from .fixtureinfo import FixtureInfo, filter_fixtures, idgenerator
|
||||
|
||||
DISCOVERY_MOCK_IP = "127.0.0.123"
|
||||
|
||||
|
||||
def _make_unsupported(device_family, encrypt_type, *, omit_keys=None):
|
||||
if omit_keys is None:
|
||||
omit_keys = {"encrypt_info": None}
|
||||
result = {
|
||||
"result": {
|
||||
"device_id": "xx",
|
||||
"owner": "xx",
|
||||
"device_type": device_family,
|
||||
"device_model": "P110(EU)",
|
||||
"ip": "127.0.0.1",
|
||||
"mac": "48-22xxx",
|
||||
"is_support_iot_cloud": True,
|
||||
"obd_src": "tplink",
|
||||
"factory_default": False,
|
||||
"mgt_encrypt_schm": {
|
||||
"is_support_https": False,
|
||||
"encrypt_type": encrypt_type,
|
||||
"http_port": 80,
|
||||
"lv": 2,
|
||||
},
|
||||
"encrypt_info": {"data": "", "key": "", "sym_schm": encrypt_type},
|
||||
},
|
||||
"error_code": 0,
|
||||
}
|
||||
for key, val in omit_keys.items():
|
||||
if val is None:
|
||||
result["result"].pop(key)
|
||||
else:
|
||||
result["result"][key].pop(val)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
UNSUPPORTED_DEVICES = {
|
||||
"unknown_device_family": _make_unsupported("SMART.TAPOXMASTREE", "AES"),
|
||||
"wrong_encryption_iot": _make_unsupported("IOT.SMARTPLUGSWITCH", "AES"),
|
||||
"wrong_encryption_smart": _make_unsupported("SMART.TAPOBULB", "IOT"),
|
||||
"unknown_encryption": _make_unsupported("IOT.SMARTPLUGSWITCH", "FOO"),
|
||||
"missing_encrypt_type": _make_unsupported(
|
||||
"SMART.TAPOBULB",
|
||||
"FOO",
|
||||
omit_keys={"mgt_encrypt_schm": "encrypt_type", "encrypt_info": None},
|
||||
),
|
||||
"unable_to_parse": _make_unsupported(
|
||||
"SMART.TAPOBULB",
|
||||
"FOO",
|
||||
omit_keys={"mgt_encrypt_schm": None},
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
def parametrize_discovery(
|
||||
desc, *, data_root_filter=None, protocol_filter=None, model_filter=None
|
||||
):
|
||||
filtered_fixtures = filter_fixtures(
|
||||
desc,
|
||||
data_root_filter=data_root_filter,
|
||||
protocol_filter=protocol_filter,
|
||||
model_filter=model_filter,
|
||||
)
|
||||
return pytest.mark.parametrize(
|
||||
"discovery_mock",
|
||||
filtered_fixtures,
|
||||
indirect=True,
|
||||
ids=idgenerator,
|
||||
)
|
||||
|
||||
|
||||
new_discovery = parametrize_discovery(
|
||||
"new discovery", data_root_filter="discovery_result"
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(
|
||||
params=filter_fixtures("discoverable", protocol_filter={"SMART", "IOT"}),
|
||||
ids=idgenerator,
|
||||
)
|
||||
async def discovery_mock(request, mocker):
|
||||
"""Mock discovery and patch protocol queries to use Fake protocols."""
|
||||
fixture_info: FixtureInfo = request.param
|
||||
return patch_discovery({DISCOVERY_MOCK_IP: fixture_info}, mocker)
|
||||
|
||||
|
||||
def create_discovery_mock(ip: str, fixture_data: dict):
|
||||
"""Mock discovery and patch protocol queries to use Fake protocols."""
|
||||
|
||||
@dataclass
|
||||
class _DiscoveryMock:
|
||||
ip: str
|
||||
default_port: int
|
||||
discovery_port: int
|
||||
discovery_data: dict
|
||||
query_data: dict
|
||||
device_type: str
|
||||
encrypt_type: str
|
||||
https: bool
|
||||
login_version: int | None = None
|
||||
port_override: int | None = None
|
||||
|
||||
@property
|
||||
def _datagram(self) -> bytes:
|
||||
if self.default_port == 9999:
|
||||
return XorEncryption.encrypt(json_dumps(self.discovery_data))[4:]
|
||||
else:
|
||||
return (
|
||||
b"\x02\x00\x00\x01\x01[\x00\x00\x00\x00\x00\x00W\xcev\xf8"
|
||||
+ json_dumps(self.discovery_data).encode()
|
||||
)
|
||||
|
||||
if "discovery_result" in fixture_data:
|
||||
discovery_data = {"result": fixture_data["discovery_result"].copy()}
|
||||
device_type = fixture_data["discovery_result"]["device_type"]
|
||||
encrypt_type = fixture_data["discovery_result"]["mgt_encrypt_schm"][
|
||||
"encrypt_type"
|
||||
]
|
||||
login_version = fixture_data["discovery_result"]["mgt_encrypt_schm"].get("lv")
|
||||
https = fixture_data["discovery_result"]["mgt_encrypt_schm"]["is_support_https"]
|
||||
dm = _DiscoveryMock(
|
||||
ip,
|
||||
80,
|
||||
20002,
|
||||
discovery_data,
|
||||
fixture_data,
|
||||
device_type,
|
||||
encrypt_type,
|
||||
https,
|
||||
login_version,
|
||||
)
|
||||
else:
|
||||
sys_info = fixture_data["system"]["get_sysinfo"]
|
||||
discovery_data = {"system": {"get_sysinfo": sys_info.copy()}}
|
||||
device_type = sys_info.get("mic_type") or sys_info.get("type")
|
||||
encrypt_type = "XOR"
|
||||
login_version = None
|
||||
dm = _DiscoveryMock(
|
||||
ip,
|
||||
9999,
|
||||
9999,
|
||||
discovery_data,
|
||||
fixture_data,
|
||||
device_type,
|
||||
encrypt_type,
|
||||
False,
|
||||
login_version,
|
||||
)
|
||||
|
||||
return dm
|
||||
|
||||
|
||||
def patch_discovery(fixture_infos: dict[str, FixtureInfo], mocker):
|
||||
"""Mock discovery and patch protocol queries to use Fake protocols."""
|
||||
discovery_mocks = {
|
||||
ip: create_discovery_mock(ip, fixture_info.data)
|
||||
for ip, fixture_info in fixture_infos.items()
|
||||
}
|
||||
protos = {
|
||||
ip: FakeSmartProtocol(fixture_info.data, fixture_info.name)
|
||||
if "SMART" in fixture_info.protocol
|
||||
else FakeIotProtocol(fixture_info.data, fixture_info.name)
|
||||
for ip, fixture_info in fixture_infos.items()
|
||||
}
|
||||
first_ip = list(fixture_infos.keys())[0]
|
||||
first_host = None
|
||||
|
||||
async def mock_discover(self):
|
||||
"""Call datagram_received for all mock fixtures.
|
||||
|
||||
Handles test cases modifying the ip and hostname of the first fixture
|
||||
for discover_single testing.
|
||||
"""
|
||||
for ip, dm in discovery_mocks.items():
|
||||
first_ip = list(discovery_mocks.values())[0].ip
|
||||
fixture_info = fixture_infos[ip]
|
||||
# Ip of first fixture could have been modified by a test
|
||||
if dm.ip == first_ip:
|
||||
# hostname could have been used
|
||||
host = first_host if first_host else first_ip
|
||||
else:
|
||||
host = dm.ip
|
||||
# update the protos for any host testing or the test overriding the first ip
|
||||
protos[host] = (
|
||||
FakeSmartProtocol(fixture_info.data, fixture_info.name)
|
||||
if "SMART" in fixture_info.protocol
|
||||
else FakeIotProtocol(fixture_info.data, fixture_info.name)
|
||||
)
|
||||
port = (
|
||||
dm.port_override
|
||||
if dm.port_override and dm.discovery_port != 20002
|
||||
else dm.discovery_port
|
||||
)
|
||||
self.datagram_received(
|
||||
dm._datagram,
|
||||
(dm.ip, port),
|
||||
)
|
||||
|
||||
async def _query(self, request, retry_count: int = 3):
|
||||
return await protos[self._host].query(request)
|
||||
|
||||
def _getaddrinfo(host, *_, **__):
|
||||
nonlocal first_host, first_ip
|
||||
first_host = host # Store the hostname used by discover single
|
||||
first_ip = list(discovery_mocks.values())[
|
||||
0
|
||||
].ip # ip could have been overridden in test
|
||||
return [(None, None, None, None, (first_ip, 0))]
|
||||
|
||||
mocker.patch("kasa.IotProtocol.query", _query)
|
||||
mocker.patch("kasa.SmartProtocol.query", _query)
|
||||
mocker.patch("kasa.discover._DiscoverProtocol.do_discover", mock_discover)
|
||||
mocker.patch(
|
||||
"socket.getaddrinfo",
|
||||
# side_effect=lambda *_, **__: [(None, None, None, None, (first_ip, 0))],
|
||||
side_effect=_getaddrinfo,
|
||||
)
|
||||
# Only return the first discovery mock to be used for testing discover single
|
||||
return discovery_mocks[first_ip]
|
||||
|
||||
|
||||
@pytest.fixture(
|
||||
params=filter_fixtures("discoverable", protocol_filter={"SMART", "IOT"}),
|
||||
ids=idgenerator,
|
||||
)
|
||||
def discovery_data(request, mocker):
|
||||
"""Return raw discovery file contents as JSON. Used for discovery tests."""
|
||||
fixture_info = request.param
|
||||
fixture_data = copy.deepcopy(fixture_info.data)
|
||||
# Add missing queries to fixture data
|
||||
if "component_nego" in fixture_data:
|
||||
components = {
|
||||
comp["id"]: int(comp["ver_code"])
|
||||
for comp in fixture_data["component_nego"]["component_list"]
|
||||
}
|
||||
for k, v in FakeSmartTransport.FIXTURE_MISSING_MAP.items():
|
||||
# Value is a tuple of component,reponse
|
||||
if k not in fixture_data and v[0] in components:
|
||||
fixture_data[k] = v[1]
|
||||
mocker.patch("kasa.IotProtocol.query", return_value=fixture_data)
|
||||
mocker.patch("kasa.SmartProtocol.query", return_value=fixture_data)
|
||||
if "discovery_result" in fixture_data:
|
||||
return {"result": fixture_data["discovery_result"]}
|
||||
else:
|
||||
return {"system": {"get_sysinfo": fixture_data["system"]["get_sysinfo"]}}
|
||||
|
||||
|
||||
@pytest.fixture(
|
||||
params=UNSUPPORTED_DEVICES.values(), ids=list(UNSUPPORTED_DEVICES.keys())
|
||||
)
|
||||
def unsupported_device_info(request, mocker):
|
||||
"""Return unsupported devices for cli and discovery tests."""
|
||||
discovery_data = request.param
|
||||
host = "127.0.0.1"
|
||||
|
||||
async def mock_discover(self):
|
||||
if discovery_data:
|
||||
data = (
|
||||
b"\x02\x00\x00\x01\x01[\x00\x00\x00\x00\x00\x00W\xcev\xf8"
|
||||
+ json_dumps(discovery_data).encode()
|
||||
)
|
||||
self.datagram_received(data, (host, 20002))
|
||||
|
||||
mocker.patch("kasa.discover._DiscoverProtocol.do_discover", mock_discover)
|
||||
|
||||
return discovery_data
|
||||
@@ -1,477 +0,0 @@
|
||||
import copy
|
||||
import logging
|
||||
|
||||
from ..deviceconfig import DeviceConfig
|
||||
from ..iotprotocol import IotProtocol
|
||||
from ..protocol import BaseTransport
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def get_realtime(obj, x, *args):
|
||||
return {
|
||||
"current": 0.268587,
|
||||
"voltage": 125.836131,
|
||||
"power": 33.495623,
|
||||
"total": 0.199000,
|
||||
}
|
||||
|
||||
|
||||
def get_monthstat(obj, x, *args):
|
||||
if x["year"] < 2016:
|
||||
return {"month_list": []}
|
||||
|
||||
return {
|
||||
"month_list": [
|
||||
{"year": 2016, "month": 11, "energy": 1.089000},
|
||||
{"year": 2016, "month": 12, "energy": 1.582000},
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
def get_daystat(obj, x, *args):
|
||||
if x["year"] < 2016:
|
||||
return {"day_list": []}
|
||||
|
||||
return {
|
||||
"day_list": [
|
||||
{"year": 2016, "month": 11, "day": 24, "energy": 0.026000},
|
||||
{"year": 2016, "month": 11, "day": 25, "energy": 0.109000},
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
emeter_support = {
|
||||
"get_realtime": get_realtime,
|
||||
"get_monthstat": get_monthstat,
|
||||
"get_daystat": get_daystat,
|
||||
}
|
||||
|
||||
|
||||
def get_realtime_units(obj, x, *args):
|
||||
return {"power_mw": 10800}
|
||||
|
||||
|
||||
def get_monthstat_units(obj, x, *args):
|
||||
if x["year"] < 2016:
|
||||
return {"month_list": []}
|
||||
|
||||
return {
|
||||
"month_list": [
|
||||
{"year": 2016, "month": 11, "energy_wh": 32},
|
||||
{"year": 2016, "month": 12, "energy_wh": 16},
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
def get_daystat_units(obj, x, *args):
|
||||
if x["year"] < 2016:
|
||||
return {"day_list": []}
|
||||
|
||||
return {
|
||||
"day_list": [
|
||||
{"year": 2016, "month": 11, "day": 24, "energy_wh": 20},
|
||||
{"year": 2016, "month": 11, "day": 25, "energy_wh": 32},
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
emeter_units_support = {
|
||||
"get_realtime": get_realtime_units,
|
||||
"get_monthstat": get_monthstat_units,
|
||||
"get_daystat": get_daystat_units,
|
||||
}
|
||||
|
||||
|
||||
emeter_commands = {
|
||||
"emeter": emeter_support,
|
||||
"smartlife.iot.common.emeter": emeter_units_support,
|
||||
}
|
||||
|
||||
|
||||
def error(msg="default msg"):
|
||||
return {"err_code": -1323, "msg": msg}
|
||||
|
||||
|
||||
def success(res):
|
||||
if res:
|
||||
res.update({"err_code": 0})
|
||||
else:
|
||||
res = {"err_code": 0}
|
||||
return res
|
||||
|
||||
|
||||
# plugs and bulbs use a different module for time information,
|
||||
# so we define the contents here to avoid repeating ourselves
|
||||
TIME_MODULE = {
|
||||
"get_time": {
|
||||
"year": 2017,
|
||||
"month": 1,
|
||||
"mday": 2,
|
||||
"hour": 3,
|
||||
"min": 4,
|
||||
"sec": 5,
|
||||
},
|
||||
"get_timezone": {
|
||||
"zone_str": "test",
|
||||
"dst_offset": -1,
|
||||
"index": 12,
|
||||
"tz_str": "test2",
|
||||
},
|
||||
}
|
||||
|
||||
CLOUD_MODULE = {
|
||||
"get_info": {
|
||||
"username": "",
|
||||
"server": "devs.tplinkcloud.com",
|
||||
"binded": 0,
|
||||
"cld_connection": 0,
|
||||
"illegalType": -1,
|
||||
"stopConnect": -1,
|
||||
"tcspStatus": -1,
|
||||
"fwDlPage": "",
|
||||
"tcspInfo": "",
|
||||
"fwNotifyType": 0,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
AMBIENT_MODULE = {
|
||||
"get_current_brt": {"value": 26, "err_code": 0},
|
||||
"get_config": {
|
||||
"devs": [
|
||||
{
|
||||
"hw_id": 0,
|
||||
"enable": 0,
|
||||
"dark_index": 1,
|
||||
"min_adc": 0,
|
||||
"max_adc": 2450,
|
||||
"level_array": [
|
||||
{"name": "cloudy", "adc": 490, "value": 20},
|
||||
{"name": "overcast", "adc": 294, "value": 12},
|
||||
{"name": "dawn", "adc": 222, "value": 9},
|
||||
{"name": "twilight", "adc": 222, "value": 9},
|
||||
{"name": "total darkness", "adc": 111, "value": 4},
|
||||
{"name": "custom", "adc": 2400, "value": 97},
|
||||
],
|
||||
}
|
||||
],
|
||||
"ver": "1.0",
|
||||
"err_code": 0,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
MOTION_MODULE = {
|
||||
"get_config": {
|
||||
"enable": 0,
|
||||
"version": "1.0",
|
||||
"trigger_index": 2,
|
||||
"cold_time": 60000,
|
||||
"min_adc": 0,
|
||||
"max_adc": 4095,
|
||||
"array": [80, 50, 20, 0],
|
||||
"err_code": 0,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class FakeIotProtocol(IotProtocol):
|
||||
def __init__(self, info, fixture_name=None):
|
||||
super().__init__(
|
||||
transport=FakeIotTransport(info, fixture_name),
|
||||
)
|
||||
|
||||
async def query(self, request, retry_count: int = 3):
|
||||
"""Implement query here so tests can still patch IotProtocol.query."""
|
||||
resp_dict = await self._query(request, retry_count)
|
||||
return resp_dict
|
||||
|
||||
|
||||
class FakeIotTransport(BaseTransport):
|
||||
def __init__(self, info, fixture_name=None):
|
||||
super().__init__(config=DeviceConfig("127.0.0.123"))
|
||||
info = copy.deepcopy(info)
|
||||
self.discovery_data = info
|
||||
self.fixture_name = fixture_name
|
||||
self.writer = None
|
||||
self.reader = None
|
||||
proto = copy.deepcopy(FakeIotTransport.baseproto)
|
||||
|
||||
for target in info:
|
||||
# print("target %s" % target)
|
||||
if target != "discovery_result":
|
||||
for cmd in info[target]:
|
||||
# print("initializing tgt %s cmd %s" % (target, cmd))
|
||||
proto[target][cmd] = info[target][cmd]
|
||||
# if we have emeter support, we need to add the missing pieces
|
||||
for module in ["emeter", "smartlife.iot.common.emeter"]:
|
||||
if (
|
||||
module in info
|
||||
and "err_code" in info[module]
|
||||
and info[module]["err_code"] != 0
|
||||
):
|
||||
proto[module] = info[module]
|
||||
else:
|
||||
for etype in ["get_realtime", "get_daystat", "get_monthstat"]:
|
||||
if (
|
||||
module in info and etype in info[module]
|
||||
): # if the fixture has the data, use it
|
||||
# print("got %s %s from fixture: %s" % (module, etype, info[module][etype]))
|
||||
proto[module][etype] = info[module][etype]
|
||||
else: # otherwise fall back to the static one
|
||||
dummy_data = emeter_commands[module][etype]
|
||||
# print("got %s %s from dummy: %s" % (module, etype, dummy_data))
|
||||
proto[module][etype] = dummy_data
|
||||
|
||||
# print("initialized: %s" % proto[module])
|
||||
|
||||
self.proto = proto
|
||||
|
||||
@property
|
||||
def default_port(self) -> int:
|
||||
return 9999
|
||||
|
||||
@property
|
||||
def credentials_hash(self) -> None:
|
||||
return None
|
||||
|
||||
def set_alias(self, x, child_ids=None):
|
||||
if child_ids is None:
|
||||
child_ids = []
|
||||
_LOGGER.debug("Setting alias to %s, child_ids: %s", x["alias"], child_ids)
|
||||
if child_ids:
|
||||
for child in self.proto["system"]["get_sysinfo"]["children"]:
|
||||
if child["id"] in child_ids:
|
||||
child["alias"] = x["alias"]
|
||||
else:
|
||||
self.proto["system"]["get_sysinfo"]["alias"] = x["alias"]
|
||||
|
||||
def set_relay_state(self, x, child_ids=None):
|
||||
if child_ids is None:
|
||||
child_ids = []
|
||||
_LOGGER.debug("Setting relay state to %s", x["state"])
|
||||
|
||||
if not child_ids and "children" in self.proto["system"]["get_sysinfo"]:
|
||||
for child in self.proto["system"]["get_sysinfo"]["children"]:
|
||||
child_ids.append(child["id"])
|
||||
|
||||
_LOGGER.info("child_ids: %s", child_ids)
|
||||
if child_ids:
|
||||
for child in self.proto["system"]["get_sysinfo"]["children"]:
|
||||
if child["id"] in child_ids:
|
||||
_LOGGER.info("Found %s, turning to %s", child, x["state"])
|
||||
child["state"] = x["state"]
|
||||
else:
|
||||
self.proto["system"]["get_sysinfo"]["relay_state"] = x["state"]
|
||||
|
||||
def set_led_off(self, x, *args):
|
||||
_LOGGER.debug("Setting led off to %s", x)
|
||||
self.proto["system"]["get_sysinfo"]["led_off"] = x["off"]
|
||||
|
||||
def set_mac(self, x, *args):
|
||||
_LOGGER.debug("Setting mac to %s", x)
|
||||
self.proto["system"]["get_sysinfo"]["mac"] = x["mac"]
|
||||
|
||||
def set_hs220_brightness(self, x, *args):
|
||||
_LOGGER.debug("Setting brightness to %s", x)
|
||||
self.proto["system"]["get_sysinfo"]["brightness"] = x["brightness"]
|
||||
|
||||
def set_hs220_dimmer_transition(self, x, *args):
|
||||
_LOGGER.debug("Setting dimmer transition to %s", x)
|
||||
brightness = x["brightness"]
|
||||
if brightness == 0:
|
||||
self.proto["system"]["get_sysinfo"]["relay_state"] = 0
|
||||
else:
|
||||
self.proto["system"]["get_sysinfo"]["relay_state"] = 1
|
||||
self.proto["system"]["get_sysinfo"]["brightness"] = x["brightness"]
|
||||
|
||||
def set_lighting_effect(self, effect, *args):
|
||||
_LOGGER.debug("Setting light effect to %s", effect)
|
||||
self.proto["system"]["get_sysinfo"]["lighting_effect_state"] = dict(effect)
|
||||
|
||||
def transition_light_state(self, state_changes, *args):
|
||||
# Setting the light state on a device will turn off any active lighting effects.
|
||||
# Unless it's just the brightness in which case it will update the brightness for
|
||||
# the lighting effect
|
||||
if lighting_effect_state := self.proto["system"]["get_sysinfo"].get(
|
||||
"lighting_effect_state"
|
||||
):
|
||||
if (
|
||||
"hue" in state_changes
|
||||
or "saturation" in state_changes
|
||||
or "color_temp" in state_changes
|
||||
):
|
||||
lighting_effect_state["enable"] = 0
|
||||
elif (
|
||||
lighting_effect_state["enable"] == 1
|
||||
and state_changes.get("on_off") != 0
|
||||
and (brightness := state_changes.get("brightness"))
|
||||
):
|
||||
lighting_effect_state["brightness"] = brightness
|
||||
return
|
||||
|
||||
_LOGGER.debug("Setting light state to %s", state_changes)
|
||||
light_state = self.proto["system"]["get_sysinfo"]["light_state"]
|
||||
|
||||
_LOGGER.debug("Current light state: %s", light_state)
|
||||
new_state = light_state
|
||||
|
||||
# turn on requested, if we were off, use the dft_on_state as a base
|
||||
if state_changes["on_off"] == 1 and not light_state["on_off"]:
|
||||
_LOGGER.debug("Bulb was off, using dft_on_state")
|
||||
new_state = light_state["dft_on_state"]
|
||||
|
||||
# override the existing settings
|
||||
new_state.update(state_changes)
|
||||
|
||||
if (
|
||||
not state_changes["on_off"] and "dft_on_state" not in light_state
|
||||
): # if not already off, pack the data inside dft_on_state
|
||||
_LOGGER.debug(
|
||||
"Bulb was on and turn_off was requested, saving to dft_on_state"
|
||||
)
|
||||
new_state = {"dft_on_state": light_state, "on_off": 0}
|
||||
|
||||
_LOGGER.debug("New light state: %s", new_state)
|
||||
self.proto["system"]["get_sysinfo"]["light_state"] = new_state
|
||||
|
||||
def set_preferred_state(self, new_state, *args):
|
||||
"""Implement set_preferred_state."""
|
||||
self.proto["system"]["get_sysinfo"]["preferred_state"][new_state["index"]] = (
|
||||
new_state
|
||||
)
|
||||
|
||||
def light_state(self, x, *args):
|
||||
light_state = self.proto["system"]["get_sysinfo"]["light_state"]
|
||||
# Our tests have light state off, so we simply return the dft_on_state when device is on.
|
||||
_LOGGER.debug("reporting light state: %s", light_state)
|
||||
# TODO: hack to go around KL430 fixture differences
|
||||
if light_state["on_off"] and "dft_on_state" in light_state:
|
||||
return light_state["dft_on_state"]
|
||||
else:
|
||||
return light_state
|
||||
|
||||
def set_time(self, new_state: dict, *args):
|
||||
"""Implement set_time."""
|
||||
mods = [
|
||||
v
|
||||
for k, v in self.proto.items()
|
||||
if k in {"time", "smartlife.iot.common.timesetting"}
|
||||
]
|
||||
index = new_state.pop("index", None)
|
||||
for mod in mods:
|
||||
mod["get_time"] = new_state
|
||||
if index is not None:
|
||||
mod["get_timezone"]["index"] = index
|
||||
|
||||
baseproto = {
|
||||
"system": {
|
||||
"set_relay_state": set_relay_state,
|
||||
"set_dev_alias": set_alias,
|
||||
"set_led_off": set_led_off,
|
||||
"get_dev_icon": {"icon": None, "hash": None},
|
||||
"set_mac_addr": set_mac,
|
||||
"get_sysinfo": None,
|
||||
},
|
||||
"emeter": {
|
||||
"get_realtime": None,
|
||||
"get_daystat": None,
|
||||
"get_monthstat": None,
|
||||
"erase_emeter_state": None,
|
||||
},
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": None,
|
||||
"get_daystat": None,
|
||||
"get_monthstat": None,
|
||||
"erase_emeter_state": None,
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"get_light_state": light_state,
|
||||
"transition_light_state": transition_light_state,
|
||||
"set_preferred_state": set_preferred_state,
|
||||
},
|
||||
"smartlife.iot.lighting_effect": {
|
||||
"set_lighting_effect": set_lighting_effect,
|
||||
},
|
||||
# lightstrip follows the same payloads but uses different module & method
|
||||
"smartlife.iot.lightStrip": {
|
||||
"set_light_state": transition_light_state,
|
||||
"get_light_state": light_state,
|
||||
"set_preferred_state": set_preferred_state,
|
||||
},
|
||||
"smartlife.iot.common.system": {
|
||||
"set_dev_alias": set_alias,
|
||||
},
|
||||
"time": {**TIME_MODULE, "set_time": set_time, "set_timezone": set_time},
|
||||
"smartlife.iot.common.timesetting": {
|
||||
**TIME_MODULE,
|
||||
"set_time": set_time,
|
||||
"set_timezone": set_time,
|
||||
},
|
||||
# HS220 brightness, different setter and getter
|
||||
"smartlife.iot.dimmer": {
|
||||
"set_brightness": set_hs220_brightness,
|
||||
"set_dimmer_transition": set_hs220_dimmer_transition,
|
||||
},
|
||||
"smartlife.iot.LAS": AMBIENT_MODULE,
|
||||
"smartlife.iot.PIR": MOTION_MODULE,
|
||||
"cnCloud": CLOUD_MODULE,
|
||||
"smartlife.iot.common.cloud": CLOUD_MODULE,
|
||||
}
|
||||
|
||||
async def send(self, request, port=9999):
|
||||
proto = self.proto
|
||||
|
||||
# collect child ids from context
|
||||
try:
|
||||
child_ids = request["context"]["child_ids"]
|
||||
request.pop("context", None)
|
||||
except KeyError:
|
||||
child_ids = []
|
||||
|
||||
def get_response_for_module(target):
|
||||
if target not in proto:
|
||||
return error(msg="target not found")
|
||||
if "err_code" in proto[target] and proto[target]["err_code"] != 0:
|
||||
return {target: proto[target]}
|
||||
|
||||
def get_response_for_command(cmd):
|
||||
if cmd not in proto[target]:
|
||||
return error(msg=f"command {cmd} not found")
|
||||
|
||||
params = request[target][cmd]
|
||||
_LOGGER.debug(
|
||||
"Going to execute %s.%s (params: %s).. ", target, cmd, params
|
||||
)
|
||||
|
||||
if callable(proto[target][cmd]):
|
||||
res = proto[target][cmd](self, params, child_ids)
|
||||
_LOGGER.debug("[callable] %s.%s: %s", target, cmd, res)
|
||||
return success(res)
|
||||
elif isinstance(proto[target][cmd], dict):
|
||||
res = proto[target][cmd]
|
||||
_LOGGER.debug("[static] %s.%s: %s", target, cmd, res)
|
||||
return success(res)
|
||||
else:
|
||||
raise NotImplementedError(f"target {target} cmd {cmd}")
|
||||
|
||||
from collections import defaultdict
|
||||
|
||||
cmd_responses = defaultdict(dict)
|
||||
for cmd in request[target]:
|
||||
cmd_responses[target][cmd] = get_response_for_command(cmd)
|
||||
|
||||
return cmd_responses
|
||||
|
||||
response = {}
|
||||
for target in request:
|
||||
response.update(get_response_for_module(target))
|
||||
|
||||
return copy.deepcopy(response)
|
||||
|
||||
async def close(self) -> None:
|
||||
pass
|
||||
|
||||
async def reset(self) -> None:
|
||||
pass
|
||||
@@ -1,540 +0,0 @@
|
||||
import copy
|
||||
from json import loads as json_loads
|
||||
from warnings import warn
|
||||
|
||||
import pytest
|
||||
|
||||
from kasa import Credentials, DeviceConfig, SmartProtocol
|
||||
from kasa.exceptions import SmartErrorCode
|
||||
from kasa.protocol import BaseTransport
|
||||
from kasa.smart import SmartChildDevice
|
||||
|
||||
|
||||
class FakeSmartProtocol(SmartProtocol):
|
||||
def __init__(self, info, fixture_name, *, is_child=False):
|
||||
super().__init__(
|
||||
transport=FakeSmartTransport(info, fixture_name, is_child=is_child),
|
||||
)
|
||||
|
||||
async def query(self, request, retry_count: int = 3):
|
||||
"""Implement query here so can still patch SmartProtocol.query."""
|
||||
resp_dict = await self._query(request, retry_count)
|
||||
return resp_dict
|
||||
|
||||
|
||||
class FakeSmartTransport(BaseTransport):
|
||||
def __init__(
|
||||
self,
|
||||
info,
|
||||
fixture_name,
|
||||
*,
|
||||
list_return_size=10,
|
||||
component_nego_not_included=False,
|
||||
warn_fixture_missing_methods=True,
|
||||
fix_incomplete_fixture_lists=True,
|
||||
is_child=False,
|
||||
):
|
||||
super().__init__(
|
||||
config=DeviceConfig(
|
||||
"127.0.0.123",
|
||||
credentials=Credentials(
|
||||
username="dummy_user",
|
||||
password="dummy_password", # noqa: S106
|
||||
),
|
||||
),
|
||||
)
|
||||
self.fixture_name = fixture_name
|
||||
# Don't copy the dict if the device is a child so that updates on the
|
||||
# child are then still reflected on the parent's lis of child device in
|
||||
if not is_child:
|
||||
self.info = copy.deepcopy(info)
|
||||
self.child_protocols = self._get_child_protocols(
|
||||
self.info, self.fixture_name, "get_child_device_list"
|
||||
)
|
||||
else:
|
||||
self.info = info
|
||||
if not component_nego_not_included:
|
||||
self.components = {
|
||||
comp["id"]: comp["ver_code"]
|
||||
for comp in self.info["component_nego"]["component_list"]
|
||||
}
|
||||
self.list_return_size = list_return_size
|
||||
self.warn_fixture_missing_methods = warn_fixture_missing_methods
|
||||
self.fix_incomplete_fixture_lists = fix_incomplete_fixture_lists
|
||||
|
||||
@property
|
||||
def default_port(self):
|
||||
"""Default port for the transport."""
|
||||
return 80
|
||||
|
||||
@property
|
||||
def credentials_hash(self):
|
||||
"""The hashed credentials used by the transport."""
|
||||
return self._credentials.username + self._credentials.password + "hash"
|
||||
|
||||
FIXTURE_MISSING_MAP = {
|
||||
"get_wireless_scan_info": ("wireless", {"ap_list": [], "wep_supported": False}),
|
||||
"get_auto_off_config": ("auto_off", {"delay_min": 10, "enable": False}),
|
||||
"get_led_info": (
|
||||
"led",
|
||||
{
|
||||
"led_rule": "never",
|
||||
"led_status": False,
|
||||
"night_mode": {
|
||||
"end_time": 420,
|
||||
"night_mode_type": "sunrise_sunset",
|
||||
"start_time": 1140,
|
||||
"sunrise_offset": 0,
|
||||
"sunset_offset": 0,
|
||||
},
|
||||
},
|
||||
),
|
||||
"get_latest_fw": (
|
||||
"firmware",
|
||||
{
|
||||
"fw_size": 0,
|
||||
"fw_ver": "1.0.5 Build 230801 Rel.095702",
|
||||
"hw_id": "",
|
||||
"need_to_upgrade": False,
|
||||
"oem_id": "",
|
||||
"release_date": "",
|
||||
"release_note": "",
|
||||
"type": 0,
|
||||
},
|
||||
),
|
||||
"get_auto_update_info": (
|
||||
"firmware",
|
||||
{"enable": True, "random_range": 120, "time": 180},
|
||||
),
|
||||
"get_alarm_configure": (
|
||||
"alarm",
|
||||
{
|
||||
"get_alarm_configure": {
|
||||
"duration": 10,
|
||||
"type": "Doorbell Ring 2",
|
||||
"volume": "low",
|
||||
}
|
||||
},
|
||||
),
|
||||
"get_support_alarm_type_list": (
|
||||
"alarm",
|
||||
{
|
||||
"alarm_type_list": [
|
||||
"Doorbell Ring 1",
|
||||
]
|
||||
},
|
||||
),
|
||||
"get_device_usage": ("device", {}),
|
||||
"get_connect_cloud_state": ("cloud_connect", {"status": 0}),
|
||||
}
|
||||
|
||||
async def send(self, request: str):
|
||||
request_dict = json_loads(request)
|
||||
method = request_dict["method"]
|
||||
|
||||
if method == "multipleRequest":
|
||||
params = request_dict["params"]
|
||||
responses = []
|
||||
for request in params["requests"]:
|
||||
response = await self._send_request(request) # type: ignore[arg-type]
|
||||
# Devices do not continue after error
|
||||
if response["error_code"] != 0:
|
||||
break
|
||||
response["method"] = request["method"] # type: ignore[index]
|
||||
responses.append(response)
|
||||
return {"result": {"responses": responses}, "error_code": 0}
|
||||
else:
|
||||
return await self._send_request(request_dict)
|
||||
|
||||
@staticmethod
|
||||
def _get_child_protocols(
|
||||
parent_fixture_info, parent_fixture_name, child_devices_key
|
||||
):
|
||||
child_infos = parent_fixture_info.get(child_devices_key, {}).get(
|
||||
"child_device_list", []
|
||||
)
|
||||
if not child_infos:
|
||||
return
|
||||
found_child_fixture_infos = []
|
||||
child_protocols = {}
|
||||
# imported here to avoid circular import
|
||||
from .conftest import filter_fixtures
|
||||
|
||||
def try_get_child_fixture_info(child_dev_info):
|
||||
hw_version = child_dev_info["hw_ver"]
|
||||
sw_version = child_dev_info["fw_ver"]
|
||||
sw_version = sw_version.split(" ")[0]
|
||||
model = child_dev_info["model"]
|
||||
region = child_dev_info.get("specs", "XX")
|
||||
child_fixture_name = f"{model}({region})_{hw_version}_{sw_version}"
|
||||
child_fixtures = filter_fixtures(
|
||||
"Child fixture",
|
||||
protocol_filter={"SMART.CHILD"},
|
||||
model_filter={child_fixture_name},
|
||||
)
|
||||
if child_fixtures:
|
||||
return next(iter(child_fixtures))
|
||||
return None
|
||||
|
||||
for child_info in child_infos:
|
||||
if ( # Is SMART protocol
|
||||
(device_id := child_info.get("device_id"))
|
||||
and (category := child_info.get("category"))
|
||||
and category in SmartChildDevice.CHILD_DEVICE_TYPE_MAP
|
||||
):
|
||||
if fixture_info_tuple := try_get_child_fixture_info(child_info):
|
||||
child_fixture = copy.deepcopy(fixture_info_tuple.data)
|
||||
child_fixture["get_device_info"]["device_id"] = device_id
|
||||
found_child_fixture_infos.append(child_fixture["get_device_info"])
|
||||
child_protocols[device_id] = FakeSmartProtocol(
|
||||
child_fixture, fixture_info_tuple.name, is_child=True
|
||||
)
|
||||
# Look for fixture inline
|
||||
elif (child_fixtures := parent_fixture_info.get("child_devices")) and (
|
||||
child_fixture := child_fixtures.get(device_id)
|
||||
):
|
||||
found_child_fixture_infos.append(child_fixture["get_device_info"])
|
||||
child_protocols[device_id] = FakeSmartProtocol(
|
||||
child_fixture,
|
||||
f"{parent_fixture_name}-{device_id}",
|
||||
is_child=True,
|
||||
)
|
||||
else:
|
||||
warn(
|
||||
f"Could not find child SMART fixture for {child_info}",
|
||||
stacklevel=2,
|
||||
)
|
||||
else:
|
||||
warn(
|
||||
f"Child is a cameraprotocol which needs to be implemented {child_info}",
|
||||
stacklevel=2,
|
||||
)
|
||||
# Replace parent child infos with the infos from the child fixtures so
|
||||
# that updates update both
|
||||
if child_infos and found_child_fixture_infos:
|
||||
parent_fixture_info[child_devices_key]["child_device_list"] = (
|
||||
found_child_fixture_infos
|
||||
)
|
||||
return child_protocols
|
||||
|
||||
async def _handle_control_child(self, params: dict):
|
||||
"""Handle control_child command."""
|
||||
device_id = params.get("device_id")
|
||||
if device_id not in self.child_protocols:
|
||||
warn(
|
||||
f"Could not find child fixture {device_id} in {self.fixture_name}",
|
||||
stacklevel=2,
|
||||
)
|
||||
return self._handle_control_child_missing(params)
|
||||
|
||||
child_protocol: SmartProtocol = self.child_protocols[device_id]
|
||||
|
||||
request_data = params.get("requestData", {})
|
||||
|
||||
child_method = request_data.get("method")
|
||||
child_params = request_data.get("params") # noqa: F841
|
||||
|
||||
resp = await child_protocol.query({child_method: child_params})
|
||||
resp["error_code"] = 0
|
||||
for val in resp.values():
|
||||
return {
|
||||
"result": {"responseData": {"result": val, "error_code": 0}},
|
||||
"error_code": 0,
|
||||
}
|
||||
|
||||
def _handle_control_child_missing(self, params: dict):
|
||||
"""Handle control_child command.
|
||||
|
||||
Used for older fixtures where child info wasn't stored in the fixture.
|
||||
TODO: Should be removed somehow for future maintanability.
|
||||
"""
|
||||
device_id = params.get("device_id")
|
||||
request_data = params.get("requestData", {})
|
||||
|
||||
child_method = request_data.get("method")
|
||||
child_params = request_data.get("params")
|
||||
|
||||
info = self.info
|
||||
children = info["get_child_device_list"]["child_device_list"]
|
||||
|
||||
for child in children:
|
||||
if child["device_id"] == device_id:
|
||||
info = child
|
||||
break
|
||||
# Create the child_devices fixture section for fixtures generated before it was added
|
||||
if "child_devices" not in self.info:
|
||||
self.info["child_devices"] = {}
|
||||
# Get the method calls made directly on the child devices
|
||||
child_device_calls = self.info["child_devices"].setdefault(device_id, {})
|
||||
|
||||
# We only support get & set device info in this method for missing.
|
||||
if child_method == "get_device_info":
|
||||
result = copy.deepcopy(info)
|
||||
return {"result": result, "error_code": 0}
|
||||
elif child_method == "set_device_info":
|
||||
info.update(child_params)
|
||||
return {"error_code": 0}
|
||||
elif child_method == "set_preset_rules":
|
||||
return self._set_child_preset_rules(info, child_params)
|
||||
elif child_method == "set_on_off_gradually_info":
|
||||
return self._set_on_off_gradually_info(info, child_params)
|
||||
elif child_method in child_device_calls:
|
||||
result = copy.deepcopy(child_device_calls[child_method])
|
||||
return {"result": result, "error_code": 0}
|
||||
elif (
|
||||
# FIXTURE_MISSING is for service calls not in place when
|
||||
# SMART fixtures started to be generated
|
||||
missing_result := self.FIXTURE_MISSING_MAP.get(child_method)
|
||||
) and missing_result[0] in self.components:
|
||||
# Copy to info so it will work with update methods
|
||||
child_device_calls[child_method] = copy.deepcopy(missing_result[1])
|
||||
result = copy.deepcopy(info[child_method])
|
||||
retval = {"result": result, "error_code": 0}
|
||||
return retval
|
||||
elif child_method[:4] == "set_":
|
||||
target_method = f"get_{child_method[4:]}"
|
||||
if target_method not in child_device_calls:
|
||||
raise RuntimeError(
|
||||
f"No {target_method} in child info, calling set before get not supported."
|
||||
)
|
||||
child_device_calls[target_method].update(child_params)
|
||||
return {"error_code": 0}
|
||||
else:
|
||||
# PARAMS error returned for KS240 when get_device_usage called
|
||||
# on parent device. Could be any error code though.
|
||||
# TODO: Try to figure out if there's a way to prevent the KS240 smartdevice
|
||||
# calling the unsupported device in the first place.
|
||||
retval = {
|
||||
"error_code": SmartErrorCode.PARAMS_ERROR.value,
|
||||
"method": child_method,
|
||||
}
|
||||
return retval
|
||||
|
||||
raise NotImplementedError(f"Method {child_method} not implemented for children")
|
||||
|
||||
def _get_on_off_gradually_info(self, info, params):
|
||||
if self.components["on_off_gradually"] == 1:
|
||||
info["get_on_off_gradually_info"] = {"enable": True}
|
||||
else:
|
||||
info["get_on_off_gradually_info"] = {
|
||||
"off_state": {"duration": 5, "enable": False, "max_duration": 60},
|
||||
"on_state": {"duration": 5, "enable": False, "max_duration": 60},
|
||||
}
|
||||
return copy.deepcopy(info["get_on_off_gradually_info"])
|
||||
|
||||
def _set_on_off_gradually_info(self, info, params):
|
||||
# Child devices can have the required properties directly in info
|
||||
|
||||
# the _handle_control_child_missing directly passes in get_device_info
|
||||
sys_info = info.get("get_device_info", info)
|
||||
|
||||
if self.components["on_off_gradually"] == 1:
|
||||
info["get_on_off_gradually_info"] = {"enable": params["enable"]}
|
||||
elif on_state := params.get("on_state"):
|
||||
if "fade_on_time" in sys_info and "gradually_on_mode" in sys_info:
|
||||
sys_info["gradually_on_mode"] = 1 if on_state["enable"] else 0
|
||||
if "duration" in on_state:
|
||||
sys_info["fade_on_time"] = on_state["duration"]
|
||||
if "get_on_off_gradually_info" in info:
|
||||
info["get_on_off_gradually_info"]["on_state"]["enable"] = on_state[
|
||||
"enable"
|
||||
]
|
||||
if "duration" in on_state:
|
||||
info["get_on_off_gradually_info"]["on_state"]["duration"] = (
|
||||
on_state["duration"]
|
||||
)
|
||||
elif off_state := params.get("off_state"):
|
||||
if "fade_off_time" in sys_info and "gradually_off_mode" in sys_info:
|
||||
sys_info["gradually_off_mode"] = 1 if off_state["enable"] else 0
|
||||
if "duration" in off_state:
|
||||
sys_info["fade_off_time"] = off_state["duration"]
|
||||
if "get_on_off_gradually_info" in info:
|
||||
info["get_on_off_gradually_info"]["off_state"]["enable"] = off_state[
|
||||
"enable"
|
||||
]
|
||||
if "duration" in off_state:
|
||||
info["get_on_off_gradually_info"]["off_state"]["duration"] = (
|
||||
off_state["duration"]
|
||||
)
|
||||
return {"error_code": 0}
|
||||
|
||||
def _set_dynamic_light_effect(self, info, params):
|
||||
"""Set or remove values as per the device behaviour."""
|
||||
info["get_device_info"]["dynamic_light_effect_enable"] = params["enable"]
|
||||
info["get_dynamic_light_effect_rules"]["enable"] = params["enable"]
|
||||
if params["enable"]:
|
||||
info["get_device_info"]["dynamic_light_effect_id"] = params["id"]
|
||||
info["get_dynamic_light_effect_rules"]["current_rule_id"] = params["id"]
|
||||
else:
|
||||
if "dynamic_light_effect_id" in info["get_device_info"]:
|
||||
del info["get_device_info"]["dynamic_light_effect_id"]
|
||||
if "current_rule_id" in info["get_dynamic_light_effect_rules"]:
|
||||
del info["get_dynamic_light_effect_rules"]["current_rule_id"]
|
||||
|
||||
def _set_edit_dynamic_light_effect_rule(self, info, params):
|
||||
"""Edit dynamic light effect rule."""
|
||||
rules = info["get_dynamic_light_effect_rules"]["rule_list"]
|
||||
for rule in rules:
|
||||
if rule["id"] == params["id"]:
|
||||
rule.update(params)
|
||||
return
|
||||
|
||||
raise Exception("Unable to find rule with id")
|
||||
|
||||
def _set_light_strip_effect(self, info, params):
|
||||
"""Set or remove values as per the device behaviour."""
|
||||
# Brightness is not always available
|
||||
if (brightness := params.get("brightness")) is not None:
|
||||
info["get_device_info"]["lighting_effect"]["brightness"] = brightness
|
||||
if "enable" in params:
|
||||
info["get_device_info"]["lighting_effect"]["enable"] = params["enable"]
|
||||
info["get_device_info"]["lighting_effect"]["name"] = params["name"]
|
||||
info["get_device_info"]["lighting_effect"]["id"] = params["id"]
|
||||
info["get_lighting_effect"] = copy.deepcopy(params)
|
||||
|
||||
def _set_led_info(self, info, params):
|
||||
"""Set or remove values as per the device behaviour."""
|
||||
info["get_led_info"]["led_status"] = params["led_rule"] != "never"
|
||||
info["get_led_info"]["led_rule"] = params["led_rule"]
|
||||
|
||||
def _set_preset_rules(self, info, params):
|
||||
"""Set or remove values as per the device behaviour."""
|
||||
if "brightness" not in info["get_preset_rules"]:
|
||||
return {"error_code": SmartErrorCode.PARAMS_ERROR}
|
||||
info["get_preset_rules"]["brightness"] = params["brightness"]
|
||||
# So far the only child device with light preset (KS240) also has the
|
||||
# data available to read in the device_info.
|
||||
device_info = info["get_device_info"]
|
||||
if "preset_state" in device_info:
|
||||
device_info["preset_state"] = [
|
||||
{"brightness": b} for b in params["brightness"]
|
||||
]
|
||||
return {"error_code": 0}
|
||||
|
||||
def _set_child_preset_rules(self, info, params):
|
||||
"""Set or remove values as per the device behaviour."""
|
||||
# So far the only child device with light preset (KS240) has the
|
||||
# data available to read in the device_info. If a child device
|
||||
# appears that doesn't have this this will need to be extended.
|
||||
if "preset_state" not in info:
|
||||
return {"error_code": SmartErrorCode.PARAMS_ERROR}
|
||||
info["preset_state"] = [{"brightness": b} for b in params["brightness"]]
|
||||
return {"error_code": 0}
|
||||
|
||||
def _edit_preset_rules(self, info, params):
|
||||
"""Set or remove values as per the device behaviour."""
|
||||
if "states" not in info["get_preset_rules"] is None:
|
||||
return {"error_code": SmartErrorCode.PARAMS_ERROR}
|
||||
info["get_preset_rules"]["states"][params["index"]] = params["state"]
|
||||
return {"error_code": 0}
|
||||
|
||||
def _update_sysinfo_key(self, info: dict, key: str, value: str) -> dict:
|
||||
"""Update a single key in the main system info.
|
||||
|
||||
This is used to implement child device setters that change the main sysinfo state.
|
||||
"""
|
||||
sys_info = info.get("get_device_info", info)
|
||||
sys_info[key] = value
|
||||
|
||||
return {"error_code": 0}
|
||||
|
||||
async def _send_request(self, request_dict: dict):
|
||||
method = request_dict["method"]
|
||||
|
||||
info = self.info
|
||||
if method == "control_child":
|
||||
return await self._handle_control_child(request_dict["params"])
|
||||
|
||||
params = request_dict.get("params", {})
|
||||
if method == "component_nego" or method[:4] == "get_":
|
||||
if method in info:
|
||||
result = copy.deepcopy(info[method])
|
||||
if "start_index" in result and "sum" in result:
|
||||
list_key = next(
|
||||
iter([key for key in result if isinstance(result[key], list)])
|
||||
)
|
||||
start_index = (
|
||||
start_index
|
||||
if (params and (start_index := params.get("start_index")))
|
||||
else 0
|
||||
)
|
||||
# Fixtures generated before _handle_response_lists was implemented
|
||||
# could have incomplete lists.
|
||||
if (
|
||||
len(result[list_key]) < result["sum"]
|
||||
and self.fix_incomplete_fixture_lists
|
||||
):
|
||||
result["sum"] = len(result[list_key])
|
||||
if self.warn_fixture_missing_methods:
|
||||
pytest.fixtures_missing_methods.setdefault( # type: ignore[attr-defined]
|
||||
self.fixture_name, set()
|
||||
).add(f"{method} (incomplete '{list_key}' list)")
|
||||
|
||||
result[list_key] = result[list_key][
|
||||
start_index : start_index + self.list_return_size
|
||||
]
|
||||
return {"result": result, "error_code": 0}
|
||||
|
||||
if (
|
||||
# FIXTURE_MISSING is for service calls not in place when
|
||||
# SMART fixtures started to be generated
|
||||
missing_result := self.FIXTURE_MISSING_MAP.get(method)
|
||||
) and missing_result[0] in self.components:
|
||||
# Copy to info so it will work with update methods
|
||||
info[method] = copy.deepcopy(missing_result[1])
|
||||
result = copy.deepcopy(info[method])
|
||||
retval = {"result": result, "error_code": 0}
|
||||
elif (
|
||||
method == "get_on_off_gradually_info"
|
||||
and "on_off_gradually" in self.components
|
||||
):
|
||||
# Need to call a method here to determine which version schema to return
|
||||
result = self._get_on_off_gradually_info(info, params)
|
||||
return {"result": result, "error_code": 0}
|
||||
else:
|
||||
# PARAMS error returned for KS240 when get_device_usage called
|
||||
# on parent device. Could be any error code though.
|
||||
# TODO: Try to figure out if there's a way to prevent the KS240 smartdevice
|
||||
# calling the unsupported device in the first place.
|
||||
retval = {
|
||||
"error_code": SmartErrorCode.PARAMS_ERROR.value,
|
||||
"method": method,
|
||||
}
|
||||
# Reduce warning spam by consolidating and reporting at the end of the run
|
||||
if self.warn_fixture_missing_methods:
|
||||
pytest.fixtures_missing_methods.setdefault( # type: ignore[attr-defined]
|
||||
self.fixture_name, set()
|
||||
).add(method)
|
||||
return retval
|
||||
elif method in ["set_qs_info", "fw_download"]:
|
||||
return {"error_code": 0}
|
||||
elif method == "set_dynamic_light_effect_rule_enable":
|
||||
self._set_dynamic_light_effect(info, params)
|
||||
return {"error_code": 0}
|
||||
elif method == "edit_dynamic_light_effect_rule":
|
||||
self._set_edit_dynamic_light_effect_rule(info, params)
|
||||
return {"error_code": 0}
|
||||
elif method == "set_lighting_effect":
|
||||
self._set_light_strip_effect(info, params)
|
||||
return {"error_code": 0}
|
||||
elif method == "set_led_info":
|
||||
self._set_led_info(info, params)
|
||||
return {"error_code": 0}
|
||||
elif method == "set_preset_rules":
|
||||
return self._set_preset_rules(info, params)
|
||||
elif method == "edit_preset_rules":
|
||||
return self._edit_preset_rules(info, params)
|
||||
elif method == "set_on_off_gradually_info":
|
||||
return self._set_on_off_gradually_info(info, params)
|
||||
elif method == "set_child_protection":
|
||||
return self._update_sysinfo_key(info, "child_protection", params["enable"])
|
||||
elif method[:4] == "set_":
|
||||
target_method = f"get_{method[4:]}"
|
||||
info[target_method].update(params)
|
||||
return {"error_code": 0}
|
||||
|
||||
async def close(self) -> None:
|
||||
pass
|
||||
|
||||
async def reset(self) -> None:
|
||||
pass
|
||||
@@ -1,199 +0,0 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import copy
|
||||
from json import loads as json_loads
|
||||
|
||||
from kasa import Credentials, DeviceConfig, SmartProtocol
|
||||
from kasa.experimental.smartcameraprotocol import SmartCameraProtocol
|
||||
from kasa.protocol import BaseTransport
|
||||
|
||||
from .fakeprotocol_smart import FakeSmartTransport
|
||||
|
||||
|
||||
class FakeSmartCameraProtocol(SmartCameraProtocol):
|
||||
def __init__(self, info, fixture_name, *, is_child=False):
|
||||
super().__init__(
|
||||
transport=FakeSmartCameraTransport(info, fixture_name, is_child=is_child),
|
||||
)
|
||||
|
||||
async def query(self, request, retry_count: int = 3):
|
||||
"""Implement query here so can still patch SmartProtocol.query."""
|
||||
resp_dict = await self._query(request, retry_count)
|
||||
return resp_dict
|
||||
|
||||
|
||||
class FakeSmartCameraTransport(BaseTransport):
|
||||
def __init__(
|
||||
self,
|
||||
info,
|
||||
fixture_name,
|
||||
*,
|
||||
list_return_size=10,
|
||||
is_child=False,
|
||||
):
|
||||
super().__init__(
|
||||
config=DeviceConfig(
|
||||
"127.0.0.123",
|
||||
credentials=Credentials(
|
||||
username="dummy_user",
|
||||
password="dummy_password", # noqa: S106
|
||||
),
|
||||
),
|
||||
)
|
||||
self.fixture_name = fixture_name
|
||||
if not is_child:
|
||||
self.info = copy.deepcopy(info)
|
||||
self.child_protocols = FakeSmartTransport._get_child_protocols(
|
||||
self.info, self.fixture_name, "getChildDeviceList"
|
||||
)
|
||||
else:
|
||||
self.info = info
|
||||
# self.child_protocols = self._get_child_protocols()
|
||||
self.list_return_size = list_return_size
|
||||
|
||||
@property
|
||||
def default_port(self):
|
||||
"""Default port for the transport."""
|
||||
return 443
|
||||
|
||||
@property
|
||||
def credentials_hash(self):
|
||||
"""The hashed credentials used by the transport."""
|
||||
return self._credentials.username + self._credentials.password + "camerahash"
|
||||
|
||||
async def send(self, request: str):
|
||||
request_dict = json_loads(request)
|
||||
method = request_dict["method"]
|
||||
|
||||
if method == "multipleRequest":
|
||||
params = request_dict["params"]
|
||||
responses = []
|
||||
for request in params["requests"]:
|
||||
response = await self._send_request(request) # type: ignore[arg-type]
|
||||
# Devices do not continue after error
|
||||
if response["error_code"] != 0:
|
||||
break
|
||||
response["method"] = request["method"] # type: ignore[index]
|
||||
responses.append(response)
|
||||
return {"result": {"responses": responses}, "error_code": 0}
|
||||
else:
|
||||
return await self._send_request(request_dict)
|
||||
|
||||
async def _handle_control_child(self, params: dict):
|
||||
"""Handle control_child command."""
|
||||
device_id = params.get("device_id")
|
||||
assert device_id in self.child_protocols, "Fixture does not have child info"
|
||||
|
||||
child_protocol: SmartProtocol = self.child_protocols[device_id]
|
||||
|
||||
request_data = params.get("request_data", {})
|
||||
|
||||
child_method = request_data.get("method")
|
||||
child_params = request_data.get("params") # noqa: F841
|
||||
|
||||
resp = await child_protocol.query({child_method: child_params})
|
||||
resp["error_code"] = 0
|
||||
for val in resp.values():
|
||||
return {
|
||||
"result": {"response_data": {"result": val, "error_code": 0}},
|
||||
"error_code": 0,
|
||||
}
|
||||
|
||||
@staticmethod
|
||||
def _get_param_set_value(info: dict, set_keys: list[str], value):
|
||||
for key in set_keys[:-1]:
|
||||
info = info[key]
|
||||
info[set_keys[-1]] = value
|
||||
|
||||
SETTERS = {
|
||||
("system", "sys", "dev_alias"): [
|
||||
"getDeviceInfo",
|
||||
"device_info",
|
||||
"basic_info",
|
||||
"device_alias",
|
||||
],
|
||||
("lens_mask", "lens_mask_info", "enabled"): [
|
||||
"getLensMaskConfig",
|
||||
"lens_mask",
|
||||
"lens_mask_info",
|
||||
"enabled",
|
||||
],
|
||||
("system", "clock_status", "seconds_from_1970"): [
|
||||
"getClockStatus",
|
||||
"system",
|
||||
"clock_status",
|
||||
"seconds_from_1970",
|
||||
],
|
||||
("system", "clock_status", "local_time"): [
|
||||
"getClockStatus",
|
||||
"system",
|
||||
"clock_status",
|
||||
"local_time",
|
||||
],
|
||||
("system", "basic", "zone_id"): [
|
||||
"getTimezone",
|
||||
"system",
|
||||
"basic",
|
||||
"zone_id",
|
||||
],
|
||||
}
|
||||
|
||||
async def _send_request(self, request_dict: dict):
|
||||
method = request_dict["method"]
|
||||
|
||||
info = self.info
|
||||
if method == "controlChild":
|
||||
return await self._handle_control_child(
|
||||
request_dict["params"]["childControl"]
|
||||
)
|
||||
|
||||
if method[:3] == "set":
|
||||
for key, val in request_dict.items():
|
||||
if key != "method":
|
||||
# key is params for multi request and the actual params
|
||||
# for single requests
|
||||
if key == "params":
|
||||
module = next(iter(val))
|
||||
val = val[module]
|
||||
else:
|
||||
module = key
|
||||
section = next(iter(val))
|
||||
skey_val = val[section]
|
||||
for skey, sval in skey_val.items():
|
||||
section_key = skey
|
||||
section_value = sval
|
||||
if setter_keys := self.SETTERS.get(
|
||||
(module, section, section_key)
|
||||
):
|
||||
self._get_param_set_value(info, setter_keys, section_value)
|
||||
else:
|
||||
return {"error_code": -1}
|
||||
break
|
||||
return {"error_code": 0}
|
||||
elif method[:3] == "get":
|
||||
params = request_dict.get("params")
|
||||
if method in info:
|
||||
result = copy.deepcopy(info[method])
|
||||
if "start_index" in result and "sum" in result:
|
||||
list_key = next(
|
||||
iter([key for key in result if isinstance(result[key], list)])
|
||||
)
|
||||
start_index = (
|
||||
start_index
|
||||
if (params and (start_index := params.get("start_index")))
|
||||
else 0
|
||||
)
|
||||
|
||||
result[list_key] = result[list_key][
|
||||
start_index : start_index + self.list_return_size
|
||||
]
|
||||
return {"result": result, "error_code": 0}
|
||||
else:
|
||||
return {"error_code": -1}
|
||||
return {"error_code": -1}
|
||||
|
||||
async def close(self) -> None:
|
||||
pass
|
||||
|
||||
async def reset(self) -> None:
|
||||
pass
|
||||
@@ -1,198 +0,0 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import glob
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
from typing import Iterable, NamedTuple
|
||||
|
||||
from kasa.device_factory import _get_device_type_from_sys_info
|
||||
from kasa.device_type import DeviceType
|
||||
from kasa.experimental.smartcamera import SmartCamera
|
||||
from kasa.smart.smartdevice import SmartDevice
|
||||
|
||||
|
||||
class FixtureInfo(NamedTuple):
|
||||
name: str
|
||||
protocol: str
|
||||
data: dict
|
||||
|
||||
|
||||
class ComponentFilter(NamedTuple):
|
||||
component_name: str
|
||||
minimum_version: int = 0
|
||||
maximum_version: int | None = None
|
||||
|
||||
|
||||
FixtureInfo.__hash__ = lambda self: hash((self.name, self.protocol)) # type: ignore[attr-defined, method-assign]
|
||||
FixtureInfo.__eq__ = lambda x, y: hash(x) == hash(y) # type: ignore[method-assign]
|
||||
|
||||
|
||||
SUPPORTED_IOT_DEVICES = [
|
||||
(device, "IOT")
|
||||
for device in glob.glob(
|
||||
os.path.dirname(os.path.abspath(__file__)) + "/fixtures/*.json"
|
||||
)
|
||||
]
|
||||
|
||||
SUPPORTED_SMART_DEVICES = [
|
||||
(device, "SMART")
|
||||
for device in glob.glob(
|
||||
os.path.dirname(os.path.abspath(__file__)) + "/fixtures/smart/*.json"
|
||||
)
|
||||
]
|
||||
|
||||
SUPPORTED_SMART_CHILD_DEVICES = [
|
||||
(device, "SMART.CHILD")
|
||||
for device in glob.glob(
|
||||
os.path.dirname(os.path.abspath(__file__)) + "/fixtures/smart/child/*.json"
|
||||
)
|
||||
]
|
||||
|
||||
SUPPORTED_SMARTCAMERA_DEVICES = [
|
||||
(device, "SMARTCAMERA")
|
||||
for device in glob.glob(
|
||||
os.path.dirname(os.path.abspath(__file__)) + "/fixtures/smartcamera/*.json"
|
||||
)
|
||||
]
|
||||
|
||||
SUPPORTED_DEVICES = (
|
||||
SUPPORTED_IOT_DEVICES
|
||||
+ SUPPORTED_SMART_DEVICES
|
||||
+ SUPPORTED_SMART_CHILD_DEVICES
|
||||
+ SUPPORTED_SMARTCAMERA_DEVICES
|
||||
)
|
||||
|
||||
|
||||
def idgenerator(paramtuple: FixtureInfo):
|
||||
try:
|
||||
return paramtuple.name + (
|
||||
"" if paramtuple.protocol == "IOT" else "-" + paramtuple.protocol
|
||||
)
|
||||
except: # TODO: HACK as idgenerator is now used by default # noqa: E722
|
||||
return None
|
||||
|
||||
|
||||
def get_fixture_info() -> list[FixtureInfo]:
|
||||
"""Return raw discovery file contents as JSON. Used for discovery tests."""
|
||||
fixture_data = []
|
||||
for file, protocol in SUPPORTED_DEVICES:
|
||||
p = Path(file)
|
||||
folder = Path(__file__).parent / "fixtures"
|
||||
if protocol == "SMART":
|
||||
folder = folder / "smart"
|
||||
if protocol == "SMART.CHILD":
|
||||
folder = folder / "smart/child"
|
||||
p = folder / file
|
||||
|
||||
with open(p) as f:
|
||||
data = json.load(f)
|
||||
|
||||
fixture_name = p.name
|
||||
fixture_data.append(
|
||||
FixtureInfo(data=data, protocol=protocol, name=fixture_name)
|
||||
)
|
||||
return fixture_data
|
||||
|
||||
|
||||
FIXTURE_DATA: list[FixtureInfo] = get_fixture_info()
|
||||
|
||||
|
||||
def filter_fixtures(
|
||||
desc,
|
||||
*,
|
||||
data_root_filter: str | None = None,
|
||||
protocol_filter: set[str] | None = None,
|
||||
model_filter: set[str] | None = None,
|
||||
component_filter: str | ComponentFilter | None = None,
|
||||
device_type_filter: Iterable[DeviceType] | None = None,
|
||||
):
|
||||
"""Filter the fixtures based on supplied parameters.
|
||||
|
||||
data_root_filter: return fixtures containing the supplied top
|
||||
level key, i.e. discovery_result
|
||||
protocol_filter: set of protocols to match, IOT, SMART, SMART.CHILD
|
||||
model_filter: set of device models to match
|
||||
component_filter: filter SMART fixtures that have the provided
|
||||
component in component_nego details.
|
||||
"""
|
||||
|
||||
def _model_match(fixture_data: FixtureInfo, model_filter: set[str]):
|
||||
if isinstance(model_filter, str):
|
||||
model_filter = {model_filter}
|
||||
assert isinstance(model_filter, set), "model filter must be a set"
|
||||
model_filter_list = [mf for mf in model_filter]
|
||||
if (
|
||||
len(model_filter_list) == 1
|
||||
and (model := model_filter_list[0])
|
||||
and len(model.split("_")) == 3
|
||||
):
|
||||
# return exact match
|
||||
return fixture_data.name == f"{model}.json"
|
||||
file_model_region = fixture_data.name.split("_")[0]
|
||||
file_model = file_model_region.split("(")[0]
|
||||
return file_model in model_filter
|
||||
|
||||
def _component_match(
|
||||
fixture_data: FixtureInfo, component_filter: str | ComponentFilter
|
||||
):
|
||||
if (component_nego := fixture_data.data.get("component_nego")) is None:
|
||||
return False
|
||||
components = {
|
||||
component["id"]: component["ver_code"]
|
||||
for component in component_nego["component_list"]
|
||||
}
|
||||
if isinstance(component_filter, str):
|
||||
return component_filter in components
|
||||
else:
|
||||
return (
|
||||
(ver_code := components.get(component_filter.component_name))
|
||||
and ver_code >= component_filter.minimum_version
|
||||
and (
|
||||
component_filter.maximum_version is None
|
||||
or ver_code <= component_filter.maximum_version
|
||||
)
|
||||
)
|
||||
|
||||
def _device_type_match(fixture_data: FixtureInfo, device_type):
|
||||
if fixture_data.protocol in {"SMART", "SMART.CHILD"}:
|
||||
info = fixture_data.data["get_device_info"]
|
||||
component_nego = fixture_data.data["component_nego"]
|
||||
components = [
|
||||
component["id"] for component in component_nego["component_list"]
|
||||
]
|
||||
return (
|
||||
SmartDevice._get_device_type_from_components(components, info["type"])
|
||||
in device_type
|
||||
)
|
||||
elif fixture_data.protocol == "IOT":
|
||||
return _get_device_type_from_sys_info(fixture_data.data) in device_type
|
||||
elif fixture_data.protocol == "SMARTCAMERA":
|
||||
info = fixture_data.data["getDeviceInfo"]["device_info"]["basic_info"]
|
||||
return SmartCamera._get_device_type_from_sysinfo(info) in device_type
|
||||
return False
|
||||
|
||||
filtered = []
|
||||
if protocol_filter is None:
|
||||
protocol_filter = {"IOT", "SMART"}
|
||||
for fixture_data in FIXTURE_DATA:
|
||||
if data_root_filter and data_root_filter not in fixture_data.data:
|
||||
continue
|
||||
if fixture_data.protocol not in protocol_filter:
|
||||
continue
|
||||
if model_filter is not None and not _model_match(fixture_data, model_filter):
|
||||
continue
|
||||
if component_filter and not _component_match(fixture_data, component_filter):
|
||||
continue
|
||||
if device_type_filter and not _device_type_match(
|
||||
fixture_data, device_type_filter
|
||||
):
|
||||
continue
|
||||
|
||||
filtered.append(fixture_data)
|
||||
|
||||
print(f"# {desc}")
|
||||
for value in filtered:
|
||||
print(f"\t{value.name}")
|
||||
filtered.sort()
|
||||
return filtered
|
||||
32
kasa/tests/fixtures/EP10(US)_1.0_1.0.2.json
vendored
32
kasa/tests/fixtures/EP10(US)_1.0_1.0.2.json
vendored
@@ -1,32 +0,0 @@
|
||||
{
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "167 lamp",
|
||||
"dev_name": "Smart Wi-Fi Plug Mini",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "EP10(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"obd_src": "tplink",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"relay_state": 0,
|
||||
"rssi": -64,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.2 Build 200915 Rel.085940",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
45
kasa/tests/fixtures/EP40(US)_1.0_1.0.2.json
vendored
45
kasa/tests/fixtures/EP40(US)_1.0_1.0.2.json
vendored
@@ -1,45 +0,0 @@
|
||||
{
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"alias": "TP-LINK_Smart Plug_004F",
|
||||
"child_num": 2,
|
||||
"children": [
|
||||
{
|
||||
"alias": "Zombie",
|
||||
"id": "8006231E1499BAC4D4BC7EFCD4B075181E6393F200",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
},
|
||||
{
|
||||
"alias": "Magic",
|
||||
"id": "8006231E1499BAC4D4BC7EFCD4B075181E6393F201",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
}
|
||||
],
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "EP40(US)",
|
||||
"ntc_state": 0,
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"rssi": -47,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.2 Build 210105 Rel.165938",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
131
kasa/tests/fixtures/ES20M(US)_1.0_1.0.11.json
vendored
131
kasa/tests/fixtures/ES20M(US)_1.0_1.0.11.json
vendored
@@ -1,131 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.LAS": {
|
||||
"get_config": {
|
||||
"devs": [
|
||||
{
|
||||
"dark_index": 0,
|
||||
"enable": 1,
|
||||
"hw_id": 0,
|
||||
"level_array": [
|
||||
{
|
||||
"adc": 390,
|
||||
"name": "cloudy",
|
||||
"value": 15
|
||||
},
|
||||
{
|
||||
"adc": 300,
|
||||
"name": "overcast",
|
||||
"value": 11
|
||||
},
|
||||
{
|
||||
"adc": 222,
|
||||
"name": "dawn",
|
||||
"value": 8
|
||||
},
|
||||
{
|
||||
"adc": 222,
|
||||
"name": "twilight",
|
||||
"value": 8
|
||||
},
|
||||
{
|
||||
"adc": 111,
|
||||
"name": "total darkness",
|
||||
"value": 4
|
||||
},
|
||||
{
|
||||
"adc": 2400,
|
||||
"name": "custom",
|
||||
"value": 94
|
||||
}
|
||||
],
|
||||
"max_adc": 2550,
|
||||
"min_adc": 0
|
||||
}
|
||||
],
|
||||
"err_code": 0,
|
||||
"ver": "1.0"
|
||||
},
|
||||
"get_current_brt": {
|
||||
"err_code": 0,
|
||||
"value": 16
|
||||
}
|
||||
},
|
||||
"smartlife.iot.PIR": {
|
||||
"get_config": {
|
||||
"array": [
|
||||
80,
|
||||
50,
|
||||
20,
|
||||
0
|
||||
],
|
||||
"cold_time": 120000,
|
||||
"enable": 1,
|
||||
"err_code": 0,
|
||||
"max_adc": 4095,
|
||||
"min_adc": 0,
|
||||
"trigger_index": 0,
|
||||
"version": "1.0"
|
||||
}
|
||||
},
|
||||
"smartlife.iot.dimmer": {
|
||||
"get_dimmer_parameters": {
|
||||
"bulb_type": 1,
|
||||
"err_code": 0,
|
||||
"fadeOffTime": 0,
|
||||
"fadeOnTime": 0,
|
||||
"gentleOffTime": 10000,
|
||||
"gentleOnTime": 3000,
|
||||
"minThreshold": 17,
|
||||
"rampRate": 30
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "#MASKED_NAME#",
|
||||
"brightness": 100,
|
||||
"dev_name": "Wi-Fi Smart Dimmer with sensor",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 1,
|
||||
"longitude_i": 0,
|
||||
"mac": "B0:A7:B9:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "ES20M(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"obd_src": "tplink",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 6,
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 100,
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"brightness": 75,
|
||||
"index": 1
|
||||
},
|
||||
{
|
||||
"brightness": 50,
|
||||
"index": 2
|
||||
},
|
||||
{
|
||||
"brightness": 25,
|
||||
"index": 3
|
||||
}
|
||||
],
|
||||
"relay_state": 1,
|
||||
"rssi": -40,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.11 Build 240514 Rel.110351",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
126
kasa/tests/fixtures/ES20M(US)_1.0_1.0.8.json
vendored
126
kasa/tests/fixtures/ES20M(US)_1.0_1.0.8.json
vendored
@@ -1,126 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.LAS": {
|
||||
"get_config": {
|
||||
"devs": [
|
||||
{
|
||||
"dark_index": 0,
|
||||
"enable": 1,
|
||||
"hw_id": 0,
|
||||
"level_array": [
|
||||
{
|
||||
"adc": 367,
|
||||
"name": "cloudy",
|
||||
"value": 14
|
||||
},
|
||||
{
|
||||
"adc": 300,
|
||||
"name": "overcast",
|
||||
"value": 12
|
||||
},
|
||||
{
|
||||
"adc": 222,
|
||||
"name": "dawn",
|
||||
"value": 9
|
||||
},
|
||||
{
|
||||
"adc": 222,
|
||||
"name": "twilight",
|
||||
"value": 9
|
||||
},
|
||||
{
|
||||
"adc": 111,
|
||||
"name": "total darkness",
|
||||
"value": 4
|
||||
},
|
||||
{
|
||||
"adc": 2400,
|
||||
"name": "custom",
|
||||
"value": 97
|
||||
}
|
||||
],
|
||||
"max_adc": 2450,
|
||||
"min_adc": 0
|
||||
}
|
||||
],
|
||||
"err_code": 0,
|
||||
"ver": "1.0"
|
||||
}
|
||||
},
|
||||
"smartlife.iot.PIR": {
|
||||
"get_config": {
|
||||
"array": [
|
||||
80,
|
||||
50,
|
||||
20,
|
||||
0
|
||||
],
|
||||
"cold_time": 600000,
|
||||
"enable": 1,
|
||||
"err_code": 0,
|
||||
"max_adc": 4095,
|
||||
"min_adc": 0,
|
||||
"trigger_index": 0,
|
||||
"version": "1.0"
|
||||
}
|
||||
},
|
||||
"smartlife.iot.dimmer": {
|
||||
"get_dimmer_parameters": {
|
||||
"bulb_type": 1,
|
||||
"err_code": 0,
|
||||
"fadeOffTime": 2000,
|
||||
"fadeOnTime": 1000,
|
||||
"gentleOffTime": 10000,
|
||||
"gentleOnTime": 3000,
|
||||
"minThreshold": 14,
|
||||
"rampRate": 30
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Test ES20M",
|
||||
"brightness": 35,
|
||||
"dev_name": "Wi-Fi Smart Dimmer with sensor",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "ES20M(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 100,
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"brightness": 75,
|
||||
"index": 1
|
||||
},
|
||||
{
|
||||
"brightness": 50,
|
||||
"index": 2
|
||||
},
|
||||
{
|
||||
"brightness": 25,
|
||||
"index": 3
|
||||
}
|
||||
],
|
||||
"relay_state": 0,
|
||||
"rssi": -59,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.8 Build 211201 Rel.123822",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
28
kasa/tests/fixtures/HS100(UK)_1.0_1.2.6.json
vendored
28
kasa/tests/fixtures/HS100(UK)_1.0_1.2.6.json
vendored
@@ -1,28 +0,0 @@
|
||||
{
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "schedule",
|
||||
"alias": "#MASKED_NAME#",
|
||||
"dev_name": "Wi-Fi Smart Plug",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"fwId": "00000000000000000000000000000000",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude": 0,
|
||||
"led_off": 0,
|
||||
"longitude": 0,
|
||||
"mac": "70:4F:57:00:00:00",
|
||||
"model": "HS100(UK)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"relay_state": 0,
|
||||
"rssi": -59,
|
||||
"sw_ver": "1.2.6 Build 200727 Rel.120236",
|
||||
"type": "IOT.SMARTPLUGSWITCH",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
47
kasa/tests/fixtures/HS100(UK)_4.1_1.1.0.json
vendored
47
kasa/tests/fixtures/HS100(UK)_4.1_1.1.0.json
vendored
@@ -1,47 +0,0 @@
|
||||
{
|
||||
"discovery_result": {
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "HS100(UK)",
|
||||
"device_type": "IOT.SMARTPLUGSWITCH",
|
||||
"factory_default": true,
|
||||
"hw_ver": "4.1",
|
||||
"ip": "127.0.0.123",
|
||||
"mac": "CC-32-E5-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"encrypt_type": "KLAP",
|
||||
"http_port": 80,
|
||||
"is_support_https": false
|
||||
},
|
||||
"owner": "00000000000000000000000000000000"
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "#MASKED_NAME#",
|
||||
"dev_name": "Smart Wi-Fi Plug",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "4.1",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "CC:32:E5:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "HS100(UK)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"ntc_state": 0,
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"relay_state": 0,
|
||||
"rssi": -43,
|
||||
"status": "new",
|
||||
"sw_ver": "1.1.0 Build 201016 Rel.175121",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
44
kasa/tests/fixtures/HS100(US)_1.0_1.2.5.json
vendored
44
kasa/tests/fixtures/HS100(US)_1.0_1.2.5.json
vendored
@@ -1,44 +0,0 @@
|
||||
{
|
||||
"emeter": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.common.emeter": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.dimmer": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "schedule",
|
||||
"alias": "Unused 3",
|
||||
"dev_name": "Wi-Fi Smart Plug",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"fwId": "00000000000000000000000000000000",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude": 0,
|
||||
"led_off": 0,
|
||||
"longitude": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"model": "HS100(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"relay_state": 0,
|
||||
"rssi": -63,
|
||||
"sw_ver": "1.2.5 Build 171129 Rel.174814",
|
||||
"type": "IOT.SMARTPLUGSWITCH",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
49
kasa/tests/fixtures/HS100(US)_2.0_1.5.6.json
vendored
49
kasa/tests/fixtures/HS100(US)_2.0_1.5.6.json
vendored
@@ -1,49 +0,0 @@
|
||||
{
|
||||
"emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
}
|
||||
},
|
||||
"smartlife.iot.common.emeter": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.dimmer": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "3D Printer",
|
||||
"dev_name": "Smart Wi-Fi Plug",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"fwId": "00000000000000000000000000000000",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "2.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"model": "HS100(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"relay_state": 0,
|
||||
"rssi": -36,
|
||||
"sw_ver": "1.5.6 Build 191118 Rel.140307",
|
||||
"type": "IOT.SMARTPLUGSWITCH",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
52
kasa/tests/fixtures/HS103(US)_1.0_1.5.7.json
vendored
52
kasa/tests/fixtures/HS103(US)_1.0_1.5.7.json
vendored
@@ -1,52 +0,0 @@
|
||||
{
|
||||
"emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
}
|
||||
},
|
||||
"smartlife.iot.common.emeter": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.dimmer": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "schedule",
|
||||
"alias": "Night lite",
|
||||
"dev_name": "Smart Wi-Fi Plug Lite",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"fwId": "00000000000000000000000000000000",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"model": "HS103(US)",
|
||||
"next_action": {
|
||||
"action": 1,
|
||||
"id": "F98589DFF09AEA1D5AC2BDB4A8867305",
|
||||
"schd_sec": 75600,
|
||||
"type": 1
|
||||
},
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"relay_state": 0,
|
||||
"rssi": -43,
|
||||
"sw_ver": "1.5.7 Build 191114 Rel.105922",
|
||||
"type": "IOT.SMARTPLUGSWITCH",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
47
kasa/tests/fixtures/HS103(US)_2.1_1.1.2.json
vendored
47
kasa/tests/fixtures/HS103(US)_2.1_1.1.2.json
vendored
@@ -1,47 +0,0 @@
|
||||
{
|
||||
"emeter": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.common.emeter": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.dimmer": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Corner",
|
||||
"dev_name": "Smart Wi-Fi Plug Lite",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "2.1",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "HS103(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"relay_state": 0,
|
||||
"rssi": -58,
|
||||
"status": "new",
|
||||
"sw_ver": "1.1.2 Build 191113 Rel.095623",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
31
kasa/tests/fixtures/HS103(US)_2.1_1.1.4.json
vendored
31
kasa/tests/fixtures/HS103(US)_2.1_1.1.4.json
vendored
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Plug",
|
||||
"dev_name": "Smart Wi-Fi Plug Lite",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "2.1",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "HS103(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"relay_state": 0,
|
||||
"rssi": -48,
|
||||
"status": "new",
|
||||
"sw_ver": "1.1.4 Build 210409 Rel.113427",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
49
kasa/tests/fixtures/HS105(US)_1.0_1.5.6.json
vendored
49
kasa/tests/fixtures/HS105(US)_1.0_1.5.6.json
vendored
@@ -1,49 +0,0 @@
|
||||
{
|
||||
"emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
}
|
||||
},
|
||||
"smartlife.iot.common.emeter": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.dimmer": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Unused 1",
|
||||
"dev_name": "Smart Wi-Fi Plug Mini",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"fwId": "00000000000000000000000000000000",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"model": "HS105(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"relay_state": 0,
|
||||
"rssi": -46,
|
||||
"sw_ver": "1.5.6 Build 191114 Rel.104204",
|
||||
"type": "IOT.SMARTPLUGSWITCH",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
59
kasa/tests/fixtures/HS107(US)_1.0_1.0.8.json
vendored
59
kasa/tests/fixtures/HS107(US)_1.0_1.0.8.json
vendored
@@ -1,59 +0,0 @@
|
||||
{
|
||||
"emeter": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.common.emeter": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.dimmer": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"alias": "TP-LINK_Smart Plug_D310",
|
||||
"child_num": 2,
|
||||
"children": [
|
||||
{
|
||||
"alias": "Garage Charger 1",
|
||||
"id": "00",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
},
|
||||
{
|
||||
"alias": "Garage Charger 2",
|
||||
"id": "01",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
}
|
||||
],
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": -0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "HS107(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"rssi": -51,
|
||||
"sw_ver": "1.0.8 Build 190103 Rel.163436",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
37
kasa/tests/fixtures/HS110(EU)_1.0_1.2.5.json
vendored
37
kasa/tests/fixtures/HS110(EU)_1.0_1.2.5.json
vendored
@@ -1,37 +0,0 @@
|
||||
{
|
||||
"emeter": {
|
||||
"get_realtime": {
|
||||
"current": 0.014937,
|
||||
"err_code": 0,
|
||||
"power": 0.928511,
|
||||
"total": 55.139,
|
||||
"voltage": 231.067823
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "schedule",
|
||||
"alias": "Bedroom Lamp Plug",
|
||||
"dev_name": "Wi-Fi Smart Plug With Energy Monitoring",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM:ENE",
|
||||
"fwId": "00000000000000000000000000000000",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude": 0,
|
||||
"led_off": 1,
|
||||
"longitude": 0,
|
||||
"mac": "50:C7:BF:00:00:00",
|
||||
"model": "HS110(EU)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 6023162,
|
||||
"relay_state": 1,
|
||||
"rssi": -71,
|
||||
"sw_ver": "1.2.5 Build 171213 Rel.101523",
|
||||
"type": "IOT.SMARTPLUGSWITCH",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
40
kasa/tests/fixtures/HS110(EU)_4.0_1.0.4.json
vendored
40
kasa/tests/fixtures/HS110(EU)_4.0_1.0.4.json
vendored
@@ -1,40 +0,0 @@
|
||||
{
|
||||
"emeter": {
|
||||
"get_realtime": {
|
||||
"current_ma": 451,
|
||||
"err_code": 0,
|
||||
"power_mw": 61753,
|
||||
"total_wh": 16323,
|
||||
"voltage_mv": 230837
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "#MASKED_NAME#",
|
||||
"dev_name": "Smart Wi-Fi Plug With Energy Monitoring",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM:ENE",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "4.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 1,
|
||||
"longitude_i": 0,
|
||||
"mac": "B0:95:75:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "HS110(EU)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 1484778,
|
||||
"relay_state": 1,
|
||||
"rssi": -60,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.4 Build 191111 Rel.143500",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
37
kasa/tests/fixtures/HS110(US)_1.0_1.2.6.json
vendored
37
kasa/tests/fixtures/HS110(US)_1.0_1.2.6.json
vendored
@@ -1,37 +0,0 @@
|
||||
{
|
||||
"emeter": {
|
||||
"get_realtime": {
|
||||
"current": 0.128037,
|
||||
"err_code": 0,
|
||||
"power": 7.677094,
|
||||
"total": 30.404,
|
||||
"voltage": 118.917389
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "schedule",
|
||||
"alias": "Home Google WiFi HS110",
|
||||
"dev_name": "Wi-Fi Smart Plug With Energy Monitoring",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM:ENE",
|
||||
"fwId": "00000000000000000000000000000000",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude": 0,
|
||||
"led_off": 0,
|
||||
"longitude": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"model": "HS110(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 14048150,
|
||||
"relay_state": 1,
|
||||
"rssi": -38,
|
||||
"sw_ver": "1.2.6 Build 200727 Rel.121701",
|
||||
"type": "IOT.SMARTPLUGSWITCH",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
49
kasa/tests/fixtures/HS200(US)_2.0_1.5.7.json
vendored
49
kasa/tests/fixtures/HS200(US)_2.0_1.5.7.json
vendored
@@ -1,49 +0,0 @@
|
||||
{
|
||||
"emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
}
|
||||
},
|
||||
"smartlife.iot.common.emeter": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.dimmer": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Master Bedroom Fan",
|
||||
"dev_name": "Smart Wi-Fi Light Switch",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"fwId": "00000000000000000000000000000000",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "2.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "HS200(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"relay_state": 0,
|
||||
"rssi": -33,
|
||||
"sw_ver": "1.5.7 Build 191118 Rel.140152",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
31
kasa/tests/fixtures/HS200(US)_3.0_1.1.5.json
vendored
31
kasa/tests/fixtures/HS200(US)_3.0_1.1.5.json
vendored
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "#MASKED_NAME#",
|
||||
"dev_name": "Smart Wi-Fi Light Switch",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "3.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "D8:07:B6:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "HS200(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"relay_state": 0,
|
||||
"rssi": -44,
|
||||
"status": "new",
|
||||
"sw_ver": "1.1.5 Build 210422 Rel.082129",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
32
kasa/tests/fixtures/HS200(US)_5.0_1.0.11.json
vendored
32
kasa/tests/fixtures/HS200(US)_5.0_1.0.11.json
vendored
@@ -1,32 +0,0 @@
|
||||
{
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "#MASKED_NAME#",
|
||||
"dev_name": "Smart Wi-Fi Light Switch",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "5.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "28:87:BA:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "HS200(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"obd_src": "tplink",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"relay_state": 0,
|
||||
"rssi": -41,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.11 Build 230908 Rel.160526",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
31
kasa/tests/fixtures/HS200(US)_5.0_1.0.2.json
vendored
31
kasa/tests/fixtures/HS200(US)_5.0_1.0.2.json
vendored
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "House Fan",
|
||||
"dev_name": "Smart Wi-Fi Light Switch",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "5.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "HS200(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"relay_state": 0,
|
||||
"rssi": -50,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.2 Build 200819 Rel.105309",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
50
kasa/tests/fixtures/HS210(US)_1.0_1.5.8.json
vendored
50
kasa/tests/fixtures/HS210(US)_1.0_1.5.8.json
vendored
@@ -1,50 +0,0 @@
|
||||
{
|
||||
"emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
}
|
||||
},
|
||||
"smartlife.iot.common.emeter": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.dimmer": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"abnormal_detect": 1,
|
||||
"active_mode": "none",
|
||||
"alias": "Garage Light",
|
||||
"dev_name": "Smart Wi-Fi 3-Way Light Switch",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"fwId": "00000000000000000000000000000000",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "HS210(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"relay_state": 0,
|
||||
"rssi": -52,
|
||||
"sw_ver": "1.5.8 Build 191118 Rel.135937",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
31
kasa/tests/fixtures/HS210(US)_2.0_1.1.5.json
vendored
31
kasa/tests/fixtures/HS210(US)_2.0_1.1.5.json
vendored
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "#MASKED_NAME#",
|
||||
"dev_name": "Smart Wi-Fi 3-Way Light Switch",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "2.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "D8:07:B6:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "HS210(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"relay_state": 0,
|
||||
"rssi": -43,
|
||||
"status": "new",
|
||||
"sw_ver": "1.1.5 Build 210422 Rel.113212",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
76
kasa/tests/fixtures/HS220(US)_1.0_1.5.7.json
vendored
76
kasa/tests/fixtures/HS220(US)_1.0_1.5.7.json
vendored
@@ -1,76 +0,0 @@
|
||||
{
|
||||
"emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
}
|
||||
},
|
||||
"smartlife.iot.common.emeter": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.dimmer": {
|
||||
"get_dimmer_parameters": {
|
||||
"bulb_type": 1,
|
||||
"err_code": 0,
|
||||
"fadeOffTime": 1000,
|
||||
"fadeOnTime": 1000,
|
||||
"gentleOffTime": 10000,
|
||||
"gentleOnTime": 3000,
|
||||
"minThreshold": 0,
|
||||
"rampRate": 30
|
||||
}
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Living Room Dimmer Switch",
|
||||
"brightness": 25,
|
||||
"dev_name": "Smart Wi-Fi Dimmer",
|
||||
"deviceId": "000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"fwId": "00000000000000000000000000000000",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 11.6210,
|
||||
"led_off": 0,
|
||||
"longitude_i": 42.2074,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "HS220(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 100,
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"brightness": 75,
|
||||
"index": 1
|
||||
},
|
||||
{
|
||||
"brightness": 50,
|
||||
"index": 2
|
||||
},
|
||||
{
|
||||
"brightness": 25,
|
||||
"index": 3
|
||||
}
|
||||
],
|
||||
"relay_state": 0,
|
||||
"rssi": -35,
|
||||
"sw_ver": "1.5.7 Build 180912 Rel.104837",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
64
kasa/tests/fixtures/HS220(US)_2.0_1.0.3.json
vendored
64
kasa/tests/fixtures/HS220(US)_2.0_1.0.3.json
vendored
@@ -1,64 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.dimmer": {
|
||||
"get_dimmer_parameters": {
|
||||
"err_code": 0,
|
||||
"fadeOffTime": 1000,
|
||||
"fadeOnTime": 1000,
|
||||
"gentleOffTime": 10000,
|
||||
"gentleOnTime": 3000,
|
||||
"minThreshold": 0,
|
||||
"rampRate": 30
|
||||
}
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Living Room Dimmer Switch",
|
||||
"brightness": 100,
|
||||
"dev_name": "Wi-Fi Smart Dimmer",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "2.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "HS220(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 100,
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"brightness": 75,
|
||||
"index": 1
|
||||
},
|
||||
{
|
||||
"brightness": 50,
|
||||
"index": 2
|
||||
},
|
||||
{
|
||||
"brightness": 25,
|
||||
"index": 3
|
||||
}
|
||||
],
|
||||
"relay_state": 0,
|
||||
"rssi": -45,
|
||||
"sw_ver": "1.0.3 Build 200326 Rel.082355",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
100
kasa/tests/fixtures/HS300(US)_1.0_1.0.10.json
vendored
100
kasa/tests/fixtures/HS300(US)_1.0_1.0.10.json
vendored
@@ -1,100 +0,0 @@
|
||||
{
|
||||
"emeter": {
|
||||
"get_realtime": {
|
||||
"current_ma": 4,
|
||||
"err_code": 0,
|
||||
"power_mw": 17,
|
||||
"total_wh": 1279,
|
||||
"voltage_mv": 122414
|
||||
}
|
||||
},
|
||||
"smartlife.iot.common.emeter": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.dimmer": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"alias": "TP-LINK_Power Strip_DAE1",
|
||||
"child_num": 6,
|
||||
"children": [
|
||||
{
|
||||
"alias": "Office Monitor 1",
|
||||
"id": "00",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
},
|
||||
{
|
||||
"alias": "Office Monitor 2",
|
||||
"id": "01",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
},
|
||||
{
|
||||
"alias": "Office Monitor 3",
|
||||
"id": "02",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
},
|
||||
{
|
||||
"alias": "Office Laptop Dock",
|
||||
"id": "03",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
},
|
||||
{
|
||||
"alias": "Office Desk Light",
|
||||
"id": "04",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
},
|
||||
{
|
||||
"alias": "Laptop",
|
||||
"id": "05",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": -32407,
|
||||
"state": 1
|
||||
}
|
||||
],
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM:ENE",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": -0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "HS300(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"rssi": -62,
|
||||
"sw_ver": "1.0.10 Build 190103 Rel.163517",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
89
kasa/tests/fixtures/HS300(US)_1.0_1.0.21.json
vendored
89
kasa/tests/fixtures/HS300(US)_1.0_1.0.21.json
vendored
@@ -1,89 +0,0 @@
|
||||
{
|
||||
"emeter": {
|
||||
"get_realtime": {
|
||||
"current_ma": 544,
|
||||
"err_code": 0,
|
||||
"power_mw": 62430,
|
||||
"total_wh": 26889,
|
||||
"voltage_mv": 118389
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"alias": "TP-LINK_Power Strip_2CA9",
|
||||
"child_num": 6,
|
||||
"children": [
|
||||
{
|
||||
"alias": "Home CameraPC",
|
||||
"id": "800623145DFF1AA096363EFD161C2E661A9D8DED00",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 1449897,
|
||||
"state": 1
|
||||
},
|
||||
{
|
||||
"alias": "Home Firewalla",
|
||||
"id": "800623145DFF1AA096363EFD161C2E661A9D8DED01",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 1449897,
|
||||
"state": 1
|
||||
},
|
||||
{
|
||||
"alias": "Home Cox modem",
|
||||
"id": "800623145DFF1AA096363EFD161C2E661A9D8DED02",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 1449897,
|
||||
"state": 1
|
||||
},
|
||||
{
|
||||
"alias": "Home rpi3-2",
|
||||
"id": "800623145DFF1AA096363EFD161C2E661A9D8DED03",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 1449897,
|
||||
"state": 1
|
||||
},
|
||||
{
|
||||
"alias": "Home Camera Switch",
|
||||
"id": "800623145DFF1AA096363EFD161C2E661A9D8DED05",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 1449897,
|
||||
"state": 1
|
||||
},
|
||||
{
|
||||
"alias": "Home Network Switch",
|
||||
"id": "800623145DFF1AA096363EFD161C2E661A9D8DED04",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 1449897,
|
||||
"state": 1
|
||||
}
|
||||
],
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM:ENE",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "HS300(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"rssi": -39,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.21 Build 210524 Rel.161309",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
90
kasa/tests/fixtures/HS300(US)_2.0_1.0.12.json
vendored
90
kasa/tests/fixtures/HS300(US)_2.0_1.0.12.json
vendored
@@ -1,90 +0,0 @@
|
||||
{
|
||||
"emeter": {
|
||||
"get_realtime": {
|
||||
"current_ma": 6,
|
||||
"err_code": 0,
|
||||
"power_mw": 277,
|
||||
"slot_id": 0,
|
||||
"total_wh": 62,
|
||||
"voltage_mv": 120110
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"alias": "#MASKED_NAME#",
|
||||
"child_num": 6,
|
||||
"children": [
|
||||
{
|
||||
"alias": "#MASKED_NAME#",
|
||||
"id": "8006A0F1D01120C3F93794F7AACACDBE1EAD246D00",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 710216,
|
||||
"state": 1
|
||||
},
|
||||
{
|
||||
"alias": "#MASKED_NAME#",
|
||||
"id": "8006A0F1D01120C3F93794F7AACACDBE1EAD246D01",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 710216,
|
||||
"state": 1
|
||||
},
|
||||
{
|
||||
"alias": "#MASKED_NAME#",
|
||||
"id": "8006A0F1D01120C3F93794F7AACACDBE1EAD246D02",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 710216,
|
||||
"state": 1
|
||||
},
|
||||
{
|
||||
"alias": "#MASKED_NAME#",
|
||||
"id": "8006A0F1D01120C3F93794F7AACACDBE1EAD246D03",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 710216,
|
||||
"state": 1
|
||||
},
|
||||
{
|
||||
"alias": "#MASKED_NAME#",
|
||||
"id": "8006A0F1D01120C3F93794F7AACACDBE1EAD246D04",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 710216,
|
||||
"state": 1
|
||||
},
|
||||
{
|
||||
"alias": "#MASKED_NAME#",
|
||||
"id": "8006A0F1D01120C3F93794F7AACACDBE1EAD246D05",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 710216,
|
||||
"state": 1
|
||||
}
|
||||
],
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM:ENE",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "2.0",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "C0:06:C3:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "HS300(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"rssi": -44,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.12 Build 220121 Rel.175814",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
90
kasa/tests/fixtures/HS300(US)_2.0_1.0.3.json
vendored
90
kasa/tests/fixtures/HS300(US)_2.0_1.0.3.json
vendored
@@ -1,90 +0,0 @@
|
||||
{
|
||||
"emeter": {
|
||||
"get_realtime": {
|
||||
"current_ma": 0,
|
||||
"err_code": 0,
|
||||
"power_mw": 0,
|
||||
"slot_id": 0,
|
||||
"total_wh": 0,
|
||||
"voltage_mv": 121302
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"alias": "TP-LINK_Power Strip_5C33",
|
||||
"child_num": 6,
|
||||
"children": [
|
||||
{
|
||||
"alias": "Plug 1",
|
||||
"id": "8006AF35494E7DB13DDE9B8F40BF2E001E77031900",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
},
|
||||
{
|
||||
"alias": "Plug 2",
|
||||
"id": "8006AF35494E7DB13DDE9B8F40BF2E001E77031901",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
},
|
||||
{
|
||||
"alias": "Plug 3",
|
||||
"id": "8006AF35494E7DB13DDE9B8F40BF2E001E77031902",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
},
|
||||
{
|
||||
"alias": "Plug 4",
|
||||
"id": "8006AF35494E7DB13DDE9B8F40BF2E001E77031903",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
},
|
||||
{
|
||||
"alias": "Plug 5",
|
||||
"id": "8006AF35494E7DB13DDE9B8F40BF2E001E77031904",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
},
|
||||
{
|
||||
"alias": "Plug 6",
|
||||
"id": "8006AF35494E7DB13DDE9B8F40BF2E001E77031905",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
}
|
||||
],
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM:ENE",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "2.0",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "HS300(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"rssi": -55,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.3 Build 201203 Rel.165457",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
89
kasa/tests/fixtures/KL110(US)_1.0_1.8.11.json
vendored
89
kasa/tests/fixtures/KL110(US)_1.0_1.8.11.json
vendored
@@ -1,89 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": 0,
|
||||
"power_mw": 0
|
||||
}
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"get_light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 95,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"saturation": 0
|
||||
},
|
||||
"err_code": 0,
|
||||
"on_off": 0
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Bulb3",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Smart Wi-Fi LED Bulb with Dimmable Light",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"heapsize": 291620,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"is_color": 0,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 0,
|
||||
"light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 95,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"saturation": 0
|
||||
},
|
||||
"on_off": 0
|
||||
},
|
||||
"mic_mac": "000000000000",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "KL110(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 0,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 75,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 1,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 25,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 2,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 1,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 3,
|
||||
"saturation": 0
|
||||
}
|
||||
],
|
||||
"rssi": -64,
|
||||
"sw_ver": "1.8.11 Build 191113 Rel.105336"
|
||||
}
|
||||
}
|
||||
}
|
||||
85
kasa/tests/fixtures/KL120(US)_1.0_1.8.11.json
vendored
85
kasa/tests/fixtures/KL120(US)_1.0_1.8.11.json
vendored
@@ -1,85 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": 0,
|
||||
"power_mw": 7800
|
||||
}
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"get_light_state": {
|
||||
"brightness": 70,
|
||||
"color_temp": 3001,
|
||||
"err_code": 0,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"on_off": 1,
|
||||
"saturation": 0
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Home Family Room Table",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Smart Wi-Fi LED Bulb with Tunable White Light",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"heapsize": 292140,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"is_color": 0,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 1,
|
||||
"light_state": {
|
||||
"brightness": 70,
|
||||
"color_temp": 3001,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"on_off": 1,
|
||||
"saturation": 0
|
||||
},
|
||||
"mic_mac": "000000000000",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "KL120(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 3500,
|
||||
"hue": 0,
|
||||
"index": 0,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 50,
|
||||
"color_temp": 5000,
|
||||
"hue": 0,
|
||||
"index": 1,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 50,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 2,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 1,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 3,
|
||||
"saturation": 0
|
||||
}
|
||||
],
|
||||
"rssi": -45,
|
||||
"sw_ver": "1.8.11 Build 191113 Rel.105336"
|
||||
}
|
||||
}
|
||||
}
|
||||
93
kasa/tests/fixtures/KL120(US)_1.0_1.8.6.json
vendored
93
kasa/tests/fixtures/KL120(US)_1.0_1.8.6.json
vendored
@@ -1,93 +0,0 @@
|
||||
{
|
||||
"emeter": {
|
||||
"err_code": -2001,
|
||||
"err_msg": "Module not support"
|
||||
},
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": 0,
|
||||
"power_mw": 1800
|
||||
}
|
||||
},
|
||||
"smartlife.iot.dimmer": {
|
||||
"err_code": -2001,
|
||||
"err_msg": "Module not support"
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"get_light_state": {
|
||||
"brightness": 10,
|
||||
"color_temp": 2700,
|
||||
"err_code": 0,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"on_off": 1,
|
||||
"saturation": 0
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Smart Wi-Fi LED Bulb with Tunable White Light",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "801200814AD69370AC59DE5501319C051AF409C3",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"heapsize": 290784,
|
||||
"hwId": "111E35908497A05512E259BB76801E10",
|
||||
"hw_ver": "1.0",
|
||||
"is_color": 0,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 1,
|
||||
"light_state": {
|
||||
"brightness": 10,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"on_off": 1,
|
||||
"saturation": 0
|
||||
},
|
||||
"mic_mac": "D80D17150474",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "KL120(US)",
|
||||
"oemId": "1210657CD7FBDC72895644388EEFAE8B",
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 3500,
|
||||
"hue": 0,
|
||||
"index": 0,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 50,
|
||||
"color_temp": 5000,
|
||||
"hue": 0,
|
||||
"index": 1,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 50,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 2,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 1,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 3,
|
||||
"saturation": 0
|
||||
}
|
||||
],
|
||||
"rssi": -52,
|
||||
"sw_ver": "1.8.6 Build 180809 Rel.091659"
|
||||
}
|
||||
}
|
||||
}
|
||||
88
kasa/tests/fixtures/KL125(US)_1.20_1.0.5.json
vendored
88
kasa/tests/fixtures/KL125(US)_1.20_1.0.5.json
vendored
@@ -1,88 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": 0,
|
||||
"power_mw": 10800,
|
||||
"total_wh": 40
|
||||
}
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"get_light_state": {
|
||||
"brightness": 100,
|
||||
"color_temp": 4000,
|
||||
"err_code": 0,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"on_off": 1,
|
||||
"saturation": 0
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "kasa-bc01",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Smart Wi-Fi LED Bulb with Color Changing",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.20",
|
||||
"is_color": 1,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 1,
|
||||
"latitude_i": 0,
|
||||
"light_state": {
|
||||
"brightness": 100,
|
||||
"color_temp": 4000,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"on_off": 1,
|
||||
"saturation": 0
|
||||
},
|
||||
"longitude_i": 0,
|
||||
"mic_mac": "000000000000",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "KL125(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 4000,
|
||||
"hue": 0,
|
||||
"index": 0,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 0,
|
||||
"index": 1,
|
||||
"saturation": 100
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 120,
|
||||
"index": 2,
|
||||
"saturation": 100
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 240,
|
||||
"index": 3,
|
||||
"saturation": 100
|
||||
}
|
||||
],
|
||||
"rssi": -59,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.5 Build 200831 Rel.141525"
|
||||
}
|
||||
}
|
||||
}
|
||||
92
kasa/tests/fixtures/KL125(US)_2.0_1.0.7.json
vendored
92
kasa/tests/fixtures/KL125(US)_2.0_1.0.7.json
vendored
@@ -1,92 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": 0,
|
||||
"power_mw": 0,
|
||||
"total_wh": 238
|
||||
}
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"get_light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 100,
|
||||
"color_temp": 2500,
|
||||
"hue": 255,
|
||||
"mode": "normal",
|
||||
"saturation": 100
|
||||
},
|
||||
"err_code": 0,
|
||||
"on_off": 0
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Test bulb 6",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Smart Wi-Fi LED Bulb with Color Changing",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "2.0",
|
||||
"is_color": 1,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 1,
|
||||
"latitude_i": 0,
|
||||
"light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 100,
|
||||
"color_temp": 2500,
|
||||
"hue": 255,
|
||||
"mode": "normal",
|
||||
"saturation": 100
|
||||
},
|
||||
"on_off": 0
|
||||
},
|
||||
"longitude_i": 0,
|
||||
"mic_mac": "000000000000",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "KL125(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 50,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 0,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 0,
|
||||
"index": 1,
|
||||
"saturation": 100
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 120,
|
||||
"index": 2,
|
||||
"saturation": 100
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 240,
|
||||
"index": 3,
|
||||
"saturation": 100
|
||||
}
|
||||
],
|
||||
"rssi": -63,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.7 Build 210811 Rel.171439"
|
||||
}
|
||||
}
|
||||
}
|
||||
93
kasa/tests/fixtures/KL125(US)_4.0_1.0.5.json
vendored
93
kasa/tests/fixtures/KL125(US)_4.0_1.0.5.json
vendored
@@ -1,93 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": 0,
|
||||
"power_mw": 0,
|
||||
"total_wh": 0
|
||||
}
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"get_light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 84,
|
||||
"color_temp": 0,
|
||||
"hue": 9,
|
||||
"mode": "normal",
|
||||
"saturation": 67
|
||||
},
|
||||
"err_code": 0,
|
||||
"on_off": 0
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "#MASKED_NAME#",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Smart Wi-Fi LED Bulb with Color Changing",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "4.0",
|
||||
"is_color": 1,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 1,
|
||||
"latitude_i": 0,
|
||||
"light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 84,
|
||||
"color_temp": 0,
|
||||
"hue": 9,
|
||||
"mode": "normal",
|
||||
"saturation": 67
|
||||
},
|
||||
"on_off": 0
|
||||
},
|
||||
"longitude_i": 0,
|
||||
"mic_mac": "5091E3000000",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "KL125(US)",
|
||||
"obd_src": "tplink",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 50,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 0,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 0,
|
||||
"index": 1,
|
||||
"saturation": 100
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 120,
|
||||
"index": 2,
|
||||
"saturation": 100
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 240,
|
||||
"index": 3,
|
||||
"saturation": 100
|
||||
}
|
||||
],
|
||||
"rssi": -37,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.5 Build 230613 Rel.151643"
|
||||
}
|
||||
}
|
||||
}
|
||||
85
kasa/tests/fixtures/KL130(EU)_1.0_1.8.8.json
vendored
85
kasa/tests/fixtures/KL130(EU)_1.0_1.8.8.json
vendored
@@ -1,85 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": 0,
|
||||
"power_mw": 2500
|
||||
}
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"get_light_state": {
|
||||
"brightness": 17,
|
||||
"color_temp": 2500,
|
||||
"err_code": 0,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"on_off": 1,
|
||||
"saturation": 0
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "#MASKED_NAME#",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Smart Wi-Fi LED Bulb with Color Changing",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"heapsize": 334708,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"is_color": 1,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 1,
|
||||
"light_state": {
|
||||
"brightness": 17,
|
||||
"color_temp": 2500,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"on_off": 1,
|
||||
"saturation": 0
|
||||
},
|
||||
"mic_mac": "1C3BF3000000",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "KL130(EU)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 50,
|
||||
"color_temp": 2500,
|
||||
"hue": 0,
|
||||
"index": 0,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 299,
|
||||
"index": 1,
|
||||
"saturation": 95
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 120,
|
||||
"index": 2,
|
||||
"saturation": 75
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 240,
|
||||
"index": 3,
|
||||
"saturation": 75
|
||||
}
|
||||
],
|
||||
"rssi": -60,
|
||||
"sw_ver": "1.8.8 Build 190613 Rel.123436"
|
||||
}
|
||||
}
|
||||
}
|
||||
89
kasa/tests/fixtures/KL130(US)_1.0_1.8.11.json
vendored
89
kasa/tests/fixtures/KL130(US)_1.0_1.8.11.json
vendored
@@ -1,89 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": 0,
|
||||
"power_mw": 0
|
||||
}
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"get_light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 30,
|
||||
"color_temp": 0,
|
||||
"hue": 240,
|
||||
"mode": "normal",
|
||||
"saturation": 100
|
||||
},
|
||||
"err_code": 0,
|
||||
"on_off": 0
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Bulb2",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Smart Wi-Fi LED Bulb with Color Changing",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"heapsize": 305252,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"is_color": 1,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 1,
|
||||
"light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 30,
|
||||
"color_temp": 0,
|
||||
"hue": 240,
|
||||
"mode": "normal",
|
||||
"saturation": 100
|
||||
},
|
||||
"on_off": 0
|
||||
},
|
||||
"mic_mac": "000000000000",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "KL130(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 50,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 0,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 0,
|
||||
"index": 1,
|
||||
"saturation": 75
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 120,
|
||||
"index": 2,
|
||||
"saturation": 75
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 240,
|
||||
"index": 3,
|
||||
"saturation": 75
|
||||
}
|
||||
],
|
||||
"rssi": -52,
|
||||
"sw_ver": "1.8.11 Build 191113 Rel.105336"
|
||||
}
|
||||
}
|
||||
}
|
||||
93
kasa/tests/fixtures/KL135(US)_1.0_1.0.15.json
vendored
93
kasa/tests/fixtures/KL135(US)_1.0_1.0.15.json
vendored
@@ -1,93 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": 0,
|
||||
"power_mw": 0,
|
||||
"total_wh": 25
|
||||
}
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"get_light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 98,
|
||||
"color_temp": 6500,
|
||||
"hue": 28,
|
||||
"mode": "normal",
|
||||
"saturation": 72
|
||||
},
|
||||
"err_code": 0,
|
||||
"on_off": 0
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "#MASKED_NAME#",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Smart Wi-Fi LED Bulb with Color Changing",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"is_color": 1,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 1,
|
||||
"latitude_i": 0,
|
||||
"light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 98,
|
||||
"color_temp": 6500,
|
||||
"hue": 28,
|
||||
"mode": "normal",
|
||||
"saturation": 72
|
||||
},
|
||||
"on_off": 0
|
||||
},
|
||||
"longitude_i": 0,
|
||||
"mic_mac": "000000000000",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "KL135(US)",
|
||||
"obd_src": "tplink",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 50,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 0,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 0,
|
||||
"index": 1,
|
||||
"saturation": 100
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 120,
|
||||
"index": 2,
|
||||
"saturation": 100
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 240,
|
||||
"index": 3,
|
||||
"saturation": 100
|
||||
}
|
||||
],
|
||||
"rssi": -41,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.15 Build 240429 Rel.154143"
|
||||
}
|
||||
}
|
||||
}
|
||||
89
kasa/tests/fixtures/KL135(US)_1.0_1.0.6.json
vendored
89
kasa/tests/fixtures/KL135(US)_1.0_1.0.6.json
vendored
@@ -1,89 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": 0,
|
||||
"power_mw": 900,
|
||||
"total_wh": 0
|
||||
}
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"get_light_state": {
|
||||
"brightness": 1,
|
||||
"color_temp": 0,
|
||||
"err_code": 0,
|
||||
"hue": 37,
|
||||
"mode": "normal",
|
||||
"on_off": 1,
|
||||
"saturation": 100
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "KL135 Bulb",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Smart Wi-Fi LED Bulb with Color Changing",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"is_color": 1,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 1,
|
||||
"latitude_i": 0,
|
||||
"light_state": {
|
||||
"brightness": 1,
|
||||
"color_temp": 0,
|
||||
"hue": 37,
|
||||
"mode": "normal",
|
||||
"on_off": 1,
|
||||
"saturation": 100
|
||||
},
|
||||
"longitude_i": 0,
|
||||
"mic_mac": "000000000000",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "KL135(US)",
|
||||
"obd_src": "tplink",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 50,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 0,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 0,
|
||||
"index": 1,
|
||||
"saturation": 100
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 120,
|
||||
"index": 2,
|
||||
"saturation": 100
|
||||
},
|
||||
{
|
||||
"brightness": 1,
|
||||
"color_temp": 0,
|
||||
"hue": 37,
|
||||
"index": 3,
|
||||
"saturation": 100
|
||||
}
|
||||
],
|
||||
"rssi": -69,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.6 Build 210330 Rel.173743"
|
||||
}
|
||||
}
|
||||
}
|
||||
57
kasa/tests/fixtures/KL400L5(US)_1.0_1.0.5.json
vendored
57
kasa/tests/fixtures/KL400L5(US)_1.0_1.0.5.json
vendored
@@ -1,57 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": 0,
|
||||
"power_mw": 10800,
|
||||
"total_wh": 0
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"LEF": 0,
|
||||
"active_mode": "none",
|
||||
"alias": "Kl400",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Kasa Smart Light Strip, Multicolor",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"is_color": 1,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 0,
|
||||
"latitude_i": 0,
|
||||
"length": 16,
|
||||
"light_state": {
|
||||
"brightness": 100,
|
||||
"color_temp": 6500,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"on_off": 1,
|
||||
"saturation": 0
|
||||
},
|
||||
"lighting_effect_state": {
|
||||
"brightness": 50,
|
||||
"custom": 0,
|
||||
"enable": 0,
|
||||
"id": "",
|
||||
"name": "station"
|
||||
},
|
||||
"longitude_i": 0,
|
||||
"mic_mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "KL400L5(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [],
|
||||
"rssi": -58,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.5 Build 210616 Rel.122727"
|
||||
}
|
||||
}
|
||||
}
|
||||
57
kasa/tests/fixtures/KL400L5(US)_1.0_1.0.8.json
vendored
57
kasa/tests/fixtures/KL400L5(US)_1.0_1.0.8.json
vendored
@@ -1,57 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": 0,
|
||||
"power_mw": 10800,
|
||||
"total_wh": 1
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"LEF": 0,
|
||||
"active_mode": "none",
|
||||
"alias": "Kl400",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Kasa Smart Light Strip, Multicolor",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"is_color": 1,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 0,
|
||||
"latitude_i": 0,
|
||||
"length": 1,
|
||||
"light_state": {
|
||||
"brightness": 100,
|
||||
"color_temp": 6500,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"on_off": 1,
|
||||
"saturation": 0
|
||||
},
|
||||
"lighting_effect_state": {
|
||||
"brightness": 100,
|
||||
"custom": 0,
|
||||
"enable": 1,
|
||||
"id": "CdLeIgiKcQrLKMINRPTMbylATulQewLD",
|
||||
"name": "Hanukkah"
|
||||
},
|
||||
"longitude_i": 0,
|
||||
"mic_mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "KL400L5(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [],
|
||||
"rssi": -44,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.8 Build 211018 Rel.162056"
|
||||
}
|
||||
}
|
||||
}
|
||||
57
kasa/tests/fixtures/KL420L5(US)_1.0_1.0.2.json
vendored
57
kasa/tests/fixtures/KL420L5(US)_1.0_1.0.2.json
vendored
@@ -1,57 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": 0,
|
||||
"power_mw": 1503,
|
||||
"total_wh": 0
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"LEF": 1,
|
||||
"active_mode": "none",
|
||||
"alias": "Kl420 test",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Kasa Smart Light Strip, Multicolor",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"is_color": 1,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 0,
|
||||
"latitude_i": 0,
|
||||
"length": 50,
|
||||
"light_state": {
|
||||
"brightness": 100,
|
||||
"color_temp": 6500,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"on_off": 1,
|
||||
"saturation": 0
|
||||
},
|
||||
"lighting_effect_state": {
|
||||
"brightness": 50,
|
||||
"custom": 0,
|
||||
"enable": 0,
|
||||
"id": "",
|
||||
"name": "station"
|
||||
},
|
||||
"longitude_i": 0,
|
||||
"mic_mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "KL420L5(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [],
|
||||
"rssi": -44,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.2 Build 211009 Rel.164949"
|
||||
}
|
||||
}
|
||||
}
|
||||
90
kasa/tests/fixtures/KL430(UN)_2.0_1.0.8.json
vendored
90
kasa/tests/fixtures/KL430(UN)_2.0_1.0.8.json
vendored
@@ -1,90 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": 0,
|
||||
"power_mw": 16760,
|
||||
"total_wh": 120
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"LEF": 1,
|
||||
"active_mode": "none",
|
||||
"alias": "Bedroom light strip",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Kasa Smart Light Strip, Multicolor",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "2.0",
|
||||
"is_color": 1,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 1,
|
||||
"latitude_i": 0,
|
||||
"length": 16,
|
||||
"light_state": {
|
||||
"brightness": 100,
|
||||
"color_temp": 9000,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"on_off": 1,
|
||||
"saturation": 0
|
||||
},
|
||||
"lighting_effect_state": {
|
||||
"brightness": 100,
|
||||
"custom": 1,
|
||||
"enable": 1,
|
||||
"id": "yMwcNpLxijmoKamskHCvvravpbnIqAIN",
|
||||
"name": "Aurora 1"
|
||||
},
|
||||
"longitude_i": 0,
|
||||
"mic_mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "KL430(UN)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 9000,
|
||||
"hue": 0,
|
||||
"index": 0,
|
||||
"mode": 1,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 217,
|
||||
"index": 1,
|
||||
"mode": 1,
|
||||
"saturation": 99
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 194,
|
||||
"index": 2,
|
||||
"mode": 1,
|
||||
"saturation": 50
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 277,
|
||||
"index": 3,
|
||||
"mode": 1,
|
||||
"saturation": 86
|
||||
}
|
||||
],
|
||||
"rssi": -43,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.8 Build 210121 Rel.084339"
|
||||
}
|
||||
}
|
||||
}
|
||||
109
kasa/tests/fixtures/KL430(US)_1.0_1.0.10.json
vendored
109
kasa/tests/fixtures/KL430(US)_1.0_1.0.10.json
vendored
@@ -1,109 +0,0 @@
|
||||
{
|
||||
"emeter": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"current_ma": 0,
|
||||
"err_code": 0,
|
||||
"power_mw": 2725,
|
||||
"total_wh": 1193,
|
||||
"voltage_mv": 0
|
||||
}
|
||||
},
|
||||
"smartlife.iot.dimmer": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "schedule",
|
||||
"alias": "Bedroom Lightstrip",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Kasa Smart Light Strip, Multicolor",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"is_color": 1,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 1,
|
||||
"latitude_i": 0,
|
||||
"length": 16,
|
||||
"light_state": {
|
||||
"brightness": 15,
|
||||
"color_temp": 2500,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"on_off": 1,
|
||||
"saturation": 0
|
||||
},
|
||||
"lighting_effect_state": {
|
||||
"brightness": 100,
|
||||
"custom": 0,
|
||||
"enable": 0,
|
||||
"id": "bCTItKETDFfrKANolgldxfgOakaarARs",
|
||||
"name": "Flicker"
|
||||
},
|
||||
"longitude_i": 0,
|
||||
"mic_mac": "CC32E5000000",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "KL430(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 100,
|
||||
"custom": 0,
|
||||
"id": "QglBhMShPHUAuxLqzNEefFrGiJwahOmz",
|
||||
"index": 0,
|
||||
"mode": 2
|
||||
},
|
||||
{
|
||||
"brightness": 100,
|
||||
"custom": 0,
|
||||
"id": "bCTItKETDFfrKANolgldxfgOakaarARs",
|
||||
"index": 1,
|
||||
"mode": 2
|
||||
},
|
||||
{
|
||||
"brightness": 34,
|
||||
"color_temp": 0,
|
||||
"hue": 7,
|
||||
"index": 2,
|
||||
"mode": 1,
|
||||
"saturation": 49
|
||||
},
|
||||
{
|
||||
"brightness": 25,
|
||||
"color_temp": 0,
|
||||
"hue": 4,
|
||||
"index": 3,
|
||||
"mode": 1,
|
||||
"saturation": 100
|
||||
},
|
||||
{
|
||||
"brightness": 15,
|
||||
"color_temp": 2500,
|
||||
"hue": 0,
|
||||
"index": 4,
|
||||
"mode": 1,
|
||||
"saturation": 0
|
||||
}
|
||||
],
|
||||
"rssi": -44,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.10 Build 200522 Rel.104340"
|
||||
}
|
||||
}
|
||||
}
|
||||
59
kasa/tests/fixtures/KL430(US)_2.0_1.0.11.json
vendored
59
kasa/tests/fixtures/KL430(US)_2.0_1.0.11.json
vendored
@@ -1,59 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": 0,
|
||||
"power_mw": 600,
|
||||
"total_wh": 0
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"LEF": 1,
|
||||
"active_mode": "none",
|
||||
"alias": "#MASKED_NAME#",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Kasa Smart Light Strip, Multicolor",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "2.0",
|
||||
"is_color": 1,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 1,
|
||||
"latitude_i": 0,
|
||||
"length": 16,
|
||||
"light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 100,
|
||||
"color_temp": 9000,
|
||||
"hue": 9,
|
||||
"mode": "normal",
|
||||
"saturation": 67
|
||||
},
|
||||
"on_off": 0
|
||||
},
|
||||
"lighting_effect_state": {
|
||||
"brightness": 70,
|
||||
"custom": 0,
|
||||
"enable": 0,
|
||||
"id": "joqVjlaTsgzmuQQBAlHRkkPAqkBUiqeb",
|
||||
"name": "Icicle"
|
||||
},
|
||||
"longitude_i": 0,
|
||||
"mic_mac": "E8:48:B8:00:00:00",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "KL430(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [],
|
||||
"rssi": -43,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.11 Build 220812 Rel.153345"
|
||||
}
|
||||
}
|
||||
}
|
||||
59
kasa/tests/fixtures/KL430(US)_2.0_1.0.8.json
vendored
59
kasa/tests/fixtures/KL430(US)_2.0_1.0.8.json
vendored
@@ -1,59 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": 0,
|
||||
"power_mw": 600,
|
||||
"total_wh": 0
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"LEF": 1,
|
||||
"active_mode": "none",
|
||||
"alias": "89 strip",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Kasa Smart Light Strip, Multicolor",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "2.0",
|
||||
"is_color": 1,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 1,
|
||||
"latitude_i": 0,
|
||||
"length": 16,
|
||||
"light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 50,
|
||||
"color_temp": 0,
|
||||
"hue": 30,
|
||||
"mode": "normal",
|
||||
"saturation": 100
|
||||
},
|
||||
"on_off": 0
|
||||
},
|
||||
"lighting_effect_state": {
|
||||
"brightness": 50,
|
||||
"custom": 0,
|
||||
"enable": 0,
|
||||
"id": "",
|
||||
"name": "station"
|
||||
},
|
||||
"longitude_i": 0,
|
||||
"mic_mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "KL430(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [],
|
||||
"rssi": -61,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.8 Build 210121 Rel.084339"
|
||||
}
|
||||
}
|
||||
}
|
||||
57
kasa/tests/fixtures/KL430(US)_2.0_1.0.9.json
vendored
57
kasa/tests/fixtures/KL430(US)_2.0_1.0.9.json
vendored
@@ -1,57 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": 0,
|
||||
"power_mw": 11150,
|
||||
"total_wh": 18
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"LEF": 1,
|
||||
"active_mode": "none",
|
||||
"alias": "kl430 updated",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Kasa Smart Light Strip, Multicolor",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "2.0",
|
||||
"is_color": 1,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 1,
|
||||
"latitude_i": 0,
|
||||
"length": 16,
|
||||
"light_state": {
|
||||
"brightness": 100,
|
||||
"color_temp": 0,
|
||||
"hue": 194,
|
||||
"mode": "normal",
|
||||
"on_off": 1,
|
||||
"saturation": 50
|
||||
},
|
||||
"lighting_effect_state": {
|
||||
"brightness": 100,
|
||||
"custom": 0,
|
||||
"enable": 1,
|
||||
"id": "izRhLCQNcDzIKdpMPqSTtBMuAIoreAuT",
|
||||
"name": "Rainbow"
|
||||
},
|
||||
"longitude_i": 0,
|
||||
"mic_mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "KL430(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [],
|
||||
"rssi": -58,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.9 Build 210915 Rel.170534"
|
||||
}
|
||||
}
|
||||
}
|
||||
90
kasa/tests/fixtures/KL50(US)_1.0_1.1.13.json
vendored
90
kasa/tests/fixtures/KL50(US)_1.0_1.1.13.json
vendored
@@ -1,90 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"current_ma": 0,
|
||||
"err_code": 0,
|
||||
"power_mw": 998,
|
||||
"total_wh": 1,
|
||||
"voltage_mv": 0
|
||||
}
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"get_light_state": {
|
||||
"brightness": 12,
|
||||
"color_temp": 2700,
|
||||
"err_code": 0,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"on_off": 1,
|
||||
"saturation": 0
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Kl50",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Kasa Smart Edison Bulb, Dimmable",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"is_color": 0,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 0,
|
||||
"latitude_i": 0,
|
||||
"light_state": {
|
||||
"brightness": 12,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"on_off": 1,
|
||||
"saturation": 0
|
||||
},
|
||||
"longitude_i": 0,
|
||||
"mic_mac": "000000000000",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "KL50(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 0,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 75,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 1,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 25,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 2,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 1,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 3,
|
||||
"saturation": 0
|
||||
}
|
||||
],
|
||||
"rssi": -68,
|
||||
"status": "new",
|
||||
"sw_ver": "1.1.13 Build 210524 Rel.082619"
|
||||
}
|
||||
}
|
||||
}
|
||||
102
kasa/tests/fixtures/KL60(UN)_1.0_1.1.4.json
vendored
102
kasa/tests/fixtures/KL60(UN)_1.0_1.1.4.json
vendored
@@ -1,102 +0,0 @@
|
||||
{
|
||||
"emeter": {
|
||||
"err_code": -2001,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"current_ma": 0,
|
||||
"err_code": 0,
|
||||
"power_mw": 0,
|
||||
"total_wh": 0,
|
||||
"voltage_mv": 0
|
||||
}
|
||||
},
|
||||
"smartlife.iot.dimmer": {
|
||||
"err_code": -2001,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"get_light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 95,
|
||||
"color_temp": 2000,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"saturation": 0
|
||||
},
|
||||
"err_code": 0,
|
||||
"on_off": 0
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "TP-LINK_Smart Bulb_9179",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Kasa Smart Edison Bulb, Dimmable",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"is_color": 0,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 0,
|
||||
"latitude_i": 0,
|
||||
"light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 95,
|
||||
"color_temp": 2000,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"saturation": 0
|
||||
},
|
||||
"on_off": 0
|
||||
},
|
||||
"longitude_i": 0,
|
||||
"mic_mac": "74DA88C89179",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "KL60(UN)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 2000,
|
||||
"hue": 0,
|
||||
"index": 0,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 75,
|
||||
"color_temp": 2000,
|
||||
"hue": 0,
|
||||
"index": 1,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 25,
|
||||
"color_temp": 2000,
|
||||
"hue": 0,
|
||||
"index": 2,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 1,
|
||||
"color_temp": 2000,
|
||||
"hue": 0,
|
||||
"index": 3,
|
||||
"saturation": 0
|
||||
}
|
||||
],
|
||||
"rssi": -60,
|
||||
"status": "new",
|
||||
"sw_ver": "1.1.4 Build 190618 Rel.085624"
|
||||
}
|
||||
}
|
||||
}
|
||||
90
kasa/tests/fixtures/KL60(US)_1.0_1.1.13.json
vendored
90
kasa/tests/fixtures/KL60(US)_1.0_1.1.13.json
vendored
@@ -1,90 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"current_ma": 0,
|
||||
"err_code": 0,
|
||||
"power_mw": 5200,
|
||||
"total_wh": 0,
|
||||
"voltage_mv": 0
|
||||
}
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"get_light_state": {
|
||||
"brightness": 100,
|
||||
"color_temp": 2000,
|
||||
"err_code": 0,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"on_off": 1,
|
||||
"saturation": 0
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Gold fil",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Kasa Smart Edison Bulb, Dimmable",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"is_color": 0,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 0,
|
||||
"latitude_i": 0,
|
||||
"light_state": {
|
||||
"brightness": 100,
|
||||
"color_temp": 2000,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"on_off": 1,
|
||||
"saturation": 0
|
||||
},
|
||||
"longitude_i": 0,
|
||||
"mic_mac": "000000000000",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "KL60(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 2000,
|
||||
"hue": 0,
|
||||
"index": 0,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 75,
|
||||
"color_temp": 2000,
|
||||
"hue": 0,
|
||||
"index": 1,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 25,
|
||||
"color_temp": 2000,
|
||||
"hue": 0,
|
||||
"index": 2,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 1,
|
||||
"color_temp": 2000,
|
||||
"hue": 0,
|
||||
"index": 3,
|
||||
"saturation": 0
|
||||
}
|
||||
],
|
||||
"rssi": -41,
|
||||
"status": "new",
|
||||
"sw_ver": "1.1.13 Build 210524 Rel.082619"
|
||||
}
|
||||
}
|
||||
}
|
||||
31
kasa/tests/fixtures/KP100(US)_3.0_1.0.1.json
vendored
31
kasa/tests/fixtures/KP100(US)_3.0_1.0.1.json
vendored
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Kasa",
|
||||
"dev_name": "Smart Wi-Fi Plug Mini",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "3.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "KP100(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 523,
|
||||
"relay_state": 1,
|
||||
"rssi": -60,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.1 Build 200831 Rel.142128",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
36
kasa/tests/fixtures/KP105(UK)_1.0_1.0.5.json
vendored
36
kasa/tests/fixtures/KP105(UK)_1.0_1.0.5.json
vendored
@@ -1,36 +0,0 @@
|
||||
{
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "schedule",
|
||||
"alias": "#MASKED_NAME#",
|
||||
"dev_name": "Smart Wi-Fi Plug",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "D8:47:32:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "KP105(UK)",
|
||||
"next_action": {
|
||||
"action": 1,
|
||||
"id": "8AA75A50A8440B17941D192BD9E01FFA",
|
||||
"schd_sec": 59160,
|
||||
"type": 1
|
||||
},
|
||||
"ntc_state": 0,
|
||||
"obd_src": "tplink",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"relay_state": 0,
|
||||
"rssi": -66,
|
||||
"status": "configured",
|
||||
"sw_ver": "1.0.5 Build 191209 Rel.094735",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
33
kasa/tests/fixtures/KP105(UK)_1.0_1.0.7.json
vendored
33
kasa/tests/fixtures/KP105(UK)_1.0_1.0.7.json
vendored
@@ -1,33 +0,0 @@
|
||||
{
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "#MASKED_NAME#",
|
||||
"dev_name": "Smart Wi-Fi Plug",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "D8:47:32:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "KP105(UK)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"ntc_state": 0,
|
||||
"obd_src": "tplink",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"relay_state": 0,
|
||||
"rssi": -67,
|
||||
"status": "configured",
|
||||
"sw_ver": "1.0.7 Build 210506 Rel.153510",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
42
kasa/tests/fixtures/KP115(EU)_1.0_1.0.16.json
vendored
42
kasa/tests/fixtures/KP115(EU)_1.0_1.0.16.json
vendored
@@ -1,42 +0,0 @@
|
||||
{
|
||||
"emeter": {
|
||||
"get_realtime": {
|
||||
"current_ma": 296,
|
||||
"err_code": 0,
|
||||
"power_mw": 63499,
|
||||
"total_wh": 12068,
|
||||
"voltage_mv": 230577
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "#MASKED_NAME#",
|
||||
"dev_name": "Smart Wi-Fi Plug Mini",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM:ENE",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 1,
|
||||
"longitude_i": 0,
|
||||
"mac": "C0:06:C3:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "KP115(EU)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"ntc_state": 0,
|
||||
"obd_src": "tplink",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 2078998,
|
||||
"relay_state": 1,
|
||||
"rssi": -49,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.16 Build 210205 Rel.163735",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
42
kasa/tests/fixtures/KP115(US)_1.0_1.0.17.json
vendored
42
kasa/tests/fixtures/KP115(US)_1.0_1.0.17.json
vendored
@@ -1,42 +0,0 @@
|
||||
{
|
||||
"emeter": {
|
||||
"get_realtime": {
|
||||
"current_ma": 0,
|
||||
"err_code": 0,
|
||||
"power_mw": 0,
|
||||
"total_wh": 0,
|
||||
"voltage_mv": 121148
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Test plug",
|
||||
"dev_name": "Smart Wi-Fi Plug Mini",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM:ENE",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "KP115(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"ntc_state": 0,
|
||||
"obd_src": "tplink",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 301,
|
||||
"relay_state": 1,
|
||||
"rssi": -59,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.17 Build 210506 Rel.075231",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
42
kasa/tests/fixtures/KP115(US)_1.0_1.0.21.json
vendored
42
kasa/tests/fixtures/KP115(US)_1.0_1.0.21.json
vendored
@@ -1,42 +0,0 @@
|
||||
{
|
||||
"emeter": {
|
||||
"get_realtime": {
|
||||
"current_ma": 0,
|
||||
"err_code": 0,
|
||||
"power_mw": 0,
|
||||
"total_wh": 0,
|
||||
"voltage_mv": 120652
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "#MASKED_NAME#",
|
||||
"dev_name": "Smart Wi-Fi Plug Mini",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM:ENE",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "54:AF:97:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "KP115(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"ntc_state": 0,
|
||||
"obd_src": "tplink",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"relay_state": 0,
|
||||
"rssi": -60,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.21 Build 231129 Rel.171238",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
42
kasa/tests/fixtures/KP125(US)_1.0_1.0.6.json
vendored
42
kasa/tests/fixtures/KP125(US)_1.0_1.0.6.json
vendored
@@ -1,42 +0,0 @@
|
||||
{
|
||||
"emeter": {
|
||||
"get_realtime": {
|
||||
"current_ma": 978,
|
||||
"err_code": 0,
|
||||
"power_mw": 100277,
|
||||
"total_wh": 12170,
|
||||
"voltage_mv": 119425
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Test plug",
|
||||
"dev_name": "Smart Wi-Fi Plug Mini",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM:ENE",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "KP125(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"ntc_state": 0,
|
||||
"obd_src": "tplink",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 301,
|
||||
"relay_state": 1,
|
||||
"rssi": -41,
|
||||
"status": "configured",
|
||||
"sw_ver": "1.0.6 Build 210928 Rel.185924",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
46
kasa/tests/fixtures/KP200(US)_3.0_1.0.3.json
vendored
46
kasa/tests/fixtures/KP200(US)_3.0_1.0.3.json
vendored
@@ -1,46 +0,0 @@
|
||||
{
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"alias": "TP-LINK_Smart Plug_C2D6",
|
||||
"child_num": 2,
|
||||
"children": [
|
||||
{
|
||||
"alias": "One ",
|
||||
"id": "80066788DFFFD572D9F2E4A5A6847669213E039F00",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 43,
|
||||
"state": 1
|
||||
},
|
||||
{
|
||||
"alias": "Two ",
|
||||
"id": "80066788DFFFD572D9F2E4A5A6847669213E039F01",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 44,
|
||||
"state": 1
|
||||
}
|
||||
],
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "3.0",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "KP200(US)",
|
||||
"ntc_state": 0,
|
||||
"obd_src": "tplink",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"rssi": -50,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.3 Build 221021 Rel.183354",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
54
kasa/tests/fixtures/KP303(UK)_1.0_1.0.3.json
vendored
54
kasa/tests/fixtures/KP303(UK)_1.0_1.0.3.json
vendored
@@ -1,54 +0,0 @@
|
||||
{
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"alias": "Bedroom Power Strip",
|
||||
"child_num": 3,
|
||||
"children": [
|
||||
{
|
||||
"alias": "Plug 1",
|
||||
"id": "8006E9854025B67C3F9D99BA1E66223D1C9A8A7700",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 79701,
|
||||
"state": 1
|
||||
},
|
||||
{
|
||||
"alias": "Plug 2",
|
||||
"id": "8006E9854025B67C3F9D99BA1E66223D1C9A8A7701",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 79700,
|
||||
"state": 0
|
||||
},
|
||||
{
|
||||
"alias": "Plug 3",
|
||||
"id": "8006E9854025B67C3F9D99BA1E66223D1C9A8A7702",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 1484408,
|
||||
"state": 0
|
||||
}
|
||||
],
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"latitude_i": 0,
|
||||
"led_off": 1,
|
||||
"longitude_i": 0,
|
||||
"mac": "1C:3B:F3:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "KP303(UK)",
|
||||
"ntc_state": 0,
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"rssi": -68,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.3 Build 191105 Rel.113122",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
54
kasa/tests/fixtures/KP303(US)_2.0_1.0.3.json
vendored
54
kasa/tests/fixtures/KP303(US)_2.0_1.0.3.json
vendored
@@ -1,54 +0,0 @@
|
||||
{
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"alias": "TP-LINK_Power Strip_BDF6",
|
||||
"child_num": 3,
|
||||
"children": [
|
||||
{
|
||||
"alias": "Plug 1",
|
||||
"id": "800681855E0E9AEF096F4891B3DC88C71E59F42E00",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
},
|
||||
{
|
||||
"alias": "Plug 2",
|
||||
"id": "800681855E0E9AEF096F4891B3DC88C71E59F42E01",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
},
|
||||
{
|
||||
"alias": "Plug 3",
|
||||
"id": "800681855E0E9AEF096F4891B3DC88C71E59F42E02",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
}
|
||||
],
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "2.0",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "KP303(US)",
|
||||
"ntc_state": 0,
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"rssi": -56,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.3 Build 201015 Rel.173920",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
55
kasa/tests/fixtures/KP303(US)_2.0_1.0.9.json
vendored
55
kasa/tests/fixtures/KP303(US)_2.0_1.0.9.json
vendored
@@ -1,55 +0,0 @@
|
||||
{
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"alias": "#MASKED_NAME#",
|
||||
"child_num": 3,
|
||||
"children": [
|
||||
{
|
||||
"alias": "#MASKED_NAME#",
|
||||
"id": "800639AA097730E58235162FCDA301CE1F038F9101",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 1461030,
|
||||
"state": 1
|
||||
},
|
||||
{
|
||||
"alias": "#MASKED_NAME#",
|
||||
"id": "800639AA097730E58235162FCDA301CE1F038F9102",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
},
|
||||
{
|
||||
"alias": "#MASKED_NAME#",
|
||||
"id": "800639AA097730E58235162FCDA301CE1F038F9100",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
}
|
||||
],
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "2.0",
|
||||
"latitude_i": 0,
|
||||
"led_off": 1,
|
||||
"longitude_i": 0,
|
||||
"mac": "B0:A7:B9:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "KP303(US)",
|
||||
"ntc_state": 0,
|
||||
"obd_src": "tplink",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"rssi": -58,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.9 Build 240131 Rel.141407",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
63
kasa/tests/fixtures/KP400(US)_1.0_1.0.10.json
vendored
63
kasa/tests/fixtures/KP400(US)_1.0_1.0.10.json
vendored
@@ -1,63 +0,0 @@
|
||||
{
|
||||
"emeter": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.common.emeter": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.dimmer": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"err_code": -1,
|
||||
"err_msg": "module not support"
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"alias": "TP-LINK_Smart Plug_2ECE",
|
||||
"child_num": 2,
|
||||
"children": [
|
||||
{
|
||||
"alias": "Rope",
|
||||
"id": "00",
|
||||
"next_action": {
|
||||
"action": 1,
|
||||
"schd_sec": 69240,
|
||||
"type": 1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
},
|
||||
{
|
||||
"alias": "Plug 2",
|
||||
"id": "01",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
}
|
||||
],
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "KP400(US)",
|
||||
"ntc_state": 0,
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"rssi": -78,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.10 Build 190716 Rel.095026",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
45
kasa/tests/fixtures/KP400(US)_2.0_1.0.6.json
vendored
45
kasa/tests/fixtures/KP400(US)_2.0_1.0.6.json
vendored
@@ -1,45 +0,0 @@
|
||||
{
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"alias": "TP-LINK_Smart Plug_DC2A",
|
||||
"child_num": 2,
|
||||
"children": [
|
||||
{
|
||||
"alias": "Anc ",
|
||||
"id": "8006B8E953CC4149E2B13AA27E0D18EF1DCFBF3400",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 313,
|
||||
"state": 1
|
||||
},
|
||||
{
|
||||
"alias": "Plug 2",
|
||||
"id": "8006B8E953CC4149E2B13AA27E0D18EF1DCFBF3401",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 313,
|
||||
"state": 1
|
||||
}
|
||||
],
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "2.0",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "KP400(US)",
|
||||
"ntc_state": 0,
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"rssi": -46,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.6 Build 200821 Rel.090909",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
45
kasa/tests/fixtures/KP400(US)_3.0_1.0.3.json
vendored
45
kasa/tests/fixtures/KP400(US)_3.0_1.0.3.json
vendored
@@ -1,45 +0,0 @@
|
||||
{
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"alias": "#MASKED_NAME#",
|
||||
"child_num": 2,
|
||||
"children": [
|
||||
{
|
||||
"alias": "#MASKED_NAME#",
|
||||
"id": "8006521377E30159055A751347B5A5E321A8D0A100",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 4024,
|
||||
"state": 1
|
||||
},
|
||||
{
|
||||
"alias": "#MASKED_NAME#",
|
||||
"id": "8006521377E30159055A751347B5A5E321A8D0A101",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 4024,
|
||||
"state": 1
|
||||
}
|
||||
],
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "3.0",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "3C:52:A1:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "KP400(US)",
|
||||
"ntc_state": 0,
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"rssi": -75,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.3 Build 220803 Rel.172301",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
46
kasa/tests/fixtures/KP400(US)_3.0_1.0.4.json
vendored
46
kasa/tests/fixtures/KP400(US)_3.0_1.0.4.json
vendored
@@ -1,46 +0,0 @@
|
||||
{
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"alias": "#MASKED_NAME#",
|
||||
"child_num": 2,
|
||||
"children": [
|
||||
{
|
||||
"alias": "#MASKED_NAME#",
|
||||
"id": "8006521377E30159055A751347B5A5E321A8D0A100",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
},
|
||||
{
|
||||
"alias": "#MASKED_NAME#",
|
||||
"id": "8006521377E30159055A751347B5A5E321A8D0A101",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"on_time": 0,
|
||||
"state": 0
|
||||
}
|
||||
],
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "3.0",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "3C:52:A1:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "KP400(US)",
|
||||
"ntc_state": 0,
|
||||
"obd_src": "tplink",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"rssi": -69,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.4 Build 240305 Rel.111944",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
32
kasa/tests/fixtures/KP401(US)_1.0_1.0.0.json
vendored
32
kasa/tests/fixtures/KP401(US)_1.0_1.0.0.json
vendored
@@ -1,32 +0,0 @@
|
||||
{
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Kp401",
|
||||
"dev_name": "Smart Outdoor Plug",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "KP401(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"ntc_state": 0,
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 127,
|
||||
"relay_state": 1,
|
||||
"rssi": -56,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.0 Build 201221 Rel.090515",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
65
kasa/tests/fixtures/KP405(US)_1.0_1.0.5.json
vendored
65
kasa/tests/fixtures/KP405(US)_1.0_1.0.5.json
vendored
@@ -1,65 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.dimmer": {
|
||||
"get_dimmer_parameters": {
|
||||
"bulb_type": 1,
|
||||
"calibration_type": 0,
|
||||
"err_code": 0,
|
||||
"fadeOffTime": 1000,
|
||||
"fadeOnTime": 1000,
|
||||
"gentleOffTime": 10000,
|
||||
"gentleOnTime": 3000,
|
||||
"minThreshold": 1,
|
||||
"rampRate": 30
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Porch Lights",
|
||||
"brightness": 50,
|
||||
"dev_name": "Kasa Smart Wi-Fi Outdoor Plug-In Dimmer",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 1,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "KP405(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"ntc_state": 0,
|
||||
"obd_src": "tplink",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 100,
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"brightness": 75,
|
||||
"index": 1
|
||||
},
|
||||
{
|
||||
"brightness": 50,
|
||||
"index": 2
|
||||
},
|
||||
{
|
||||
"brightness": 25,
|
||||
"index": 3
|
||||
}
|
||||
],
|
||||
"relay_state": 0,
|
||||
"rssi": -64,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.5 Build 221108 Rel.181739",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
65
kasa/tests/fixtures/KP405(US)_1.0_1.0.6.json
vendored
65
kasa/tests/fixtures/KP405(US)_1.0_1.0.6.json
vendored
@@ -1,65 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.dimmer": {
|
||||
"get_dimmer_parameters": {
|
||||
"bulb_type": 1,
|
||||
"calibration_type": 0,
|
||||
"err_code": 0,
|
||||
"fadeOffTime": 1000,
|
||||
"fadeOnTime": 1000,
|
||||
"gentleOffTime": 10000,
|
||||
"gentleOnTime": 3000,
|
||||
"minThreshold": 1,
|
||||
"rampRate": 30
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "#MASKED_NAME#",
|
||||
"brightness": 100,
|
||||
"dev_name": "Kasa Smart Wi-Fi Outdoor Plug-In Dimmer",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "50:91:E3:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "KP405(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"ntc_state": 0,
|
||||
"obd_src": "tplink",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 100,
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"brightness": 75,
|
||||
"index": 1
|
||||
},
|
||||
{
|
||||
"brightness": 50,
|
||||
"index": 2
|
||||
},
|
||||
{
|
||||
"brightness": 25,
|
||||
"index": 3
|
||||
}
|
||||
],
|
||||
"relay_state": 0,
|
||||
"rssi": -66,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.6 Build 240229 Rel.174151",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
96
kasa/tests/fixtures/KS200M(US)_1.0_1.0.10.json
vendored
96
kasa/tests/fixtures/KS200M(US)_1.0_1.0.10.json
vendored
@@ -1,96 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.LAS": {
|
||||
"get_config": {
|
||||
"devs": [
|
||||
{
|
||||
"dark_index": 0,
|
||||
"enable": 1,
|
||||
"hw_id": 0,
|
||||
"level_array": [
|
||||
{
|
||||
"adc": 390,
|
||||
"name": "cloudy",
|
||||
"value": 15
|
||||
},
|
||||
{
|
||||
"adc": 300,
|
||||
"name": "overcast",
|
||||
"value": 12
|
||||
},
|
||||
{
|
||||
"adc": 222,
|
||||
"name": "dawn",
|
||||
"value": 9
|
||||
},
|
||||
{
|
||||
"adc": 222,
|
||||
"name": "twilight",
|
||||
"value": 9
|
||||
},
|
||||
{
|
||||
"adc": 111,
|
||||
"name": "total darkness",
|
||||
"value": 4
|
||||
},
|
||||
{
|
||||
"adc": 2400,
|
||||
"name": "custom",
|
||||
"value": 97
|
||||
}
|
||||
],
|
||||
"max_adc": 2450,
|
||||
"min_adc": 0
|
||||
}
|
||||
],
|
||||
"err_code": 0,
|
||||
"ver": "1.0"
|
||||
}
|
||||
},
|
||||
"smartlife.iot.PIR": {
|
||||
"get_config": {
|
||||
"array": [
|
||||
80,
|
||||
50,
|
||||
20,
|
||||
0
|
||||
],
|
||||
"cold_time": 15000,
|
||||
"enable": 1,
|
||||
"err_code": 0,
|
||||
"max_adc": 4095,
|
||||
"min_adc": 0,
|
||||
"trigger_index": 0,
|
||||
"version": "1.0"
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "#MASKED_NAME#",
|
||||
"dev_name": "Smart Light Switch with PIR",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "54:AF:97:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "KS200M(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"obd_src": "tplink",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"relay_state": 0,
|
||||
"rssi": -39,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.10 Build 221019 Rel.194527",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
96
kasa/tests/fixtures/KS200M(US)_1.0_1.0.11.json
vendored
96
kasa/tests/fixtures/KS200M(US)_1.0_1.0.11.json
vendored
@@ -1,96 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.LAS": {
|
||||
"get_config": {
|
||||
"devs": [
|
||||
{
|
||||
"dark_index": 0,
|
||||
"enable": 0,
|
||||
"hw_id": 0,
|
||||
"level_array": [
|
||||
{
|
||||
"adc": 390,
|
||||
"name": "cloudy",
|
||||
"value": 15
|
||||
},
|
||||
{
|
||||
"adc": 300,
|
||||
"name": "overcast",
|
||||
"value": 12
|
||||
},
|
||||
{
|
||||
"adc": 222,
|
||||
"name": "dawn",
|
||||
"value": 9
|
||||
},
|
||||
{
|
||||
"adc": 222,
|
||||
"name": "twilight",
|
||||
"value": 9
|
||||
},
|
||||
{
|
||||
"adc": 111,
|
||||
"name": "total darkness",
|
||||
"value": 4
|
||||
},
|
||||
{
|
||||
"adc": 2400,
|
||||
"name": "custom",
|
||||
"value": 97
|
||||
}
|
||||
],
|
||||
"max_adc": 2450,
|
||||
"min_adc": 0
|
||||
}
|
||||
],
|
||||
"err_code": 0,
|
||||
"ver": "1.0"
|
||||
}
|
||||
},
|
||||
"smartlife.iot.PIR": {
|
||||
"get_config": {
|
||||
"array": [
|
||||
80,
|
||||
50,
|
||||
20,
|
||||
0
|
||||
],
|
||||
"cold_time": 60000,
|
||||
"enable": 0,
|
||||
"err_code": 0,
|
||||
"max_adc": 4095,
|
||||
"min_adc": 0,
|
||||
"trigger_index": 1,
|
||||
"version": "1.0"
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "#MASKED_NAME#",
|
||||
"dev_name": "Smart Light Switch with PIR",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "3C:52:A1:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "KS200M(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"obd_src": "tplink",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"relay_state": 0,
|
||||
"rssi": -40,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.11 Build 230113 Rel.151038",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
96
kasa/tests/fixtures/KS200M(US)_1.0_1.0.12.json
vendored
96
kasa/tests/fixtures/KS200M(US)_1.0_1.0.12.json
vendored
@@ -1,96 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.LAS": {
|
||||
"get_config": {
|
||||
"devs": [
|
||||
{
|
||||
"dark_index": 0,
|
||||
"enable": 1,
|
||||
"hw_id": 0,
|
||||
"level_array": [
|
||||
{
|
||||
"adc": 390,
|
||||
"name": "cloudy",
|
||||
"value": 15
|
||||
},
|
||||
{
|
||||
"adc": 300,
|
||||
"name": "overcast",
|
||||
"value": 11
|
||||
},
|
||||
{
|
||||
"adc": 222,
|
||||
"name": "dawn",
|
||||
"value": 8
|
||||
},
|
||||
{
|
||||
"adc": 222,
|
||||
"name": "twilight",
|
||||
"value": 8
|
||||
},
|
||||
{
|
||||
"adc": 111,
|
||||
"name": "total darkness",
|
||||
"value": 4
|
||||
},
|
||||
{
|
||||
"adc": 2400,
|
||||
"name": "custom",
|
||||
"value": 94
|
||||
}
|
||||
],
|
||||
"max_adc": 2550,
|
||||
"min_adc": 0
|
||||
}
|
||||
],
|
||||
"err_code": 0,
|
||||
"ver": "1.0"
|
||||
}
|
||||
},
|
||||
"smartlife.iot.PIR": {
|
||||
"get_config": {
|
||||
"array": [
|
||||
80,
|
||||
50,
|
||||
20,
|
||||
0
|
||||
],
|
||||
"cold_time": 600000,
|
||||
"enable": 1,
|
||||
"err_code": 0,
|
||||
"max_adc": 4095,
|
||||
"min_adc": 0,
|
||||
"trigger_index": 1,
|
||||
"version": "1.0"
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "#MASKED_NAME#",
|
||||
"dev_name": "Smart Light Switch with PIR",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "98:25:4A:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "KS200M(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"obd_src": "tplink",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"relay_state": 0,
|
||||
"rssi": -55,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.12 Build 240507 Rel.143458",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
95
kasa/tests/fixtures/KS200M(US)_1.0_1.0.8.json
vendored
95
kasa/tests/fixtures/KS200M(US)_1.0_1.0.8.json
vendored
@@ -1,95 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.LAS": {
|
||||
"get_config": {
|
||||
"devs": [
|
||||
{
|
||||
"dark_index": 4,
|
||||
"enable": 1,
|
||||
"hw_id": 0,
|
||||
"level_array": [
|
||||
{
|
||||
"adc": 390,
|
||||
"name": "cloudy",
|
||||
"value": 15
|
||||
},
|
||||
{
|
||||
"adc": 300,
|
||||
"name": "overcast",
|
||||
"value": 12
|
||||
},
|
||||
{
|
||||
"adc": 222,
|
||||
"name": "dawn",
|
||||
"value": 9
|
||||
},
|
||||
{
|
||||
"adc": 220,
|
||||
"name": "twilight",
|
||||
"value": 8
|
||||
},
|
||||
{
|
||||
"adc": 98,
|
||||
"name": "total darkness",
|
||||
"value": 4
|
||||
},
|
||||
{
|
||||
"adc": 2400,
|
||||
"name": "custom",
|
||||
"value": 97
|
||||
}
|
||||
],
|
||||
"max_adc": 2450,
|
||||
"min_adc": 0
|
||||
}
|
||||
],
|
||||
"err_code": 0,
|
||||
"ver": "1.0"
|
||||
}
|
||||
},
|
||||
"smartlife.iot.PIR": {
|
||||
"get_config": {
|
||||
"array": [
|
||||
80,
|
||||
50,
|
||||
20,
|
||||
0
|
||||
],
|
||||
"cold_time": 600000,
|
||||
"enable": 1,
|
||||
"err_code": 0,
|
||||
"max_adc": 4095,
|
||||
"min_adc": 0,
|
||||
"trigger_index": 1,
|
||||
"version": "1.0"
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Test KS200M",
|
||||
"dev_name": "Smart Light Switch with PIR",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "KS200M(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"relay_state": 0,
|
||||
"rssi": -66,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.8 Build 211201 Rel.125056",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
65
kasa/tests/fixtures/KS220(US)_1.0_1.0.13.json
vendored
65
kasa/tests/fixtures/KS220(US)_1.0_1.0.13.json
vendored
@@ -1,65 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.dimmer": {
|
||||
"get_dimmer_parameters": {
|
||||
"bulb_type": 1,
|
||||
"calibration_type": 1,
|
||||
"err_code": 0,
|
||||
"fadeOffTime": 1000,
|
||||
"fadeOnTime": 1000,
|
||||
"gentleOffTime": 10000,
|
||||
"gentleOnTime": 3000,
|
||||
"minThreshold": 1,
|
||||
"rampRate": 30
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "#MASKED_NAME#",
|
||||
"brightness": 100,
|
||||
"dev_name": "Smart Wi-Fi Dimmer Switch",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "30:DE:4B:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "KS220(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"ntc_state": 0,
|
||||
"obd_src": "apple",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 100,
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"brightness": 75,
|
||||
"index": 1
|
||||
},
|
||||
{
|
||||
"brightness": 50,
|
||||
"index": 2
|
||||
},
|
||||
{
|
||||
"brightness": 25,
|
||||
"index": 3
|
||||
}
|
||||
],
|
||||
"relay_state": 0,
|
||||
"rssi": -47,
|
||||
"status": "configured",
|
||||
"sw_ver": "1.0.13 Build 240424 Rel.102214",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
126
kasa/tests/fixtures/KS220M(US)_1.0_1.0.4.json
vendored
126
kasa/tests/fixtures/KS220M(US)_1.0_1.0.4.json
vendored
@@ -1,126 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.LAS": {
|
||||
"get_config": {
|
||||
"devs": [
|
||||
{
|
||||
"dark_index": 0,
|
||||
"enable": 1,
|
||||
"hw_id": 0,
|
||||
"level_array": [
|
||||
{
|
||||
"adc": 490,
|
||||
"name": "cloudy",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"adc": 294,
|
||||
"name": "overcast",
|
||||
"value": 12
|
||||
},
|
||||
{
|
||||
"adc": 222,
|
||||
"name": "dawn",
|
||||
"value": 9
|
||||
},
|
||||
{
|
||||
"adc": 222,
|
||||
"name": "twilight",
|
||||
"value": 9
|
||||
},
|
||||
{
|
||||
"adc": 111,
|
||||
"name": "total darkness",
|
||||
"value": 4
|
||||
},
|
||||
{
|
||||
"adc": 2400,
|
||||
"name": "custom",
|
||||
"value": 97
|
||||
}
|
||||
],
|
||||
"max_adc": 2450,
|
||||
"min_adc": 0
|
||||
}
|
||||
],
|
||||
"err_code": 0,
|
||||
"ver": "1.0"
|
||||
}
|
||||
},
|
||||
"smartlife.iot.PIR": {
|
||||
"get_config": {
|
||||
"array": [
|
||||
80,
|
||||
50,
|
||||
20,
|
||||
61
|
||||
],
|
||||
"cold_time": 60000,
|
||||
"enable": 1,
|
||||
"err_code": 0,
|
||||
"max_adc": 4095,
|
||||
"min_adc": 0,
|
||||
"trigger_index": 2,
|
||||
"version": "1.0"
|
||||
}
|
||||
},
|
||||
"smartlife.iot.dimmer": {
|
||||
"get_dimmer_parameters": {
|
||||
"bulb_type": 1,
|
||||
"err_code": 0,
|
||||
"fadeOffTime": 0,
|
||||
"fadeOnTime": 0,
|
||||
"gentleOffTime": 10000,
|
||||
"gentleOnTime": 3000,
|
||||
"minThreshold": 1,
|
||||
"rampRate": 30
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Garage Entryway Lights",
|
||||
"brightness": 100,
|
||||
"dev_name": "Wi-Fi Smart Dimmer with sensor",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "KS220M(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 100,
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"brightness": 75,
|
||||
"index": 1
|
||||
},
|
||||
{
|
||||
"brightness": 50,
|
||||
"index": 2
|
||||
},
|
||||
{
|
||||
"brightness": 25,
|
||||
"index": 3
|
||||
}
|
||||
],
|
||||
"relay_state": 0,
|
||||
"rssi": -42,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.4 Build 210616 Rel.193517",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
64
kasa/tests/fixtures/KS230(US)_1.0_1.0.14.json
vendored
64
kasa/tests/fixtures/KS230(US)_1.0_1.0.14.json
vendored
@@ -1,64 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.dimmer": {
|
||||
"get_dimmer_parameters": {
|
||||
"bulb_type": 1,
|
||||
"err_code": 0,
|
||||
"fadeOffTime": 1000,
|
||||
"fadeOnTime": 1000,
|
||||
"gentleOffTime": 10000,
|
||||
"gentleOnTime": 3000,
|
||||
"minThreshold": 11,
|
||||
"rampRate": 30
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "Test KS230",
|
||||
"brightness": 60,
|
||||
"dc_state": 0,
|
||||
"dev_name": "Wi-Fi Smart 3-Way Dimmer",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"err_code": 0,
|
||||
"feature": "TIM",
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"icon_hash": "",
|
||||
"latitude_i": 0,
|
||||
"led_off": 0,
|
||||
"longitude_i": 0,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"mic_type": "IOT.SMARTPLUGSWITCH",
|
||||
"model": "KS230(US)",
|
||||
"next_action": {
|
||||
"type": -1
|
||||
},
|
||||
"ntc_state": 0,
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 100,
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"brightness": 75,
|
||||
"index": 1
|
||||
},
|
||||
{
|
||||
"brightness": 50,
|
||||
"index": 2
|
||||
},
|
||||
{
|
||||
"brightness": 25,
|
||||
"index": 3
|
||||
}
|
||||
],
|
||||
"relay_state": 0,
|
||||
"rssi": -52,
|
||||
"status": "new",
|
||||
"sw_ver": "1.0.14 Build 220127 Rel.124555",
|
||||
"updating": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
89
kasa/tests/fixtures/LB110(US)_1.0_1.8.11.json
vendored
89
kasa/tests/fixtures/LB110(US)_1.0_1.8.11.json
vendored
@@ -1,89 +0,0 @@
|
||||
{
|
||||
"smartlife.iot.common.emeter": {
|
||||
"get_realtime": {
|
||||
"err_code": 0,
|
||||
"power_mw": 0
|
||||
}
|
||||
},
|
||||
"smartlife.iot.smartbulb.lightingservice": {
|
||||
"get_light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 100,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"saturation": 0
|
||||
},
|
||||
"err_code": 0,
|
||||
"on_off": 0
|
||||
}
|
||||
},
|
||||
"system": {
|
||||
"get_sysinfo": {
|
||||
"active_mode": "none",
|
||||
"alias": "TP-LINK_Smart Bulb_43EC",
|
||||
"ctrl_protocols": {
|
||||
"name": "Linkie",
|
||||
"version": "1.0"
|
||||
},
|
||||
"description": "Smart Wi-Fi LED Bulb with Dimmable Light",
|
||||
"dev_state": "normal",
|
||||
"deviceId": "0000000000000000000000000000000000000000",
|
||||
"disco_ver": "1.0",
|
||||
"err_code": 0,
|
||||
"heapsize": 290048,
|
||||
"hwId": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"is_color": 0,
|
||||
"is_dimmable": 1,
|
||||
"is_factory": false,
|
||||
"is_variable_color_temp": 0,
|
||||
"light_state": {
|
||||
"dft_on_state": {
|
||||
"brightness": 100,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"mode": "normal",
|
||||
"saturation": 0
|
||||
},
|
||||
"on_off": 0
|
||||
},
|
||||
"mic_mac": "000000000000",
|
||||
"mic_type": "IOT.SMARTBULB",
|
||||
"model": "LB110(US)",
|
||||
"oemId": "00000000000000000000000000000000",
|
||||
"preferred_state": [
|
||||
{
|
||||
"brightness": 100,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 0,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 75,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 1,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 25,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 2,
|
||||
"saturation": 0
|
||||
},
|
||||
{
|
||||
"brightness": 1,
|
||||
"color_temp": 2700,
|
||||
"hue": 0,
|
||||
"index": 3,
|
||||
"saturation": 0
|
||||
}
|
||||
],
|
||||
"rssi": -59,
|
||||
"sw_ver": "1.8.11 Build 191113 Rel.105336"
|
||||
}
|
||||
}
|
||||
}
|
||||
457
kasa/tests/fixtures/smart/EP25(US)_2.6_1.0.1.json
vendored
457
kasa/tests/fixtures/smart/EP25(US)_2.6_1.0.1.json
vendored
@@ -1,457 +0,0 @@
|
||||
{
|
||||
"component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "wireless",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "schedule",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "countdown",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "antitheft",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "led",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "default_states",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "auto_off",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "energy_monitoring",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "power_protection",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "homekit",
|
||||
"ver_code": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"discovery_result": {
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "EP25(US)",
|
||||
"device_type": "SMART.KASAPLUG",
|
||||
"factory_default": false,
|
||||
"ip": "127.0.0.123",
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "00-00-00-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"encrypt_type": "AES",
|
||||
"http_port": 80,
|
||||
"is_support_https": false,
|
||||
"lv": 2
|
||||
},
|
||||
"obd_src": "tplink",
|
||||
"owner": "00000000000000000000000000000000"
|
||||
},
|
||||
"get_antitheft_rules": {
|
||||
"antitheft_rule_max_count": 1,
|
||||
"enable": false,
|
||||
"rule_list": []
|
||||
},
|
||||
"get_auto_off_config": {
|
||||
"delay_min": 120,
|
||||
"enable": false
|
||||
},
|
||||
"get_auto_update_info": {
|
||||
"enable": true,
|
||||
"random_range": 120,
|
||||
"time": 180
|
||||
},
|
||||
"get_connect_cloud_state": {
|
||||
"status": 0
|
||||
},
|
||||
"get_countdown_rules": {
|
||||
"countdown_rule_max_count": 1,
|
||||
"enable": false,
|
||||
"rule_list": []
|
||||
},
|
||||
"get_current_power": {
|
||||
"current_power": 0
|
||||
},
|
||||
"get_device_info": {
|
||||
"auto_off_remain_time": 0,
|
||||
"auto_off_status": "off",
|
||||
"avatar": "plug",
|
||||
"default_states": {
|
||||
"state": {},
|
||||
"type": "last_states"
|
||||
},
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"device_on": true,
|
||||
"fw_id": "00000000000000000000000000000000",
|
||||
"fw_ver": "1.0.1 Build 230614 Rel.150219",
|
||||
"has_set_location_info": true,
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "2.6",
|
||||
"ip": "127.0.0.123",
|
||||
"lang": "en_US",
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
"mac": "00-00-00-00-00-00",
|
||||
"model": "EP25",
|
||||
"nickname": "I01BU0tFRF9OQU1FIw==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"on_time": 36,
|
||||
"overheated": false,
|
||||
"power_protection_status": "normal",
|
||||
"region": "America/Chicago",
|
||||
"rssi": -51,
|
||||
"signal_level": 2,
|
||||
"specs": "",
|
||||
"ssid": "I01BU0tFRF9TU0lEIw==",
|
||||
"time_diff": -360,
|
||||
"type": "SMART.KASAPLUG"
|
||||
},
|
||||
"get_device_time": {
|
||||
"region": "America/Chicago",
|
||||
"time_diff": -360,
|
||||
"timestamp": 1704406778
|
||||
},
|
||||
"get_device_usage": {
|
||||
"power_usage": {
|
||||
"past30": 0,
|
||||
"past7": 0,
|
||||
"today": 0
|
||||
},
|
||||
"saved_power": {
|
||||
"past30": 38793,
|
||||
"past7": 9619,
|
||||
"today": 979
|
||||
},
|
||||
"time_usage": {
|
||||
"past30": 38793,
|
||||
"past7": 9619,
|
||||
"today": 979
|
||||
}
|
||||
},
|
||||
"get_electricity_price_config": {
|
||||
"constant_price": 0,
|
||||
"time_of_use_config": {
|
||||
"summer": {
|
||||
"midpeak": 0,
|
||||
"offpeak": 0,
|
||||
"onpeak": 0,
|
||||
"period": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"weekday_config": [
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"weekend_config": [
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"winter": {
|
||||
"midpeak": 0,
|
||||
"offpeak": 0,
|
||||
"onpeak": 0,
|
||||
"period": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"weekday_config": [
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"weekend_config": [
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"type": "constant"
|
||||
},
|
||||
"get_energy_usage": {
|
||||
"current_power": 0,
|
||||
"electricity_charge": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"local_time": "2024-01-04 16:19:38",
|
||||
"month_energy": 0,
|
||||
"month_runtime": 5299,
|
||||
"today_energy": 0,
|
||||
"today_runtime": 979
|
||||
},
|
||||
"get_fw_download_state": {
|
||||
"auto_upgrade": true,
|
||||
"download_progress": 100,
|
||||
"reboot_time": 5,
|
||||
"status": 3,
|
||||
"upgrade_time": 5
|
||||
},
|
||||
"get_latest_fw": {
|
||||
"fw_size": 786432,
|
||||
"fw_ver": "1.0.2 Build 231108 Rel.163012",
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"need_to_upgrade": true,
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"release_date": "2023-12-05",
|
||||
"release_note": "Modifications and Bug Fixes:\n1. Enhanced device security.\n2. Optimized Homekit setup.\n3. Improved time synchronization accuracy.\n4. Fixed some minor bugs.",
|
||||
"type": 1
|
||||
},
|
||||
"get_led_info": {
|
||||
"led_rule": "always",
|
||||
"led_status": true,
|
||||
"night_mode": {
|
||||
"end_time": 438,
|
||||
"night_mode_type": "sunrise_sunset",
|
||||
"start_time": 1056,
|
||||
"sunrise_offset": 0,
|
||||
"sunset_offset": 0
|
||||
}
|
||||
},
|
||||
"get_max_power": {
|
||||
"max_power": 1883
|
||||
},
|
||||
"get_next_event": {},
|
||||
"get_protection_power": {
|
||||
"enabled": false,
|
||||
"protection_power": 0
|
||||
},
|
||||
"get_schedule_rules": {
|
||||
"enable": false,
|
||||
"rule_list": [],
|
||||
"schedule_rule_max_count": 32,
|
||||
"start_index": 0,
|
||||
"sum": 0
|
||||
},
|
||||
"get_wireless_scan_info": {
|
||||
"ap_list": [
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa_psk",
|
||||
"signal_level": 3,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa_psk",
|
||||
"signal_level": 2,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa_psk",
|
||||
"signal_level": 2,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
}
|
||||
],
|
||||
"wep_supported": false
|
||||
},
|
||||
"qs_component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "ble_whole_setup",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
}
|
||||
],
|
||||
"extra_info": {
|
||||
"device_model": "EP25",
|
||||
"device_type": "SMART.KASAPLUG"
|
||||
}
|
||||
}
|
||||
}
|
||||
414
kasa/tests/fixtures/smart/EP25(US)_2.6_1.0.2.json
vendored
414
kasa/tests/fixtures/smart/EP25(US)_2.6_1.0.2.json
vendored
@@ -1,414 +0,0 @@
|
||||
{
|
||||
"component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "wireless",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "schedule",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "countdown",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "antitheft",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "led",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "default_states",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "auto_off",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "energy_monitoring",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "power_protection",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "homekit",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "current_protection",
|
||||
"ver_code": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"discovery_result": {
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "EP25(US)",
|
||||
"device_type": "SMART.KASAPLUG",
|
||||
"factory_default": false,
|
||||
"ip": "127.0.0.123",
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "3C-52-A1-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"encrypt_type": "AES",
|
||||
"http_port": 80,
|
||||
"is_support_https": false,
|
||||
"lv": 2
|
||||
},
|
||||
"obd_src": "tplink",
|
||||
"owner": "00000000000000000000000000000000"
|
||||
},
|
||||
"get_antitheft_rules": {
|
||||
"antitheft_rule_max_count": 1,
|
||||
"enable": false,
|
||||
"rule_list": []
|
||||
},
|
||||
"get_auto_off_config": {
|
||||
"delay_min": 120,
|
||||
"enable": false
|
||||
},
|
||||
"get_auto_update_info": {
|
||||
"enable": true,
|
||||
"random_range": 120,
|
||||
"time": 180
|
||||
},
|
||||
"get_connect_cloud_state": {
|
||||
"status": 0
|
||||
},
|
||||
"get_countdown_rules": {
|
||||
"countdown_rule_max_count": 1,
|
||||
"enable": false,
|
||||
"rule_list": []
|
||||
},
|
||||
"get_current_power": {
|
||||
"current_power": 0
|
||||
},
|
||||
"get_device_info": {
|
||||
"auto_off_remain_time": 0,
|
||||
"auto_off_status": "off",
|
||||
"avatar": "plug",
|
||||
"default_states": {
|
||||
"state": {},
|
||||
"type": "last_states"
|
||||
},
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"device_on": true,
|
||||
"fw_id": "00000000000000000000000000000000",
|
||||
"fw_ver": "1.0.2 Build 231108 Rel.163012",
|
||||
"has_set_location_info": true,
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "2.6",
|
||||
"ip": "127.0.0.123",
|
||||
"lang": "en_US",
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
"mac": "3C-52-A1-00-00-00",
|
||||
"model": "EP25",
|
||||
"nickname": "I01BU0tFRF9OQU1FIw==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"on_time": 155838,
|
||||
"overcurrent_status": "normal",
|
||||
"overheated": false,
|
||||
"power_protection_status": "normal",
|
||||
"region": "America/Chicago",
|
||||
"rssi": -56,
|
||||
"signal_level": 2,
|
||||
"specs": "",
|
||||
"ssid": "I01BU0tFRF9TU0lEIw==",
|
||||
"time_diff": -360,
|
||||
"type": "SMART.KASAPLUG"
|
||||
},
|
||||
"get_device_time": {
|
||||
"region": "America/Chicago",
|
||||
"time_diff": -360,
|
||||
"timestamp": 1705991903
|
||||
},
|
||||
"get_device_usage": {
|
||||
"power_usage": {
|
||||
"past30": 0,
|
||||
"past7": 0,
|
||||
"today": 0
|
||||
},
|
||||
"saved_power": {
|
||||
"past30": 41789,
|
||||
"past7": 8678,
|
||||
"today": 38
|
||||
},
|
||||
"time_usage": {
|
||||
"past30": 41789,
|
||||
"past7": 8678,
|
||||
"today": 38
|
||||
}
|
||||
},
|
||||
"get_electricity_price_config": {
|
||||
"constant_price": 0,
|
||||
"time_of_use_config": {
|
||||
"summer": {
|
||||
"midpeak": 0,
|
||||
"offpeak": 0,
|
||||
"onpeak": 0,
|
||||
"period": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"weekday_config": [
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"weekend_config": [
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"winter": {
|
||||
"midpeak": 0,
|
||||
"offpeak": 0,
|
||||
"onpeak": 0,
|
||||
"period": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"weekday_config": [
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"weekend_config": [
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
}
|
||||
},
|
||||
"type": "constant"
|
||||
},
|
||||
"get_energy_usage": {
|
||||
"current_power": 0,
|
||||
"electricity_charge": [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"local_time": "2024-01-23 00:38:23",
|
||||
"month_energy": 0,
|
||||
"month_runtime": 31709,
|
||||
"today_energy": 0,
|
||||
"today_runtime": 38
|
||||
},
|
||||
"get_fw_download_state": {
|
||||
"auto_upgrade": false,
|
||||
"download_progress": 0,
|
||||
"reboot_time": 5,
|
||||
"status": 0,
|
||||
"upgrade_time": 5
|
||||
},
|
||||
"get_latest_fw": {
|
||||
"fw_size": 0,
|
||||
"fw_ver": "1.0.2 Build 231108 Rel.163012",
|
||||
"hw_id": "",
|
||||
"need_to_upgrade": false,
|
||||
"oem_id": "",
|
||||
"release_date": "",
|
||||
"release_note": "",
|
||||
"type": 0
|
||||
},
|
||||
"get_led_info": {
|
||||
"led_rule": "always",
|
||||
"led_status": true,
|
||||
"night_mode": {
|
||||
"end_time": 436,
|
||||
"night_mode_type": "sunrise_sunset",
|
||||
"start_time": 1072,
|
||||
"sunrise_offset": 0,
|
||||
"sunset_offset": 0
|
||||
}
|
||||
},
|
||||
"get_max_power": {
|
||||
"max_power": 1885
|
||||
},
|
||||
"get_next_event": {},
|
||||
"get_protection_power": {
|
||||
"enabled": false,
|
||||
"protection_power": 0
|
||||
},
|
||||
"get_schedule_rules": {
|
||||
"enable": false,
|
||||
"rule_list": [],
|
||||
"schedule_rule_max_count": 32,
|
||||
"start_index": 0,
|
||||
"sum": 0
|
||||
},
|
||||
"get_wireless_scan_info": {
|
||||
"ap_list": [],
|
||||
"wep_supported": false
|
||||
},
|
||||
"qs_component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "ble_whole_setup",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
}
|
||||
],
|
||||
"extra_info": {
|
||||
"device_model": "EP25",
|
||||
"device_type": "SMART.KASAPLUG",
|
||||
"is_klap": false
|
||||
}
|
||||
}
|
||||
}
|
||||
876
kasa/tests/fixtures/smart/EP40M(US)_1.0_1.1.0.json
vendored
876
kasa/tests/fixtures/smart/EP40M(US)_1.0_1.1.0.json
vendored
@@ -1,876 +0,0 @@
|
||||
{
|
||||
"child_devices": {
|
||||
"SCRUBBED_CHILD_DEVICE_ID_1": {
|
||||
"component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "schedule",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "countdown",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "antitheft",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "default_states",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "overheat_protection",
|
||||
"ver_code": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"get_antitheft_rules": {
|
||||
"antitheft_rule_max_count": 1,
|
||||
"enable": false,
|
||||
"rule_list": []
|
||||
},
|
||||
"get_connect_cloud_state": {
|
||||
"status": 0
|
||||
},
|
||||
"get_countdown_rules": {
|
||||
"countdown_rule_max_count": 1,
|
||||
"enable": false,
|
||||
"rule_list": []
|
||||
},
|
||||
"get_device_info": {
|
||||
"avatar": "tape_lights",
|
||||
"bind_count": 1,
|
||||
"category": "plug.powerstrip.sub-plug",
|
||||
"default_states": {
|
||||
"type": "last_states"
|
||||
},
|
||||
"device_id": "SCRUBBED_CHILD_DEVICE_ID_1",
|
||||
"device_on": false,
|
||||
"fw_id": "00000000000000000000000000000000",
|
||||
"fw_ver": "1.1.0 Build 240415 Rel.171219",
|
||||
"has_set_location_info": true,
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"is_usb": false,
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
"mac": "F0090D000000",
|
||||
"model": "EP40M",
|
||||
"nickname": "I01BU0tFRF9OQU1FIw==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"original_device_id": "0000000000000000000000000000000000000000",
|
||||
"overheat_status": "normal",
|
||||
"position": 2,
|
||||
"region": "America/Denver",
|
||||
"slot_number": 2,
|
||||
"status_follow_edge": true,
|
||||
"type": "SMART.KASAPLUG"
|
||||
},
|
||||
"get_device_usage": {
|
||||
"time_usage": {
|
||||
"past30": 2,
|
||||
"past7": 2,
|
||||
"today": 0
|
||||
}
|
||||
},
|
||||
"get_next_event": {},
|
||||
"get_schedule_rules": {
|
||||
"enable": false,
|
||||
"rule_list": [],
|
||||
"schedule_rule_max_count": 32,
|
||||
"start_index": 0,
|
||||
"sum": 0
|
||||
}
|
||||
},
|
||||
"SCRUBBED_CHILD_DEVICE_ID_2": {
|
||||
"component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "schedule",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "countdown",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "antitheft",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "default_states",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "overheat_protection",
|
||||
"ver_code": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"get_antitheft_rules": {
|
||||
"antitheft_rule_max_count": 1,
|
||||
"enable": false,
|
||||
"rule_list": []
|
||||
},
|
||||
"get_connect_cloud_state": {
|
||||
"status": 0
|
||||
},
|
||||
"get_countdown_rules": {
|
||||
"countdown_rule_max_count": 1,
|
||||
"enable": false,
|
||||
"rule_list": []
|
||||
},
|
||||
"get_device_info": {
|
||||
"avatar": "house",
|
||||
"bind_count": 1,
|
||||
"category": "plug.powerstrip.sub-plug",
|
||||
"default_states": {
|
||||
"type": "last_states"
|
||||
},
|
||||
"device_id": "SCRUBBED_CHILD_DEVICE_ID_2",
|
||||
"device_on": false,
|
||||
"fw_id": "00000000000000000000000000000000",
|
||||
"fw_ver": "1.1.0 Build 240415 Rel.171219",
|
||||
"has_set_location_info": true,
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"is_usb": false,
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
"mac": "F0090D000000",
|
||||
"model": "EP40M",
|
||||
"nickname": "I01BU0tFRF9OQU1FIw==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"original_device_id": "0000000000000000000000000000000000000000",
|
||||
"overheat_status": "normal",
|
||||
"position": 1,
|
||||
"region": "America/Denver",
|
||||
"slot_number": 2,
|
||||
"status_follow_edge": true,
|
||||
"type": "SMART.KASAPLUG"
|
||||
},
|
||||
"get_device_usage": {
|
||||
"time_usage": {
|
||||
"past30": 842,
|
||||
"past7": 842,
|
||||
"today": 249
|
||||
}
|
||||
},
|
||||
"get_next_event": {
|
||||
"desired_states": {
|
||||
"on": true
|
||||
},
|
||||
"e_time": 0,
|
||||
"id": "S1",
|
||||
"s_time": 1729382340,
|
||||
"type": 1
|
||||
},
|
||||
"get_schedule_rules": {
|
||||
"enable": true,
|
||||
"rule_list": [
|
||||
{
|
||||
"day": 19,
|
||||
"desired_states": {
|
||||
"on": true
|
||||
},
|
||||
"e_action": "none",
|
||||
"e_min": 0,
|
||||
"e_type": "normal",
|
||||
"enable": true,
|
||||
"id": "S1",
|
||||
"mode": "repeat",
|
||||
"month": 10,
|
||||
"s_min": 1081,
|
||||
"s_type": "sunset",
|
||||
"time_offset": -15,
|
||||
"week_day": 127,
|
||||
"year": 2024
|
||||
},
|
||||
{
|
||||
"day": 19,
|
||||
"desired_states": {
|
||||
"on": false
|
||||
},
|
||||
"e_action": "none",
|
||||
"e_min": 0,
|
||||
"e_type": "normal",
|
||||
"enable": true,
|
||||
"id": "S2",
|
||||
"mode": "repeat",
|
||||
"month": 10,
|
||||
"s_min": 1330,
|
||||
"s_type": "normal",
|
||||
"time_offset": 0,
|
||||
"week_day": 127,
|
||||
"year": 2024
|
||||
}
|
||||
],
|
||||
"schedule_rule_max_count": 32,
|
||||
"start_index": 0,
|
||||
"sum": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "wireless",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "schedule",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "countdown",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "antitheft",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "led",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "default_states",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "control_child",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "child_device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "matter",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "overheat_protection",
|
||||
"ver_code": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"discovery_result": {
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "EP40M(US)",
|
||||
"device_type": "SMART.KASAPLUG",
|
||||
"factory_default": false,
|
||||
"ip": "127.0.0.123",
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "F0-09-0D-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"encrypt_type": "KLAP",
|
||||
"http_port": 80,
|
||||
"is_support_https": false,
|
||||
"lv": 2
|
||||
},
|
||||
"obd_src": "matter",
|
||||
"owner": "00000000000000000000000000000000"
|
||||
},
|
||||
"get_auto_update_info": {
|
||||
"enable": true,
|
||||
"random_range": 120,
|
||||
"time": 180
|
||||
},
|
||||
"get_child_device_component_list": {
|
||||
"child_component_list": [
|
||||
{
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "schedule",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "countdown",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "antitheft",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "default_states",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "overheat_protection",
|
||||
"ver_code": 1
|
||||
}
|
||||
],
|
||||
"device_id": "SCRUBBED_CHILD_DEVICE_ID_1"
|
||||
},
|
||||
{
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "schedule",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "countdown",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "antitheft",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "default_states",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "overheat_protection",
|
||||
"ver_code": 1
|
||||
}
|
||||
],
|
||||
"device_id": "SCRUBBED_CHILD_DEVICE_ID_2"
|
||||
}
|
||||
],
|
||||
"start_index": 0,
|
||||
"sum": 2
|
||||
},
|
||||
"get_child_device_list": {
|
||||
"child_device_list": [
|
||||
{
|
||||
"avatar": "tape_lights",
|
||||
"bind_count": 1,
|
||||
"category": "plug.powerstrip.sub-plug",
|
||||
"default_states": {
|
||||
"type": "last_states"
|
||||
},
|
||||
"device_id": "SCRUBBED_CHILD_DEVICE_ID_1",
|
||||
"device_on": false,
|
||||
"fw_id": "00000000000000000000000000000000",
|
||||
"fw_ver": "1.1.0 Build 240415 Rel.171219",
|
||||
"has_set_location_info": true,
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"is_usb": false,
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
"mac": "F0090D000000",
|
||||
"model": "EP40M",
|
||||
"nickname": "I01BU0tFRF9OQU1FIw==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"original_device_id": "0000000000000000000000000000000000000000",
|
||||
"overheat_status": "normal",
|
||||
"position": 2,
|
||||
"region": "America/Denver",
|
||||
"slot_number": 2,
|
||||
"status_follow_edge": true,
|
||||
"type": "SMART.KASAPLUG"
|
||||
},
|
||||
{
|
||||
"avatar": "house",
|
||||
"bind_count": 1,
|
||||
"category": "plug.powerstrip.sub-plug",
|
||||
"default_states": {
|
||||
"type": "last_states"
|
||||
},
|
||||
"device_id": "SCRUBBED_CHILD_DEVICE_ID_2",
|
||||
"device_on": false,
|
||||
"fw_id": "00000000000000000000000000000000",
|
||||
"fw_ver": "1.1.0 Build 240415 Rel.171219",
|
||||
"has_set_location_info": true,
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"is_usb": false,
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
"mac": "F0090D000000",
|
||||
"model": "EP40M",
|
||||
"nickname": "I01BU0tFRF9OQU1FIw==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"original_device_id": "0000000000000000000000000000000000000000",
|
||||
"overheat_status": "normal",
|
||||
"position": 1,
|
||||
"region": "America/Denver",
|
||||
"slot_number": 2,
|
||||
"status_follow_edge": true,
|
||||
"type": "SMART.KASAPLUG"
|
||||
}
|
||||
],
|
||||
"start_index": 0,
|
||||
"sum": 2
|
||||
},
|
||||
"get_connect_cloud_state": {
|
||||
"status": 0
|
||||
},
|
||||
"get_device_info": {
|
||||
"avatar": "",
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"fw_id": "00000000000000000000000000000000",
|
||||
"fw_ver": "1.1.0 Build 240415 Rel.171219",
|
||||
"has_set_location_info": true,
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"ip": "127.0.0.123",
|
||||
"lang": "en_US",
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
"mac": "F0-09-0D-00-00-00",
|
||||
"model": "EP40M",
|
||||
"nickname": "I01BU0tFRF9OQU1FIw==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"region": "America/Denver",
|
||||
"rssi": -66,
|
||||
"signal_level": 2,
|
||||
"specs": "",
|
||||
"ssid": "I01BU0tFRF9TU0lEIw==",
|
||||
"time_diff": -420,
|
||||
"type": "SMART.KASAPLUG"
|
||||
},
|
||||
"get_device_time": {
|
||||
"region": "America/Denver",
|
||||
"time_diff": -420,
|
||||
"timestamp": 1729316541
|
||||
},
|
||||
"get_device_usage": {
|
||||
"time_usage": {
|
||||
"past30": 842,
|
||||
"past7": 842,
|
||||
"today": 249
|
||||
}
|
||||
},
|
||||
"get_fw_download_state": {
|
||||
"auto_upgrade": false,
|
||||
"download_progress": 0,
|
||||
"reboot_time": 5,
|
||||
"status": 0,
|
||||
"upgrade_time": 5
|
||||
},
|
||||
"get_latest_fw": {
|
||||
"fw_size": 0,
|
||||
"fw_ver": "1.1.0 Build 240415 Rel.171219",
|
||||
"hw_id": "",
|
||||
"need_to_upgrade": false,
|
||||
"oem_id": "",
|
||||
"release_date": "",
|
||||
"release_note": "",
|
||||
"type": 0
|
||||
},
|
||||
"get_led_info": {
|
||||
"bri_config": {
|
||||
"bri_type": "overall",
|
||||
"overall_bri": 50
|
||||
},
|
||||
"led_rule": "never",
|
||||
"led_status": false,
|
||||
"night_mode": {
|
||||
"end_time": 435,
|
||||
"night_mode_type": "sunrise_sunset",
|
||||
"start_time": 1096,
|
||||
"sunrise_offset": 0,
|
||||
"sunset_offset": 0
|
||||
}
|
||||
},
|
||||
"get_matter_setup_info": {
|
||||
"setup_code": "00000000000",
|
||||
"setup_payload": "00:000000-000000000000"
|
||||
},
|
||||
"get_wireless_scan_info": {
|
||||
"ap_list": [
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 2,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 0,
|
||||
"key_type": "none",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 0,
|
||||
"key_type": "none",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
}
|
||||
],
|
||||
"start_index": 0,
|
||||
"sum": 18,
|
||||
"wep_supported": false
|
||||
},
|
||||
"qs_component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "ble_whole_setup",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "matter",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "control_child",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "child_device",
|
||||
"ver_code": 2
|
||||
}
|
||||
],
|
||||
"extra_info": {
|
||||
"device_model": "EP40M",
|
||||
"device_type": "SMART.KASAPLUG",
|
||||
"is_klap": true
|
||||
}
|
||||
}
|
||||
}
|
||||
221
kasa/tests/fixtures/smart/H100(EU)_1.0_1.2.3.json
vendored
221
kasa/tests/fixtures/smart/H100(EU)_1.0_1.2.3.json
vendored
@@ -1,221 +0,0 @@
|
||||
{
|
||||
"component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "wireless",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "led",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "child_device",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "child_quick_setup",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "child_inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "control_child",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "alarm",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_load",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "alarm_logs",
|
||||
"ver_code": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"discovery_result": {
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "H100(EU)",
|
||||
"device_type": "SMART.TAPOHUB",
|
||||
"factory_default": true,
|
||||
"ip": "127.0.0.123",
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "3C-52-A1-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"encrypt_type": "AES",
|
||||
"http_port": 80,
|
||||
"is_support_https": false,
|
||||
"lv": 2
|
||||
},
|
||||
"obd_src": "tplink",
|
||||
"owner": ""
|
||||
},
|
||||
"get_auto_update_info": {
|
||||
"enable": true,
|
||||
"random_range": 120,
|
||||
"time": 180
|
||||
},
|
||||
"get_child_device_component_list": {
|
||||
"child_component_list": [],
|
||||
"start_index": 0,
|
||||
"sum": 0
|
||||
},
|
||||
"get_child_device_list": {
|
||||
"child_device_list": [],
|
||||
"start_index": 0,
|
||||
"sum": 0
|
||||
},
|
||||
"get_connect_cloud_state": {
|
||||
"status": 1
|
||||
},
|
||||
"get_device_info": {
|
||||
"avatar": "",
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"fw_id": "00000000000000000000000000000000",
|
||||
"fw_ver": "1.2.3 Build 221012 Rel.103821",
|
||||
"has_set_location_info": false,
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"in_alarm": false,
|
||||
"in_alarm_source": "",
|
||||
"ip": "127.0.0.123",
|
||||
"lang": "",
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
"mac": "3C-52-A1-00-00-00",
|
||||
"model": "H100",
|
||||
"nickname": "I01BU0tFRF9OQU1FIw==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"overheated": false,
|
||||
"region": "",
|
||||
"rssi": -30,
|
||||
"signal_level": 3,
|
||||
"specs": "EU",
|
||||
"ssid": "I01BU0tFRF9TU0lEIw==",
|
||||
"time_diff": 0,
|
||||
"type": "SMART.TAPOHUB"
|
||||
},
|
||||
"get_device_time": {
|
||||
"region": "",
|
||||
"time_diff": 0,
|
||||
"timestamp": 946771480
|
||||
},
|
||||
"get_fw_download_state": {
|
||||
"auto_upgrade": false,
|
||||
"download_progress": 0,
|
||||
"reboot_time": 5,
|
||||
"status": 0,
|
||||
"upgrade_time": 5
|
||||
},
|
||||
"get_inherit_info": null,
|
||||
"get_led_info": {
|
||||
"led_rule": "always",
|
||||
"led_status": true,
|
||||
"night_mode": {
|
||||
"end_time": 420,
|
||||
"night_mode_type": "sunrise_sunset",
|
||||
"start_time": 1140,
|
||||
"sunrise_offset": 0,
|
||||
"sunset_offset": 0
|
||||
}
|
||||
},
|
||||
"get_wireless_scan_info": {
|
||||
"ap_list": [
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 2,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 2,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
}
|
||||
],
|
||||
"wep_supported": false
|
||||
},
|
||||
"qs_component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
}
|
||||
],
|
||||
"extra_info": {
|
||||
"device_model": "H100",
|
||||
"device_type": "SMART.TAPOHUB"
|
||||
}
|
||||
}
|
||||
}
|
||||
547
kasa/tests/fixtures/smart/H100(EU)_1.0_1.5.10.json
vendored
547
kasa/tests/fixtures/smart/H100(EU)_1.0_1.5.10.json
vendored
@@ -1,547 +0,0 @@
|
||||
{
|
||||
"component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "wireless",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "led",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "child_device",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "child_quick_setup",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "child_inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "control_child",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "alarm",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_load",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "alarm_logs",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "localSmart",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "matter",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "chime",
|
||||
"ver_code": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"discovery_result": {
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "H100(EU)",
|
||||
"device_type": "SMART.TAPOHUB",
|
||||
"factory_default": false,
|
||||
"ip": "127.0.0.123",
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "3C-52-A1-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"encrypt_type": "AES",
|
||||
"http_port": 80,
|
||||
"is_support_https": false,
|
||||
"lv": 2
|
||||
},
|
||||
"obd_src": "tplink",
|
||||
"owner": "00000000000000000000000000000000"
|
||||
},
|
||||
"get_alarm_configure": {
|
||||
"duration": 10,
|
||||
"type": "Alarm 1",
|
||||
"volume": "high"
|
||||
},
|
||||
"get_auto_update_info": {
|
||||
"enable": false,
|
||||
"random_range": 120,
|
||||
"time": 180
|
||||
},
|
||||
"get_child_device_component_list": {
|
||||
"child_component_list": [
|
||||
{
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "schedule",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "countdown",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "frost_protection",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "child_protection",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "temperature",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "temp_control",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "remove_scale",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "progress_calibration",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "early_start",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "temp_record",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "screen_setting",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "night_mode",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "smart_control_schedule",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "battery_detect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "temperature_correction",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "window_open_detect",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "shutdown_mode",
|
||||
"ver_code": 1
|
||||
}
|
||||
],
|
||||
"device_id": "SCRUBBED_CHILD_DEVICE_ID_1"
|
||||
},
|
||||
{
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "trigger_log",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "localSmart",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "battery_detect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "temperature",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "humidity",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "temp_humidity_record",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "comfort_temperature",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "comfort_humidity",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "report_mode",
|
||||
"ver_code": 1
|
||||
}
|
||||
],
|
||||
"device_id": "SCRUBBED_CHILD_DEVICE_ID_2"
|
||||
}
|
||||
],
|
||||
"start_index": 0,
|
||||
"sum": 2
|
||||
},
|
||||
"get_child_device_list": {
|
||||
"child_device_list": [
|
||||
{
|
||||
"at_low_battery": false,
|
||||
"avatar": "",
|
||||
"battery_percentage": 100,
|
||||
"bind_count": 5,
|
||||
"category": "subg.trv",
|
||||
"child_protection": false,
|
||||
"current_temp": 22.9,
|
||||
"device_id": "SCRUBBED_CHILD_DEVICE_ID_1",
|
||||
"frost_protection_on": false,
|
||||
"fw_ver": "2.4.0 Build 230804 Rel.193040",
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"jamming_rssi": -113,
|
||||
"jamming_signal_level": 1,
|
||||
"location": "",
|
||||
"mac": "A842A1000000",
|
||||
"max_control_temp": 30,
|
||||
"min_control_temp": 5,
|
||||
"model": "KE100",
|
||||
"nickname": "I01BU0tFRF9OQU1FIw==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"parent_device_id": "0000000000000000000000000000000000000000",
|
||||
"region": "Europe/Berlin",
|
||||
"rssi": -7,
|
||||
"signal_level": 3,
|
||||
"specs": "EU",
|
||||
"status": "online",
|
||||
"status_follow_edge": false,
|
||||
"target_temp": 23.0,
|
||||
"temp_offset": 0,
|
||||
"temp_unit": "celsius",
|
||||
"trv_states": [
|
||||
"heating"
|
||||
],
|
||||
"type": "SMART.KASAENERGY"
|
||||
},
|
||||
{
|
||||
"at_low_battery": false,
|
||||
"avatar": "",
|
||||
"battery_percentage": 100,
|
||||
"bind_count": 1,
|
||||
"category": "subg.trigger.temp-hmdt-sensor",
|
||||
"current_humidity": 62,
|
||||
"current_humidity_exception": 2,
|
||||
"current_temp": 24.0,
|
||||
"current_temp_exception": 0,
|
||||
"device_id": "SCRUBBED_CHILD_DEVICE_ID_2",
|
||||
"fw_ver": "1.7.0 Build 230424 Rel.170332",
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"jamming_rssi": -115,
|
||||
"jamming_signal_level": 1,
|
||||
"lastOnboardingTimestamp": 1706990901,
|
||||
"mac": "F0A731000000",
|
||||
"model": "T315",
|
||||
"nickname": "I01BU0tFRF9OQU1FIw==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"parent_device_id": "0000000000000000000000000000000000000000",
|
||||
"region": "Europe/Berlin",
|
||||
"report_interval": 16,
|
||||
"rssi": -38,
|
||||
"signal_level": 3,
|
||||
"specs": "EU",
|
||||
"status": "online",
|
||||
"status_follow_edge": false,
|
||||
"temp_unit": "celsius",
|
||||
"type": "SMART.TAPOSENSOR"
|
||||
}
|
||||
],
|
||||
"start_index": 0,
|
||||
"sum": 2
|
||||
},
|
||||
"get_connect_cloud_state": {
|
||||
"status": 0
|
||||
},
|
||||
"get_device_info": {
|
||||
"avatar": "hub",
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"fw_id": "00000000000000000000000000000000",
|
||||
"fw_ver": "1.5.10 Build 240207 Rel.175759",
|
||||
"has_set_location_info": true,
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"in_alarm": false,
|
||||
"in_alarm_source": "",
|
||||
"ip": "127.0.0.123",
|
||||
"lang": "de_DE",
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
"mac": "3C-52-A1-00-00-00",
|
||||
"model": "H100",
|
||||
"nickname": "I01BU0tFRF9OQU1FIw==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"overheated": false,
|
||||
"region": "Europe/Berlin",
|
||||
"rssi": -60,
|
||||
"signal_level": 2,
|
||||
"specs": "EU",
|
||||
"ssid": "I01BU0tFRF9TU0lEIw==",
|
||||
"time_diff": 60,
|
||||
"type": "SMART.TAPOHUB"
|
||||
},
|
||||
"get_device_load_info": {
|
||||
"cur_load_num": 4,
|
||||
"load_level": "light",
|
||||
"max_load_num": 64,
|
||||
"total_memory": 4352,
|
||||
"used_memory": 1451
|
||||
},
|
||||
"get_device_time": {
|
||||
"region": "Europe/Berlin",
|
||||
"time_diff": 60,
|
||||
"timestamp": 1714669215
|
||||
},
|
||||
"get_device_usage": {},
|
||||
"get_fw_download_state": {
|
||||
"auto_upgrade": false,
|
||||
"download_progress": 0,
|
||||
"reboot_time": 5,
|
||||
"status": 0,
|
||||
"upgrade_time": 5
|
||||
},
|
||||
"get_inherit_info": null,
|
||||
"get_latest_fw": {
|
||||
"fw_size": 0,
|
||||
"fw_ver": "1.5.10 Build 240207 Rel.175759",
|
||||
"hw_id": "",
|
||||
"need_to_upgrade": false,
|
||||
"oem_id": "",
|
||||
"release_date": "",
|
||||
"release_note": "",
|
||||
"type": 0
|
||||
},
|
||||
"get_led_info": {
|
||||
"led_rule": "never",
|
||||
"led_status": false,
|
||||
"night_mode": {
|
||||
"end_time": 358,
|
||||
"night_mode_type": "sunrise_sunset",
|
||||
"start_time": 1259,
|
||||
"sunrise_offset": 0,
|
||||
"sunset_offset": 0
|
||||
}
|
||||
},
|
||||
"get_matter_setup_info": {
|
||||
"setup_code": "00000000000",
|
||||
"setup_payload": "00:0000000000000000000"
|
||||
},
|
||||
"get_support_alarm_type_list": {
|
||||
"alarm_type_list": [
|
||||
"Doorbell Ring 1",
|
||||
"Doorbell Ring 2",
|
||||
"Doorbell Ring 3",
|
||||
"Doorbell Ring 4",
|
||||
"Doorbell Ring 5",
|
||||
"Doorbell Ring 6",
|
||||
"Doorbell Ring 7",
|
||||
"Doorbell Ring 8",
|
||||
"Doorbell Ring 9",
|
||||
"Doorbell Ring 10",
|
||||
"Phone Ring",
|
||||
"Alarm 1",
|
||||
"Alarm 2",
|
||||
"Alarm 3",
|
||||
"Alarm 4",
|
||||
"Dripping Tap",
|
||||
"Alarm 5",
|
||||
"Connection 1",
|
||||
"Connection 2"
|
||||
]
|
||||
},
|
||||
"get_support_child_device_category": {
|
||||
"device_category_list": [
|
||||
{
|
||||
"category": "subg.trv"
|
||||
},
|
||||
{
|
||||
"category": "subg.trigger"
|
||||
},
|
||||
{
|
||||
"category": "subg.plugswitch"
|
||||
}
|
||||
]
|
||||
},
|
||||
"get_wireless_scan_info": {
|
||||
"ap_list": [],
|
||||
"start_index": 0,
|
||||
"sum": 0,
|
||||
"wep_supported": false
|
||||
},
|
||||
"qs_component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "matter",
|
||||
"ver_code": 3
|
||||
}
|
||||
],
|
||||
"extra_info": {
|
||||
"device_model": "H100",
|
||||
"device_type": "SMART.TAPOHUB",
|
||||
"is_klap": false
|
||||
}
|
||||
}
|
||||
}
|
||||
391
kasa/tests/fixtures/smart/H100(EU)_1.0_1.5.5.json
vendored
391
kasa/tests/fixtures/smart/H100(EU)_1.0_1.5.5.json
vendored
@@ -1,391 +0,0 @@
|
||||
{
|
||||
"component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "wireless",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "led",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "child_device",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "child_quick_setup",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "child_inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "control_child",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "alarm",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_load",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "alarm_logs",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "localSmart",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "matter",
|
||||
"ver_code": 3
|
||||
}
|
||||
]
|
||||
},
|
||||
"discovery_result": {
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "H100(EU)",
|
||||
"device_type": "SMART.TAPOHUB",
|
||||
"factory_default": false,
|
||||
"ip": "127.0.0.123",
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "3C-52-A1-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"encrypt_type": "AES",
|
||||
"http_port": 80,
|
||||
"is_support_https": false,
|
||||
"lv": 2
|
||||
},
|
||||
"obd_src": "tplink",
|
||||
"owner": "00000000000000000000000000000000"
|
||||
},
|
||||
"get_alarm_configure": {
|
||||
"duration": 10,
|
||||
"type": "Doorbell Ring 2",
|
||||
"volume": "low"
|
||||
},
|
||||
"get_auto_update_info": {
|
||||
"enable": false,
|
||||
"random_range": 120,
|
||||
"time": 180
|
||||
},
|
||||
"get_child_device_component_list": {
|
||||
"child_component_list": [
|
||||
{
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "trigger_log",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "localSmart",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "battery_detect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "temperature",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "humidity",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "temp_humidity_record",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "comfort_temperature",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "comfort_humidity",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "report_mode",
|
||||
"ver_code": 1
|
||||
}
|
||||
],
|
||||
"device_id": "0000000000000000000000000000000000000000"
|
||||
}
|
||||
],
|
||||
"start_index": 0,
|
||||
"sum": 1
|
||||
},
|
||||
"get_child_device_list": {
|
||||
"child_device_list": [
|
||||
{
|
||||
"at_low_battery": false,
|
||||
"avatar": "",
|
||||
"battery_percentage": 100,
|
||||
"bind_count": 1,
|
||||
"category": "subg.trigger.temp-hmdt-sensor",
|
||||
"current_humidity": 56,
|
||||
"current_humidity_exception": -34,
|
||||
"current_temp": 22.2,
|
||||
"current_temp_exception": 0,
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"fw_ver": "1.7.0 Build 230424 Rel.170332",
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"jamming_rssi": -118,
|
||||
"jamming_signal_level": 1,
|
||||
"lastOnboardingTimestamp": 1706990901,
|
||||
"mac": "F0A731000000",
|
||||
"model": "T315",
|
||||
"nickname": "I01BU0tFRF9OQU1FIw==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"parent_device_id": "0000000000000000000000000000000000000000",
|
||||
"region": "Europe/Berlin",
|
||||
"report_interval": 16,
|
||||
"rssi": -45,
|
||||
"signal_level": 3,
|
||||
"specs": "EU",
|
||||
"status": "online",
|
||||
"status_follow_edge": false,
|
||||
"temp_unit": "celsius",
|
||||
"type": "SMART.TAPOSENSOR"
|
||||
}
|
||||
],
|
||||
"start_index": 0,
|
||||
"sum": 1
|
||||
},
|
||||
"get_connect_cloud_state": {
|
||||
"status": 0
|
||||
},
|
||||
"get_device_info": {
|
||||
"avatar": "hub",
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"fw_id": "00000000000000000000000000000000",
|
||||
"fw_ver": "1.5.5 Build 240105 Rel.192438",
|
||||
"has_set_location_info": true,
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"in_alarm": false,
|
||||
"in_alarm_source": "",
|
||||
"ip": "127.0.0.123",
|
||||
"lang": "",
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
"mac": "3C-52-A1-00-00-00",
|
||||
"model": "H100",
|
||||
"nickname": "I01BU0tFRF9OQU1FIw==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"overheated": false,
|
||||
"region": "Europe/Berlin",
|
||||
"rssi": -62,
|
||||
"signal_level": 2,
|
||||
"specs": "EU",
|
||||
"ssid": "I01BU0tFRF9TU0lEIw==",
|
||||
"time_diff": 60,
|
||||
"type": "SMART.TAPOHUB"
|
||||
},
|
||||
"get_device_load_info": {
|
||||
"cur_load_num": 2,
|
||||
"load_level": "light",
|
||||
"max_load_num": 64,
|
||||
"total_memory": 4352,
|
||||
"used_memory": 1384
|
||||
},
|
||||
"get_device_time": {
|
||||
"region": "Europe/Berlin",
|
||||
"time_diff": 60,
|
||||
"timestamp": 1706995844
|
||||
},
|
||||
"get_device_usage": {},
|
||||
"get_fw_download_state": {
|
||||
"auto_upgrade": false,
|
||||
"download_progress": 0,
|
||||
"reboot_time": 5,
|
||||
"status": 0,
|
||||
"upgrade_time": 5
|
||||
},
|
||||
"get_inherit_info": null,
|
||||
"get_latest_fw": {
|
||||
"fw_size": 0,
|
||||
"fw_ver": "1.5.5 Build 240105 Rel.192438",
|
||||
"hw_id": "",
|
||||
"need_to_upgrade": false,
|
||||
"oem_id": "",
|
||||
"release_date": "",
|
||||
"release_note": "",
|
||||
"type": 0
|
||||
},
|
||||
"get_led_info": {
|
||||
"led_rule": "always",
|
||||
"led_status": true,
|
||||
"night_mode": {
|
||||
"end_time": 485,
|
||||
"night_mode_type": "sunrise_sunset",
|
||||
"start_time": 1046,
|
||||
"sunrise_offset": 0,
|
||||
"sunset_offset": 0
|
||||
}
|
||||
},
|
||||
"get_matter_setup_info": {
|
||||
"setup_code": "00000000000",
|
||||
"setup_payload": "00:0000000000000000000"
|
||||
},
|
||||
"get_support_alarm_type_list": {
|
||||
"alarm_type_list": [
|
||||
"Doorbell Ring 1",
|
||||
"Doorbell Ring 2",
|
||||
"Doorbell Ring 3",
|
||||
"Doorbell Ring 4",
|
||||
"Doorbell Ring 5",
|
||||
"Doorbell Ring 6",
|
||||
"Doorbell Ring 7",
|
||||
"Doorbell Ring 8",
|
||||
"Doorbell Ring 9",
|
||||
"Doorbell Ring 10",
|
||||
"Phone Ring",
|
||||
"Alarm 1",
|
||||
"Alarm 2",
|
||||
"Alarm 3",
|
||||
"Alarm 4",
|
||||
"Dripping Tap",
|
||||
"Alarm 5",
|
||||
"Connection 1",
|
||||
"Connection 2"
|
||||
]
|
||||
},
|
||||
"get_support_child_device_category": {
|
||||
"device_category_list": [
|
||||
{
|
||||
"category": "subg.trv"
|
||||
},
|
||||
{
|
||||
"category": "subg.trigger"
|
||||
},
|
||||
{
|
||||
"category": "subg.plugswitch"
|
||||
}
|
||||
]
|
||||
},
|
||||
"get_wireless_scan_info": {
|
||||
"ap_list": [],
|
||||
"wep_supported": false
|
||||
},
|
||||
"qs_component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "matter",
|
||||
"ver_code": 3
|
||||
}
|
||||
],
|
||||
"extra_info": {
|
||||
"device_model": "H100",
|
||||
"device_type": "SMART.TAPOHUB",
|
||||
"is_klap": false
|
||||
}
|
||||
}
|
||||
}
|
||||
371
kasa/tests/fixtures/smart/HS220(US)_3.26_1.0.1.json
vendored
371
kasa/tests/fixtures/smart/HS220(US)_3.26_1.0.1.json
vendored
@@ -1,371 +0,0 @@
|
||||
{
|
||||
"component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "wireless",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "schedule",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "countdown",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "antitheft",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "led",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "default_states",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "brightness",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "preset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "on_off_gradually",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "dimmer_calibration",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "overheat_protection",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "smart_switch",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "dimmer_custom_action",
|
||||
"ver_code": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"discovery_result": {
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"owner": "00000000000000000000000000000000",
|
||||
"device_type": "SMART.KASASWITCH",
|
||||
"device_model": "HS220(US)",
|
||||
"ip": "127.0.0.123",
|
||||
"mac": "24-2F-D0-00-00-00",
|
||||
"is_support_iot_cloud": true,
|
||||
"obd_src": "tplink",
|
||||
"factory_default": false,
|
||||
"mgt_encrypt_schm": {
|
||||
"is_support_https": false,
|
||||
"encrypt_type": "AES",
|
||||
"http_port": 80,
|
||||
"lv": 2
|
||||
}
|
||||
},
|
||||
"get_antitheft_rules": {
|
||||
"antitheft_rule_max_count": 1,
|
||||
"enable": false,
|
||||
"rule_list": []
|
||||
},
|
||||
"get_auto_update_info": {
|
||||
"enable": true,
|
||||
"random_range": 120,
|
||||
"time": 180
|
||||
},
|
||||
"get_connect_cloud_state": {
|
||||
"status": 0
|
||||
},
|
||||
"get_countdown_rules": {
|
||||
"countdown_rule_max_count": 1,
|
||||
"enable": false,
|
||||
"rule_list": []
|
||||
},
|
||||
"get_device_info": {
|
||||
"avatar": "table_lamp_5",
|
||||
"brightness": 51,
|
||||
"default_states": {
|
||||
"re_power_type": "always_off",
|
||||
"re_power_type_capability": [
|
||||
"last_states",
|
||||
"always_on",
|
||||
"always_off"
|
||||
],
|
||||
"type": "last_states"
|
||||
},
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"device_on": false,
|
||||
"fw_id": "00000000000000000000000000000000",
|
||||
"fw_ver": "1.0.1 Build 230829 Rel.160220",
|
||||
"has_set_location_info": true,
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "3.26",
|
||||
"ip": "127.0.0.123",
|
||||
"lang": "en_US",
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
"mac": "24-2F-D0-00-00-00",
|
||||
"model": "HS220",
|
||||
"nickname": "I01BU0tFRF9OQU1FIw==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"overheat_status": "normal",
|
||||
"region": "America/Detroit",
|
||||
"rssi": -62,
|
||||
"signal_level": 2,
|
||||
"smart_switch_state": false,
|
||||
"specs": "",
|
||||
"ssid": "I01BU0tFRF9TU0lEIw==",
|
||||
"time_diff": -300,
|
||||
"type": "SMART.KASASWITCH"
|
||||
},
|
||||
"get_device_time": {
|
||||
"region": "America/Detroit",
|
||||
"time_diff": -300,
|
||||
"timestamp": 1720201570
|
||||
},
|
||||
"get_device_usage": {
|
||||
"time_usage": {
|
||||
"past30": 30,
|
||||
"past7": 30,
|
||||
"today": 11
|
||||
}
|
||||
},
|
||||
"get_fw_download_state": {
|
||||
"auto_upgrade": false,
|
||||
"download_progress": 0,
|
||||
"reboot_time": 5,
|
||||
"status": 0,
|
||||
"upgrade_time": 5
|
||||
},
|
||||
"get_inherit_info": null,
|
||||
"get_latest_fw": {
|
||||
"fw_size": 0,
|
||||
"fw_ver": "1.0.1 Build 230829 Rel.160220",
|
||||
"hw_id": "",
|
||||
"need_to_upgrade": false,
|
||||
"oem_id": "",
|
||||
"release_date": "",
|
||||
"release_note": "",
|
||||
"type": 0
|
||||
},
|
||||
"get_led_info": {
|
||||
"bri_config": {
|
||||
"bri_type": "overall",
|
||||
"overall_bri": 50
|
||||
},
|
||||
"led_rule": "toggle",
|
||||
"led_status": true,
|
||||
"night_mode": {
|
||||
"end_time": 420,
|
||||
"night_mode_type": "custom",
|
||||
"start_time": 1320
|
||||
}
|
||||
},
|
||||
"get_next_event": {},
|
||||
"get_on_off_gradually_info": {
|
||||
"off_state": {
|
||||
"duration": 1,
|
||||
"enable": true,
|
||||
"max_duration": 60
|
||||
},
|
||||
"on_state": {
|
||||
"duration": 1,
|
||||
"enable": true,
|
||||
"max_duration": 60
|
||||
}
|
||||
},
|
||||
"get_preset_rules": {
|
||||
"brightness": [
|
||||
100,
|
||||
75,
|
||||
50,
|
||||
25,
|
||||
1
|
||||
]
|
||||
},
|
||||
"get_schedule_rules": {
|
||||
"enable": false,
|
||||
"rule_list": [],
|
||||
"schedule_rule_max_count": 32,
|
||||
"start_index": 0,
|
||||
"sum": 0
|
||||
},
|
||||
"get_wireless_scan_info": {
|
||||
"ap_list": [
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 3,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 3,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 3,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 2,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 2,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 2,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
}
|
||||
],
|
||||
"start_index": 0,
|
||||
"sum": 11,
|
||||
"wep_supported": false
|
||||
},
|
||||
"qs_component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
}
|
||||
],
|
||||
"extra_info": {
|
||||
"device_model": "HS220",
|
||||
"device_type": "SMART.KASASWITCH",
|
||||
"is_klap": false
|
||||
}
|
||||
}
|
||||
}
|
||||
255
kasa/tests/fixtures/smart/KH100(EU)_1.0_1.2.3.json
vendored
255
kasa/tests/fixtures/smart/KH100(EU)_1.0_1.2.3.json
vendored
@@ -1,255 +0,0 @@
|
||||
{
|
||||
"component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "wireless",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "led",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "child_device",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "child_quick_setup",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "child_inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "control_child",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "alarm",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_load",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "alarm_logs",
|
||||
"ver_code": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"discovery_result": {
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "KH100(EU)",
|
||||
"device_type": "SMART.KASAHUB",
|
||||
"factory_default": false,
|
||||
"ip": "127.0.0.123",
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "A8-42-A1-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"encrypt_type": "AES",
|
||||
"http_port": 80,
|
||||
"is_support_https": false,
|
||||
"lv": 2
|
||||
},
|
||||
"obd_src": "tplink",
|
||||
"owner": "00000000000000000000000000000000"
|
||||
},
|
||||
"get_alarm_configure": {
|
||||
"duration": 300,
|
||||
"type": "Doorbell Ring 1",
|
||||
"volume": "high"
|
||||
},
|
||||
"get_auto_update_info": {
|
||||
"enable": true,
|
||||
"random_range": 120,
|
||||
"time": 180
|
||||
},
|
||||
"get_child_device_component_list": {
|
||||
"child_component_list": [],
|
||||
"start_index": 0,
|
||||
"sum": 0
|
||||
},
|
||||
"get_child_device_list": {
|
||||
"child_device_list": [],
|
||||
"start_index": 0,
|
||||
"sum": 0
|
||||
},
|
||||
"get_connect_cloud_state": {
|
||||
"status": 1
|
||||
},
|
||||
"get_device_info": {
|
||||
"avatar": "",
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"fw_id": "00000000000000000000000000000000",
|
||||
"fw_ver": "1.2.3 Build 221012 Rel.103821",
|
||||
"has_set_location_info": false,
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"in_alarm": false,
|
||||
"in_alarm_source": "",
|
||||
"ip": "127.0.0.123",
|
||||
"lang": "",
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
"mac": "A8-42-A1-00-00-00",
|
||||
"model": "KH100",
|
||||
"nickname": "I01BU0tFRF9OQU1FIw==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"overheated": false,
|
||||
"region": "",
|
||||
"rssi": -61,
|
||||
"signal_level": 2,
|
||||
"specs": "EU",
|
||||
"ssid": "I01BU0tFRF9TU0lEIw==",
|
||||
"time_diff": 0,
|
||||
"type": "SMART.KASAHUB"
|
||||
},
|
||||
"get_device_load_info": {
|
||||
"cur_load_num": 0,
|
||||
"load_level": "light",
|
||||
"max_load_num": 64,
|
||||
"total_memory": 4352,
|
||||
"used_memory": 250
|
||||
},
|
||||
"get_device_time": {
|
||||
"region": "",
|
||||
"time_diff": 0,
|
||||
"timestamp": 1725109066
|
||||
},
|
||||
"get_device_usage": {},
|
||||
"get_fw_download_state": {
|
||||
"auto_upgrade": false,
|
||||
"download_progress": 0,
|
||||
"reboot_time": 5,
|
||||
"status": 0,
|
||||
"upgrade_time": 5
|
||||
},
|
||||
"get_inherit_info": null,
|
||||
"get_led_info": {
|
||||
"led_rule": "always",
|
||||
"led_status": true,
|
||||
"night_mode": {
|
||||
"end_time": 420,
|
||||
"night_mode_type": "sunrise_sunset",
|
||||
"start_time": 1140,
|
||||
"sunrise_offset": 0,
|
||||
"sunset_offset": 0
|
||||
}
|
||||
},
|
||||
"get_support_alarm_type_list": {
|
||||
"alarm_type_list": [
|
||||
"Doorbell Ring 1",
|
||||
"Doorbell Ring 2",
|
||||
"Doorbell Ring 3",
|
||||
"Doorbell Ring 4",
|
||||
"Doorbell Ring 5",
|
||||
"Doorbell Ring 6",
|
||||
"Doorbell Ring 7",
|
||||
"Doorbell Ring 8",
|
||||
"Doorbell Ring 9",
|
||||
"Doorbell Ring 10",
|
||||
"Phone Ring",
|
||||
"Alarm 1",
|
||||
"Alarm 2",
|
||||
"Alarm 3",
|
||||
"Alarm 4",
|
||||
"Dripping Tap",
|
||||
"Alarm 5",
|
||||
"Connection 1",
|
||||
"Connection 2"
|
||||
]
|
||||
},
|
||||
"get_support_child_device_category": {
|
||||
"device_category_list": [
|
||||
{
|
||||
"category": "subg.trv"
|
||||
},
|
||||
{
|
||||
"category": "subg.trigger"
|
||||
},
|
||||
{
|
||||
"category": "subg.plugswitch"
|
||||
}
|
||||
]
|
||||
},
|
||||
"get_wireless_scan_info": {
|
||||
"ap_list": [],
|
||||
"start_index": 0,
|
||||
"sum": 0,
|
||||
"wep_supported": false
|
||||
},
|
||||
"qs_component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
}
|
||||
],
|
||||
"extra_info": {
|
||||
"device_model": "KH100",
|
||||
"device_type": "SMART.KASAHUB"
|
||||
}
|
||||
}
|
||||
}
|
||||
429
kasa/tests/fixtures/smart/KH100(EU)_1.0_1.5.12.json
vendored
429
kasa/tests/fixtures/smart/KH100(EU)_1.0_1.5.12.json
vendored
@@ -1,429 +0,0 @@
|
||||
{
|
||||
"component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "wireless",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "led",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "child_device",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "child_quick_setup",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "child_inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "control_child",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "alarm",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_load",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "alarm_logs",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "localSmart",
|
||||
"ver_code": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"discovery_result": {
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "KH100(EU)",
|
||||
"device_type": "SMART.KASAHUB",
|
||||
"factory_default": false,
|
||||
"ip": "127.0.0.123",
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "A8-42-A1-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"encrypt_type": "KLAP",
|
||||
"http_port": 80,
|
||||
"is_support_https": false,
|
||||
"lv": 2
|
||||
},
|
||||
"obd_src": "tplink",
|
||||
"owner": "00000000000000000000000000000000"
|
||||
},
|
||||
"get_alarm_configure": {
|
||||
"duration": 300,
|
||||
"type": "Doorbell Ring 1",
|
||||
"volume": "high"
|
||||
},
|
||||
"get_auto_update_info": {
|
||||
"enable": true,
|
||||
"random_range": 120,
|
||||
"time": 900
|
||||
},
|
||||
"get_child_device_component_list": {
|
||||
"child_component_list": [
|
||||
{
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "schedule",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "countdown",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "frost_protection",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "child_protection",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "temperature",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "temp_control",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "remove_scale",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "progress_calibration",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "early_start",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "temp_record",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "screen_setting",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "night_mode",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "smart_control_schedule",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "battery_detect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "temperature_correction",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "window_open_detect",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "shutdown_mode",
|
||||
"ver_code": 1
|
||||
}
|
||||
],
|
||||
"device_id": "SCRUBBED_CHILD_DEVICE_ID_1"
|
||||
}
|
||||
],
|
||||
"start_index": 0,
|
||||
"sum": 1
|
||||
},
|
||||
"get_child_device_list": {
|
||||
"child_device_list": [
|
||||
{
|
||||
"at_low_battery": false,
|
||||
"avatar": "",
|
||||
"battery_percentage": 75,
|
||||
"bind_count": 7,
|
||||
"category": "subg.trv",
|
||||
"child_protection": false,
|
||||
"current_temp": 24.0,
|
||||
"device_id": "SCRUBBED_CHILD_DEVICE_ID_1",
|
||||
"frost_protection_on": false,
|
||||
"fw_ver": "2.4.0 Build 230804 Rel.193040",
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"jamming_rssi": -116,
|
||||
"jamming_signal_level": 1,
|
||||
"location": "",
|
||||
"mac": "A842A1000000",
|
||||
"max_control_temp": 30,
|
||||
"min_control_temp": 5,
|
||||
"model": "KE100",
|
||||
"nickname": "I01BU0tFRF9OQU1FIw==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"parent_device_id": "0000000000000000000000000000000000000000",
|
||||
"region": "Europe/Berlin",
|
||||
"rssi": -13,
|
||||
"signal_level": 3,
|
||||
"specs": "EU",
|
||||
"status": "online",
|
||||
"status_follow_edge": false,
|
||||
"target_temp": 22.0,
|
||||
"temp_offset": 0,
|
||||
"temp_unit": "celsius",
|
||||
"trv_states": [],
|
||||
"type": "SMART.KASAENERGY"
|
||||
}
|
||||
],
|
||||
"start_index": 0,
|
||||
"sum": 1
|
||||
},
|
||||
"get_connect_cloud_state": {
|
||||
"status": 0
|
||||
},
|
||||
"get_device_info": {
|
||||
"avatar": "kasa_hub",
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"fw_id": "00000000000000000000000000000000",
|
||||
"fw_ver": "1.5.12 Build 240320 Rel.123648",
|
||||
"has_set_location_info": true,
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"in_alarm": false,
|
||||
"in_alarm_source": "",
|
||||
"ip": "127.0.0.123",
|
||||
"lang": "",
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
"mac": "A8-42-A1-00-00-00",
|
||||
"model": "KH100",
|
||||
"nickname": "I01BU0tFRF9OQU1FIw==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"overheated": false,
|
||||
"region": "Europe/Berlin",
|
||||
"rssi": -60,
|
||||
"signal_level": 2,
|
||||
"specs": "EU",
|
||||
"ssid": "I01BU0tFRF9TU0lEIw==",
|
||||
"time_diff": 60,
|
||||
"type": "SMART.KASAHUB"
|
||||
},
|
||||
"get_device_load_info": {
|
||||
"cur_load_num": 2,
|
||||
"load_level": "light",
|
||||
"max_load_num": 64,
|
||||
"total_memory": 4352,
|
||||
"used_memory": 1439
|
||||
},
|
||||
"get_device_time": {
|
||||
"region": "Europe/Berlin",
|
||||
"time_diff": 60,
|
||||
"timestamp": 1725111902
|
||||
},
|
||||
"get_device_usage": {},
|
||||
"get_fw_download_state": {
|
||||
"auto_upgrade": false,
|
||||
"download_progress": 0,
|
||||
"reboot_time": 5,
|
||||
"status": 0,
|
||||
"upgrade_time": 5
|
||||
},
|
||||
"get_inherit_info": null,
|
||||
"get_latest_fw": {
|
||||
"fw_size": 0,
|
||||
"fw_ver": "1.5.12 Build 240320 Rel.123648",
|
||||
"hw_id": "",
|
||||
"need_to_upgrade": false,
|
||||
"oem_id": "",
|
||||
"release_date": "",
|
||||
"release_note": "",
|
||||
"type": 0
|
||||
},
|
||||
"get_led_info": {
|
||||
"led_rule": "always",
|
||||
"led_status": true,
|
||||
"night_mode": {
|
||||
"end_time": 406,
|
||||
"night_mode_type": "sunrise_sunset",
|
||||
"start_time": 1217,
|
||||
"sunrise_offset": 0,
|
||||
"sunset_offset": 0
|
||||
}
|
||||
},
|
||||
"get_support_alarm_type_list": {
|
||||
"alarm_type_list": [
|
||||
"Doorbell Ring 1",
|
||||
"Doorbell Ring 2",
|
||||
"Doorbell Ring 3",
|
||||
"Doorbell Ring 4",
|
||||
"Doorbell Ring 5",
|
||||
"Doorbell Ring 6",
|
||||
"Doorbell Ring 7",
|
||||
"Doorbell Ring 8",
|
||||
"Doorbell Ring 9",
|
||||
"Doorbell Ring 10",
|
||||
"Phone Ring",
|
||||
"Alarm 1",
|
||||
"Alarm 2",
|
||||
"Alarm 3",
|
||||
"Alarm 4",
|
||||
"Dripping Tap",
|
||||
"Alarm 5",
|
||||
"Connection 1",
|
||||
"Connection 2"
|
||||
]
|
||||
},
|
||||
"get_support_child_device_category": {
|
||||
"device_category_list": [
|
||||
{
|
||||
"category": "subg.trv"
|
||||
},
|
||||
{
|
||||
"category": "subg.trigger"
|
||||
},
|
||||
{
|
||||
"category": "subg.plugswitch"
|
||||
}
|
||||
]
|
||||
},
|
||||
"get_wireless_scan_info": {
|
||||
"ap_list": [
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 2,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
}
|
||||
],
|
||||
"start_index": 0,
|
||||
"sum": 1,
|
||||
"wep_supported": false
|
||||
},
|
||||
"qs_component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
}
|
||||
],
|
||||
"extra_info": {
|
||||
"device_model": "KH100",
|
||||
"device_type": "SMART.KASAHUB",
|
||||
"is_klap": true
|
||||
}
|
||||
}
|
||||
}
|
||||
1557
kasa/tests/fixtures/smart/KH100(UK)_1.0_1.5.6.json
vendored
1557
kasa/tests/fixtures/smart/KH100(UK)_1.0_1.5.6.json
vendored
File diff suppressed because it is too large
Load Diff
175
kasa/tests/fixtures/smart/KP125M(US)_1.0_1.1.3.json
vendored
175
kasa/tests/fixtures/smart/KP125M(US)_1.0_1.1.3.json
vendored
@@ -1,175 +0,0 @@
|
||||
{
|
||||
"component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "wireless",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "schedule",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "countdown",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "antitheft",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "led",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "default_states",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "auto_off",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "energy_monitoring",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "power_protection",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "matter",
|
||||
"ver_code": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"discovery_result": {
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "KP125M(US)",
|
||||
"device_type": "SMART.KASAPLUG",
|
||||
"factory_default": false,
|
||||
"ip": "127.0.0.123",
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "00-00-00-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"encrypt_type": "AES",
|
||||
"http_port": 80,
|
||||
"is_support_https": false,
|
||||
"lv": 2
|
||||
},
|
||||
"obd_src": "tplink",
|
||||
"owner": "00000000000000000000000000000000"
|
||||
},
|
||||
"get_current_power": {
|
||||
"current_power": 17
|
||||
},
|
||||
"get_device_info": {
|
||||
"auto_off_remain_time": 0,
|
||||
"auto_off_status": "off",
|
||||
"avatar": "coffee_maker",
|
||||
"default_states": {
|
||||
"state": {},
|
||||
"type": "last_states"
|
||||
},
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"device_on": true,
|
||||
"fw_id": "00000000000000000000000000000000",
|
||||
"fw_ver": "1.1.3 Build 230801 Rel.092557",
|
||||
"has_set_location_info": true,
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"ip": "127.0.0.123",
|
||||
"lang": "en_US",
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
"mac": "00-00-00-00-00-00",
|
||||
"model": "KP125M",
|
||||
"nickname": "IyNNQVNLRUROQU1FIyM=",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"on_time": 5332,
|
||||
"overheated": false,
|
||||
"power_protection_status": "normal",
|
||||
"region": "America/Chicago",
|
||||
"rssi": -62,
|
||||
"signal_level": 2,
|
||||
"specs": "",
|
||||
"ssid": "IyNNQVNLRUROQU1FIyM=",
|
||||
"time_diff": -360,
|
||||
"type": "SMART.KASAPLUG"
|
||||
},
|
||||
"get_device_time": {
|
||||
"region": "America/Chicago",
|
||||
"time_diff": -360,
|
||||
"timestamp": 1701569348
|
||||
},
|
||||
"get_device_usage": {
|
||||
"power_usage": {
|
||||
"past30": 6757,
|
||||
"past7": 4101,
|
||||
"today": 513
|
||||
},
|
||||
"saved_power": {
|
||||
"past30": 9516,
|
||||
"past7": 5748,
|
||||
"today": 696
|
||||
},
|
||||
"time_usage": {
|
||||
"past30": 16273,
|
||||
"past7": 9849,
|
||||
"today": 1209
|
||||
}
|
||||
},
|
||||
"get_energy_usage": {
|
||||
"current_power": 17654,
|
||||
"electricity_charge": [
|
||||
0,
|
||||
64,
|
||||
111
|
||||
],
|
||||
"local_time": "2023-12-02 20:09:08",
|
||||
"month_energy": 1020,
|
||||
"month_runtime": 2649,
|
||||
"today_energy": 513,
|
||||
"today_runtime": 1209
|
||||
}
|
||||
}
|
||||
487
kasa/tests/fixtures/smart/KP125M(US)_1.0_1.2.3.json
vendored
487
kasa/tests/fixtures/smart/KP125M(US)_1.0_1.2.3.json
vendored
@@ -1,487 +0,0 @@
|
||||
{
|
||||
"component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "wireless",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "schedule",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "countdown",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "antitheft",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "led",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "default_states",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "auto_off",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "energy_monitoring",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "power_protection",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "matter",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "current_protection",
|
||||
"ver_code": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"discovery_result": {
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "KP125M(US)",
|
||||
"device_type": "SMART.KASAPLUG",
|
||||
"factory_default": false,
|
||||
"ip": "127.0.0.123",
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "48-22-54-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"encrypt_type": "KLAP",
|
||||
"http_port": 80,
|
||||
"is_support_https": false,
|
||||
"lv": 2
|
||||
},
|
||||
"obd_src": "tplink",
|
||||
"owner": "00000000000000000000000000000000"
|
||||
},
|
||||
"get_antitheft_rules": {
|
||||
"antitheft_rule_max_count": 1,
|
||||
"enable": false,
|
||||
"rule_list": []
|
||||
},
|
||||
"get_auto_off_config": {
|
||||
"delay_min": 120,
|
||||
"enable": false
|
||||
},
|
||||
"get_auto_update_info": {
|
||||
"enable": true,
|
||||
"random_range": 120,
|
||||
"time": 180
|
||||
},
|
||||
"get_connect_cloud_state": {
|
||||
"status": 0
|
||||
},
|
||||
"get_countdown_rules": {
|
||||
"countdown_rule_max_count": 1,
|
||||
"enable": false,
|
||||
"rule_list": []
|
||||
},
|
||||
"get_current_power": {
|
||||
"current_power": 69
|
||||
},
|
||||
"get_device_info": {
|
||||
"auto_off_remain_time": 0,
|
||||
"auto_off_status": "off",
|
||||
"avatar": "coffee_maker",
|
||||
"default_states": {
|
||||
"state": {
|
||||
"on": true
|
||||
},
|
||||
"type": "custom"
|
||||
},
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"device_on": true,
|
||||
"fw_id": "00000000000000000000000000000000",
|
||||
"fw_ver": "1.2.3 Build 240624 Rel.154806",
|
||||
"has_set_location_info": true,
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"ip": "127.0.0.123",
|
||||
"lang": "en_US",
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
"mac": "48-22-54-00-00-00",
|
||||
"model": "KP125M",
|
||||
"nickname": "I01BU0tFRF9OQU1FIw==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"on_time": 8818511,
|
||||
"overcurrent_status": "normal",
|
||||
"overheat_status": "normal",
|
||||
"power_protection_status": "normal",
|
||||
"region": "America/Denver",
|
||||
"rssi": -40,
|
||||
"signal_level": 3,
|
||||
"specs": "",
|
||||
"ssid": "I01BU0tFRF9TU0lEIw==",
|
||||
"time_diff": -420,
|
||||
"type": "SMART.KASAPLUG"
|
||||
},
|
||||
"get_device_time": {
|
||||
"region": "America/Denver",
|
||||
"time_diff": -420,
|
||||
"timestamp": 1730957712
|
||||
},
|
||||
"get_device_usage": {
|
||||
"power_usage": {
|
||||
"past30": 46786,
|
||||
"past7": 10896,
|
||||
"today": 1507
|
||||
},
|
||||
"saved_power": {
|
||||
"past30": 0,
|
||||
"past7": 0,
|
||||
"today": 0
|
||||
},
|
||||
"time_usage": {
|
||||
"past30": 43175,
|
||||
"past7": 10055,
|
||||
"today": 1355
|
||||
}
|
||||
},
|
||||
"get_electricity_price_config": {
|
||||
"constant_price": 0,
|
||||
"time_of_use_config": {
|
||||
"summer": {
|
||||
"midpeak": 120,
|
||||
"offpeak": 60,
|
||||
"onpeak": 170,
|
||||
"period": [
|
||||
5,
|
||||
1,
|
||||
10,
|
||||
31
|
||||
],
|
||||
"weekday_config": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"weekend_config": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
},
|
||||
"winter": {
|
||||
"midpeak": 90,
|
||||
"offpeak": 60,
|
||||
"onpeak": 110,
|
||||
"period": [
|
||||
11,
|
||||
1,
|
||||
4,
|
||||
30
|
||||
],
|
||||
"weekday_config": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"weekend_config": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
"type": "time_of_use"
|
||||
},
|
||||
"get_energy_usage": {
|
||||
"current_power": 69737,
|
||||
"electricity_charge": [
|
||||
2901,
|
||||
3351,
|
||||
536
|
||||
],
|
||||
"local_time": "2024-11-06 22:35:14",
|
||||
"month_energy": 9332,
|
||||
"month_runtime": 8615,
|
||||
"today_energy": 1507,
|
||||
"today_runtime": 1355
|
||||
},
|
||||
"get_fw_download_state": {
|
||||
"auto_upgrade": false,
|
||||
"download_progress": 0,
|
||||
"reboot_time": 5,
|
||||
"status": 0,
|
||||
"upgrade_time": 5
|
||||
},
|
||||
"get_latest_fw": {
|
||||
"fw_size": 0,
|
||||
"fw_ver": "1.2.3 Build 240624 Rel.154806",
|
||||
"hw_id": "",
|
||||
"need_to_upgrade": false,
|
||||
"oem_id": "",
|
||||
"release_date": "",
|
||||
"release_note": "",
|
||||
"type": 0
|
||||
},
|
||||
"get_led_info": {
|
||||
"bri_config": {
|
||||
"bri_type": "overall",
|
||||
"overall_bri": 50
|
||||
},
|
||||
"led_rule": "always",
|
||||
"led_status": true,
|
||||
"night_mode": {
|
||||
"end_time": 396,
|
||||
"night_mode_type": "sunrise_sunset",
|
||||
"start_time": 1013,
|
||||
"sunrise_offset": 0,
|
||||
"sunset_offset": 0
|
||||
}
|
||||
},
|
||||
"get_matter_setup_info": {
|
||||
"setup_code": "00000000000",
|
||||
"setup_payload": "00:000000-000000000000"
|
||||
},
|
||||
"get_max_power": {
|
||||
"max_power": 1537
|
||||
},
|
||||
"get_next_event": {},
|
||||
"get_protection_power": {
|
||||
"enabled": false,
|
||||
"protection_power": 0
|
||||
},
|
||||
"get_schedule_rules": {
|
||||
"enable": false,
|
||||
"rule_list": [],
|
||||
"schedule_rule_max_count": 32,
|
||||
"start_index": 0,
|
||||
"sum": 0
|
||||
},
|
||||
"get_wireless_scan_info": {
|
||||
"ap_list": [
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 3,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 3,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 3,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
}
|
||||
],
|
||||
"start_index": 0,
|
||||
"sum": 7,
|
||||
"wep_supported": false
|
||||
},
|
||||
"qs_component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "ble_whole_setup",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "matter",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
}
|
||||
],
|
||||
"extra_info": {
|
||||
"device_model": "KP125M",
|
||||
"device_type": "SMART.KASAPLUG",
|
||||
"is_klap": true
|
||||
}
|
||||
}
|
||||
}
|
||||
243
kasa/tests/fixtures/smart/KS205(US)_1.0_1.0.2.json
vendored
243
kasa/tests/fixtures/smart/KS205(US)_1.0_1.0.2.json
vendored
@@ -1,243 +0,0 @@
|
||||
{
|
||||
"component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "wireless",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "schedule",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "countdown",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "antitheft",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "led",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "default_states",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "auto_off",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "matter",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "delay_action",
|
||||
"ver_code": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"discovery_result": {
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "KS205(US)",
|
||||
"device_type": "SMART.KASASWITCH",
|
||||
"factory_default": false,
|
||||
"ip": "127.0.0.123",
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "00-00-00-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"encrypt_type": "AES",
|
||||
"http_port": 80,
|
||||
"is_support_https": false,
|
||||
"lv": 2
|
||||
},
|
||||
"obd_src": "tplink",
|
||||
"owner": "00000000000000000000000000000000"
|
||||
},
|
||||
"get_antitheft_rules": {
|
||||
"antitheft_rule_max_count": 1,
|
||||
"enable": false,
|
||||
"rule_list": []
|
||||
},
|
||||
"get_auto_off_config": {
|
||||
"delay_min": 120,
|
||||
"enable": false
|
||||
},
|
||||
"get_auto_update_info": {
|
||||
"enable": false,
|
||||
"random_range": 120,
|
||||
"time": 180
|
||||
},
|
||||
"get_connect_cloud_state": {
|
||||
"status": 0
|
||||
},
|
||||
"get_countdown_rules": {
|
||||
"countdown_rule_max_count": 1,
|
||||
"enable": false,
|
||||
"rule_list": []
|
||||
},
|
||||
"get_device_info": {
|
||||
"auto_off_remain_time": 0,
|
||||
"auto_off_status": "off",
|
||||
"avatar": "switch_s500",
|
||||
"default_states": {
|
||||
"state": {},
|
||||
"type": "last_states"
|
||||
},
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"device_on": false,
|
||||
"fw_id": "00000000000000000000000000000000",
|
||||
"fw_ver": "1.0.2 Build 230810 Rel.140202",
|
||||
"has_set_location_info": true,
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"ip": "127.0.0.123",
|
||||
"lang": "en_US",
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
"mac": "00-00-00-00-00-00",
|
||||
"model": "KS205",
|
||||
"nickname": "I01BU0tFRF9OQU1FIw==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"overheated": false,
|
||||
"region": "America/Toronto",
|
||||
"rssi": -49,
|
||||
"signal_level": 3,
|
||||
"specs": "",
|
||||
"ssid": "I01BU0tFRF9TU0lEIw==",
|
||||
"time_diff": -300,
|
||||
"type": "SMART.KASASWITCH"
|
||||
},
|
||||
"get_device_time": {
|
||||
"region": "America/Toronto",
|
||||
"time_diff": -300,
|
||||
"timestamp": 1704216652
|
||||
},
|
||||
"get_device_usage": {
|
||||
"time_usage": {
|
||||
"past30": 10908,
|
||||
"past7": 3476,
|
||||
"today": 10
|
||||
}
|
||||
},
|
||||
"get_fw_download_state": {
|
||||
"auto_upgrade": false,
|
||||
"download_progress": 0,
|
||||
"reboot_time": 5,
|
||||
"status": 0,
|
||||
"upgrade_time": 5
|
||||
},
|
||||
"get_latest_fw": {
|
||||
"fw_size": 0,
|
||||
"fw_ver": "1.0.2 Build 230810 Rel.140202",
|
||||
"hw_id": "",
|
||||
"need_to_upgrade": false,
|
||||
"oem_id": "",
|
||||
"release_date": "",
|
||||
"release_note": "",
|
||||
"type": 0
|
||||
},
|
||||
"get_led_info": {
|
||||
"led_rule": "always",
|
||||
"led_status": true,
|
||||
"night_mode": {
|
||||
"end_time": 476,
|
||||
"night_mode_type": "sunrise_sunset",
|
||||
"start_time": 1020,
|
||||
"sunrise_offset": 0,
|
||||
"sunset_offset": 0
|
||||
}
|
||||
},
|
||||
"get_next_event": {},
|
||||
"get_schedule_rules": {
|
||||
"enable": false,
|
||||
"rule_list": [],
|
||||
"schedule_rule_max_count": 32,
|
||||
"start_index": 0,
|
||||
"sum": 0
|
||||
},
|
||||
"get_wireless_scan_info": {
|
||||
"ap_list": [],
|
||||
"wep_supported": false
|
||||
},
|
||||
"qs_component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "ble_whole_setup",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "matter",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
}
|
||||
],
|
||||
"extra_info": {
|
||||
"device_model": "KS205",
|
||||
"device_type": "SMART.KASASWITCH",
|
||||
"is_klap": false
|
||||
}
|
||||
}
|
||||
}
|
||||
298
kasa/tests/fixtures/smart/KS205(US)_1.0_1.1.0.json
vendored
298
kasa/tests/fixtures/smart/KS205(US)_1.0_1.1.0.json
vendored
@@ -1,298 +0,0 @@
|
||||
{
|
||||
"component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "wireless",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "schedule",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "countdown",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "antitheft",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "led",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "default_states",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "auto_off",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "matter",
|
||||
"ver_code": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"discovery_result": {
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "KS205(US)",
|
||||
"device_type": "SMART.KASASWITCH",
|
||||
"factory_default": false,
|
||||
"ip": "127.0.0.123",
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "40-ED-00-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"encrypt_type": "KLAP",
|
||||
"http_port": 80,
|
||||
"is_support_https": false,
|
||||
"lv": 2
|
||||
},
|
||||
"obd_src": "tplink",
|
||||
"owner": ""
|
||||
},
|
||||
"get_antitheft_rules": {
|
||||
"antitheft_rule_max_count": 1,
|
||||
"enable": false,
|
||||
"rule_list": []
|
||||
},
|
||||
"get_auto_off_config": {
|
||||
"delay_min": 120,
|
||||
"enable": false
|
||||
},
|
||||
"get_auto_update_info": {
|
||||
"enable": true,
|
||||
"random_range": 120,
|
||||
"time": 180
|
||||
},
|
||||
"get_connect_cloud_state": {
|
||||
"status": 0
|
||||
},
|
||||
"get_countdown_rules": {
|
||||
"countdown_rule_max_count": 1,
|
||||
"enable": false,
|
||||
"rule_list": []
|
||||
},
|
||||
"get_device_info": {
|
||||
"auto_off_remain_time": 0,
|
||||
"auto_off_status": "off",
|
||||
"avatar": "switch_s500",
|
||||
"default_states": {
|
||||
"state": {},
|
||||
"type": "last_states"
|
||||
},
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"device_on": false,
|
||||
"fw_id": "00000000000000000000000000000000",
|
||||
"fw_ver": "1.1.0 Build 240411 Rel.144632",
|
||||
"has_set_location_info": true,
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"ip": "127.0.0.123",
|
||||
"lang": "en_US",
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
"mac": "40-ED-00-00-00-00",
|
||||
"model": "KS205",
|
||||
"nickname": "I01BU0tFRF9OQU1FIw==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"overheat_status": "normal",
|
||||
"region": "America/Toronto",
|
||||
"rssi": -57,
|
||||
"signal_level": 2,
|
||||
"specs": "",
|
||||
"ssid": "I01BU0tFRF9TU0lEIw==",
|
||||
"time_diff": -300,
|
||||
"type": "SMART.KASASWITCH"
|
||||
},
|
||||
"get_device_time": {
|
||||
"region": "America/Toronto",
|
||||
"time_diff": -300,
|
||||
"timestamp": 1720146765
|
||||
},
|
||||
"get_device_usage": {
|
||||
"time_usage": {
|
||||
"past30": 10601,
|
||||
"past7": 966,
|
||||
"today": 0
|
||||
}
|
||||
},
|
||||
"get_fw_download_state": {
|
||||
"auto_upgrade": false,
|
||||
"download_progress": 0,
|
||||
"reboot_time": 5,
|
||||
"status": 0,
|
||||
"upgrade_time": 5
|
||||
},
|
||||
"get_latest_fw": {
|
||||
"fw_size": 0,
|
||||
"fw_ver": "1.1.0 Build 240411 Rel.144632",
|
||||
"hw_id": "",
|
||||
"need_to_upgrade": false,
|
||||
"oem_id": "",
|
||||
"release_date": "",
|
||||
"release_note": "",
|
||||
"type": 0
|
||||
},
|
||||
"get_led_info": {
|
||||
"bri_config": {
|
||||
"bri_type": "overall",
|
||||
"overall_bri": 50
|
||||
},
|
||||
"led_rule": "always",
|
||||
"led_status": true,
|
||||
"night_mode": {
|
||||
"end_time": 351,
|
||||
"night_mode_type": "sunrise_sunset",
|
||||
"start_time": 1266,
|
||||
"sunrise_offset": 0,
|
||||
"sunset_offset": 0
|
||||
}
|
||||
},
|
||||
"get_matter_setup_info": {
|
||||
"setup_code": "00000000000",
|
||||
"setup_payload": "00:0000000-0000.00.000"
|
||||
},
|
||||
"get_next_event": {},
|
||||
"get_schedule_rules": {
|
||||
"enable": false,
|
||||
"rule_list": [],
|
||||
"schedule_rule_max_count": 32,
|
||||
"start_index": 0,
|
||||
"sum": 0
|
||||
},
|
||||
"get_wireless_scan_info": {
|
||||
"ap_list": [
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 2,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 2,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 1,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 0,
|
||||
"key_type": "none",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
}
|
||||
],
|
||||
"start_index": 0,
|
||||
"sum": 6,
|
||||
"wep_supported": false
|
||||
},
|
||||
"qs_component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "ble_whole_setup",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "matter",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
}
|
||||
],
|
||||
"extra_info": {
|
||||
"device_model": "KS205",
|
||||
"device_type": "SMART.KASASWITCH",
|
||||
"is_klap": true
|
||||
}
|
||||
}
|
||||
}
|
||||
269
kasa/tests/fixtures/smart/KS225(US)_1.0_1.0.2.json
vendored
269
kasa/tests/fixtures/smart/KS225(US)_1.0_1.0.2.json
vendored
@@ -1,269 +0,0 @@
|
||||
{
|
||||
"component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "wireless",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "schedule",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "countdown",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "antitheft",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "led",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "default_states",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "brightness",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "preset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "on_off_gradually",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "dimmer_calibration",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "overheat_protection",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "matter",
|
||||
"ver_code": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"discovery_result": {
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "KS225(US)",
|
||||
"device_type": "SMART.KASASWITCH",
|
||||
"factory_default": false,
|
||||
"ip": "127.0.0.123",
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "00-00-00-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"encrypt_type": "AES",
|
||||
"http_port": 80,
|
||||
"is_support_https": false,
|
||||
"lv": 2
|
||||
},
|
||||
"obd_src": "tplink",
|
||||
"owner": "00000000000000000000000000000000"
|
||||
},
|
||||
"get_antitheft_rules": {
|
||||
"antitheft_rule_max_count": 1,
|
||||
"enable": false,
|
||||
"rule_list": []
|
||||
},
|
||||
"get_auto_update_info": {
|
||||
"enable": true,
|
||||
"random_range": 120,
|
||||
"time": 180
|
||||
},
|
||||
"get_connect_cloud_state": {
|
||||
"status": 0
|
||||
},
|
||||
"get_countdown_rules": {
|
||||
"countdown_rule_max_count": 1,
|
||||
"enable": false,
|
||||
"rule_list": []
|
||||
},
|
||||
"get_device_info": {
|
||||
"avatar": "switch_s500d",
|
||||
"brightness": 34,
|
||||
"default_states": {
|
||||
"re_power_type": "always_off",
|
||||
"re_power_type_capability": [
|
||||
"last_states",
|
||||
"always_on",
|
||||
"always_off"
|
||||
],
|
||||
"type": "last_states"
|
||||
},
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"device_on": false,
|
||||
"fw_id": "00000000000000000000000000000000",
|
||||
"fw_ver": "1.0.2 Build 230810 Rel.141013",
|
||||
"has_set_location_info": true,
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"ip": "127.0.0.123",
|
||||
"lang": "en_US",
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
"mac": "00-00-00-00-00-00",
|
||||
"model": "KS225",
|
||||
"nickname": "I01BU0tFRF9OQU1FIw==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"on_time": 0,
|
||||
"overheat_status": "normal",
|
||||
"region": "America/Toronto",
|
||||
"rssi": -51,
|
||||
"signal_level": 2,
|
||||
"specs": "",
|
||||
"ssid": "I01BU0tFRF9TU0lEIw==",
|
||||
"time_diff": -300,
|
||||
"type": "SMART.KASASWITCH"
|
||||
},
|
||||
"get_device_time": {
|
||||
"region": "America/Toronto",
|
||||
"time_diff": -300,
|
||||
"timestamp": 1704216678
|
||||
},
|
||||
"get_device_usage": {
|
||||
"time_usage": {
|
||||
"past30": 7410,
|
||||
"past7": 2190,
|
||||
"today": 1
|
||||
}
|
||||
},
|
||||
"get_fw_download_state": {
|
||||
"auto_upgrade": false,
|
||||
"download_progress": 0,
|
||||
"reboot_time": 5,
|
||||
"status": 0,
|
||||
"upgrade_time": 5
|
||||
},
|
||||
"get_inherit_info": null,
|
||||
"get_latest_fw": {
|
||||
"fw_size": 0,
|
||||
"fw_ver": "1.0.2 Build 230810 Rel.141013",
|
||||
"hw_id": "",
|
||||
"need_to_upgrade": false,
|
||||
"oem_id": "",
|
||||
"release_date": "",
|
||||
"release_note": "",
|
||||
"type": 0
|
||||
},
|
||||
"get_led_info": {
|
||||
"led_rule": "always",
|
||||
"led_status": true,
|
||||
"night_mode": {
|
||||
"end_time": 476,
|
||||
"night_mode_type": "sunrise_sunset",
|
||||
"start_time": 1020,
|
||||
"sunrise_offset": 0,
|
||||
"sunset_offset": 0
|
||||
}
|
||||
},
|
||||
"get_next_event": {},
|
||||
"get_preset_rules": {
|
||||
"brightness": [
|
||||
100,
|
||||
75,
|
||||
50,
|
||||
25,
|
||||
1
|
||||
]
|
||||
},
|
||||
"get_schedule_rules": {
|
||||
"enable": false,
|
||||
"rule_list": [],
|
||||
"schedule_rule_max_count": 32,
|
||||
"start_index": 0,
|
||||
"sum": 0
|
||||
},
|
||||
"get_wireless_scan_info": {
|
||||
"ap_list": [],
|
||||
"wep_supported": false
|
||||
},
|
||||
"qs_component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "ble_whole_setup",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "matter",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
}
|
||||
],
|
||||
"extra_info": {
|
||||
"device_model": "KS225",
|
||||
"device_type": "SMART.KASASWITCH",
|
||||
"is_klap": false
|
||||
}
|
||||
}
|
||||
}
|
||||
332
kasa/tests/fixtures/smart/KS225(US)_1.0_1.1.0.json
vendored
332
kasa/tests/fixtures/smart/KS225(US)_1.0_1.1.0.json
vendored
@@ -1,332 +0,0 @@
|
||||
{
|
||||
"component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "wireless",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "schedule",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "countdown",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "antitheft",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "led",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "default_states",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "brightness",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "preset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "on_off_gradually",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "dimmer_calibration",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "overheat_protection",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "matter",
|
||||
"ver_code": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"discovery_result": {
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "KS225(US)",
|
||||
"device_type": "SMART.KASASWITCH",
|
||||
"factory_default": false,
|
||||
"ip": "127.0.0.123",
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "3C-52-A1-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"encrypt_type": "KLAP",
|
||||
"http_port": 80,
|
||||
"is_support_https": false,
|
||||
"lv": 2
|
||||
},
|
||||
"obd_src": "tplink",
|
||||
"owner": ""
|
||||
},
|
||||
"get_antitheft_rules": {
|
||||
"antitheft_rule_max_count": 1,
|
||||
"enable": false,
|
||||
"rule_list": []
|
||||
},
|
||||
"get_auto_update_info": {
|
||||
"enable": true,
|
||||
"random_range": 120,
|
||||
"time": 180
|
||||
},
|
||||
"get_connect_cloud_state": {
|
||||
"status": 0
|
||||
},
|
||||
"get_countdown_rules": {
|
||||
"countdown_rule_max_count": 1,
|
||||
"enable": false,
|
||||
"rule_list": []
|
||||
},
|
||||
"get_device_info": {
|
||||
"avatar": "switch_s500d",
|
||||
"brightness": 5,
|
||||
"default_states": {
|
||||
"re_power_type": "always_off",
|
||||
"re_power_type_capability": [
|
||||
"last_states",
|
||||
"always_on",
|
||||
"always_off"
|
||||
],
|
||||
"type": "last_states"
|
||||
},
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"device_on": true,
|
||||
"fw_id": "00000000000000000000000000000000",
|
||||
"fw_ver": "1.1.0 Build 240411 Rel.150716",
|
||||
"has_set_location_info": true,
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"ip": "127.0.0.123",
|
||||
"lang": "en_US",
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
"mac": "3C-52-A1-00-00-00",
|
||||
"model": "KS225",
|
||||
"nickname": "I01BU0tFRF9OQU1FIw==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"on_time": 88,
|
||||
"overheat_status": "normal",
|
||||
"region": "America/Toronto",
|
||||
"rssi": -48,
|
||||
"signal_level": 3,
|
||||
"specs": "",
|
||||
"ssid": "I01BU0tFRF9TU0lEIw==",
|
||||
"time_diff": -300,
|
||||
"type": "SMART.KASASWITCH"
|
||||
},
|
||||
"get_device_time": {
|
||||
"region": "America/Toronto",
|
||||
"time_diff": -300,
|
||||
"timestamp": 1720036002
|
||||
},
|
||||
"get_device_usage": {
|
||||
"time_usage": {
|
||||
"past30": 1371,
|
||||
"past7": 659,
|
||||
"today": 58
|
||||
}
|
||||
},
|
||||
"get_fw_download_state": {
|
||||
"auto_upgrade": false,
|
||||
"download_progress": 0,
|
||||
"reboot_time": 5,
|
||||
"status": 0,
|
||||
"upgrade_time": 5
|
||||
},
|
||||
"get_inherit_info": null,
|
||||
"get_latest_fw": {
|
||||
"fw_size": 0,
|
||||
"fw_ver": "1.1.0 Build 240411 Rel.150716",
|
||||
"hw_id": "",
|
||||
"need_to_upgrade": false,
|
||||
"oem_id": "",
|
||||
"release_date": "",
|
||||
"release_note": "",
|
||||
"type": 0
|
||||
},
|
||||
"get_led_info": {
|
||||
"bri_config": {
|
||||
"bri_type": "overall",
|
||||
"overall_bri": 50
|
||||
},
|
||||
"led_rule": "always",
|
||||
"led_status": false,
|
||||
"night_mode": {
|
||||
"end_time": 350,
|
||||
"night_mode_type": "sunrise_sunset",
|
||||
"start_time": 1266,
|
||||
"sunrise_offset": 0,
|
||||
"sunset_offset": 0
|
||||
}
|
||||
},
|
||||
"get_matter_setup_info": {
|
||||
"setup_code": "00000000000",
|
||||
"setup_payload": "00:0000000000000000000"
|
||||
},
|
||||
"get_next_event": {},
|
||||
"get_on_off_gradually_info": {
|
||||
"off_state": {
|
||||
"duration": 1,
|
||||
"enable": true,
|
||||
"max_duration": 60
|
||||
},
|
||||
"on_state": {
|
||||
"duration": 1,
|
||||
"enable": true,
|
||||
"max_duration": 60
|
||||
}
|
||||
},
|
||||
"get_preset_rules": {
|
||||
"brightness": [
|
||||
100,
|
||||
75,
|
||||
50,
|
||||
25,
|
||||
1
|
||||
]
|
||||
},
|
||||
"get_schedule_rules": {
|
||||
"enable": false,
|
||||
"rule_list": [],
|
||||
"schedule_rule_max_count": 32,
|
||||
"start_index": 0,
|
||||
"sum": 0
|
||||
},
|
||||
"get_wireless_scan_info": {
|
||||
"ap_list": [
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 3,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 3,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 1,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
}
|
||||
],
|
||||
"start_index": 0,
|
||||
"sum": 5,
|
||||
"wep_supported": false
|
||||
},
|
||||
"qs_component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "ble_whole_setup",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "matter",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
}
|
||||
],
|
||||
"extra_info": {
|
||||
"device_model": "KS225",
|
||||
"device_type": "SMART.KASASWITCH",
|
||||
"is_klap": true
|
||||
}
|
||||
}
|
||||
}
|
||||
899
kasa/tests/fixtures/smart/KS240(US)_1.0_1.0.4.json
vendored
899
kasa/tests/fixtures/smart/KS240(US)_1.0_1.0.4.json
vendored
@@ -1,899 +0,0 @@
|
||||
{
|
||||
"child_devices": {
|
||||
"SCRUBBED_CHILD_DEVICE_ID_1": {
|
||||
"component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "schedule",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "countdown",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "antitheft",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "default_states",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "brightness",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "preset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "on_off_gradually",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "dimmer_calibration",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "overheat_protection",
|
||||
"ver_code": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"get_antitheft_rules": {
|
||||
"antitheft_rule_max_count": 1,
|
||||
"enable": false,
|
||||
"rule_list": []
|
||||
},
|
||||
"get_connect_cloud_state": {
|
||||
"status": 0
|
||||
},
|
||||
"get_countdown_rules": {
|
||||
"countdown_rule_max_count": 1,
|
||||
"enable": false,
|
||||
"rule_list": []
|
||||
},
|
||||
"get_device_info": {
|
||||
"avatar": "switch_ks240",
|
||||
"bind_count": 1,
|
||||
"brightness": 44,
|
||||
"category": "kasa.switch.outlet.sub-dimmer",
|
||||
"default_states": {
|
||||
"re_power_type": "always_off",
|
||||
"re_power_type_capability": [
|
||||
"last_states",
|
||||
"always_on",
|
||||
"always_off"
|
||||
],
|
||||
"type": "last_states"
|
||||
},
|
||||
"device_id": "SCRUBBED_CHILD_DEVICE_ID_1",
|
||||
"device_on": true,
|
||||
"fade_off_time": 5,
|
||||
"fade_on_time": 5,
|
||||
"fw_id": "00000000000000000000000000000000",
|
||||
"fw_ver": "1.0.4 Build 230721 Rel.184322",
|
||||
"gradually_off_mode": 0,
|
||||
"gradually_on_mode": 0,
|
||||
"has_set_location_info": true,
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"lang": "en_US",
|
||||
"latitude": 0,
|
||||
"led_off": 0,
|
||||
"longitude": 0,
|
||||
"mac": "F0A731000000",
|
||||
"max_fade_off_time": 60,
|
||||
"max_fade_on_time": 60,
|
||||
"model": "KS240",
|
||||
"nickname": "I01BU0tFRF9OQU1FIw==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"on_off": 1,
|
||||
"on_time": 67955,
|
||||
"original_device_id": "0000000000000000000000000000000000000000",
|
||||
"overheat_status": "normal",
|
||||
"preset_state": [
|
||||
{
|
||||
"brightness": 100
|
||||
},
|
||||
{
|
||||
"brightness": 75
|
||||
},
|
||||
{
|
||||
"brightness": 50
|
||||
},
|
||||
{
|
||||
"brightness": 25
|
||||
},
|
||||
{
|
||||
"brightness": 1
|
||||
}
|
||||
],
|
||||
"region": "America/Chicago",
|
||||
"specs": "",
|
||||
"status_follow_edge": true,
|
||||
"type": "SMART.KASASWITCH"
|
||||
},
|
||||
"get_device_usage": {
|
||||
"time_usage": {
|
||||
"past30": 41994,
|
||||
"past7": 8874,
|
||||
"today": 236
|
||||
}
|
||||
},
|
||||
"get_next_event": {},
|
||||
"get_on_off_gradually_info": {
|
||||
"off_state": {
|
||||
"duration": 5,
|
||||
"enable": false,
|
||||
"max_duration": 60
|
||||
},
|
||||
"on_state": {
|
||||
"duration": 5,
|
||||
"enable": false,
|
||||
"max_duration": 60
|
||||
}
|
||||
},
|
||||
"get_preset_rules": {
|
||||
"brightness": [
|
||||
100,
|
||||
75,
|
||||
50,
|
||||
25,
|
||||
1
|
||||
]
|
||||
},
|
||||
"get_schedule_rules": {
|
||||
"enable": false,
|
||||
"rule_list": [],
|
||||
"schedule_rule_max_count": 32,
|
||||
"start_index": 0,
|
||||
"sum": 0
|
||||
}
|
||||
},
|
||||
"SCRUBBED_CHILD_DEVICE_ID_2": {
|
||||
"component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "schedule",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "countdown",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "fan_control",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "overheat_protection",
|
||||
"ver_code": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"get_connect_cloud_state": {
|
||||
"status": 0
|
||||
},
|
||||
"get_countdown_rules": {
|
||||
"countdown_rule_max_count": 1,
|
||||
"enable": false,
|
||||
"rule_list": []
|
||||
},
|
||||
"get_device_info": {
|
||||
"avatar": "switch_ks240",
|
||||
"bind_count": 1,
|
||||
"category": "kasa.switch.outlet.sub-fan",
|
||||
"device_id": "SCRUBBED_CHILD_DEVICE_ID_2",
|
||||
"device_on": true,
|
||||
"fan_sleep_mode_on": false,
|
||||
"fan_speed_level": 4,
|
||||
"fw_id": "00000000000000000000000000000000",
|
||||
"fw_ver": "1.0.4 Build 230721 Rel.184322",
|
||||
"has_set_location_info": true,
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"lang": "en_US",
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
"mac": "F0A731000000",
|
||||
"model": "KS240",
|
||||
"nickname": "I01BU0tFRF9OQU1FIw==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"original_device_id": "0000000000000000000000000000000000000000",
|
||||
"overheat_status": "normal",
|
||||
"region": "America/Chicago",
|
||||
"specs": "",
|
||||
"status_follow_edge": true,
|
||||
"type": "SMART.KASASWITCH"
|
||||
},
|
||||
"get_device_usage": {
|
||||
"time_usage": {
|
||||
"past30": 6786,
|
||||
"past7": 6786,
|
||||
"today": 236
|
||||
}
|
||||
},
|
||||
"get_next_event": {},
|
||||
"get_schedule_rules": {
|
||||
"enable": false,
|
||||
"rule_list": [],
|
||||
"schedule_rule_max_count": 32,
|
||||
"start_index": 0,
|
||||
"sum": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "wireless",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "schedule",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "countdown",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "antitheft",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "led",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "default_states",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "control_child",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "child_device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "localSmart",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "brightness",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "preset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "on_off_gradually",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "dimmer_calibration",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "fan_control",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "homekit",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "overheat_protection",
|
||||
"ver_code": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"discovery_result": {
|
||||
"device_id": "00000000000000000000000000000000",
|
||||
"device_model": "KS240(US)",
|
||||
"device_type": "SMART.KASASWITCH",
|
||||
"factory_default": false,
|
||||
"ip": "127.0.0.123",
|
||||
"is_support_iot_cloud": true,
|
||||
"mac": "F0-A7-31-00-00-00",
|
||||
"mgt_encrypt_schm": {
|
||||
"encrypt_type": "AES",
|
||||
"http_port": 80,
|
||||
"is_support_https": false,
|
||||
"lv": 2
|
||||
},
|
||||
"obd_src": "tplink",
|
||||
"owner": "00000000000000000000000000000000"
|
||||
},
|
||||
"get_auto_update_info": {
|
||||
"enable": false,
|
||||
"random_range": 120,
|
||||
"time": 180
|
||||
},
|
||||
"get_child_device_component_list": {
|
||||
"child_component_list": [
|
||||
{
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "schedule",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "countdown",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "antitheft",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "default_states",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "brightness",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "preset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "on_off_gradually",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "dimmer_calibration",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "overheat_protection",
|
||||
"ver_code": 1
|
||||
}
|
||||
],
|
||||
"device_id": "SCRUBBED_CHILD_DEVICE_ID_1"
|
||||
},
|
||||
{
|
||||
"component_list": [
|
||||
{
|
||||
"id": "device",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "schedule",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "countdown",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "account",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "synchronize",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "cloud_connect",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "device_local_time",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "fan_control",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "overheat_protection",
|
||||
"ver_code": 1
|
||||
}
|
||||
],
|
||||
"device_id": "SCRUBBED_CHILD_DEVICE_ID_2"
|
||||
}
|
||||
],
|
||||
"start_index": 0,
|
||||
"sum": 2
|
||||
},
|
||||
"get_child_device_list": {
|
||||
"child_device_list": [
|
||||
{
|
||||
"avatar": "switch_ks240",
|
||||
"bind_count": 1,
|
||||
"category": "kasa.switch.outlet.sub-fan",
|
||||
"device_id": "SCRUBBED_CHILD_DEVICE_ID_2",
|
||||
"device_on": true,
|
||||
"fan_sleep_mode_on": false,
|
||||
"fan_speed_level": 4,
|
||||
"fw_id": "00000000000000000000000000000000",
|
||||
"fw_ver": "1.0.4 Build 230721 Rel.184322",
|
||||
"has_set_location_info": true,
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"lang": "en_US",
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
"mac": "F0A731000000",
|
||||
"model": "KS240",
|
||||
"nickname": "I01BU0tFRF9OQU1FIw==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"original_device_id": "0000000000000000000000000000000000000000",
|
||||
"overheat_status": "normal",
|
||||
"region": "America/Chicago",
|
||||
"specs": "",
|
||||
"status_follow_edge": true,
|
||||
"type": "SMART.KASASWITCH"
|
||||
},
|
||||
{
|
||||
"avatar": "switch_ks240",
|
||||
"bind_count": 1,
|
||||
"brightness": 44,
|
||||
"category": "kasa.switch.outlet.sub-dimmer",
|
||||
"default_states": {
|
||||
"re_power_type": "always_off",
|
||||
"re_power_type_capability": [
|
||||
"last_states",
|
||||
"always_on",
|
||||
"always_off"
|
||||
],
|
||||
"type": "last_states"
|
||||
},
|
||||
"device_id": "SCRUBBED_CHILD_DEVICE_ID_1",
|
||||
"device_on": true,
|
||||
"fade_off_time": 5,
|
||||
"fade_on_time": 5,
|
||||
"fw_id": "00000000000000000000000000000000",
|
||||
"fw_ver": "1.0.4 Build 230721 Rel.184322",
|
||||
"gradually_off_mode": 0,
|
||||
"gradually_on_mode": 0,
|
||||
"has_set_location_info": true,
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"lang": "en_US",
|
||||
"latitude": 0,
|
||||
"led_off": 0,
|
||||
"longitude": 0,
|
||||
"mac": "F0A731000000",
|
||||
"max_fade_off_time": 60,
|
||||
"max_fade_on_time": 60,
|
||||
"model": "KS240",
|
||||
"nickname": "I01BU0tFRF9OQU1FIw==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"on_off": 1,
|
||||
"on_time": 67951,
|
||||
"original_device_id": "0000000000000000000000000000000000000000",
|
||||
"overheat_status": "normal",
|
||||
"preset_state": [
|
||||
{
|
||||
"brightness": 100
|
||||
},
|
||||
{
|
||||
"brightness": 75
|
||||
},
|
||||
{
|
||||
"brightness": 50
|
||||
},
|
||||
{
|
||||
"brightness": 25
|
||||
},
|
||||
{
|
||||
"brightness": 1
|
||||
}
|
||||
],
|
||||
"region": "America/Chicago",
|
||||
"specs": "",
|
||||
"status_follow_edge": true,
|
||||
"type": "SMART.KASASWITCH"
|
||||
}
|
||||
],
|
||||
"start_index": 0,
|
||||
"sum": 2
|
||||
},
|
||||
"get_connect_cloud_state": {
|
||||
"status": 0
|
||||
},
|
||||
"get_device_info": {
|
||||
"avatar": "",
|
||||
"device_id": "0000000000000000000000000000000000000000",
|
||||
"fw_id": "00000000000000000000000000000000",
|
||||
"fw_ver": "1.0.4 Build 230721 Rel.184322",
|
||||
"has_set_location_info": true,
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"hw_ver": "1.0",
|
||||
"ip": "127.0.0.123",
|
||||
"lang": "en_US",
|
||||
"latitude": 0,
|
||||
"longitude": 0,
|
||||
"mac": "F0-A7-31-00-00-00",
|
||||
"model": "KS240",
|
||||
"nickname": "I01BU0tFRF9OQU1FIw==",
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"region": "America/Chicago",
|
||||
"rssi": -37,
|
||||
"signal_level": 3,
|
||||
"specs": "",
|
||||
"ssid": "I01BU0tFRF9TU0lEIw==",
|
||||
"time_diff": -360,
|
||||
"type": "SMART.KASASWITCH"
|
||||
},
|
||||
"get_device_time": {
|
||||
"region": "America/Chicago",
|
||||
"time_diff": -360,
|
||||
"timestamp": 1714553757
|
||||
},
|
||||
"get_fw_download_state": {
|
||||
"auto_upgrade": false,
|
||||
"download_progress": 0,
|
||||
"reboot_time": 5,
|
||||
"status": 0,
|
||||
"upgrade_time": 5
|
||||
},
|
||||
"get_homekit_info": {
|
||||
"mfi_setup_code": "000-00-000",
|
||||
"mfi_setup_id": "0000",
|
||||
"mfi_token_token": "0000000000000000000000000000000000/00000000000000000000000/00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000+00000000000000000=",
|
||||
"mfi_token_uuid": "00000000-0000-0000-0000-000000000000"
|
||||
},
|
||||
"get_latest_fw": {
|
||||
"fw_size": 786432,
|
||||
"fw_ver": "1.0.5 Build 231204 Rel.172150",
|
||||
"hw_id": "00000000000000000000000000000000",
|
||||
"need_to_upgrade": true,
|
||||
"oem_id": "00000000000000000000000000000000",
|
||||
"release_date": "2024-01-12",
|
||||
"release_note": "Modifications and Bug Fixes:\n1. Improved time synchronization accuracy.\n2. Enhanced stability and performance.\n3. Fixed some minor bugs.",
|
||||
"type": 2
|
||||
},
|
||||
"get_led_info": {
|
||||
"bri_config": {
|
||||
"bri_type": "overall",
|
||||
"overall_bri": 50
|
||||
},
|
||||
"led_rule": "auto",
|
||||
"led_status": false,
|
||||
"night_mode": {
|
||||
"end_time": 420,
|
||||
"night_mode_type": "custom",
|
||||
"start_time": 1320
|
||||
}
|
||||
},
|
||||
"get_wireless_scan_info": {
|
||||
"ap_list": [
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 3,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 3,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 2,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 2,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 2,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 2,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
},
|
||||
{
|
||||
"bssid": "000000000000",
|
||||
"channel": 0,
|
||||
"cipher_type": 2,
|
||||
"key_type": "wpa2_psk",
|
||||
"signal_level": 1,
|
||||
"ssid": "I01BU0tFRF9TU0lEIw=="
|
||||
}
|
||||
],
|
||||
"start_index": 0,
|
||||
"sum": 13,
|
||||
"wep_supported": false
|
||||
},
|
||||
"qs_component_nego": {
|
||||
"component_list": [
|
||||
{
|
||||
"id": "quick_setup",
|
||||
"ver_code": 3
|
||||
},
|
||||
{
|
||||
"id": "sunrise_sunset",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "ble_whole_setup",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "iot_cloud",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "inherit",
|
||||
"ver_code": 1
|
||||
},
|
||||
{
|
||||
"id": "firmware",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "control_child",
|
||||
"ver_code": 2
|
||||
},
|
||||
{
|
||||
"id": "child_device",
|
||||
"ver_code": 2
|
||||
}
|
||||
],
|
||||
"extra_info": {
|
||||
"device_model": "KS240",
|
||||
"device_type": "SMART.KASASWITCH"
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user