I cannot seem to get the tp-link Kasa integration to find the HS200 switch I have on my network and connect to it. I’ve tried many times and wonder if it’s either something to do with the fact that I run my HA instance behind a remote URL or something to do with the fact I cannot find the IP address of the device on my network? I don’t know what to put in the “Host” field and leaving it empty tries to search for devices but can’t find anything. Does anyone have any direction on this or had success connecting the HS200 switch?
Do you mean it’s not discovered by HA or that it’s not seen as a device by your router. If the latter, start by finding out why the device cannot be seen. Has it been initiated? Has it connected to a wifi AP?
Through the Kasa app on your phone?
Whatever does this mean? If the switch is on the same IP as your Home Assistant, this shouldn’t matter.
Ideally, the IP address of the device on your network. Your device name plus .local might work. (myswitch.local for example).
You could try something as simple as ping myswitch.local
.
The Kasa phone app will give you the MAC address of your device, but for some strange reason, not the IP address. You can install Advanced IP Scanner and scan your network. You can sort by name and look for the host name you gave the switch, or failing that, sort on the MAC address and find the device IP using the MAC address the phone app gives you.
It’s not discovered by HA. But when I go into the DHCP table on my router and attempt to give the switch static IP for instance the switch does not show up as a device connected to my network. It works in the Kasa app so it’s definitely on the network
By remote URL I mean that I setup a duckdns.org domain to access my HA through so I wasn’t sure if that could have anything to do with why it can’t connect since I’m using duckdns and not a local IP address to access HA
I will try the IP scanner tool, I was having trouble finding the IP with normal ARP or other command line tools but since I have the mac address from the app hopefully that can help me find the IP
Seems odd! It should show up on you router. In the Kasa app, look and see which wifi the device is connected to. Perhaps it’s not configured correctly and is connecting to the Kasa app via its own wifi rather than the intended wifi.
Kasa connects through the cloud. That doesn’t mean the IP is right.
It only does that on setup for a second…
I have never had issue with any of my 30+ kasa switches/devices being discovered. I’d guess a networking issue. (nothnig to do with your duckdns domain btw.)
btw, you can verify its a kasa switch by telneting to the port 9999 and making sure it connects.
success:
$- telnet 10.100.1.101 9999
Trying 10.100.1.101...
Connected to 10.100.1.101.
Escape character is '^]'.
^]
telnet> q
Connection closed.
Doesn’t help if the OP doesn’t know the IP4 of the Kasa device.
Eureka! (I think).
The Kasa HS200 works on 2.4GHz and 5GHz. I’ll bet that the Kasa app on your phone defaulted to the 5GHz WiFi. If your DHCP range for the 5GHz WiFi in the router doesn’t have available IPV4 addresses, then all you can see is the IPV6 address.
Yes it does help. That’s exactly why I said it. When he scans, he can look for that open port. He can use nmap or any other one and VERIFY that is the kasa switch that way.
lol what? the ghz has nothing to do with the pool of IP addresses nor DHCP in general. They connect to the same network. Its just a different band lol. and the HS200 or any Kasa swtich does NOT connect on 5GHz.
I misread the info from TP-Link:
except for KC200 and KC120 which support both 2.4GHz and 5GHz band, all of the other smart devices support only 2.4GHz Wi-Fi bands.
I was looking for the HS200 and didn’t noticew that the search found KC200.
Sure but even if they did connect to 5GHz… That has nothing to do with the pool of DHCP addresses nor IPv4/ipv6.
I have nothing on 5GHz here, but I was under the impression that the 2.4GHz and 5GHz have different IP ranges. Wrong again.
It is odd that the OP can control the switch through the app on the phone, but that he can’t find the IPV4 address.
The app controls it through the cloud. So that isn’t odd really. It has an IP somewhere because the cloud can talk to it. He likely has a network issue on discovering it. or a misconfiguration (zeroconf or similar in HA) not allowing it to find it.
He should just be able to scan for the mac address and find the IP. Then scan directly.
@jordanr Do you have ‘default_config:’ specified in your configuration.yaml? or have you customized what loads?
That’s what I suggested using Advanced IP Scanner for.
Sure it should, but did it! I had one stay on the switch wifi. Was an error on my part. Didn’t follow config steps in the correct order.
Yes, I have default_config
at the top of the configuration.yaml
Running the Advanced IP Scanner still is not showing anything matching the mac address shown in the app. For what it may be worth, my 5ghz and 2.4ghz networks are named the same. I was under the impression this was an okay practice since most things will just connect to the band they want and ignore the other band