dickydoouk / tp-link-tapo-connect

Unofficial Node.js library for connecting to TP-Link Tapo devices. Currently limited to the P100 & P105 smart plugs and L510E smart bulbs.
112 stars 39 forks source link

acess device from wlan ? external network #13

Closed mirsella closed 2 years ago

mirsella commented 2 years ago

hey I got a tapo 100 I managed to get this package working on LAN by accessing the device with it's local IP. do you have a idea if it would be possible to connect directly to p100 from another network ?

my current solution is a web server listening on a PC in my home and relaying the info to the device with this package.

mirkokiefer commented 2 years ago

The official Tapo app works without being connected to the local network - so there must be APIs for that. Looking for a solution as well!

dewhurstwill commented 2 years ago

I will have a look into this however even with inspecting network traffic this will be a difficult task as the mobile app and API is not documented. If they had a desktop or webapp this would be much easier.

In the meantime I would advise a solution where you run your own rest API locally on a lower power computer like a raspberry pi, setting up dynamic DNS and opening a port on your router. If you want the solution to be more secure you could implement authentication on your rest api which passes the credentials through to the tapo library instead of them being environment variables.

mirsella commented 2 years ago

yeah I'm already using this solution https://github.com/mirsella/tp-link-tapo-connect-wrapper

thanks for the answer

dewhurstwill commented 2 years ago

In the meantime package my work slightly better for your requirements https://github.com/adumont/tplink-cloud-api

mirsella commented 2 years ago

@dewhurstwill this project would be perfect except it doesn't support the P100, a issue is open about it on the project page.

dickydoouk commented 2 years ago

It would be ideal if the tp-link cloud api supported passthrough to the smart plug which it may do (Just haven't found out how this is done as yet)