Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for alarms #132

Open
tobixen opened this issue Jan 23, 2021 · 5 comments
Open

Support for alarms #132

tobixen opened this issue Jan 23, 2021 · 5 comments
Milestone

Comments

@tobixen
Copy link
Member

tobixen commented Jan 23, 2021

The processing of alarms as described in https://tools.ietf.org/html/rfc4791#section-8.6 is outside the scope of the caldav library, possibly with the exception of sending emails. Anyway, the library should support methods for alarm discovery.

@tobixen tobixen added this to the v0.9 milestone Jan 23, 2021
@newhinton
Copy link

will this include setting new alarms?

@tobixen
Copy link
Member Author

tobixen commented Oct 21, 2021

Setting new alarms is possible through the library today. It's part of the icalendar data sent to the server, generation of this data is outside the scope of the caldav library.

@tobixen tobixen modified the milestones: v0.9, v.0.10 Mar 2, 2022
@tobixen
Copy link
Member Author

tobixen commented Oct 23, 2022

generation of this data is outside the scope of the caldav library.

I have reconsidered this a bit.

So, to fully support alarms, I think we may need to support ...

Adding alarms

It's always possible to add alarms by editing the raw icalendar, or editing it via the vobject_instance or icalendar_instance properties. However, recently we've started adding multiple "high level" convenience methods and parameters for editing and generating icalendar code, so we may as well add explicit support for alarms. So it's needed with:

  • The possibility to add simple alarms through parameters to the save_*-methods.
  • Possibility to add simple alarms to an existing Event/Todo-object

Finding alarms

  • The search-method (introduced in the upcoming v0.10 version) should be fixed to allow searching for alarms by a time range search
  • The calendar object should have a method find_upcoming_alarm(after=now, cnt=1) for finding upcoming alarm(s).

Processing alarms

The RFC defines four kind of alarm actions, it's sound, display, email and procedure. This library is definitively not going to play and sounds or display something for the end user. This library could theoretically send emails or launch procedures. However, since this library does not have any kind of event loop or other means of getting the timing correct, I feel that all kind of processing is out of the scope for this library and should be taken care of by the caller.

tobixen added a commit that referenced this issue Oct 24, 2022
@tobixen
Copy link
Member Author

tobixen commented Oct 24, 2022

  • Adding of alarms (without having to hand-craft the icalendar data) is supported in WiP: Support for alarms #221
  • Searching for events/todos based on alarm time is supported in WiP: Support for alarms #221, but not tested
  • Searching for "upcoming alarms" not supported yet, procrastinating it

If anyone has a great needs for alarms, I will prioritize this and get it merged, testing it towards a calendar server that supports searching for alarms. It seems like neither radicale nor xandikos supports searching for alarms yet, and those two are my primary test servers.

@tobixen tobixen modified the milestones: v.0.10, v.0.11 Oct 24, 2022
tobixen added a commit that referenced this issue Nov 30, 2022
tobixen added a commit that referenced this issue Nov 30, 2022
tobixen added a commit that referenced this issue Nov 30, 2022
tobixen added a commit that referenced this issue Nov 30, 2022
@tobixen
Copy link
Member Author

tobixen commented Mar 4, 2024

So I basically wrote some code (but no documentation) for adding alarms easily to new events long long time ago, but got busy with other things. I will try to prioritize to get it merged in, problem is that I have no idea when I will get time to do any work towards the caldav library next time. Perhaps tomorrow, perhaps next week, perhaps next month ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants