Unofficial Rust & Python API Client Libraries
Unofficial Rust & Python API Client Libraries
[Updated at 2023-10-01]
I've built a Rust API Client Library that works with TP-Link Tapo smart devices. Tested with light bulbs (L510, L530, L610, L630), light strips (L900, L920, L930), plugs (P100, P105, P110, P115), hubs (H100), switches (S200B) and sensors (T100, T110, T310, T315).
The Python version only supports the plugs (P100, P105, P110, P115) currently, but I plan to extend it in the near future to on at feature parity with the Rust version.
You can find both libraries at https://github.com/mihai-dinculescu/tapo. Feedback will be much appreciated!
- Copy Link
- Subscribe
- Bookmark
- Report Inappropriate Content
Nice, will your app fix my problem below?
https://community.tp-link.com/en/smart-home/forum/topic/576282
- Copy Link
- Report Inappropriate Content
@JJJ123 I don't think that it will help in your situation.
This library enables you to programmatically interact with your devices. It does not change how the devices interact with the mobile Tapo app.
- Copy Link
- Report Inappropriate Content
@FaithRaven Hi
Do you have any idea how to get at the energy usage of a Tapo bulb? The "get_energy_usage" method which works for the plug returns an error for the bulb, but the Tapo iOS app shows energy consumption for the bulbs, so there must be a way!
- Copy Link
- Report Inappropriate Content
get_energy_usage is a feature unique to P110, as per the Device Support table.
While the bulbs don't offer the advanced energy usage monitoring of P110, they do offer some.
get_device_usage will return the Time Usage, Power Usage and the Estimated Saved Power for today, the last 7 days and the last 30 days.
- Copy Link
- Report Inappropriate Content
@FaithRaven Thanks!
- Copy Link
- Report Inappropriate Content
Release v0.3.0 brings a new `set` API that allows multiple properties to be set in a single request for the L510 and L530 devices.
https://github.com/mihai-dinculescu/tapo
Next up, I plan to add support for L930 devices.
- Copy Link
- Report Inappropriate Content
Release v0.4.0 adds the `get_energy_data` for P110 devices.
- Copy Link
- Report Inappropriate Content
Release v0.6.0 brings the much-anticipated support for light strips (L900, L920 & L930), more bulbs (L610 & L630) and improved ergonomics.
https://github.com/mihai-dinculescu/tapo
- Copy Link
- Report Inappropriate Content
Tapo v0.7.0 adds support for the H100 hub and most of the sensors and switches it interacts with.
- Copy Link
- Report Inappropriate Content
Tapo v0.7.4 supports the new KLAP authentication method that is now required by the latest firmware of several devices.
A newly added Python wrapper supports the P100, P105, P110 and P115 plug devices in version v0.1.1.
- Copy Link
- Report Inappropriate Content
Information
Helpful: 4
Views: 5264
Replies: 17