Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

I am trying to control my devices with a custom voice assistant that will run on an external server. Is there a way to discover devices or connect them when not on the same network?

Thank you.

You must be logged in to vote

Replies: 3 comments · 3 replies

Comment options

Yes, it is possible. The older devices use 9999/udp for discovery and 9999/tcp for communications. For newer devices that require authentication, the discovery port is 20002/udp with communications done via 80/tcp.
If you don't need discovery, you can pass the parameters for both protocols manually.

You didn't mention if you are planning to use the API or the cli tool, but for API access you can use SmartDevice.connect() and pass DeviceConfig with the wanted parameters.

You must be logged in to vote
0 replies
Comment options

Thank you for the information. However, I am looking for a solution that does not involve port forwarding. The Kasa app can control the devices from anywhere without port forwarding, so there must be a way to achieve this via an API. Is there a method to connect to and control the devices over a different network without relying on port forwarding? @rytilahti

Thank you.

You must be logged in to vote
1 reply
@rytilahti
Comment options

I think there are some libraries on GitHub that implement communications over the tplink cloud, but I'm not familiar with those so I cannot really help here, sorry!

Comment options

@sooswastaken Heyyy, did you manage to find any solutions?

You must be logged in to vote
2 replies
@sooswastaken
Comment options

Hello, I don't remember off the top of my head, but you could try the tplink-cloud-api library.

@A-M-Alizadeh
Comment options

Thank you very much! I'll take a look into that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #914 on May 14, 2024 13:53.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.