| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Hi All,
I am just testing the latest support for the TAPO H100 hub with various sensors.
It looks like the temperature/humidity sensor T310 is working, but the T300 (Waterleak) and T110 (Contact) sensors are not.
The sensors are discovered fine as child devices, but the device type is unknown and the relevant attributes are not shown in the CLI.
== Smart Hub - H100 ==
Host: 192.168.1.86
Port: 80
Device state: False
== Children ==
== Temperatur (innen) (T310, DeviceType.Sensor) ==
== Information ==
Signal Level (signal_level): 3
Battery level (battery_level): got exception ('battery_percentage')
Battery low (battery_low): False
Cloud connection (cloud_connection): True
Update available (update_available): False
Humidity (humidity): 40
Humidity warning (humidity_warning): False
Temperature (temperature): 22.2
Temperature warning (temperature_warning): False
== Configuration ==
Temperature unit (temperature_unit): celsius
== Debug ==
Device ID (device_id): 802E6B66E717D6AD31BB4726011746212219698C
RSSI (rssi): -51
Report interval (report_interval): 16
Time (time): 2024-04-27 13:52:21+01:00
WARNING:kasa.smart.smartchilddevice:Unknown child device type, please open issue
== Wasser (T300, DeviceType.Unknown) ==
== Information ==
Signal Level (signal_level): 3
Battery level (battery_level): 100
Battery low (battery_low): False
Cloud connection (cloud_connection): True
Update available (update_available): False
== Debug ==
Device ID (device_id): 802ED99B9EC1A0A8C9F48AB5C709927D2245EEE7
RSSI (rssi): -43
Time (time): 2024-04-27 13:52:21+01:00
WARNING:kasa.smart.smartchilddevice:Unknown child device type, please open issue
== Dach (innen) (T110, DeviceType.Unknown) ==
== Information ==
Signal Level (signal_level): 0
Battery level (battery_level): got exception ('battery_percentage')
Battery low (battery_low): False
Cloud connection (cloud_connection): True
Update available (update_available): False
== Debug ==
Device ID (device_id): 802E3B14B17594B105DEB69CCED699DD22155944
RSSI (rssi): 0
Time (time): 2024-04-27 13:52:21+01:00
== Generic information ==
Time: 2024-04-27 13:52:21+01:00 (tz: {'timezone': 'Europe/Berlin'}
Hardware: 1.0
Software: 1.5.10 Build 240207 Rel.175759
MAC (rssi): E4:FA:C4:6F:50:64 (-45)
Location: {'latitude': 49.3225, 'longitude': 8.6947}
== Information ==
Signal Level (signal_level): 3
Alarm (alarm): False
Alarm source (alarm_source): None
Alarm sound (alarm_sound): Alarm 1
Alarm volume (alarm_volume): high
Cloud connection (cloud_connection): True
Update available (update_available): False
== Configuration ==
Test alarm (test_alarm): <Action>
Stop alarm (stop_alarm): <Action>
Auto update enabled (auto_update_enabled): True
LED (led): True
== Debug ==
Device ID (device_id): 802D587301438320D7122ECF6E591028221B023C
RSSI (rssi): -45
SSID (ssid): CarpeNoctemRemote
Overheated (overheated): False
Time (time): 2024-04-27 13:52:21+01:00
== Modules ==
+ <Module AlarmModule (alarm) for 192.168.1.86>
+ <Module ChildDeviceModule (child_device) for 192.168.1.86>
+ <Module CloudModule (cloud_connect) for 192.168.1.86>
+ <Module DeviceModule (device) for 192.168.1.86>
+ <Module Firmware (firmware) for 192.168.1.86>
+ <Module LedModule (led) for 192.168.1.86>
+ <Module TimeModule (time) for 192.168.1.86>
Here is the JSON output:
WARNING:kasa.smart.smartchilddevice:Unknown child device type, please open issue
WARNING:kasa.smart.smartchilddevice:Unknown child device type, please open issue
{
"get_alarm_configure": {
"type": "Alarm 1",
"volume": "high",
"duration": 300
},
"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_child_device_list": {
"child_device_list": [
{
"parent_device_id": "802D587301438320D7122ECF6E591028221B023C",
"hw_ver": "1.0",
"fw_ver": "1.5.0 Build 230105 Rel.150707",
"device_id": "802E6B66E717D6AD31BB4726011746212219698C",
"mac": "E4FAC44C516F",
"type": "SMART.TAPOSENSOR",
"model": "T310",
"hw_id": "2AE1228C7CE042A310FC70EA70D7A788",
"oem_id": "02F7CFFC203A7E622F6EA84BBB74C68F",
"specs": "EU",
"category": "subg.trigger.temp-hmdt-sensor",
"bind_count": 2,
"status_follow_edge": false,
"status": "online",
"lastOnboardingTimestamp": 1708892232,
"rssi": -50,
"signal_level": 3,
"jamming_rssi": -117,
"jamming_signal_level": 1,
"at_low_battery": false,
"temp_unit": "celsius",
"current_temp": 22.3,
"current_humidity": 39,
"current_temp_exception": 0,
"current_humidity_exception": 0,
"nickname": "VGVtcGVyYXR1ciAoaW5uZW4p",
"avatar": "sensor_t310",
"report_interval": 16,
"region": "Europe/Berlin"
},
{
"parent_device_id": "802D587301438320D7122ECF6E591028221B023C",
"hw_ver": "1.0",
"fw_ver": "1.7.0 Build 230628 Rel.194748",
"device_id": "802ED99B9EC1A0A8C9F48AB5C709927D2245EEE7",
"mac": "98254AED3001",
"type": "SMART.TAPOSENSOR",
"model": "T300",
"hw_id": "CE0B3AE8E83B5A0D78D53B41EC4D5F1E",
"oem_id": "BA0BFAB2B6264F680059C097EA3AC8F4",
"specs": "EU",
"category": "subg.trigger.water-leak-sensor",
"bind_count": 3,
"status_follow_edge": false,
"status": "online",
"lastOnboardingTimestamp": 1708893337,
"rssi": -43,
"signal_level": 3,
"jamming_rssi": -121,
"jamming_signal_level": 1,
"in_alarm": false,
"water_leak_status": "normal",
"battery_percentage": 100,
"at_low_battery": false,
"nickname": "V2Fzc2Vy",
"avatar": "sensor_t300",
"report_interval": 16,
"region": "Europe/Berlin"
},
{
"parent_device_id": "802D587301438320D7122ECF6E591028221B023C",
"hw_ver": "1.0",
"fw_ver": "1.9.0 Build 230704 Rel.154531",
"device_id": "802E3B14B17594B105DEB69CCED699DD22155944",
"mac": "E4FAC4310C0D",
"type": "SMART.TAPOSENSOR",
"model": "T110",
"hw_id": "8B5164B3EDF216E59BCAB740ABCB40CD",
"oem_id": "477C83614EF5FFFF6A8C2D80BBD306AB",
"specs": "EU",
"category": "subg.trigger.contact-sensor",
"bind_count": 2,
"status_follow_edge": false,
"status": "online",
"lastOnboardingTimestamp": 1708892158,
"rssi": 0,
"signal_level": 0,
"jamming_rssi": 0,
"jamming_signal_level": 0,
"at_low_battery": false,
"open": false,
"nickname": "RGFjaCAoaW5uZW4p",
"avatar": "sensor_t110",
"report_interval": 16,
"region": "Europe/Berlin"
}
],
"start_index": 0,
"sum": 3
},
"get_connect_cloud_state": {
"status": 0
},
"get_device_info": {
"device_id": "802D587301438320D7122ECF6E591028221B023C",
"fw_ver": "1.5.10 Build 240207 Rel.175759",
"hw_ver": "1.0",
"type": "SMART.TAPOHUB",
"model": "H100",
"mac": "E4-FA-C4-6F-50-64",
"hw_id": "81C01BC6E4AD1827315AC6A9D81A5132",
"fw_id": "00000000000000000000000000000000",
"oem_id": "D65F1AA7B819559EDF3C5C2BD5957929",
"overheated": false,
"ip": "192.168.1.86",
"time_diff": 60,
"ssid": "Q2FycGVOb2N0ZW1SZW1vdGU=",
"rssi": -45,
"signal_level": 3,
"in_alarm": false,
"in_alarm_source": "",
"longitude": 86947,
"latitude": 493225,
"lang": "de_DE",
"avatar": "hub",
"region": "Europe/Berlin",
"specs": "EU",
"nickname": "U21hcnQgSHVi",
"has_set_location_info": true
},
"get_device_usage": {},
"get_latest_fw": {
"type": 0,
"fw_ver": "1.5.10 Build 240207 Rel.175759",
"release_date": "",
"release_note": "",
"fw_size": 0,
"hw_id": "",
"oem_id": "",
"need_to_upgrade": false
},
"get_auto_update_info": {
"enable": true,
"time": 780,
"random_range": 120
},
"get_led_info": {
"night_mode": {
"night_mode_type": "sunrise_sunset",
"start_time": 1239,
"end_time": 368,
"sunrise_offset": 0,
"sunset_offset": 0
},
"led_status": true,
"led_rule": "always"
},
"get_device_time": {
"time_diff": 60,
"timestamp": 1714223467,
"region": "Europe/Berlin"
}
}
I hope that with this info these senor types can be fully supported soon.
Best Regards,
Nico
| Back | FazBrowse Home | New Git URL |
Activity
rytilahti commented on Apr 27, 2024
Hi Nico, could you run python -m devtools.dump_devinfo --host <addr> --username <username> --password <password> (username and password not needed, if you have defined those as environment variables), and create a PR to upload the fixture files?
Adding support for the water leak sensor should be straightforward as the information is contained within the JSON, supporting the other one requires probably a bit more work.
ngaertner commented on Apr 27, 2024
Thanks for the prompt response!
The relevant information for the T110 sensor is also part of the JSON:
"open": false ==> contact is closed
"open": true ==> contact is open
I have executed the command, but i don't know where to find the fixture files - i am not also not familiar with the process of creating PRs.
Maybe you can build something without the files...
Here's the output that i received from the command:
Best Regards
Nico
rytilahti commented on Apr 27, 2024
Looks like there's a bug in the script itself, you could add --debug to the command line and you will get a lot of output. Could you check what happens just before that error?
We really do need those fixture files, but if you could search for child_component_list response that would allow me to get started with the implementation.
Here's an example what it outputs to my T315, we use "temperature" and "humidity" (and others) to select which modules we activate and which information we show, so we need to figure out what features your sensors have:
{'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}],Do you see something related to waterleaks and/or contact in yours?
I started to add support for waterleaks in #876, but the REQUIRED_COMPONENT = "waterleak" may not be correct here :-)
rytilahti commented on Apr 27, 2024
Sure thing, thanks for the issue report and those JSONs, they are already helpful!
Great catch! I created #877 which will eventually add support for this. Like with the water leak sensor, we are going to need the component name.
When we get the dump_devinfo fixed, you could also send the files to me by email and I can add them.
rytilahti commented on Apr 27, 2024
Looks like T310 doesn't support reporting the battery level like T315 does, but the component listing will likely reveal how we need to adapt the library to avoid creating that feature :-)
ngaertner commented on Apr 27, 2024
Here is the output just before the error with -- debug
DEBUG:kasa.smartprotocol:192.168.1.86 multi-request-batch-1 >> '{"method":"multipleRequest","params":{"requests":[{"method":"get_auto_update_info","params":null},{"method":"get_fw_download_state","params":null},{"method":"get_latest_fw","params":null},{"method":"qs_component_nego","params":null},{"method":"get_inherit_info","params":null}]},"requestID":1233901580097556480,"request_time_milis":1714226661478,"terminal_uuid":"MerxVh6FaBbv9jVpVR3D6A=="}' DEBUG:kasa.httpclient:Posting to http://192.168.1.86:80/app?token=AE7CAA4C1E26AA4D447EAB4D1C532B4D DEBUG:kasa.smartprotocol:192.168.1.86 multi-request-batch-1 << {'error_code': 0, 'result': {'responses': [{'error_code': 0, 'method': 'get_auto_update_info', 'result': {'enable': True, 'random_range': 120, 'time': 780}}, {'error_code': 0, 'method': 'get_fw_download_state', 'result': {'auto_upgrade': False, 'download_progress': 0, 'reboot_time': 5, 'status': 0, 'upgrade_time': 5}}, {'error_code': 0, 'method': 'get_latest_fw', 'result': {'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}}, {'error_code': 0, 'method': 'qs_component_nego', 'result': {'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}}}, {'error_code': 0, 'method': 'get_inherit_info'}]}} Unexpected exception querying all successes at once at once: argument of type 'NoneType' is not iterable File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "C:\git\python-kasa\devtools\dump_devinfo.py", line 675, in <module> cli() File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-CdcHLFJd-py3.11\Lib\site-packages\asyncclick\core.py", line 1205, in __call__ return anyio.run(self._main, main, args, kwargs, **opts) File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-CdcHLFJd-py3.11\Lib\site-packages\anyio\_core\_eventloop.py", line 73, in run return async_backend.run(func, args, {}, backend_options) File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-CdcHLFJd-py3.11\Lib\site-packages\anyio\_backends\_asyncio.py", line 2001, in run return runner.run(wrapper()) File "C:\Users\ngaer\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) File "C:\Users\ngaer\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 640, in run_until_complete self.run_forever() File "C:\Users\ngaer\AppData\Local\Programs\Python\Python311\Lib\asyncio\windows_events.py", line 321, in run_forever super().run_forever() File "C:\Users\ngaer\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 607, in run_forever self._run_once() File "C:\Users\ngaer\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 1922, in _run_once handle._run() File "C:\Users\ngaer\AppData\Local\Programs\Python\Python311\Lib\asyncio\events.py", line 80, in _run self._context.run(self._callback, *self._args) File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-CdcHLFJd-py3.11\Lib\site-packages\anyio\_backends\_asyncio.py", line 1989, in wrapper return await func(*args) File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-CdcHLFJd-py3.11\Lib\site-packages\asyncclick\core.py", line 1208, in _main return await main(*args, **kwargs) File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-CdcHLFJd-py3.11\Lib\site-packages\asyncclick\core.py", line 1120, in main rv = await self.invoke(ctx) File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-CdcHLFJd-py3.11\Lib\site-packages\asyncclick\core.py", line 1485, in invoke return await ctx.invoke(self.callback, **ctx.params) File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-CdcHLFJd-py3.11\Lib\site-packages\asyncclick\core.py", line 824, in invoke rv = await rv File "C:\git\python-kasa\devtools\dump_devinfo.py", line 255, in cli await handle_device(basedir, autosave, device, batch_size) File "C:\git\python-kasa\devtools\dump_devinfo.py", line 147, in handle_device fixture_results: list[FixtureResult] = await get_smart_fixtures( File "C:\git\python-kasa\devtools\dump_devinfo.py", line 609, in get_smart_fixtures final = await _make_requests_or_exit( File "C:\git\python-kasa\devtools\dump_devinfo.py", line 392, in _make_requests_or_exit traceback.print_stack()ngaertner commented on Apr 27, 2024
i will send the component listing later...
rytilahti commented on Apr 27, 2024
Great, thanks! You could also try one of those linked PRs after adjusting the required_component field to see if it's working as expected.
@sdb9696 is more familiar with the dump_devinfo so maybe he knows off the bat how what's the issue, but I'm guess it could be the missing result in this response: {'error_code': 0, 'method': 'get_inherit_info'}.
ngaertner commented on Apr 27, 2024
Here is the component listing with some additional context information about the devices.
I hope it helps, and it contains all required infos.
DEBUG:kasa.smartprotocol:192.168.1.86 multi-request-batch-1 << {'error_code': 0, 'result': {'responses': [{'error_code': 0, 'method': 'component_nego', 'result': {'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}]}}, {'error_code': 0, 'method': 'get_child_device_component_list', 'result': {'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': '802E6B66E717D6AD31BB4726011746212219698C'}, {'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': 'sensor_alarm', 'ver_code': 1}], 'device_id': '802ED99B9EC1A0A8C9F48AB5C709927D2245EEE7'}, {'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}], 'device_id': '802E3B14B17594B105DEB69CCED699DD22155944'}], 'start_index': 0, 'sum': 3}}, {'error_code': 0, 'method': 'get_child_device_list', 'result': {'child_device_list': [{'at_low_battery': False, 'avatar': 'sensor_t310', 'bind_count': 2, 'category': 'subg.trigger.temp-hmdt-sensor', 'current_humidity': 41, 'current_humidity_exception': 0, 'current_temp': 21.5, 'current_temp_exception': 0, 'device_id': '802E6B66E717D6AD31BB4726011746212219698C', 'fw_ver': '1.5.0 ' 'Build ' '230105 ' 'Rel.150707', 'hw_id': '2AE1228C7CE042A310FC70EA70D7A788', 'hw_ver': '1.0', 'jamming_rssi': -119, 'jamming_signal_level': 1, 'lastOnboardingTimestamp': 1708892232, 'mac': 'E4FAC44C516F', 'model': 'T310', 'nickname': 'VGVtcGVyYXR1ciAoaW5uZW4p', 'oem_id': '02F7CFFC203A7E622F6EA84BBB74C68F', 'parent_device_id': '802D587301438320D7122ECF6E591028221B023C', 'region': 'Europe/Berlin', 'report_interval': 16, 'rssi': -43, 'signal_level': 3, 'specs': 'EU', 'status': 'online', 'status_follow_edge': False, 'temp_unit': 'celsius', 'type': 'SMART.TAPOSENSOR'}, {'at_low_battery': False, 'avatar': 'sensor_t300', 'battery_percentage': 100, 'bind_count': 3, 'category': 'subg.trigger.water-leak-sensor', 'device_id': '802ED99B9EC1A0A8C9F48AB5C709927D2245EEE7', 'fw_ver': '1.7.0 ' 'Build ' '230628 ' 'Rel.194748', 'hw_id': 'CE0B3AE8E83B5A0D78D53B41EC4D5F1E', 'hw_ver': '1.0', 'in_alarm': False, 'jamming_rssi': -121, 'jamming_signal_level': 1, 'lastOnboardingTimestamp': 1708893337, 'mac': '98254AED3001', 'model': 'T300', 'nickname': 'V2Fzc2Vy', 'oem_id': 'BA0BFAB2B6264F680059C097EA3AC8F4', 'parent_device_id': '802D587301438320D7122ECF6E591028221B023C', 'region': 'Europe/Berlin', 'report_interval': 16, 'rssi': -43, 'signal_level': 3, 'specs': 'EU', 'status': 'online', 'status_follow_edge': False, 'type': 'SMART.TAPOSENSOR', 'water_leak_status': 'normal'}, {'at_low_battery': False, 'avatar': 'sensor_t110', 'bind_count': 2, 'category': 'subg.trigger.contact-sensor', 'device_id': '802E3B14B17594B105DEB69CCED699DD22155944', 'fw_ver': '1.9.0 ' 'Build ' '230704 ' 'Rel.154531', 'hw_id': '8B5164B3EDF216E59BCAB740ABCB40CD', 'hw_ver': '1.0', 'jamming_rssi': -117, 'jamming_signal_level': 1, 'lastOnboardingTimestamp': 1708892158, 'mac': 'E4FAC4310C0D', 'model': 'T110', 'nickname': 'RGFjaCAoaW5uZW4p', 'oem_id': '477C83614EF5FFFF6A8C2D80BBD306AB', 'open': False, 'parent_device_id': '802D587301438320D7122ECF6E591028221B023C', 'region': 'Europe/Berlin', 'report_interval': 16, 'rssi': -63, 'signal_level': 3, 'specs': 'EU', 'status': 'online', 'status_follow_edge': False, 'type': 'SMART.TAPOSENSOR'}], 'start_index': 0, 'sum': 3}}, {'error_code': 0, 'method': 'get_device_info', 'result': {'avatar': 'hub', 'device_id': '802D587301438320D7122ECF6E591028221B023C', 'fw_id': '00000000000000000000000000000000', 'fw_ver': '1.5.10 Build 240207 ' 'Rel.175759', 'has_set_location_info': True, 'hw_id': '81C01BC6E4AD1827315AC6A9D81A5132', 'hw_ver': '1.0', 'in_alarm': False, 'in_alarm_source': '', 'ip': '192.168.1.86', 'lang': 'de_DE', 'latitude': 493225, 'longitude': 86947, 'mac': 'E4-FA-C4-6F-50-64', 'model': 'H100', 'nickname': 'U21hcnQgSHVi', 'oem_id': 'D65F1AA7B819559EDF3C5C2BD5957929', 'overheated': False, 'region': 'Europe/Berlin', 'rssi': -44, 'signal_level': 3, 'specs': 'EU', 'ssid': 'Q2FycGVOb2N0ZW1SZW1vdGU=', 'time_diff': 60, 'type': 'SMART.TAPOHUB'}}, {'error_code': 0, 'method': 'get_device_usage', 'result': {}}]}}rytilahti commented on Apr 27, 2024
Thanks, I updated the waterleak PR to use sensor_alarm for detection, which should work for the time being as there are no other sensors using that. We will probably need to revisit this at some later point, but feel free to test that PR if you wish.
The contact sensor doesn't provide any component specific to it, so that will require us to rethink the logic how the library handles modules, likely by introducing a way to initialize modules based on the device model.
ngaertner commented on Apr 28, 2024
Hi,
i have tested the feat/waterleak_sensor branch, and it seems to work.
output:
... == Debug == Device ID (device_id): 802E6B66E717D6AD31BB4726011746212219698C RSSI (rssi): -45 Report interval (report_interval): 16 Time (time): 2024-04-28 11:33:58+01:00 == Wasser (T300, DeviceType.Sensor) == == Information == Signal Level (signal_level): 3 Battery level (battery_level): 100 Battery low (battery_low): False Cloud connection (cloud_connection): True Update available (update_available): False Status (status): normal Alarm (alarm): False == Debug == Device ID (device_id): 802ED99B9EC1A0A8C9F48AB5C709927D2245EEE7 RSSI (rssi): -47 Time (time): 2024-04-28 11:33:58+01:00 ...json:
{ "parent_device_id": "802D587301438320D7122ECF6E591028221B023C", "hw_ver": "1.0", "fw_ver": "1.7.0 Build 230628 Rel.194748", "device_id": "802ED99B9EC1A0A8C9F48AB5C709927D2245EEE7", "mac": "98254AED3001", "type": "SMART.TAPOSENSOR", "model": "T300", "hw_id": "CE0B3AE8E83B5A0D78D53B41EC4D5F1E", "oem_id": "BA0BFAB2B6264F680059C097EA3AC8F4", "specs": "EU", "category": "subg.trigger.water-leak-sensor", "bind_count": 3, "status_follow_edge": false, "status": "online", "lastOnboardingTimestamp": 1708893337, "rssi": -53, "signal_level": 3, "jamming_rssi": -120, "jamming_signal_level": 1, "in_alarm": false, "water_leak_status": "water_dry", "trigger_timestamp": 1714300553, "battery_percentage": 100, "at_low_battery": false, "nickname": "V2Fzc2Vy", "avatar": "sensor_t300", "report_interval": 16, "region": "Europe/Berlin" },"water_leak_status" can be either "normal" -> "water_leak" -> "water_dry" (after the water has dried up) -> "normal"
It seems "in_alarm" will always only be true if the alarm sound on the sensor is enabled - if it is silent "in_alarm" seems to be always false.
ngaertner commented on Apr 28, 2024
Regarding the T110:
At least it does not show up anymore as unknown device.
In the CLI the output of the contact status is still missing:
== Dach (innen) (T110, DeviceType.Sensor) == == Information == Signal Level (signal_level): 3 Battery level (battery_level): got exception ('battery_percentage') Battery low (battery_low): False Cloud connection (cloud_connection): True Update available (update_available): False == Debug == Device ID (device_id): 802E3B14B17594B105DEB69CCED699DD22155944 RSSI (rssi): -73 Time (time): 2024-04-28 12:15:25+01:00JSON looks fine
"child_device_list": [ { "parent_device_id": "802D587301438320D7122ECF6E591028221B023C", "hw_ver": "1.0", "fw_ver": "1.9.0 Build 230704 Rel.154531", "device_id": "802E3B14B17594B105DEB69CCED699DD22155944", "mac": "E4FAC4310C0D", "type": "SMART.TAPOSENSOR", "model": "T110", "hw_id": "8B5164B3EDF216E59BCAB740ABCB40CD", "oem_id": "477C83614EF5FFFF6A8C2D80BBD306AB", "specs": "EU", "category": "subg.trigger.contact-sensor", "bind_count": 2, "status_follow_edge": false, "status": "online", "lastOnboardingTimestamp": 1708892158, "rssi": -73, "signal_level": 3, "jamming_rssi": -114, "jamming_signal_level": 1, "at_low_battery": false, "open": false, "nickname": "RGFjaCAoaW5uZW4p", "avatar": "sensor_t110", "report_interval": 16, "region": "Europe/Berlin" },rytilahti commented on Apr 28, 2024
Great, so both of these features are useful to have around! I updated the PR a bit and it should be ready to be merged now. Would you mind retesting to make sure it's still working? I added an enum for the water leak status, so that we can later show the available options for homeassistant automations.
Yeah, this will require some architectural changes as we are currently initializing the modules based on supported component names and there was nothing explicit for the contact sensor. We are either going to need to use the existence of "open" in the response, or the model information, to decide on that, but neither is really optimal.
ngaertner commented on Apr 28, 2024
ok.. did another test:
Normal state:
== Information == Signal Level (signal_level): 3 Battery level (battery_level): 100 Battery low (battery_low): False Cloud connection (cloud_connection): True Update available (update_available): False Water leak (water_leak): WaterleakStatus.Normal Water alert (water_alert): False{ "parent_device_id": "802D587301438320D7122ECF6E591028221B023C", "hw_ver": "1.0", "fw_ver": "1.7.0 Build 230628 Rel.194748", "device_id": "802ED99B9EC1A0A8C9F48AB5C709927D2245EEE7", "mac": "98254AED3001", "type": "SMART.TAPOSENSOR", "model": "T300", "hw_id": "CE0B3AE8E83B5A0D78D53B41EC4D5F1E", "oem_id": "BA0BFAB2B6264F680059C097EA3AC8F4", "specs": "EU", "category": "subg.trigger.water-leak-sensor", "bind_count": 6, "status_follow_edge": false, "status": "online", "lastOnboardingTimestamp": 1714302216, "rssi": -44, "signal_level": 3, "jamming_rssi": -114, "jamming_signal_level": 1, "in_alarm": false, "water_leak_status": "normal", "battery_percentage": 100, "at_low_battery": false, "nickname": "V2Fzc2VybGVjaw==", "avatar": "sensor_t300", "report_interval": 16, "region": "Europe/Berlin" },Wet state:
== Information == Signal Level (signal_level): 3 Battery level (battery_level): 100 Battery low (battery_low): False Cloud connection (cloud_connection): True Update available (update_available): False Water leak (water_leak): WaterleakStatus.LeakDetected Water alert (water_alert): False{ "parent_device_id": "802D587301438320D7122ECF6E591028221B023C", "hw_ver": "1.0", "fw_ver": "1.7.0 Build 230628 Rel.194748", "device_id": "802ED99B9EC1A0A8C9F48AB5C709927D2245EEE7", "mac": "98254AED3001", "type": "SMART.TAPOSENSOR", "model": "T300", "hw_id": "CE0B3AE8E83B5A0D78D53B41EC4D5F1E", "oem_id": "BA0BFAB2B6264F680059C097EA3AC8F4", "specs": "EU", "category": "subg.trigger.water-leak-sensor", "bind_count": 6, "status_follow_edge": false, "status": "online", "lastOnboardingTimestamp": 1714302216, "rssi": -60, "signal_level": 3, "jamming_rssi": -118, "jamming_signal_level": 1, "in_alarm": false, "water_leak_status": "water_leak", "trigger_timestamp": 1714310287, "battery_percentage": 100, "at_low_battery": false, "nickname": "V2Fzc2VybGVjaw==", "avatar": "sensor_t300", "report_interval": 16, "region": "Europe/Berlin" },Drying State:
== Information == Signal Level (signal_level): 3 Battery level (battery_level): 100 Battery low (battery_low): False Cloud connection (cloud_connection): True Update available (update_available): False Water leak (water_leak): WaterleakStatus.Drying Water alert (water_alert): False{ "parent_device_id": "802D587301438320D7122ECF6E591028221B023C", "hw_ver": "1.0", "fw_ver": "1.7.0 Build 230628 Rel.194748", "device_id": "802ED99B9EC1A0A8C9F48AB5C709927D2245EEE7", "mac": "98254AED3001", "type": "SMART.TAPOSENSOR", "model": "T300", "hw_id": "CE0B3AE8E83B5A0D78D53B41EC4D5F1E", "oem_id": "BA0BFAB2B6264F680059C097EA3AC8F4", "specs": "EU", "category": "subg.trigger.water-leak-sensor", "bind_count": 6, "status_follow_edge": false, "status": "online", "lastOnboardingTimestamp": 1714302216, "rssi": -54, "signal_level": 3, "jamming_rssi": -124, "jamming_signal_level": 1, "in_alarm": false, "water_leak_status": "water_dry", "trigger_timestamp": 1714310408, "battery_percentage": 100, "at_low_battery": false, "nickname": "V2Fzc2VybGVjaw==", "avatar": "sensor_t300", "report_interval": 16, "region": "Europe/Berlin" },Wet state with sound alert:
== Information == Signal Level (signal_level): 3 Battery level (battery_level): 100 Battery low (battery_low): False Cloud connection (cloud_connection): True Update available (update_available): False Water leak (water_leak): WaterleakStatus.LeakDetected Water alert (water_alert): True{ "parent_device_id": "802D587301438320D7122ECF6E591028221B023C", "hw_ver": "1.0", "fw_ver": "1.7.0 Build 230628 Rel.194748", "device_id": "802ED99B9EC1A0A8C9F48AB5C709927D2245EEE7", "mac": "98254AED3001", "type": "SMART.TAPOSENSOR", "model": "T300", "hw_id": "CE0B3AE8E83B5A0D78D53B41EC4D5F1E", "oem_id": "BA0BFAB2B6264F680059C097EA3AC8F4", "specs": "EU", "category": "subg.trigger.water-leak-sensor", "bind_count": 6, "status_follow_edge": false, "status": "online", "lastOnboardingTimestamp": 1714302216, "rssi": -55, "signal_level": 3, "jamming_rssi": -121, "jamming_signal_level": 1, "in_alarm": true, "water_leak_status": "water_leak", "trigger_timestamp": 1714310503, "battery_percentage": 100, "at_low_battery": false, "nickname": "V2Fzc2VybGVjaw==", "avatar": "sensor_t300", "report_interval": 16, "region": "Europe/Berlin" },ngaertner commented on Apr 28, 2024
so... everything works fine.
Just another question (a little off-topic let me know if i should create another issue for it).
During the tests I noticed the following:
When i control the Tapo Plugs (like P100) i can use KLAP encryption with --credentions-hash , but when i try to access the H100 Hub I have to use AES and --username and --password.
Using credentials-hash gives me:
Raised error: 'utf-8' codec can't decode byte 0xed in position 1: invalid continuation byte
Is it possible to support the credentials hash for the hub as well?
rytilahti commented on Apr 28, 2024
Yes, please create a new issue for that. The --credential-hash should work, but note that this is protocol specific, i.e., the hash gets generated differently for KLAP and for AES encryption schemes, that's likely the problem you are encountering here?
ngaertner commented on Apr 28, 2024
thanks - i created #878 for it.
sdb9696 commented on Apr 29, 2024
@ngaertner PR #882 should fix the dump_devinfo issue you were having. If you could try running it from that PR it should work now and give you the fixture. Thanks.
EDIT: #884 contains the fix and has been merged so you should be able to run this from the master branch now.
sdb9696 commented on Apr 30, 2024
Hi @ngaertner, it would be really great if you could try the dump_devinfo from the latest master branch of python-kasa. If we get those fixtures uploading we'll be able to confirm that we can properly support these devices and make sure the support goes into the next library release.
ngaertner commented on May 2, 2024
The saving of the fixture JSON failed, but here's the output - I hope it helps.
Just note that this is now a different hub, as I don't have access to the original one anymore.
## device info file ## {'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': '5C-E9-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_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': [{'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': 'sensor_alarm', '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}], 'device_id': 'SCRUBBED_CHILD_DEVICE_ID_2'}], 'start_index': 0, 'sum': 2}, 'get_child_device_list': {'child_device_list': [{'at_low_battery': False, 'avatar': 'sensor_t300', 'battery_percentage': 100, 'bind_count': 1, 'category': 'subg.trigger.water-leak-sensor', 'device_id': 'SCRUBBED_CHILD_DEVICE_ID_1', 'fw_ver': '1.7.0 Build ' '230628 Rel.194748', 'hw_id': '00000000000000000000000000000000', 'hw_ver': '1.0', 'in_alarm': False, 'jamming_rssi': -119, 'jamming_signal_level': 1, 'lastOnboardingTimestamp': 1714661760, 'mac': '98254A000000', 'model': 'T300', 'nickname': 'I01BU0tFRF9OQU1FIw==', 'oem_id': '00000000000000000000000000000000', 'parent_device_id': '0000000000000000000000000000000000000000', 'region': 'Europe/Berlin', 'report_interval': 16, 'rssi': -73, 'signal_level': 3, 'specs': 'EU', 'status': 'online', 'status_follow_edge': False, 'type': 'SMART.TAPOSENSOR', 'water_leak_status': 'normal'}, {'at_low_battery': False, 'avatar': 'sensor_t110', 'bind_count': 1, 'category': 'subg.trigger.contact-sensor', 'device_id': 'SCRUBBED_CHILD_DEVICE_ID_2', 'fw_ver': '1.8.0 Build ' '220728 Rel.160024', 'hw_id': '00000000000000000000000000000000', 'hw_ver': '1.0', 'jamming_rssi': -113, 'jamming_signal_level': 1, 'lastOnboardingTimestamp': 1714661626, 'mac': 'E4FAC4000000', 'model': 'T110', 'nickname': 'I01BU0tFRF9OQU1FIw==', 'oem_id': '00000000000000000000000000000000', 'open': False, 'parent_device_id': '0000000000000000000000000000000000000000', 'region': 'Europe/Berlin', 'report_interval': 16, 'rssi': -54, 'signal_level': 3, 'specs': 'EU', 'status': 'online', 'status_follow_edge': False, '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': '', 'latitude': 0, 'longitude': 0, 'mac': '5C-E9-31-00-00-00', 'model': 'H100', 'nickname': 'I01BU0tFRF9OQU1FIw==', 'oem_id': '00000000000000000000000000000000', 'overheated': False, 'region': 'Europe/Berlin', 'rssi': -46, 'signal_level': 3, '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': 1483}, 'get_device_time': {'region': 'Europe/Berlin', 'time_diff': 60, 'timestamp': 1714666608}, 'get_device_usage': {}, 'get_fw_download_state': {'auto_upgrade': False, 'download_progress': 0, 'reboot_time': 5, 'status': 0, 'upgrade_time': 5}, 'get_inherit_info': None, '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': 'always', 'led_status': True, 'night_mode': {'end_time': 359, 'night_mode_type': 'sunrise_sunset', 'start_time': 1246, 'sunrise_offset': 0, 'sunset_offset': 0}}, 'get_matter_setup_info': {'setup_code': '00000000000', 'setup_payload': '00:000000-000000000000'}, '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}}}ngaertner commented on May 2, 2024
And here's the error that I received...
Do you want to save the above content to kasa\tests\fixtures\smart\H100(EU)_1.0_1.5.10.json (y/n): y Saving info to kasa\tests\fixtures\smart\H100(EU)_1.0_1.5.10.json Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "C:\git\python-kasa\devtools\dump_devinfo.py", line 696, in <module> cli() File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-CdcHLFJd-py3.11\Lib\site-packages\asyncclick\core.py", line 1205, in __call__ return anyio.run(self._main, main, args, kwargs, **opts) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-CdcHLFJd-py3.11\Lib\site-packages\anyio\_core\_eventloop.py", line 73, in run return async_backend.run(func, args, {}, backend_options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-CdcHLFJd-py3.11\Lib\site-packages\anyio\_backends\_asyncio.py", line 2001, in run return runner.run(wrapper()) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ngaer\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ngaer\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-CdcHLFJd-py3.11\Lib\site-packages\anyio\_backends\_asyncio.py", line 1989, in wrapper return await func(*args) ^^^^^^^^^^^^^^^^^ File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-CdcHLFJd-py3.11\Lib\site-packages\asyncclick\core.py", line 1208, in _main return await main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-CdcHLFJd-py3.11\Lib\site-packages\asyncclick\core.py", line 1120, in main rv = await self.invoke(ctx) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-CdcHLFJd-py3.11\Lib\site-packages\asyncclick\core.py", line 1485, in invoke return await ctx.invoke(self.callback, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ngaer\AppData\Local\pypoetry\Cache\virtualenvs\python-kasa-CdcHLFJd-py3.11\Lib\site-packages\asyncclick\core.py", line 824, in invoke rv = await rv ^^^^^^^^ File "C:\git\python-kasa\devtools\dump_devinfo.py", line 256, in cli await handle_device(basedir, autosave, device, batch_size) File "C:\git\python-kasa\devtools\dump_devinfo.py", line 167, in handle_device with open(save_filename, "w") as f: ^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'kasa\\tests\\fixtures\\smart\\H100(EU)_1.0_1.5.10.json'rytilahti commented on May 2, 2024
Unfortunately, that only contains the fixture for the main device. Could you retry it with #894?
sdb9696 commented on May 2, 2024
Ah, it assumes you're running from a cloned git repository. First it tries to save the hub then the children. If you create the following folders below where you are running it from it should save all of them:
kasa\tests\fixtures\smart\child
The hub will be in the smart folder and the other devices in the child folder.
ngaertner commented on May 2, 2024
here you go ;-)
T110(EU)_1.0_1.8.0.json
T300(EU)_1.0_1.7.0.json
sdb9696 commented on May 2, 2024
Fantastic thanks Nico!
Add fixture for waterleak sensor T300 (#897)
rytilahti commented on May 7, 2024
Feel free to test if #877 works now with the contact sensor. I'm unsure if that's the correct approach (instead of trying to initialize all modules and to check _check_supported), but it's worth testing if it works otherwise.
Add fixture for waterleak sensor T300 (python-kasa#897)