My smart home lagged for weeks — the culprit was DNS, not Wi-Fi or hardware

Building a smart home is fun, but maintaining one turned out to be an ongoing project. For weeks, my smart lights took a couple of seconds to turn on when triggered by a routine. Other devices either didn't fire or took a long time to respond. On checking Home Assistant, I saw the spinning refresh icon going on for a while. Voice commands registered after a delay.
None of those things were disastrous. It was the annoying low-grade lag that made me distrust a system I'd built to feel quick. Over time, the sluggish, unresponsive behavior of some devices got the better of me, and I couldn't figure out why. I had three separate working theories before I found the actual cause. To my surprise, DNS wasn't even on my initial suspect list.
I blamed the coverage due to my dual router setup at first. I repurposed my old ASUS RT-AC66U router as a second router functioning as an access point dedicated to smart home devices. It's a few feet away from my main router (ASUS RT-AX88U), and I power-cycled both routers as a troubleshooting measure. I moved my Raspberry Pi 4, which was running Home Assistant at the time, closer to the second router to ensure better connectivity for all devices.
My theory rested on the old router being a weaker access point, which added latency to every request from smart home devices. Even after that, the signal strength was fine everywhere I tested, and the delay was present for devices closer to the main router and those in the far bedroom. A frustrating evening of restarting routers and moving the second one around helped reveal that coverage wasn't the issue.
Next, I suspected the Raspberry Pi was simply too weak to handle Home Assistant plus all the integrations. I migrated the whole setup to a mini PC with a much faster processor. That migration took time, but the lag persisted exactly as before. I then thought my Wi-Fi extender might be causing conflicts, so I unplugged it. Still no improvement.
The real culprit turned out to be DNS. I had been running Pi-hole as a local DNS server, and it lived on the same Raspberry Pi that was already running Home Assistant. When the load grew, DNS queries were processed with a delay, and every request from a smart device to the cloud or a local service had to pass through that node. The fix was simple: move Pi-hole to a separate device or switch to a fast external DNS. After that, response times became instant.
I had three theories before finding the actual cause, and DNS wasn't even on my initial suspect list. That's why the diagnosis took so long. If your smart home feels slow and you've already ruled out Wi-Fi and hardware, check your local DNS server — it might be the bottleneck you never considered.


