AsteroidOS / asteroid-calendar

Default calendar app for AsteroidOS
GNU General Public License v3.0
6 stars 6 forks source link

Calendar reminders can't be dismissed #20

Closed beroset closed 1 year ago

beroset commented 1 year ago

Now that the import of calendar is working, when an appointment comes up, I get a rather uninformative alert: image

Dismissing it does not seem to have an effect, so it keeps popping up alerts until the battery drains completely.

This occurs when the imported VEVENT contains a VALARM like this:

BEGIN:VALARM
TRIGGER:-PT15M
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM

The icalconverter software comes from nemo-qml-plugin-calendar which uses kcalendarcore. Within that, there is alarm.cpp and alarm.h that appear to be responsible for handling this, but it's not clear to me how the linkage is made between that and our alarm presenter, which is part of https://github.com/AsteroidOS/asteroid-alarmclock

beroset commented 1 year ago

I have figured out a way to trigger this at will and log the resulting D-Bus traffic. The attached ics file has a single appointment in it with a start time of America/New_York:20230128T074600 and a VALARM set with TRIGGER:-PT1M, or in other words, an alarm for one minute before the event. The script below is run on the host computer with watch being whatever the watch's IP address is (192.168.2.15 if USB).

This sets the time zone and time, imports the calendar (deleting any existing one), and then advances the time to 5 seconds before the reminder alarm. It then starts a D-Bus monitor of all traffic which can be redirected to a file. I still don't know why this doesn't work, however, so the next step is probably to observe an alarm clock alarm and see how it differs.

#!/bin/bash
ssh root@watch 'timedatectl set-timezone America/New_York'
ssh root@watch 'timedatectl set-time "2023-01-20 07:44:39"'
ssh ceres@watch "icalconverter import -d dummy.ics"
ssh root@watch 'timedatectl set-time "2023-01-28 07:44:55"'
ssh root@watch busctl monitor

dummy.ics

fds2610 commented 1 year ago

Is there a workaround to disable cal reminders completely ?

beroset commented 1 year ago

No, there's no workaround on the watch yet. One alternative might be to remove all of the VALARM entries from your calendar before importing the data.

beroset commented 1 year ago

Fixed a typo in that last commmit.