mihai-dinculescu / tapo

Unofficial Tapo API Client. Works with TP-Link Tapo smart devices. Tested with light bulbs (L510, L520, L530, L610, L630), light strips (L900, L920, L930), plugs (P100, P105, P110, P115, P300), hubs (H100), switches (S200B) and sensors (KE100, T100, T110, T300, T310, T315).
MIT License
352 stars 36 forks source link

on_time characteristic causing error #60

Closed claviger-pc closed 1 year ago

claviger-pc commented 1 year ago

Thanks for this project! For me, with recently bought L530 bulbs and updated firmware, getting info results in an error due to the lack of on_time

in src/responses/device_info_result/l530.rs commenting out that line (28) allows the information to be printed.

mihai-dinculescu commented 1 year ago

Thank you for the bug report. Can you please add the firmware version and your country? My UK devices have yet to receive any updates.

claviger-pc commented 1 year ago

No problem, I bought these on Amazon in Italy. Here is the relevant part of the output:

Device info: L530DeviceInfoResult { device_id: "8023483F7523B4FCBE9211F39xxxxxxxxxxxxx", type: "SMART.TAPOBULB", model: "L530", hw_id: "FDE1C68674D1535B12A042682B192E4E", hw_ver: "2.0", fw_id: "7BECA9DC454565672FEC87D1104F9972", fw_ver: "1.0.9 Build 220526 Rel.203202", oem_id: "2241AD354FF56159AF1AC4A53B011A5D"

I had guessed that the on_time must have simply been changed to something else, but several obvious guesses (ontime, uptime, up_time) did not work.

mihai-dinculescu commented 1 year ago

It looks like only the devices with hardware v2 have got that firmware upgrade.

This has been fixed by making the field optional in https://github.com/mihai-dinculescu/tapo/commit/6f4d9576e44478816861c10c15f8b4c6d45fc308 and released in v0.3.1.