Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improvement] Schedule #166

Open
mioux opened this issue Jan 28, 2024 · 8 comments
Open

[Improvement] Schedule #166

mioux opened this issue Jan 28, 2024 · 8 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@mioux
Copy link

mioux commented Jan 28, 2024

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
Copy link
Owner

mihai-dinculescu commented Feb 2, 2024

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.

@mihai-dinculescu mihai-dinculescu added help wanted Extra attention is needed good first issue Good for newcomers labels Feb 2, 2024
@mioux
Copy link
Author

mioux commented Feb 9, 2024

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
Copy link
Owner

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:

  • get_schedule_rules
  • get_schedule_next_action
  • get_schedule_day_runtime
  • get_schedule_month_runtime
  • add_schedule_rule
  • edit_schedule_rule
  • remove_schedule_rules
  • remove_all_schedule_runtime

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
Copy link

tzven0 commented Mar 26, 2024

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.

@Tkd-Alex
Copy link

I would like to automatically power off my plug after 10 minutes of my computer shutdowns.
The schedule function could help me, or do you have any other ideas to send a delayed command?

@goofy2k
Copy link

goofy2k commented Nov 16, 2024

Hi @mihai-dinculescu ,

Do I understand from this

All the information should be in the decompiled Android app.

I see the following methods available in the API

that the API for the plugs is available (probably via reverse engineering)?
Where can I find it?

@mihai-dinculescu
Copy link
Owner

I've managed to decompile it by using ApkStudio on the downloaded Android APK.

@Tkd-Alex
Copy link

Hello @mihai-dinculescu if you are able to create a little walkthrough to implement a new feature on the library I could try to develop the schedule part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants