Problem:You've installed a Unifi AP system and though things were working at one point, they now are not.
Solution:Open port 8080 on your unifi controller.
Other solutions:Make sure the devices can find your DNS server and resolve the controller correctly.
You can SSH into the devices and read their logs.
You can replace the hostname with the hostIP if that's what's failing, or as a test.