How do network events reach Home Assistant? Through Ubiquiti's Alarm Manager, in UniFi Network 9.3 and later, where each alarm pairs a trigger with an action. One action is a webhook, a GET or POST to any URL, which a Home Assistant webhook trigger receives at /api/webhook/ plus the ID you choose.
Entities tell you a state. Alarms, however, tell you an event happened, and Ubiquiti's Alarm Manager article lists the triggers a network owner cares about.
Its categories span the whole console, and four of them matter here:
- Internet. WAN offline, latency spikes, packet loss and data limits reached.
- Power. PoE issues and power loss.
- Security. Threat detections, honeypot hits and firewall blocks.
- System. Device adoption, VPN disconnects, port errors and admin configuration changes.
The Home Assistant side is a single trigger. A webhook automation listens on an endpoint you name, and its documentation notes that webhook triggers accept requests only from devices on the same network by default.
That is where your gateway sits, so the default usually needs no change, though it is worth testing once when the gateway and the host are on different VLANs.
The default is a feature rather than an obstacle. The gateway posts from inside the house, and the payload arrives in the automation as form data or JSON.
Note what Home Assistant asks of webhooks in return. Its documentation says endpoints carry no authentication beyond knowing a valid ID, so treat that ID like a password, generate your own rather than copying one, and leave the local-only option enabled.
It also says not to trigger destructive or safety-related automations from a webhook, giving locks and garage doors as the examples. That is why the alarms here end in notifications, while the port-cycling above is triggered by an entity Home Assistant owns.
Naturally, you can narrow it further. The trigger takes an allowed-methods list, so an endpoint that only ever receives a POST can refuse everything else.