Super quick Siri Reminders CalDAV service
I've been migrating my task list to Todoist, which is generally pretty good but lacks a good WatchOS Siri integration. I just want to activate Siri on the watch, say "remind me to ..." and have that show up automatically in my task list.
Siri will add "remind me to..." inputs into the Reminders app. Reminders supports CalDAV accounts as a backing store, so I had the idea that I might be able to write a quick server to intercept these task creations and write back to Todoist. I wanted to validate that idea, and was able to get a proof of concept working in under an hour.
Radicale is an open source CalDAV server, and I found a nice Docker image packaging it. It was simple to get started:
$ docker run -d --name radicale \
-p 5232:5232 \
-v ~/radicale/data:/data \
tomsquest/docker-radicale
Unable to find image 'tomsquest/docker-radicale:latest' locally
latest: Pulling from tomsquest/docker-radicale
bca4290a9639: Pull complete
00368ae188be: Pull complete
05e165f0ef5d: Pull complete
b61f4bd8c6b2: Pull complete
Digest: sha256:b55fe9128b3edec338c9bddfcca539de0c2becade2261866ee45713e47717792
Status: Downloaded newer image for tomsquest/docker-radicale:latest
92a965b1abc99eff22266a50560545081152bfc80598d44275a635a3f92f64dc
Then I ran an ngrok tunnel to expose this to the internet.
$ ngrok http://localhost:5232
K8s Gateway API support available now: https://ngrok.com/r/k8sgb
Session Status online
Account Arne Roomann-Kurrik (Plan: Free)
Update update available (version 3.11.0, Ctrl-U to update)
Version 3.10.1
Region United States (California) (us-cal-1)
Web Interface http://127.0.0.1:4040
Forwarding https://random-ngrok-id-here.ngrok-free.app -> http://localhost:5232
Connections ttl opn rt1 rt5 p50 p90
0 0 0.00 0.00 0.00 0.00
Then I added the https://random-ngrok-id-here.ngrok-free.app
URL as an Account in the iOS Reminders app settings. By default the Radicale image accepts any username / password, so I used "test/test". Then I updated the Reminders "Default list" setting to refer to the account I just added.
Once set up, I was able to say "hey Siri, remind me to write a blog post" and my device called out to the CalDAV service. I was able to see the requests in ngrok.
HTTP Requests
-------------
REPORT /test/A205915C-890C-4502-9078-2A53351F6DAF/ 207 Multi-Status
PROPFIND /test/ 207 Multi-Status
PUT /test/A205915C-890C-4502-9078-2A53351F6DAF/72BEA31B-FEC1-47AE-AF6B-998F56084B7F.ics 201 Created
PROPFIND /test/ 207 Multi-Status
GET /test/A205915C-890C-4502-9078-2A53351F6DAF/ 200 OK
PROPFIND /test/ 207 Multi-Status
PROPFIND / 207 Multi-Status
Radicale serves a debug web UI at the exposed URL. Logging in with "test/test" I was able to see the calendar which had been created, and also download an .ics
file which contained the following:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//PYVOBJECT//NONSGML Version 1//EN
X-WR-CALNAME;VALUE=TEXT:DEFAULT_TASK_CALENDAR_NAME
BEGIN:VTODO
CREATED:20240614T013341Z
DTSTAMP:20240614T013347Z
LAST-MODIFIED:20240614T013341Z
STATUS:NEEDS-ACTION
SUMMARY:Write a blog post
UID:8485B007-409F-4A51-AF12-17401F3B076D
END:VTODO
END:VCALENDAR
This seems like a really promising way to quickly get data from my WatchOS Siri into Todoist (or anywhere else, really).