返回资讯中心
外部精选
软件工程
#社区热议

Tapo (Rust/Python library) now speaks TP-Link's TPAP protocol

class=zola-anchor href=#tpap-support>TPAP support

Hacker Newsfaithraven2026/10/6 · 25 天前5 分钟阅读

以下正文同步自 Hacker News,版权归原站所有,已转换为易读排版。

class=zola-anchor href=#tpap-support>TPAP support

On recent Tapo firmware, the Third-Party Compatibility switch decides which protocol a device speaks. A light, plug, power strip or H100 hub speaks KLAP when it's on, and TPAP when it's off. Cameras never spoke KLAP. Their older protocol is AES SSL, and some of them refuse that one when the switch is off. The library didn't speak TPAP, so it could only reach a device whose switch was on.v0.11.1 adds TPAP. Lights, plugs, power strips, hubs and cameras that require it can now be used with the switch off, both when connecting by IP address and through discover_devices. There is nothing to change in your code: the client works out which protocol the device speaks and logs in over that one.Three things are worth knowing:A wrong password can lock the device. After too many failed logins a TPAP device refuses every login for a while. The library reports the wrong password as TPAP_CREDENTIALS and the lockout as TPAP_AUTH_ATTEMPTS_LIMIT. Don't retry either of them in a loop.Camera hubs don't speak TPAP yet. An H200 (new in v0.10, see below) on firmware 1.7.5 announces AES SSL whether the switch is on or off, and the library logs in over that.Some cameras don't speak TPAP yet either. It depends on the model and its firmware. A C220 and a C510W on firmware 1.3.4 speak TPAP, so they work with the switch off. A C210 on firmware 1.5.2 doesn't, so the library logs in to it over AES SSL instead, and the camera refuses that login while the switch is off. For now it only works with the switch on.While one protocol arrived, another left. The original AES protocol, the one KLAP replaced in 2023, was still in the library, which probed every light and plug it connected to by IP address to find out whether it wanted that or KLAP. No firmware has shipped with it for a long time, so v0.11.0 removes it. AES SSL, the one cameras and camera hubs speak, is a close relative: the same kind of encrypted envelope, but over HTTPS and with a different login. That one stays.<a aria-label=

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →