Solving Common Kasa Integration Problems in Home Assistant
The TP-Link Kasa integration is one of the most popular and reliable ways to bring smart plugs, bulbs, and switches into your Home Assistant ecosystem. However, network complexities can sometimes lead to frustrating issues, most commonly the dreaded "unavailable" status. This guide will walk you through the most effective solutions to create a rock-solid Kasa setup in Home Assistant.
## The Root of the Problem: Unstable IP Addresses
The number one cause of Kasa devices becoming unavailable in Home Assistant is a changing IP address.
By default, your router assigns IP addresses to devices on your network dynamically (using DHCP). This means a Kasa smart plug might be 192.168.1.50 today, but after a router reboot, it could be reassigned as 192.168.1.55. When this happens, Home Assistant, which is still looking for the plug at the old address, can no longer find it and marks the device as "unavailable."
## The Permanent Solution: DHCP Reservations or Static IPs
The best way to fix this is to tell your router to always assign the same IP address to each of your Kasa devices. This is known as a DHCP Reservation or assigning a Static IP.
- Find Your Device's MAC Address: Each Kasa device has a unique physical identifier called a MAC address. You can find this in the Kasa app under the device's settings, or on a sticker on the device itself.
- Log In to Your Router: Access your router's administration page by typing its IP address (e.g.,
192.168.1.1or192.168.0.1) into a web browser. - Find the DHCP Reservation Section: This is usually located under "LAN Setup," "Network Settings," or "DHCP Server."
- Create a Reservation: You will see a list of connected devices. Find your Kasa device (using its MAC address or current IP) and create a reservation. You will essentially be linking its unique MAC address to a specific IP address of your choosing (e.g.,
192.168.1.101). - Repeat for All Kasa Devices: It's best practice to do this for every Kasa device you own to prevent future issues.
- Reboot and Re-discover: After setting up reservations, reboot your router and then your Kasa devices. In Home Assistant, you may need to reload the Kasa integration or restart Home Assistant for it to discover the devices at their new, permanent addresses.
## Step 2: Check Network and Firewall Settings
Home Assistant communicates with Kasa devices locally, without needing the internet. This requires direct network access.
- Firewall Rules: Kasa devices use TCP port 9999 for local communication. If you have a firewall on your network (or between VLANs), ensure that your Home Assistant server is allowed to establish connections to your Kasa devices on this port.
- Guest Networks: Do not place your Kasa devices on a "Guest" Wi-Fi network. These networks are typically isolated from your main local network, which will prevent Home Assistant from being able to see or control them. Both Home Assistant and your Kasa devices must be on the same local network.
## Step 3: Enable Local Control on Newer Devices
Some of the very latest Kasa devices or firmware updates have been found to disable local control by default, forcing communication through the cloud. Home Assistant's Kasa integration relies exclusively on this local control.
- Check the Kasa App: Open the official TP-Link Kasa app on your phone.
- Go to the settings for the specific device that is causing problems.
- Look for an option called "Local Control" or "LAN Control".
- If this option exists, make sure it is enabled.
## Step 4: Re-installing the Kasa Integration
If you have assigned static IPs and checked your network settings, but a device is still stubbornly unavailable, you can try removing and re-adding the Kasa integration in Home Assistant.
- Go to Settings > Devices & Services.
- Find the Kasa integration and click the three dots, then select Delete.
- Restart Home Assistant.
- Go back to Devices & Services, click Add Integration, and search for and install the "TP-Link Kasa Smart Home" integration again. This will force a fresh scan of your network and should pick up the devices at their new static IP addresses.
By taking the time to set up DHCP reservations, you can create an exceptionally stable and reliable Kasa experience within Home Assistant, eliminating the most common point of failure.