Closed amiyamandal-dev closed 2 weeks ago
Can you please post the output of get_device_info_json()
?
Here's a (redacted) dump from my p110. Looks like they helpfully renamed overheated
to overheat_status
. So I'd suggest changing the field name and adding a serde alias for the old name (for people on old firmware). Additionally, I'm guessing it's part of the change that introduced overcurrent_status
and power_protection_status
.
{"auto_off_remain_time":0,"auto_off_status":"off","avatar":"house","charging_status":"normal","default_states":{"state":{"on":false},"type":"custom"},"device_id":"REDACTED","device_on":true,"fw_id":"00000000000000000000000000000000","fw_ver":"1.3.1 Build 240621 Rel.162048","has_set_location_info":true,"hw_id":"REDACTED","hw_ver":"1.0","ip":"REDACTED","lang":"en_US","latitude":0,"longitude":-0"mac":"REDACTED","model":"P110","nickname":"REDACTED","oem_id":"REDACTED","on_time":0,"overcurrent_status":"normal","overheat_status":"normal","power_protection_status":"normal","region":"REDACTED","rssi":0,"signal_level":2,"specs":"","ssid":"REDACTED","time_diff":0,"type":"SMART.TAPOPLUG"}
Hi all, same issue on my Tapo P115, firmware version 1.3.1 Build 240621 Rel.162048
. I confirm that there is not overheated
field anymore but only 'overheat_status': 'normal'
I have the same issue with P110 -- is there a work around or do we need to wait for a new version?
same here
Traceback (most recent call last): File "C:\Program Files (x86)\Domoticz\tapo_p110.py", line 74, in <module> asyncio.run(main()) File "C:\Program Files (x86)\Python310-32\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\Program Files (x86)\Python310-32\lib\asyncio\base_events.py", line 646, in run_until_complete return future.result() File "C:\Program Files (x86)\Domoticz\tapo_p110.py", line 40, in main device_info = await device.get_device_info() Exception: Serde(Error("missing field
overheated", line: 1, column: 832))
found its defined in (https://github.com/mihai-dinculescu/tapo/tree/main/tapo-py/tapo-py/tapo/responses/device_info_result) /plug_result.pyi
but i have no clue how to change localy this file
Edit 1:
did a pip --force-reinstall --no-cache but that did not help dfoh the errors changed a bit
Turning device on...
Waiting 2 seconds...
Turning device off...
Traceback (most recent call last):
File "tapo_p110.py", line 62, in overheated
", line: 1, column: 830))
I left a couple of remarks to make your life easier and to kindly help identify ( i am still learning how to use python and github)
Edit 2: I also found a fork thats 2 commits ahead and should solve it just dont know how to proceed https://github.com/Toommi/tapo suppose we have to wait for mihai to commit ?
Edit 3: If i skip calling the [get_device_info call and focus on the usage parameters it runs, But there seem to be more changes as i see the code to be very slow sometimes.
Looks like some trottle/loadbalancing is in place on the server side, making multiple data requests in the same call to "hang" at some point ( tried once a minute on one of my p115 devices, and once per 5 min, with same result) If i only request current usage it runs mostly, if i include monthly or daily usage it hangs allmost every time.
I take as starting point the example files, and will try if i can use the
same here!
Fixed in https://github.com/mihai-dinculescu/tapo/pull/254, verified to work on my P110 and P115.
I was able to find out the following by decompiling a recent Tapo Android app
Possible values for the overheat_status are
This change seems to affect only plugs (and possibly power strips, but I couldn't test it as I don't have one).
Therefore, I believe that only the plugs should be updated for now to support the new enum.
@mihai-dinculescu Can i buy you one to support your future development ?
@sledgemhammer Sponsorship is enabled for the project. Every little bit helps, thank you!
The fix has been released in Tapo Rust v.0.7.13 and Tapo Python v0.3.2.
The overheated field for plugs has been replaced by three enums: overcurrent_status
, overheat_status
, and power_protection_status
, thanks to the help from @padenot.
Please let me know how this works for you.
Error while fetching info from get_device_info() for P110
Description
When trying to fetch device information using
get_device_info()
for a P110 device, the following error occurs:Environment
Steps to Reproduce
await device.get_device_info()
Expected Behavior
The function should return the device information without any errors.