Home Assistant¶
Overview¶
Home Assistant can receive Shoutrrr notifications in two ways.
Use the dedicated homeassistant service to create persistent notifications or call notify actions through the REST API with a long-lived access token.
Use a webhook URL only when an automation should run from an unauthenticated POST to /api/webhook/<webhook_id>.
REST notifications¶
Create a long-lived access token in your Home Assistant profile, then send to the REST API. Replace the following:
LONG_LIVED_TOKEN: the long-lived access tokenHOST: the host name or IP address of your Home Assistant instance
homeassistant://LONG_LIVED_TOKEN@HOST
homeassistant://LONG_LIVED_TOKEN@HOST:8123/?disabletls=yes
Example
shoutrrr send --url "homeassistant://[email protected]:8123/?disabletls=yes&title=Update" --message "Hello, Home Assistant!"
Notification sent
Reuse nid when later messages should replace the same persistent notification instead of stacking.
homeassistant://[email protected]:8123/?disabletls=yes&nid=watchtower
Call a notify action such as a companion-app notifier with service:
homeassistant://[email protected]?service=notify.mobile_app_phone
Webhook trigger¶
Configure a webhook trigger in Home Assistant, then POST JSON to /api/webhook/WEBHOOK_ID.
Replace the following:
HOST: the host name or IP address of your Home Assistant instancePORT: the port Home Assistant listens on, usually8123WEBHOOK_ID: the ID of the webhook trigger
In the automation, read the message from {{ trigger.json.message }}.
generic://HOST:PORT/api/webhook/WEBHOOK_ID?template=json
generic://HOST:PORT/api/webhook/WEBHOOK_ID?template=json&disabletls=yes
Example
shoutrrr send --url "generic://192.0.2.10:8123/api/webhook/WEBHOOK_ID?template=json&disabletls=yes" --message "Hello, Home Assistant!"
Notification sent
Note
Webhook IDs are unauthenticated. Treat them like passwords and keep local_only enabled unless internet access is required.