I just ran into this last night with a couple of my HomePods, and it was driving me insane, too. Tried all the troubleshooting stuff people were running through, but ended up in a bind when three of my problematic HomePod Minis were left in a useless state after multiple full factory restores. A couple other posters mentioned restarting their Wi-Fi routers, and one specifically mentioned having Eero (which I do, too), but I don't know how much Eero is the culprit as opposed to just a combination of things.
On a regular basis, I run into "Hmm...I'm having trouble connecting to the internet" messages on my HomePods that don't get used as often, and I think the crux of the issue is Apple security and network related.
When these seldom-used HomePods get activated, they're calling back up to Apple with IP addresses that my network still associates with those devices. Unfortunately, they've already been released to another device somewhere else. So, this device can't get online and Apple won't allow it to activate because it's viewed as some kind of IP spoofing situation.
I can't confirm this 100% because my network admin portal typically just shows most devices as "Unnamed Device" so it's a bit hard to track down confirmation, but that's at my working theory on the "what's causing this to happen?"
But what did I do to fix this?
I'm not sure that the order matters, but I did it like this to be safe...
- Did a full restore of my HomePod Mini. (Mine was bricked, so normal resetting wasn't working). Left unplugged.
- Deleted record of previously associated Room these HomePods were assigned to (Don't know if this eventually mattered, but I got them setup finally).
- Quit out of Home.app on my iOS device.
- Restarted iOS Device.
- Restarted my home network. If possible, I'd recommend doing this through whatever admin app you have to ensure the flushing of any old caches that their restarts should be doing, but if your home network doesn't have something easily accessible, a hard reset should work.
- Once home network is successfully back online, plug in HomePod(s) and go through device setup.
I'd say steps 2-4 are optional, but they won't take very long, so it won't hurt. And it could just be that a simple restart of your network could resolve this, but I didn't want to waste more time incase there was something cached either within the Home.app on my device or within the memory on the HomePod, so I did it this way.
Like I mentioned above, any of us who have HomePods that are used sparingly are going to run into some weird network related things. Many can resolve themselves with simple reboots of the device or your network, or even giving it time, but we have these devices to use them. But the best option is keep using them to ensure stuff like this doesn't keep happening. Sorry for the novel, but hope this helps someone.