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

Local access to TAPO P110 for energy data #215

Closed
goofy2k opened this issue May 16, 2024 · 10 comments
Closed

Local access to TAPO P110 for energy data #215

goofy2k opened this issue May 16, 2024 · 10 comments

Comments

@goofy2k
Copy link

goofy2k commented May 16, 2024

Is acquisition of energy data of the P110 still possible with local access?

I did that succesfully in NodeRed using the staus node of this flow. Lately I get invalid results. Could this be due to blocking of the functionality in recent firmware updates?

@mihai-dinculescu
Copy link
Owner

As far as I know, getting the energy data has always required the device to be connected to the internet. I suspect this is because the data is stored in the cloud rather than on the device.

@goofy2k
Copy link
Author

goofy2k commented May 18, 2024

Thanks for your reply!

I have been able to access the devices locally with a Nodered flow. Currently I can only get the data by using the Export function in the Android Tapo app. This generates a csv file that is sent to my email.

Currently I have no way to get my data available via Homey Pro.

Fred

@mihai-dinculescu
Copy link
Owner

Yes, you can access the device, get device info, turn it on/off, etc, without the device having an internet connection. But to get energy data, it does need an internet connection.

@goofy2k
Copy link
Author

goofy2k commented May 19, 2024

I will send you a link to the relevant source code(s) later.

Unfortunately I am not able to test it anymore e.g. by switching off my internet connection.

I The API info was allegedly supplied by TP-link. I now suspect that they removed that mode of access in later firmware updates.

Now I have to press a key in the Android app. Then I get an email with the data in some longer period.

I could live with it if I could let a Homey app do that key press all was it in a weekly frequency....

@goofy2k
Copy link
Author

goofy2k commented May 19, 2024

I discovered that more people hit on this issue. Local access was possible, but the method does not work after a firmware upgrade of the plugs.

You can find the discussion by following the link to the nodered software in my first message. Then follow the link to the relevant github repository and see Issues.

There is a solution available for Home Assistant. It is based on this.

I will test that solution in Python to see if it works for me....

@mihai-dinculescu
Copy link
Owner

Is this the issue that you're referring to?
sanlike0911/node-red-contrib-tplink-tapo-connect-api#38

@goofy2k
Copy link
Author

goofy2k commented May 20, 2024

Yep

@mihai-dinculescu
Copy link
Owner

That thread is about last year's firmware version that started using the KLAP encryption protocol.
This library does support it.

@goofy2k
Copy link
Author

goofy2k commented May 21, 2024

OK that's great! I will see if I can get data from my P110's !
I'll have to study how to use the lib.

OK. Got your TAPO_p110.py script working OK! Switches my garden lights on and of and ..... gets energy data. :-)

I use(d) that for monitoring energy usage of my heat pump.

I am not very knowledgable on networking. Is this local access? The plugs do not request for data from the TP-link cloud?

@mihai-dinculescu
Copy link
Owner

It is primarily local access. Most operations do not require the device to be connected to the Internet. However, some, like getting energy usage historical data, do require a cloud connection. Also, the devices need to connect to the cloud from time to time so that the locally cached password hash is synced.

@mihai-dinculescu mihai-dinculescu closed this as not planned Won't fix, can't repro, duplicate, stale Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants