I am a pretty new Vikunja user, and I thought I would share details on how I configured self-hosted Vikunja to integrate with Home Assistant via webhooks to send push notifications for events like reminders and overdue notifications to your phone. I haven’t seen this option for getting push notifications discussed before so thought I would share.
It’s really pretty simple, but there are a couple gotchas so I wrote it up as a blog. But basically:
- Create a webhook automation in Home Assistant that sends a push notification
- Add webhooks in Vikunja
- Be notified!
The automation in HA looks like this. This creates a webhook at http://172.16.2.100:8123/api/webhook/vikunja_reminder(assuming your HA instance is at 172.16.2.100)
- id: vikunja-reminder-notification
alias: Vikunja reminder notification
triggers:
- trigger: webhook
webhook_id: vikunja_reminder
allowed_methods:
- POST
local_only: false
conditions: []
actions:
# replace with your device's notify service
- action: notify.mobile_app_pixel_10
data:
title:
"{{ trigger.json.event_name | default('Task reminder') | replace('task.', '') | replace('tasks.', '') |
replace('_', ' ') | title }}"
message:
"{{ trigger.json.data.task.title | default(trigger.json.data.tasks | map(attribute='title') | join(', ') |
default('Task event')) }}"
mode: single
In your Vikuja instance you need to configure VIKUNJA_OUTGOINGREQUESTS_ALLOWNONROUTABLEIPS: 'true' - otherwise webhook requests to nonroutable IPs will be dropped.
You need to configure the action with the entity ID for your phone. Then just add that URL as a webhook in Vikunja.
That’s about it! Hope this is useful to others.