If your Unifi device (USG, Switch, WAP, etc.) is on a remote network from your controller, you'll need to manually point that device at the controller.
1. Login to the Unifi device via SSH
ssh ubnt@172.16.34.78
2. Once logged in, use the set-inform command to point the device at the controller. (Can use IP or hostname)
set-inform http://10.1.0.4:8080/inform
In most cases, using the set-inform works for pointing a UniFi device at the Network Controller when its IP has changed. However, I've seen instances where the UniFi device will connect via the new Controller IP but the change doesn't persist a device reboot. Try this instead, or in addition to set-inform
SSH into the UniFi device and view the current mgmt config file. You'll likely see the IP/Hostname of the old Controller IP in the mgmt.servers.1.url, stun_url, and mgmt_url variables.
cat cfg/mgmt
Don't modify this file directly, it won't persist a reboot.
Modify /etc/persistent/cfg/mgmt with the correct Controller IP.
mgmt.servers.1.url=http://<new-ip>:8080/inform
stun_url=stun://<new-ip>/
mgmt_url=https://<new-ip>:8443/manage/site/default
Run the save command to apply your new config.
save
Test rebooting the UniFi device to ensure the new config works correctly.