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 have a Tapo TP15. It works great with the Tapo app on my phone as well as Google Home. I installed python-kasa into a Python environment (Conda) on my laptop. The version installed is 0.7.7.

With the Conda environment active (but not running Python), at the command line I cannot get kasa discover to work. It never finds my outlet. 0 devices found is always what it says. I tried specifying the --username and --password options, but I get this:
Error: No such option: --username

I was able to turn on the device using the following command:
kasa --host 10.x.x.x on

This turned on the device, but any subsequent commands, like turning it off, fail with the following error:
ERROR:kasa.discover:Got error: [WinError 1234] No service is operating at the destination network endpoint on the remote system

Now I cannot even turn the outlet on. It responds just fine from my phone app but nothing works on my laptop.

Searching for help on this in Google is absolutely useless (as usual). Even trying Reddit yields absolutely no help at all. Killing all Python processes on my laptop does nothing. It won't even turn the outlet on any longer.

I could use some advice on how to overcome this.

You must be logged in to vote

Replies: 1 comment · 2 replies

Comment options

If you have multiple network adapters, you need to use --target to define the network. For example, if the device is in 10.100.100.0/24 network, you need to use kasa --target 10.100.100.255 discover to make it work.

For direct commands, did you put the username and the password for the main command? Something like kasa --host 10.100.100.100 --username <email address> --password <password>?

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

I did try using my username and password. I even set them as environment variables. Specifying them makes no difference. Setting them as environment variables makes no difference.

ERROR:kasa.discover:Got error: [WinError 1234] No service is operating at the destination network endpoint on the remote system
Raised error: Timed out getting discovery response for 10.0.0.44

I tried using the kasa --target with the network mask other than 255.255.255.255 for discovery, and it still finds 0 devices. I thought maybe there's some timeout going on, so I tried specifying the --discovery-timeout as something other than 10 seconds, but it still only tries for 10 seconds. So, I tried --timeout of 20 seconds. Nothing I provide at the command line seems to work.

In a script, using very rudimentary examples from the python-kasa documentation, I get the same WinError.

@rytilahti
Comment options

So this error is coming from your operating system. I cannot help much here, as I don't know much about the inner workings of windows' network layer. You could try to Google that error code and find out what it means.

The discovery just tries to send regular udp packets on a broadcast address, and it's known to work on other windows systems. So this is unlikely a problem in this library, but rather a problem in your network or operating system setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.