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
318 stars 30 forks source link

[Improvement] Schedule #166

Open mioux opened 5 months ago

mioux commented 5 months ago

By using the official app, I have seen there is a scheduler to turn P100 off or on

It seems not to be a timer integrated in the app, as I tried to completely shut down my phone after setting the timer, the plug has switched on while the phone was powered off

If you need some tests to get the API used, I can try to help

mihai-dinculescu commented 5 months ago

You are correct. The schedule is stored on the device itself, and the Tapo App is not required to trigger it.

I have previously encountered the schedule set and get API endpoints, so I am confident that support for them can be added.

I'm not sure when I'll be able to get to it myself. Currently, my focus is on bringing the Python wrapper up to feature parity and then adding support for the camera devices.

mioux commented 5 months ago

I tried to setup a wireshark to capture packet sent to the Tapo without success (i'm a beginner in network :D)

If you want me to capture this, it may take some time (I have successuly setup wireshark to decode https packets, I did not see one going to the tapo)

mihai-dinculescu commented 5 months ago

I don't think that Wireshark is needed. All the information should be in the decompiled Android app.

I see the following methods available in the API:

The easiest way to go about it would be to set different schedules in the Tapo App and use get_schedule_rules to see what the result looks like. That can then be followed by trying to get add_schedule_rule to create schedules that appear in the App as they would if they were natively created.

tzven0 commented 3 months ago

Hey, i second this. Any chance this will be implemented soon? Sadly, i am just starting out with rust and i am currently using the tapo-rest API which uses your tapo lib for the sake of convenience. Can i help out somehow, although i am just starting out with r? Any chance i can test stuff with postman, did you test this?

EDIT: i do only have the P115 though.