Webhook
The Diagral cloud supports sending webhooks to your Home Assistant to receive real-time alerts, anomalies, or state changes. Notifications are transmitted per system, and each system can have only one webhook subscription.
This means that in addition to the regular refresh interval, a refresh can also be triggered upon receiving a webhook of these type :
STATUS
: Status change (Armed, Disarmed, etc...)ALERT
: Alert is triggered like Intrusion or Silent Panic AlarmANOMALY
: A new anomaly is triggered
Home Assistant URL
To benefit from webhooks, you need a Home Assistant instance that is accessible from the Internet over HTTPS
.

The integration can use the connection through Home Assistant Cloud.
However, if you have both an external access and a Home Assistant Cloud subscription, priority will be given to external access.
Implementation
You don't have to do anything to implement webhooks. As long as you meet the aforementioned conditions, webhooks will be automatically set up when the integration starts. You can confirm this by checking the "INFO" logs in Home Assistant
2024-03-15 09:42:13.627 INFO (MainThread) [custom_components.diagral] Webhook successfully created for HomeSystem (27458196034A82) on : https://my-homeassistant.example.com/api/webhook/5af9c3d1e8b7246f0a9c5d8e2b1f4a7c3d6e9b8a2f5c8d7e4b1a9f6c3d2e5b8
2025-02-26 16:29:00.458 INFO (MainThread) [custom_components.diagral] Webhook successfully registered for HomeSystem (27458196034A82)
In case of any error, it will also be indicated in the Home Assistant logs.
In case of error, you can try to restart the integration or use the actions diagral.unregister_webhook and diagral.register_webhook to force webhooks to reconfigure.
Existing subscription
If a webhook subscription already exists for this installation (system ID) on a URL different from your Home Assistant's external URL, the integration will force the webhook URL to update
.
This can happen in various cases such as:
- Using Diagral Webhook with systems other than this Home Assistant integration
- A change in your external URL on your Home Assistant
- After disabling Home Assistant Cloud to use direct external access or another access solution
- etc...
This scenario will trigger a warning message in your Home Assistant logs.