Events

When Diagral integration receive webhooks from the Diagral Cloud, all Webhook received are propagated to Home Assistant Event and can be monitor with the event type DIAGRAL_EVENT.

HA DevTool Events
Example of Event
yaml
event_type: DIAGRAL_EVENT
data:
  type: STATUS // [!code highlight]
  data:
    transmitter_id: 1234567890ABCD // [!code highlight]
    alarm_code: "3401"
    alarm_description: LOCAL-ARMING-OF-GROUP // [!code highlight]
    group_index: NIGHT_MODE_GROUP_CODE // [!code highlight]
    detail:
      device_type: null // [!code highlight]
      device_index: null // [!code highlight]
      device_label: null // [!code highlight]
    user:
      username: HereMyName // [!code highlight]
      user_type: owner // [!code highlight]
    date_time: "2025-02-25T17:59:58.008154+00:00"
origin: LOCAL
time_fired: "2025-02-25T17:59:59.359763+00:00"
context:
  id: 01JMZ480KZPV5J7M1FX2QQWT47
  parent_id: null
  user_id: null

The information provided by the received webhook is located in the data key.

The type can be:

  • STATUS
  • ALERT
  • ANOMALY
  • UNKNOWN (If you encounter this issue, please open a GitHub issue and provide all relevant event details for further investigation)

Additional fields include:

  • transmitter_id: ID of the device that triggered the event
  • alarm_code: Alarm code defined internally by Diagral
  • alarm_description: Description of the alarm_code provided by Diagral
  • group_index: Group ID or specific group (e.g., NIGHT_MODE_GROUP_CODE) affected by the action that triggered the event
  • details:
    • device_type: Type of device (e.g., CAMERA, CENTRAL, COMMAND, SENSOR, SIREN, TRANSCEIVER, TRANSMITTER)
    • device_index: Sensor ID (empty if device_type is CENTRAL)
    • date_time: Datetime when the event was emitted by Diagral
  • user:
    • username: The full name of the user who initiated the event (if it was triggered by a user action)
    • user_type: Type of user
  • date_time: Date and time when the event was initiated by Diagral

On this page