Skip to content

restart_device

Restart an adopted UniFi device (gateway, AP, or switch).

Side effects:

  • Issues a soft reboot. The device is unreachable for ~60 seconds.
  • Wireless clients on a restarted AP will be disconnected and must re-associate.
  • Restarting a gateway interrupts WAN/LAN traffic for the duration of the reboot.
  • Mutates controller state. Use dry_run=True to preview the change without applying.
restart_device(mac="aa:bb:cc:00:00:01")
ParameterTypeRequiredDefaultDescription
macstringyesDevice MAC address (from list_devices).
controllerstringno”default”Name of the UniFi controller to target. Defaults to "default".
dry_runbooleannofalsePreview the change without applying it. Returns the predicted change set.