Skip to content

Events, Webhooks & MQTT Configuration Reference ​

The events, webhooks, and mqtt blocks in config.yaml configure real-time notification dispatching and IoT broker publishing.


1. Events & Notifications Configuration Block ​

yaml
# Outbound Webhooks Configuration
webhooks:
  enabled: true
  endpoints:
    - url: "https://api.example.com/v1/ruseon-webhook"
      secret: "replace_with_webhook_hmac_secret_key"
      events:
        - "camera.online"
        - "camera.offline"
        - "recording.segment_closed"
        - "ai.detection"
      timeout: "5s"
      max_retries: 3
      circuit_breaker:
        failure_threshold: 5
        cooldown_period: "60s"

# MQTT Telemetry Publisher Configuration
mqtt:
  enabled: true
  broker: "tcp://broker.emqx.io:1883"
  client_id: "ruseon_server_prod"
  topic_prefix: "ruseon"
  username: "mqtt_user"
  password: "mqtt_password"
  qos: 1
  retain_status: true
  queue_capacity: 5000
  tls:
    enabled: false
    ca_file: "/etc/ruseon/certs/ca.crt"
    cert_file: "/etc/ruseon/certs/client.crt"
    key_file: "/etc/ruseon/certs/client.key"

2. Webhook & MQTT Parameter Table ​

ParameterTypeDefaultDescription
webhooks.enabledbooleanfalseEnable outbound HTTP POST webhook notifications
webhooks.endpoints[].urlstringRequiredDestination HTTP/HTTPS endpoint URL
webhooks.endpoints[].secretstring""Pre-shared key for X-Ruseon-Signature HMAC-SHA256
webhooks.endpoints[].circuit_breakerobject—Automatic failure isolation to prevent worker blocking
mqtt.enabledbooleanfalseEnable MQTT 3.1.1 / 5.0 telemetry broadcasting
mqtt.brokerstring""Broker connection URI (tcp://... or ssl://...)
mqtt.qosinteger1Quality of Service delivery level (0, 1, 2)

Released under the MIT License.