Unofficial Rust & Python API Client Libraries

This thread has been locked for further replies. You can start a new thread to share your ideas or ask questions.
12

Unofficial Rust & Python API Client Libraries

This thread has been locked for further replies. You can start a new thread to share your ideas or ask questions.
Unofficial Rust & Python API Client Libraries
Unofficial Rust & Python API Client Libraries
2022-07-02 17:53:03 - last edited 2023-10-01 12:55:53

[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!

  4      
  4      
#1
Options
15 Reply
Re:Unofficial Rust API Client
2022-08-04 02:09:59

  @FaithRaven 

 

Nice, will your app fix my problem below?

 

https://community.tp-link.com/en/smart-home/forum/topic/576282

  0  
  0  
#2
Options
Re:Unofficial Rust API Client
2022-08-07 11:19:59

@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.

  0  
  0  
#3
Options
Re:Unofficial Rust API Client
2022-10-14 11:07:43

  @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!

 

  0  
  0  
#4
Options
Re:Unofficial Rust API Client
2022-10-17 09:36:38 - last edited 2022-10-17 09:37:52

  @acarter 

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.

 

  0  
  0  
#5
Options
Re:Unofficial Rust API Client
2022-10-17 09:57:10

  @FaithRaven  Thanks!

 

  0  
  0  
#6
Options
Re:Unofficial Rust API Client
2022-11-20 18:08:53 - last edited 2022-11-20 18:09:47

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.

  1  
  1  
#7
Options
Re:Unofficial Rust API Client
2023-02-25 20:00:45

Release v0.4.0 adds the `get_energy_data` for P110 devices.

https://github.com/mihai-dinculescu/tapo

  0  
  0  
#8
Options
Re:Unofficial Rust API Client
2023-05-08 19:56:35

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

 

  0  
  0  
#9
Options
Re:Unofficial Rust API Client
2023-05-26 10:09:08

Tapo v0.7.0 adds support for the H100 hub and most of the sensors and switches it interacts with.

https://github.com/mihai-dinculescu/tapo

  0  
  0  
#10
Options
Re:Unofficial Rust API Client
2023-10-01 12:59:51

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.

 

https://github.com/mihai-dinculescu/tapo

  3  
  3  
#11
Options