Skip to main content

Webhook

Webhook

This component allows you to send HTTP requests to a specified URL when an event is dispatched on the server. It can be used to integrate with external services in a flexible way.

Configuration

Configuration example
/config/config.yaml
webhook:
cool_hook:
trigger:
event: camera_one/motion_detected # The event to listen for
condition:
> # Optional condition to filter events, e.g., only trigger if motion is detected
{{ event.motion_detected }}
url: http://example.com/webhook
payload: "Motion detected on {{ event.camera_identifier }}!"
webhookmap required
Webhook component configuration.

Templates

The component supports Jinja2 templates for dynamic content in many of its configuration options, such as url, payload, and condition.

See the templating documentation for more details on how to use templates.

Troubleshooting

To enable debug logging for webhook, add the following to your config.yaml
/config/config.yaml
logger:
logs:
viseron.components.webhook: debug