python-kasa 0.7.6__tar.gz → 0.7.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_kasa-0.7.6 → python_kasa-0.7.7}/CHANGELOG.md +32 -1
- {python_kasa-0.7.6 → python_kasa-0.7.7}/PKG-INFO +1 -1
- {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/helpers/smartcamerarequests.py +2 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/parse_pcap_klap.py +65 -68
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/__init__.py +5 -4
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cli/device.py +10 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cli/discover.py +11 -2
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/device.py +2 -2
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/device_factory.py +5 -3
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/discover.py +38 -8
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/interfaces/energy.py +1 -1
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/iotdevice.py +2 -2
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/iotplug.py +10 -1
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/ambientlight.py +28 -10
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/motion.py +36 -8
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/module.py +4 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/__init__.py +4 -0
- python_kasa-0.7.7/kasa/smart/modules/childprotection.py +41 -0
- python_kasa-0.7.7/kasa/smart/modules/triggerlogs.py +34 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/smartchilddevice.py +3 -4
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fakeprotocol_smart.py +16 -4
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/S200B(US)_1.0_1.12.0.json +11 -3
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/T110(US)_1.0_1.9.0.json +7 -2
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/T310(US)_1.0_1.5.0.json +10 -5
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/T315(US)_1.0_1.8.0.json +10 -5
- python_kasa-0.7.7/kasa/tests/fixtures/smartcamera/C210(EU)_2.0_1.4.3.json +962 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smartcamera/H200(EU)_1.0_1.3.2.json +177 -8
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smartcamera/H200(US)_1.0_1.3.6.json +66 -35
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smartcamera/TC65_1.0_1.3.9.json +135 -7
- python_kasa-0.7.7/kasa/tests/iot/modules/test_ambientlight.py +46 -0
- python_kasa-0.7.7/kasa/tests/iot/modules/test_motion.py +57 -0
- python_kasa-0.7.7/kasa/tests/iot/test_wallswitch.py +9 -0
- python_kasa-0.7.7/kasa/tests/smart/modules/test_childprotection.py +43 -0
- python_kasa-0.7.7/kasa/tests/smartcamera/__init__.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_cli.py +9 -1
- {python_kasa-0.7.6 → python_kasa-0.7.7}/pyproject.toml +1 -1
- {python_kasa-0.7.6 → python_kasa-0.7.7}/.gitignore +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/LICENSE +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/README.md +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/README.md +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/__init__.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/bench/benchmark.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/bench/utils/__init__.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/bench/utils/data.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/bench/utils/original.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/create_module_fixtures.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/dump_devinfo.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/generate_supported.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/helpers/__init__.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/helpers/smartrequests.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/parse_pcap.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/devtools/perftest.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/Makefile +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/make.bat +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/SUPPORTED.md +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/_static/copybutton.js +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/cli.rst +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/codeinfo.md +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/conf.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/contribute.md +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/deprecated.md +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/guides/connect.md +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/guides/device.md +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/guides/discover.md +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/guides/energy.md +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/guides/feature.md +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/guides/light.md +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/guides/module.md +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/guides/strip.md +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/guides.md +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/index.md +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/library.md +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/reference.md +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/smartbulb.rst +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/smartdevice.rst +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/smartdimmer.rst +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/smartlightstrip.rst +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/smartplug.rst +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/smartstrip.rst +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/topics.md +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/source/tutorial.md +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/docs/tutorial.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/aestransport.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cachedzoneinfo.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cli/__init__.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cli/__main__.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cli/common.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cli/feature.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cli/lazygroup.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cli/light.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cli/main.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cli/schedule.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cli/time.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cli/usage.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/cli/wifi.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/credentials.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/device_type.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/deviceconfig.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/emeterstatus.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/exceptions.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/experimental/__init__.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/experimental/modules/__init__.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/experimental/modules/camera.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/experimental/modules/childdevice.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/experimental/modules/device.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/experimental/modules/time.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/experimental/smartcamera.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/experimental/smartcameramodule.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/experimental/smartcameraprotocol.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/experimental/sslaestransport.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/feature.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/httpclient.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/interfaces/__init__.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/interfaces/fan.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/interfaces/led.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/interfaces/light.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/interfaces/lighteffect.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/interfaces/lightpreset.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/interfaces/time.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/__init__.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/effects.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/iotbulb.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/iotdimmer.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/iotlightstrip.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/iotmodule.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/iotstrip.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/iottimezone.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/__init__.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/antitheft.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/cloud.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/countdown.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/emeter.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/led.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/light.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/lighteffect.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/lightpreset.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/rulemodule.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/schedule.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/time.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iot/modules/usage.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/iotprotocol.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/json.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/klaptransport.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/modulemapping.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/modulemapping.pyi +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/protocol.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/py.typed +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/__init__.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/effects.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/alarm.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/autooff.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/batterysensor.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/brightness.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/childdevice.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/cloud.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/color.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/colortemperature.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/contactsensor.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/devicemodule.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/energy.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/fan.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/firmware.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/frostprotection.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/humiditysensor.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/led.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/light.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/lighteffect.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/lightpreset.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/lightstripeffect.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/lighttransition.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/motionsensor.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/reportmode.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/temperaturecontrol.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/temperaturesensor.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/time.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/modules/waterleaksensor.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/smartdevice.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smart/smartmodule.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/smartprotocol.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/__init__.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/conftest.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/device_fixtures.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/discovery_fixtures.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fakeprotocol_iot.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fakeprotocol_smartcamera.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtureinfo.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/EP10(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/EP40(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/ES20M(US)_1.0_1.0.8.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS100(UK)_1.0_1.2.6.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS100(UK)_4.1_1.1.0.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS100(US)_1.0_1.2.5.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS100(US)_2.0_1.5.6.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS103(US)_1.0_1.5.7.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS103(US)_2.1_1.1.2.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS103(US)_2.1_1.1.4.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS105(US)_1.0_1.5.6.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS107(US)_1.0_1.0.8.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS110(EU)_1.0_1.2.5.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS110(EU)_4.0_1.0.4.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS110(US)_1.0_1.2.6.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS200(US)_2.0_1.5.7.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS200(US)_5.0_1.0.2.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS210(US)_1.0_1.5.8.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS220(US)_1.0_1.5.7.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS220(US)_2.0_1.0.3.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS300(US)_1.0_1.0.10.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS300(US)_1.0_1.0.21.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS300(US)_2.0_1.0.12.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/HS300(US)_2.0_1.0.3.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL110(US)_1.0_1.8.11.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL120(US)_1.0_1.8.11.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL120(US)_1.0_1.8.6.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL125(US)_1.20_1.0.5.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL125(US)_2.0_1.0.7.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL125(US)_4.0_1.0.5.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL130(EU)_1.0_1.8.8.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL130(US)_1.0_1.8.11.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL135(US)_1.0_1.0.15.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL135(US)_1.0_1.0.6.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL400L5(US)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL400L5(US)_1.0_1.0.8.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL420L5(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL430(UN)_2.0_1.0.8.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL430(US)_1.0_1.0.10.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL430(US)_2.0_1.0.11.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL430(US)_2.0_1.0.8.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL430(US)_2.0_1.0.9.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL50(US)_1.0_1.1.13.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL60(UN)_1.0_1.1.4.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KL60(US)_1.0_1.1.13.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP100(US)_3.0_1.0.1.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP105(UK)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP105(UK)_1.0_1.0.7.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP115(EU)_1.0_1.0.16.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP115(US)_1.0_1.0.17.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP115(US)_1.0_1.0.21.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP125(US)_1.0_1.0.6.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP200(US)_3.0_1.0.3.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP303(UK)_1.0_1.0.3.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP303(US)_2.0_1.0.3.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP400(US)_1.0_1.0.10.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP400(US)_2.0_1.0.6.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP400(US)_3.0_1.0.3.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP400(US)_3.0_1.0.4.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP401(US)_1.0_1.0.0.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP405(US)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KP405(US)_1.0_1.0.6.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KS200M(US)_1.0_1.0.11.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KS200M(US)_1.0_1.0.12.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KS200M(US)_1.0_1.0.8.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KS220M(US)_1.0_1.0.4.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/KS230(US)_1.0_1.0.14.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/LB110(US)_1.0_1.8.11.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/EP25(US)_2.6_1.0.1.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/EP25(US)_2.6_1.0.2.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/H100(EU)_1.0_1.2.3.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/H100(EU)_1.0_1.5.10.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/H100(EU)_1.0_1.5.5.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/HS220(US)_3.26_1.0.1.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/KH100(EU)_1.0_1.2.3.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/KH100(EU)_1.0_1.5.12.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/KH100(UK)_1.0_1.5.6.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/KP125M(US)_1.0_1.1.3.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/KS205(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/KS205(US)_1.0_1.1.0.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/KS225(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/KS225(US)_1.0_1.1.0.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/KS240(US)_1.0_1.0.4.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/KS240(US)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L510B(EU)_3.0_1.0.5.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L510E(US)_3.0_1.0.5.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L510E(US)_3.0_1.1.2.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L530E(EU)_3.0_1.0.6.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L530E(EU)_3.0_1.1.0.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L530E(EU)_3.0_1.1.6.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L530E(US)_2.0_1.1.0.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L900-10(EU)_1.0_1.0.17.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L900-10(US)_1.0_1.0.11.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L900-5(EU)_1.0_1.0.17.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L900-5(EU)_1.0_1.1.0.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L920-5(EU)_1.0_1.0.7.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L920-5(EU)_1.0_1.1.3.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L920-5(US)_1.0_1.1.0.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L920-5(US)_1.0_1.1.3.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/L930-5(US)_1.0_1.1.2.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/P100_1.0.0_1.1.3.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/P100_1.0.0_1.3.7.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/P100_1.0.0_1.4.0.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/P110(EU)_1.0_1.0.7.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/P110(EU)_1.0_1.2.3.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/P110(UK)_1.0_1.3.0.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/P115(EU)_1.0_1.2.3.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/P125M(US)_1.0_1.1.0.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/P135(US)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/P300(EU)_1.0_1.0.13.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/P300(EU)_1.0_1.0.15.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/P300(EU)_1.0_1.0.7.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/P304M(UK)_1.0_1.0.3.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/S500D(US)_1.0_1.0.5.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/S505(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/S505D(US)_1.0_1.1.0.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/TP15(US)_1.0_1.0.3.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/TP25(US)_1.0_1.0.2.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/KE100(EU)_1.0_2.4.0.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/KE100(EU)_1.0_2.8.0.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/KE100(UK)_1.0_2.8.0.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/S200B(EU)_1.0_1.11.0.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/S200D(EU)_1.0_1.11.0.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/S200D(EU)_1.0_1.12.0.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/T100(EU)_1.0_1.12.0.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/T110(EU)_1.0_1.8.0.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/T110(EU)_1.0_1.9.0.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/T300(EU)_1.0_1.7.0.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/T310(EU)_1.0_1.5.0.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smart/child/T315(EU)_1.0_1.7.0.json +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/fixtures/smartcamera/C210(EU)_2.0_1.4.2.json +0 -0
- {python_kasa-0.7.6/kasa/tests/smart → python_kasa-0.7.7/kasa/tests/iot/modules}/__init__.py +0 -0
- {python_kasa-0.7.6/kasa/tests/smart/features → python_kasa-0.7.7/kasa/tests/smart}/__init__.py +0 -0
- {python_kasa-0.7.6/kasa/tests/smart/modules → python_kasa-0.7.7/kasa/tests/smart/features}/__init__.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/features/test_brightness.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/features/test_colortemp.py +0 -0
- {python_kasa-0.7.6/kasa/tests/smartcamera → python_kasa-0.7.7/kasa/tests/smart/modules}/__init__.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/modules/test_autooff.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/modules/test_contact.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/modules/test_fan.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/modules/test_firmware.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/modules/test_humidity.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/modules/test_light_effect.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/modules/test_light_strip_effect.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/modules/test_lighttransition.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/modules/test_motionsensor.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/modules/test_temperature.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/modules/test_temperaturecontrol.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smart/modules/test_waterleak.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/smartcamera/test_smartcamera.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_aestransport.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_bulb.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_childdevice.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_common_modules.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_device.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_device_factory.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_device_type.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_deviceconfig.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_dimmer.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_discovery.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_emeter.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_feature.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_httpclient.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_iotdevice.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_klapprotocol.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_lightstrip.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_plug.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_protocol.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_readme_examples.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_smartdevice.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_smartprotocol.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_sslaestransport.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_strip.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/tests/test_usage.py +0 -0
- {python_kasa-0.7.6 → python_kasa-0.7.7}/kasa/xortransport.py +0 -0
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.7.7](https://github.com/python-kasa/python-kasa/tree/0.7.7) (2024-11-04)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.7.6...0.7.7)
|
|
6
|
+
|
|
7
|
+
**Release summary:**
|
|
8
|
+
|
|
9
|
+
- Bugfix for child device device creation error with credentials_hash
|
|
10
|
+
- PIR support for iot dimmers and wall switches.
|
|
11
|
+
- Various small enhancements and project improvements.
|
|
12
|
+
|
|
13
|
+
**Implemented enhancements:**
|
|
14
|
+
|
|
15
|
+
- Add PIR&LAS for wall switches mentioning PIR support [\#1227](https://github.com/python-kasa/python-kasa/pull/1227) (@rytilahti)
|
|
16
|
+
- Expose ambient light setting for iot dimmers [\#1210](https://github.com/python-kasa/python-kasa/pull/1210) (@rytilahti)
|
|
17
|
+
- Expose PIR enabled setting for iot dimmers [\#1174](https://github.com/python-kasa/python-kasa/pull/1174) (@rytilahti)
|
|
18
|
+
- Add childprotection module [\#1141](https://github.com/python-kasa/python-kasa/pull/1141) (@rytilahti)
|
|
19
|
+
- Initial trigger logs implementation [\#900](https://github.com/python-kasa/python-kasa/pull/900) (@rytilahti)
|
|
20
|
+
|
|
21
|
+
**Fixed bugs:**
|
|
22
|
+
|
|
23
|
+
- Fix AES child device creation error [\#1220](https://github.com/python-kasa/python-kasa/pull/1220) (@sdb9696)
|
|
24
|
+
|
|
25
|
+
**Project maintenance:**
|
|
26
|
+
|
|
27
|
+
- Update TC65 fixture [\#1225](https://github.com/python-kasa/python-kasa/pull/1225) (@rytilahti)
|
|
28
|
+
- Update smartcamera fixtures from latest dump\_devinfo [\#1224](https://github.com/python-kasa/python-kasa/pull/1224) (@sdb9696)
|
|
29
|
+
- Add component queries to smartcamera devices [\#1223](https://github.com/python-kasa/python-kasa/pull/1223) (@sdb9696)
|
|
30
|
+
- Update try\_connect\_all to be more efficient and report attempts [\#1222](https://github.com/python-kasa/python-kasa/pull/1222) (@sdb9696)
|
|
31
|
+
- Use stacklevel=2 for warnings to report on callsites [\#1219](https://github.com/python-kasa/python-kasa/pull/1219) (@rytilahti)
|
|
32
|
+
- parse\_pcap\_klap: various code cleanups [\#1138](https://github.com/python-kasa/python-kasa/pull/1138) (@rytilahti)
|
|
33
|
+
|
|
3
34
|
## [0.7.6](https://github.com/python-kasa/python-kasa/tree/0.7.6) (2024-10-29)
|
|
4
35
|
|
|
5
36
|
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.7.5...0.7.6)
|
|
@@ -45,7 +76,7 @@
|
|
|
45
76
|
|
|
46
77
|
**Project maintenance:**
|
|
47
78
|
|
|
48
|
-
- Fix mypy errors in
|
|
79
|
+
- Fix mypy errors in parse\_pcap\_klap [\#1214](https://github.com/python-kasa/python-kasa/pull/1214) (@sdb9696)
|
|
49
80
|
- Make HSV NamedTuple creation more efficient [\#1211](https://github.com/python-kasa/python-kasa/pull/1211) (@sdb9696)
|
|
50
81
|
- dump\_devinfo: query get\_current\_brt for iot dimmers [\#1209](https://github.com/python-kasa/python-kasa/pull/1209) (@rytilahti)
|
|
51
82
|
- Add trigger\_logs and double\_click to dump\_devinfo helper [\#1208](https://github.com/python-kasa/python-kasa/pull/1208) (@sdb9696)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: python-kasa
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.7
|
|
4
4
|
Summary: Python API for TP-Link Kasa and Tapo devices
|
|
5
5
|
Project-URL: Homepage, https://github.com/python-kasa/python-kasa
|
|
6
6
|
Project-URL: Bug Tracker, https://github.com/python-kasa/python-kasa/issues
|
|
@@ -52,6 +52,8 @@ SMARTCAMERA_REQUESTS: list[dict] = [
|
|
|
52
52
|
{"getVideoCapability": {"video_capability": {"name": "main"}}},
|
|
53
53
|
{"getTimezone": {"system": {"name": "basic"}}},
|
|
54
54
|
{"getClockStatus": {"system": {"name": "clock_status"}}},
|
|
55
|
+
{"getAppComponentList": {"app_component": {"name": "app_component_list"}}},
|
|
56
|
+
{"getChildDeviceComponentList": {"childControl": {"start_index": 0}}},
|
|
55
57
|
# single request only methods
|
|
56
58
|
{"get": {"function": {"name": ["module_spec"]}}},
|
|
57
59
|
{"get": {"cet": {"name": ["vhttpd"]}}},
|
|
@@ -29,6 +29,18 @@ from kasa.klaptransport import KlapEncryptionSession, KlapTransportV2
|
|
|
29
29
|
from kasa.protocol import DEFAULT_CREDENTIALS, get_default_credentials
|
|
30
30
|
|
|
31
31
|
|
|
32
|
+
def _get_seq_from_query(packet):
|
|
33
|
+
"""Return sequence number for the query."""
|
|
34
|
+
query = packet.http.get("request_uri_query")
|
|
35
|
+
if query is None:
|
|
36
|
+
raise Exception("No request_uri_query found")
|
|
37
|
+
# use regex to get: seq=(\d+)
|
|
38
|
+
seq = re.search(r"seq=(\d+)", query)
|
|
39
|
+
if seq is not None:
|
|
40
|
+
return int(seq.group(1))
|
|
41
|
+
raise Exception("Unable to find sequence number")
|
|
42
|
+
|
|
43
|
+
|
|
32
44
|
def _is_http_response_for_packet(response, packet):
|
|
33
45
|
"""Return True if the *response* contains a response for request in *packet*.
|
|
34
46
|
|
|
@@ -41,10 +53,7 @@ def _is_http_response_for_packet(response, packet):
|
|
|
41
53
|
):
|
|
42
54
|
return True
|
|
43
55
|
# tshark 4.4.0
|
|
44
|
-
|
|
45
|
-
return True
|
|
46
|
-
|
|
47
|
-
return False
|
|
56
|
+
return response.http.request_uri == packet.http.request_uri
|
|
48
57
|
|
|
49
58
|
|
|
50
59
|
class MyEncryptionSession(KlapEncryptionSession):
|
|
@@ -244,71 +253,59 @@ def main(
|
|
|
244
253
|
if packet.ip.src != source_host:
|
|
245
254
|
continue
|
|
246
255
|
# we only care about http packets
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
message = bytes.fromhex(data)
|
|
277
|
-
try:
|
|
278
|
-
plaintext = operator.decrypt(message)
|
|
279
|
-
payload = json.loads(plaintext)
|
|
280
|
-
print(json.dumps(payload, indent=2))
|
|
281
|
-
packets.append(payload)
|
|
282
|
-
except ValueError:
|
|
283
|
-
print("Insufficient data to decrypt thus far")
|
|
284
|
-
|
|
285
|
-
case "/app/handshake1":
|
|
286
|
-
if packet.ip.dst != device_ip:
|
|
287
|
-
continue
|
|
288
|
-
assert isinstance(data, str) # noqa: S101
|
|
289
|
-
message = bytes.fromhex(data)
|
|
290
|
-
operator.local_seed = message
|
|
291
|
-
response = None
|
|
292
|
-
print(
|
|
293
|
-
f"got handshake1 in {packet_number}, "
|
|
294
|
-
f"looking for the response"
|
|
295
|
-
)
|
|
296
|
-
while (
|
|
297
|
-
True
|
|
298
|
-
): # we are going to now look for the response to this request
|
|
299
|
-
response = capture.next()
|
|
300
|
-
if _is_http_response_for_packet(response, packet):
|
|
301
|
-
print(f"found response in {packet_number}")
|
|
302
|
-
break
|
|
303
|
-
data = response.http.get_field_value("file_data", raw=True)
|
|
304
|
-
message = bytes.fromhex(data)
|
|
305
|
-
operator.remote_seed = message[0:16]
|
|
306
|
-
operator.remote_auth_hash = message[16:]
|
|
307
|
-
|
|
308
|
-
case "/app/handshake2":
|
|
309
|
-
continue # we don't care about this
|
|
310
|
-
case _:
|
|
256
|
+
# this is redundant, as pyshark is set to only load http packets
|
|
257
|
+
if not hasattr(packet, "http"):
|
|
258
|
+
continue
|
|
259
|
+
|
|
260
|
+
uri = packet.http.get("request_uri_path", packet.http.get("request_uri"))
|
|
261
|
+
if uri is None:
|
|
262
|
+
continue
|
|
263
|
+
|
|
264
|
+
operator.seq = _get_seq_from_query(packet)
|
|
265
|
+
|
|
266
|
+
# Windows and linux file_data attribute returns different
|
|
267
|
+
# pretty format so get the raw field value.
|
|
268
|
+
data = packet.http.get_field_value("file_data", raw=True)
|
|
269
|
+
|
|
270
|
+
match uri:
|
|
271
|
+
case "/app/request":
|
|
272
|
+
if packet.ip.dst != device_ip:
|
|
273
|
+
continue
|
|
274
|
+
message = bytes.fromhex(data)
|
|
275
|
+
try:
|
|
276
|
+
plaintext = operator.decrypt(message)
|
|
277
|
+
payload = json.loads(plaintext)
|
|
278
|
+
print(json.dumps(payload, indent=2))
|
|
279
|
+
packets.append(payload)
|
|
280
|
+
except ValueError:
|
|
281
|
+
print("Insufficient data to decrypt thus far")
|
|
282
|
+
|
|
283
|
+
case "/app/handshake1":
|
|
284
|
+
if packet.ip.dst != device_ip:
|
|
311
285
|
continue
|
|
286
|
+
message = bytes.fromhex(data)
|
|
287
|
+
operator.local_seed = message
|
|
288
|
+
response = None
|
|
289
|
+
print(
|
|
290
|
+
f"got handshake1 in {packet_number}, "
|
|
291
|
+
f"looking for the response"
|
|
292
|
+
)
|
|
293
|
+
while (
|
|
294
|
+
True
|
|
295
|
+
): # we are going to now look for the response to this request
|
|
296
|
+
response = capture.next()
|
|
297
|
+
if _is_http_response_for_packet(response, packet):
|
|
298
|
+
print(f"found response in {packet_number}")
|
|
299
|
+
break
|
|
300
|
+
data = response.http.get_field_value("file_data", raw=True)
|
|
301
|
+
message = bytes.fromhex(data)
|
|
302
|
+
operator.remote_seed = message[0:16]
|
|
303
|
+
operator.remote_auth_hash = message[16:]
|
|
304
|
+
|
|
305
|
+
case "/app/handshake2":
|
|
306
|
+
continue # we don't care about this
|
|
307
|
+
case _:
|
|
308
|
+
continue
|
|
312
309
|
except StopIteration:
|
|
313
310
|
break
|
|
314
311
|
|
|
@@ -41,7 +41,7 @@ from kasa.iotprotocol import (
|
|
|
41
41
|
_deprecated_TPLinkSmartHomeProtocol, # noqa: F401
|
|
42
42
|
)
|
|
43
43
|
from kasa.module import Module
|
|
44
|
-
from kasa.protocol import BaseProtocol
|
|
44
|
+
from kasa.protocol import BaseProtocol, BaseTransport
|
|
45
45
|
from kasa.smartprotocol import SmartProtocol
|
|
46
46
|
|
|
47
47
|
__version__ = version("python-kasa")
|
|
@@ -50,6 +50,7 @@ __version__ = version("python-kasa")
|
|
|
50
50
|
__all__ = [
|
|
51
51
|
"Discover",
|
|
52
52
|
"BaseProtocol",
|
|
53
|
+
"BaseTransport",
|
|
53
54
|
"IotProtocol",
|
|
54
55
|
"SmartProtocol",
|
|
55
56
|
"LightState",
|
|
@@ -102,7 +103,7 @@ deprecated_classes = {
|
|
|
102
103
|
|
|
103
104
|
def __getattr__(name):
|
|
104
105
|
if name in deprecated_names:
|
|
105
|
-
warn(f"{name} is deprecated", DeprecationWarning, stacklevel=
|
|
106
|
+
warn(f"{name} is deprecated", DeprecationWarning, stacklevel=2)
|
|
106
107
|
return globals()[f"_deprecated_{name}"]
|
|
107
108
|
if name in deprecated_smart_devices:
|
|
108
109
|
new_class = deprecated_smart_devices[name]
|
|
@@ -112,13 +113,13 @@ def __getattr__(name):
|
|
|
112
113
|
+ f"from package {package_name} instead or use Discover.discover_single()"
|
|
113
114
|
+ " and Device.connect() to support new protocols",
|
|
114
115
|
DeprecationWarning,
|
|
115
|
-
stacklevel=
|
|
116
|
+
stacklevel=2,
|
|
116
117
|
)
|
|
117
118
|
return new_class
|
|
118
119
|
if name in deprecated_classes:
|
|
119
120
|
new_class = deprecated_classes[name]
|
|
120
121
|
msg = f"{name} is deprecated, use {new_class.__name__} instead"
|
|
121
|
-
warn(msg, DeprecationWarning, stacklevel=
|
|
122
|
+
warn(msg, DeprecationWarning, stacklevel=2)
|
|
122
123
|
return new_class
|
|
123
124
|
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
124
125
|
|
|
@@ -193,3 +193,13 @@ async def update_credentials(dev, username, password):
|
|
|
193
193
|
click.confirm("Do you really want to replace the existing credentials?", abort=True)
|
|
194
194
|
|
|
195
195
|
return await dev.update_credentials(username, password)
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
@device.command(name="logs")
|
|
199
|
+
@pass_dev_or_child
|
|
200
|
+
async def child_logs(dev):
|
|
201
|
+
"""Print child device trigger logs."""
|
|
202
|
+
if logs := dev.modules.get(Module.TriggerLogs):
|
|
203
|
+
await dev.update(update_children=True)
|
|
204
|
+
for entry in logs.logs:
|
|
205
|
+
print(entry)
|
|
@@ -15,7 +15,7 @@ from kasa import (
|
|
|
15
15
|
Discover,
|
|
16
16
|
UnsupportedDeviceError,
|
|
17
17
|
)
|
|
18
|
-
from kasa.discover import DiscoveryResult
|
|
18
|
+
from kasa.discover import ConnectAttempt, DiscoveryResult
|
|
19
19
|
|
|
20
20
|
from .common import echo, error
|
|
21
21
|
|
|
@@ -165,8 +165,17 @@ async def config(ctx):
|
|
|
165
165
|
|
|
166
166
|
credentials = Credentials(username, password) if username and password else None
|
|
167
167
|
|
|
168
|
+
host_port = host + (f":{port}" if port else "")
|
|
169
|
+
|
|
170
|
+
def on_attempt(connect_attempt: ConnectAttempt, success: bool) -> None:
|
|
171
|
+
prot, tran, dev = connect_attempt
|
|
172
|
+
key_str = f"{prot.__name__} + {tran.__name__} + {dev.__name__}"
|
|
173
|
+
result = "succeeded" if success else "failed"
|
|
174
|
+
msg = f"Attempt to connect to {host_port} with {key_str} {result}"
|
|
175
|
+
echo(msg)
|
|
176
|
+
|
|
168
177
|
dev = await Discover.try_connect_all(
|
|
169
|
-
host, credentials=credentials, timeout=timeout, port=port
|
|
178
|
+
host, credentials=credentials, timeout=timeout, port=port, on_attempt=on_attempt
|
|
170
179
|
)
|
|
171
180
|
if dev:
|
|
172
181
|
cparams = dev.config.connection_type
|
|
@@ -545,7 +545,7 @@ class Device(ABC):
|
|
|
545
545
|
msg = f"{name} is deprecated"
|
|
546
546
|
if module:
|
|
547
547
|
msg += f", use: {module} in device.modules instead"
|
|
548
|
-
warn(msg, DeprecationWarning, stacklevel=
|
|
548
|
+
warn(msg, DeprecationWarning, stacklevel=2)
|
|
549
549
|
return self.device_type == dep_device_type_attr[1]
|
|
550
550
|
# Other deprecated attributes
|
|
551
551
|
if (dep_attr := self._deprecated_other_attributes.get(name)) and (
|
|
@@ -556,6 +556,6 @@ class Device(ABC):
|
|
|
556
556
|
dev_or_mod = self.modules[mod] if mod else self
|
|
557
557
|
replacing = f"Module.{mod} in device.modules" if mod else replacing_attr
|
|
558
558
|
msg = f"{name} is deprecated, use: {replacing} instead"
|
|
559
|
-
warn(msg, DeprecationWarning, stacklevel=
|
|
559
|
+
warn(msg, DeprecationWarning, stacklevel=2)
|
|
560
560
|
return getattr(dev_or_mod, replacing_attr)
|
|
561
561
|
raise AttributeError(f"Device has no attribute {name!r}")
|
|
@@ -167,7 +167,7 @@ def get_device_class_from_sys_info(sysinfo: dict[str, Any]) -> type[IotDevice]:
|
|
|
167
167
|
|
|
168
168
|
|
|
169
169
|
def get_device_class_from_family(
|
|
170
|
-
device_type: str, *, https: bool
|
|
170
|
+
device_type: str, *, https: bool, require_exact: bool = False
|
|
171
171
|
) -> type[Device] | None:
|
|
172
172
|
"""Return the device class from the type name."""
|
|
173
173
|
supported_device_types: dict[str, type[Device]] = {
|
|
@@ -185,8 +185,10 @@ def get_device_class_from_family(
|
|
|
185
185
|
}
|
|
186
186
|
lookup_key = f"{device_type}{'.HTTPS' if https else ''}"
|
|
187
187
|
if (
|
|
188
|
-
cls := supported_device_types.get(lookup_key)
|
|
189
|
-
|
|
188
|
+
(cls := supported_device_types.get(lookup_key)) is None
|
|
189
|
+
and device_type.startswith("SMART.")
|
|
190
|
+
and not require_exact
|
|
191
|
+
):
|
|
190
192
|
_LOGGER.warning("Unknown SMART device with %s, using SmartDevice", device_type)
|
|
191
193
|
cls = SmartDevice
|
|
192
194
|
|
|
@@ -91,7 +91,7 @@ import socket
|
|
|
91
91
|
import struct
|
|
92
92
|
from collections.abc import Awaitable
|
|
93
93
|
from pprint import pformat as pf
|
|
94
|
-
from typing import TYPE_CHECKING, Any, Callable, Dict, Optional, Type, cast
|
|
94
|
+
from typing import TYPE_CHECKING, Any, Callable, Dict, NamedTuple, Optional, Type, cast
|
|
95
95
|
|
|
96
96
|
from aiohttp import ClientSession
|
|
97
97
|
|
|
@@ -118,6 +118,7 @@ from kasa.exceptions import (
|
|
|
118
118
|
TimeoutError,
|
|
119
119
|
UnsupportedDeviceError,
|
|
120
120
|
)
|
|
121
|
+
from kasa.experimental import Experimental
|
|
121
122
|
from kasa.iot.iotdevice import IotDevice
|
|
122
123
|
from kasa.iotprotocol import REDACTORS as IOT_REDACTORS
|
|
123
124
|
from kasa.json import dumps as json_dumps
|
|
@@ -127,9 +128,21 @@ from kasa.xortransport import XorEncryption
|
|
|
127
128
|
|
|
128
129
|
_LOGGER = logging.getLogger(__name__)
|
|
129
130
|
|
|
131
|
+
if TYPE_CHECKING:
|
|
132
|
+
from kasa import BaseProtocol, BaseTransport
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
class ConnectAttempt(NamedTuple):
|
|
136
|
+
"""Try to connect attempt."""
|
|
137
|
+
|
|
138
|
+
protocol: type
|
|
139
|
+
transport: type
|
|
140
|
+
device: type
|
|
141
|
+
|
|
130
142
|
|
|
131
143
|
OnDiscoveredCallable = Callable[[Device], Awaitable[None]]
|
|
132
144
|
OnUnsupportedCallable = Callable[[UnsupportedDeviceError], Awaitable[None]]
|
|
145
|
+
OnConnectAttemptCallable = Callable[[ConnectAttempt, bool], None]
|
|
133
146
|
DeviceDict = Dict[str, Device]
|
|
134
147
|
|
|
135
148
|
NEW_DISCOVERY_REDACTORS: dict[str, Callable[[Any], Any] | None] = {
|
|
@@ -535,6 +548,7 @@ class Discover:
|
|
|
535
548
|
timeout: int | None = None,
|
|
536
549
|
credentials: Credentials | None = None,
|
|
537
550
|
http_client: ClientSession | None = None,
|
|
551
|
+
on_attempt: OnConnectAttemptCallable | None = None,
|
|
538
552
|
) -> Device | None:
|
|
539
553
|
"""Try to connect directly to a device with all possible parameters.
|
|
540
554
|
|
|
@@ -551,13 +565,22 @@ class Discover:
|
|
|
551
565
|
"""
|
|
552
566
|
from .device_factory import _connect
|
|
553
567
|
|
|
554
|
-
|
|
568
|
+
main_device_families = {
|
|
569
|
+
Device.Family.SmartTapoPlug,
|
|
570
|
+
Device.Family.IotSmartPlugSwitch,
|
|
571
|
+
}
|
|
572
|
+
if Experimental.enabled():
|
|
573
|
+
main_device_families.add(Device.Family.SmartIpCamera)
|
|
574
|
+
candidates: dict[
|
|
575
|
+
tuple[type[BaseProtocol], type[BaseTransport], type[Device]],
|
|
576
|
+
tuple[BaseProtocol, DeviceConfig],
|
|
577
|
+
] = {
|
|
555
578
|
(type(protocol), type(protocol._transport), device_class): (
|
|
556
579
|
protocol,
|
|
557
580
|
config,
|
|
558
581
|
)
|
|
559
582
|
for encrypt in Device.EncryptionType
|
|
560
|
-
for device_family in
|
|
583
|
+
for device_family in main_device_families
|
|
561
584
|
for https in (True, False)
|
|
562
585
|
if (
|
|
563
586
|
conn_params := DeviceConnectionParameters(
|
|
@@ -580,19 +603,26 @@ class Discover:
|
|
|
580
603
|
and (protocol := get_protocol(config))
|
|
581
604
|
and (
|
|
582
605
|
device_class := get_device_class_from_family(
|
|
583
|
-
device_family.value, https=https
|
|
606
|
+
device_family.value, https=https, require_exact=True
|
|
584
607
|
)
|
|
585
608
|
)
|
|
586
609
|
}
|
|
587
|
-
for
|
|
610
|
+
for key, val in candidates.items():
|
|
588
611
|
try:
|
|
589
|
-
|
|
612
|
+
prot, config = val
|
|
613
|
+
dev = await _connect(config, prot)
|
|
590
614
|
except Exception:
|
|
591
|
-
_LOGGER.debug("Unable to connect with %s",
|
|
615
|
+
_LOGGER.debug("Unable to connect with %s", prot)
|
|
616
|
+
if on_attempt:
|
|
617
|
+
ca = tuple.__new__(ConnectAttempt, key)
|
|
618
|
+
on_attempt(ca, False)
|
|
592
619
|
else:
|
|
620
|
+
if on_attempt:
|
|
621
|
+
ca = tuple.__new__(ConnectAttempt, key)
|
|
622
|
+
on_attempt(ca, True)
|
|
593
623
|
return dev
|
|
594
624
|
finally:
|
|
595
|
-
await
|
|
625
|
+
await prot.close()
|
|
596
626
|
return None
|
|
597
627
|
|
|
598
628
|
@staticmethod
|
|
@@ -182,6 +182,6 @@ class Energy(Module, ABC):
|
|
|
182
182
|
def __getattr__(self, name):
|
|
183
183
|
if attr := self._deprecated_attributes.get(name):
|
|
184
184
|
msg = f"{name} is deprecated, use {attr} instead"
|
|
185
|
-
warn(msg, DeprecationWarning, stacklevel=
|
|
185
|
+
warn(msg, DeprecationWarning, stacklevel=2)
|
|
186
186
|
return getattr(self, attr)
|
|
187
187
|
raise AttributeError(f"Energy module has no attribute {name!r}")
|
|
@@ -472,7 +472,7 @@ class IotDevice(Device):
|
|
|
472
472
|
async def get_time(self) -> datetime:
|
|
473
473
|
"""Return current time from the device, if available."""
|
|
474
474
|
msg = "Use `time` property instead, this call will be removed in the future."
|
|
475
|
-
warn(msg, DeprecationWarning, stacklevel=
|
|
475
|
+
warn(msg, DeprecationWarning, stacklevel=2)
|
|
476
476
|
return self.time
|
|
477
477
|
|
|
478
478
|
async def get_timezone(self) -> tzinfo:
|
|
@@ -480,7 +480,7 @@ class IotDevice(Device):
|
|
|
480
480
|
msg = (
|
|
481
481
|
"Use `timezone` property instead, this call will be removed in the future."
|
|
482
482
|
)
|
|
483
|
-
warn(msg, DeprecationWarning, stacklevel=
|
|
483
|
+
warn(msg, DeprecationWarning, stacklevel=2)
|
|
484
484
|
return self.timezone
|
|
485
485
|
|
|
486
486
|
@property # type: ignore
|
|
@@ -9,7 +9,7 @@ from ..deviceconfig import DeviceConfig
|
|
|
9
9
|
from ..module import Module
|
|
10
10
|
from ..protocol import BaseProtocol
|
|
11
11
|
from .iotdevice import IotDevice, requires_update
|
|
12
|
-
from .modules import Antitheft, Cloud, Led, Schedule, Time, Usage
|
|
12
|
+
from .modules import AmbientLight, Antitheft, Cloud, Led, Motion, Schedule, Time, Usage
|
|
13
13
|
|
|
14
14
|
_LOGGER = logging.getLogger(__name__)
|
|
15
15
|
|
|
@@ -92,3 +92,12 @@ class IotWallSwitch(IotPlug):
|
|
|
92
92
|
) -> None:
|
|
93
93
|
super().__init__(host=host, config=config, protocol=protocol)
|
|
94
94
|
self._device_type = DeviceType.WallSwitch
|
|
95
|
+
|
|
96
|
+
async def _initialize_modules(self) -> None:
|
|
97
|
+
"""Initialize modules."""
|
|
98
|
+
await super()._initialize_modules()
|
|
99
|
+
if (dev_name := self.sys_info["dev_name"]) and "PIR" in dev_name:
|
|
100
|
+
self.add_module(Module.IotMotion, Motion(self, "smartlife.iot.PIR"))
|
|
101
|
+
self.add_module(
|
|
102
|
+
Module.IotAmbientLight, AmbientLight(self, "smartlife.iot.LAS")
|
|
103
|
+
)
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
"""Implementation of the ambient light (LAS) module found in some dimmers."""
|
|
2
2
|
|
|
3
|
+
import logging
|
|
4
|
+
|
|
3
5
|
from ...feature import Feature
|
|
4
6
|
from ..iotmodule import IotModule, merge
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
# [{"hw_id":0,"enable":0,"dark_index":1,"min_adc":0,"max_adc":2450,
|
|
8
|
-
# "level_array":[{"name":"cloudy","adc":490,"value":20},
|
|
9
|
-
# {"name":"overcast","adc":294,"value":12},
|
|
10
|
-
# {"name":"dawn","adc":222,"value":9},
|
|
11
|
-
# {"name":"twilight","adc":222,"value":9},
|
|
12
|
-
# {"name":"total darkness","adc":111,"value":4},
|
|
13
|
-
# {"name":"custom","adc":2400,"value":97}]}]
|
|
8
|
+
_LOGGER = logging.getLogger(__name__)
|
|
14
9
|
|
|
15
10
|
|
|
16
11
|
class AmbientLight(IotModule):
|
|
@@ -18,6 +13,19 @@ class AmbientLight(IotModule):
|
|
|
18
13
|
|
|
19
14
|
def _initialize_features(self):
|
|
20
15
|
"""Initialize features after the initial update."""
|
|
16
|
+
self._add_feature(
|
|
17
|
+
Feature(
|
|
18
|
+
device=self._device,
|
|
19
|
+
container=self,
|
|
20
|
+
id="ambient_light_enabled",
|
|
21
|
+
name="Ambient light enabled",
|
|
22
|
+
icon="mdi:brightness-percent",
|
|
23
|
+
attribute_getter="enabled",
|
|
24
|
+
attribute_setter="set_enabled",
|
|
25
|
+
type=Feature.Type.Switch,
|
|
26
|
+
category=Feature.Category.Config,
|
|
27
|
+
)
|
|
28
|
+
)
|
|
21
29
|
self._add_feature(
|
|
22
30
|
Feature(
|
|
23
31
|
device=self._device,
|
|
@@ -41,15 +49,25 @@ class AmbientLight(IotModule):
|
|
|
41
49
|
|
|
42
50
|
return req
|
|
43
51
|
|
|
52
|
+
@property
|
|
53
|
+
def config(self) -> dict:
|
|
54
|
+
"""Return current ambient light config."""
|
|
55
|
+
config = self.data["get_config"]
|
|
56
|
+
devs = config["devs"]
|
|
57
|
+
if len(devs) != 1:
|
|
58
|
+
_LOGGER.error("Unexpected number of devs in config: %s", config)
|
|
59
|
+
|
|
60
|
+
return devs[0]
|
|
61
|
+
|
|
44
62
|
@property
|
|
45
63
|
def presets(self) -> dict:
|
|
46
64
|
"""Return device-defined presets for brightness setting."""
|
|
47
|
-
return self.
|
|
65
|
+
return self.config["level_array"]
|
|
48
66
|
|
|
49
67
|
@property
|
|
50
68
|
def enabled(self) -> bool:
|
|
51
69
|
"""Return True if the module is enabled."""
|
|
52
|
-
return bool(self.
|
|
70
|
+
return bool(self.config["enable"])
|
|
53
71
|
|
|
54
72
|
@property
|
|
55
73
|
def ambientlight_brightness(self) -> int:
|
|
@@ -2,11 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
import logging
|
|
5
6
|
from enum import Enum
|
|
6
7
|
|
|
7
8
|
from ...exceptions import KasaException
|
|
9
|
+
from ...feature import Feature
|
|
8
10
|
from ..iotmodule import IotModule
|
|
9
11
|
|
|
12
|
+
_LOGGER = logging.getLogger(__name__)
|
|
13
|
+
|
|
10
14
|
|
|
11
15
|
class Range(Enum):
|
|
12
16
|
"""Range for motion detection."""
|
|
@@ -17,27 +21,51 @@ class Range(Enum):
|
|
|
17
21
|
Custom = 3
|
|
18
22
|
|
|
19
23
|
|
|
20
|
-
# TODO: use the config reply in tests
|
|
21
|
-
# {"enable":0,"version":"1.0","trigger_index":2,"cold_time":60000,
|
|
22
|
-
# "min_adc":0,"max_adc":4095,"array":[80,50,20,0],"err_code":0}}}
|
|
23
|
-
|
|
24
|
-
|
|
25
24
|
class Motion(IotModule):
|
|
26
25
|
"""Implements the motion detection (PIR) module."""
|
|
27
26
|
|
|
27
|
+
def _initialize_features(self):
|
|
28
|
+
"""Initialize features after the initial update."""
|
|
29
|
+
# Only add features if the device supports the module
|
|
30
|
+
if "get_config" not in self.data:
|
|
31
|
+
return
|
|
32
|
+
|
|
33
|
+
if "enable" not in self.config:
|
|
34
|
+
_LOGGER.warning("%r initialized, but no enable in response")
|
|
35
|
+
return
|
|
36
|
+
|
|
37
|
+
self._add_feature(
|
|
38
|
+
Feature(
|
|
39
|
+
device=self._device,
|
|
40
|
+
container=self,
|
|
41
|
+
id="pir_enabled",
|
|
42
|
+
name="PIR enabled",
|
|
43
|
+
icon="mdi:motion-sensor",
|
|
44
|
+
attribute_getter="enabled",
|
|
45
|
+
attribute_setter="set_enabled",
|
|
46
|
+
type=Feature.Type.Switch,
|
|
47
|
+
category=Feature.Category.Config,
|
|
48
|
+
)
|
|
49
|
+
)
|
|
50
|
+
|
|
28
51
|
def query(self):
|
|
29
52
|
"""Request PIR configuration."""
|
|
30
53
|
return self.query_for_command("get_config")
|
|
31
54
|
|
|
55
|
+
@property
|
|
56
|
+
def config(self) -> dict:
|
|
57
|
+
"""Return current configuration."""
|
|
58
|
+
return self.data["get_config"]
|
|
59
|
+
|
|
32
60
|
@property
|
|
33
61
|
def range(self) -> Range:
|
|
34
62
|
"""Return motion detection range."""
|
|
35
|
-
return Range(self.
|
|
63
|
+
return Range(self.config["trigger_index"])
|
|
36
64
|
|
|
37
65
|
@property
|
|
38
66
|
def enabled(self) -> bool:
|
|
39
67
|
"""Return True if module is enabled."""
|
|
40
|
-
return bool(self.
|
|
68
|
+
return bool(self.config["enable"])
|
|
41
69
|
|
|
42
70
|
async def set_enabled(self, state: bool):
|
|
43
71
|
"""Enable/disable PIR."""
|
|
@@ -63,7 +91,7 @@ class Motion(IotModule):
|
|
|
63
91
|
@property
|
|
64
92
|
def inactivity_timeout(self) -> int:
|
|
65
93
|
"""Return inactivity timeout in milliseconds."""
|
|
66
|
-
return self.
|
|
94
|
+
return self.config["cold_time"]
|
|
67
95
|
|
|
68
96
|
async def set_inactivity_timeout(self, timeout: int):
|
|
69
97
|
"""Set inactivity timeout in milliseconds.
|
|
@@ -127,6 +127,10 @@ class Module(ABC):
|
|
|
127
127
|
WaterleakSensor: Final[ModuleName[smart.WaterleakSensor]] = ModuleName(
|
|
128
128
|
"WaterleakSensor"
|
|
129
129
|
)
|
|
130
|
+
ChildProtection: Final[ModuleName[smart.ChildProtection]] = ModuleName(
|
|
131
|
+
"ChildProtection"
|
|
132
|
+
)
|
|
133
|
+
TriggerLogs: Final[ModuleName[smart.TriggerLogs]] = ModuleName("TriggerLogs")
|
|
130
134
|
|
|
131
135
|
# SMARTCAMERA only modules
|
|
132
136
|
Camera: Final[ModuleName[experimental.Camera]] = ModuleName("Camera")
|