August 21st, 2013
I am so happy right now I could actually bounce: with many thanks to the caldav-sync author Marten Gajda, I finally figured out what was wrong with my OwnCloud instance’s CalDAV support.
I very briefly had a working CalDAV setup before – I could sync my desktop, laptop and phone and it all worked. It was great. Then I tried OC 5.0 and it kinda stopped working right. Then I dropped down to OC 4.x again and my PCs mostly still seemed to work, but I could no longer set up sync with an Android client. At all. Also, adding the OC account via GNOME’s ‘Online Accounts’ didn’t add its CalDAV stuff to Evolution, though I could do it manually.
After lots of back and forth with Marten we found out a newly created account on my server worked fine – it was just my account that didn’t. Grr.
Finally, a wireshark capture of an attempt to register via caldav-sync as me bore fruit: somehow, the server was sending the wrong component type when telling caldav-sync what sort of stuff it supports. It should send something like “VEVENT,VTODO”, but it was sending the string “Default calendar”, which makes no sense at all.
After a bit of poking I found this is set as a property of each calendar in the OwnCloud database, in the table oc_calendar_calendars as the “components” column. A simple:
UPDATE oc_calendar_calendars SET components=”VEVENT,VTODO,VJOURNAL”;
was all it took to fix it, and suddenly my Android devices can get my calendars again, setting up the OC account via GNOME makes its calendars instantly pop up in Evolution, birds sing in the trees, and all is right with the world.
I also noticed that both my Android devices and Evolution can actually sync tasks with the OC server via CalDAV too, so I’m using that. I have my todo list in Evo on my PCs and as a neat widget on one of the home screens of my Android devices. I can categorize todo items and check ‘em off from anywhere, and it’s awesome. I was using mytinytodo before, but this is way better, as I don’t have to fiddle with signing into a web interface on my phone. Ahh, glorious.
Now, if only it’ll all hold together for longer this time…