asteroid icon indicating copy to clipboard operation
asteroid copied to clipboard

[Feature Request] Support calendar import via file or wifi

Open beroset opened this issue 2 years ago • 0 comments

There is no working synchronization client for either iPhone or Linux that support the synchronization of calendar data. Since those are the devices I own, it makes the calendar nearly useless to me. But anyway, who needs a phone? Consistent with the philosophy of AsteroidOS, what if the watch could do this on its own?

Calendar import via file or WiFi The nemo-qml-plugin-calendar code includes a utility called icalconverter that is already installed on the watch. It is capable of importing .ics files directly into the database used by the asteroid-calendar application. Combining this with wget (also already installed on the watch) in a shell script allows an internet-connected watch to fetch, convert and populate the database so that the user can see appointments on the asteroid-calendar application without having to rely on tethering with a phone.

Additional context Using my own Microsoft office365 calendar, I was able to change a setting to "publish" my calendar as an .ics file with a https: url. From my computer, I used wget -O office.ics https://outlook.office365.com/owa/calendar/<other stuff>/calendar.ics. I was then able to copy the file to my watch using scp office.ics ceres@watch (where watch is set up as an alias for the watch's IP address).

With the office.ics file on the watch, I did an import with icalconverter import office.ics -d. The -d suffix tells the watch to delete the entire current calendar, so use with care! While the import worked and I could see the appointments on my watch, I found a few problems. The first was a month off-by-one error which is now fixed.

The next problem was that the watch did not properly handle the imported meeting times (they were all off by several hours) because:

  1. the watch does not yet have https://github.com/AsteroidOS/asteroid-launcher/issues/35
  2. the icalconverter code was not correctly handling importing and interpreting time zones

For the first issue, setting the appropriate time zone using timedatectl on the command line on the watch seemed to work, but it would be convenient to have a GUI setting screen for setting the timezone, or perhaps GPS-enabled watches could automatically infer it.

For the second issue, experiments have shown that updating nemo-qml-plugin-calendar resolves most of the issues. This required several updates:

  • [x] https://github.com/AsteroidOS/meta-asteroid/pull/105
  • [x] https://github.com/AsteroidOS/meta-asteroid/pull/106
  • [ ] update mkcal which requires:
    • [x] https://github.com/AsteroidOS/meta-asteroid/pull/107
    • [ ] remove obsolete kcalcore
    • [ ] update nemo-qml-plugin-calendar
    • [ ] update asteroid-calendar

With these applied, the calendar entries are shown on the watch at the right times and on the right days, but there seem to be some remaining problems with recurring events that still need resolution.

beroset avatar Jul 27 '22 17:07 beroset