A MagicMirror² module that parses a Google Calendar iCal feed for events tagged with [A], [M], or [A&M] in the title and displays upcoming days off grouped by person.
Unlike the built-in calendar module, MMM-DaysOff performs tag-based parsing so you can track days off for specific people from a single shared calendar.
- Navigate to your MagicMirror modules directory:
cd ~/MagicMirror/modules- Clone this repository:
git clone https://github.com/MatthewNewsum/MMM-DaysOff.gitNo npm install is required -- this module has no external dependencies.
Add the following to the modules array in your config/config.js file:
{
module: "MMM-DaysOff",
position: "top_left",
config: {
icalUrl: "https://calendar.google.com/calendar/ical/YOUR_CALENDAR_ID/public/basic.ics",
tags: ["A", "M", "A&M"],
maxEvents: 10,
header: "DAYS OFF",
dateFormat: { month: "short", day: "numeric" },
updateInterval: 3600000
}
}| Option | Description | Default |
|---|---|---|
icalUrl |
Required. URL of your Google Calendar iCal feed. | "" |
tags |
Array of tags to look for in event titles. | ["A", "M", "A&M"] |
maxEvents |
Maximum number of upcoming events to display. | 10 |
header |
Header text shown above the list. | "DAYS OFF" |
dateFormat |
Date formatting options passed to toLocaleDateString. |
{ month: "short", day: "numeric" } |
updateInterval |
How often to refresh the calendar feed (ms). | 3600000 (1 hour) |
Tags represent people's first initials. By tagging calendar events, you can see at a glance which days off are shared and which aren't — useful for planning around each other's schedules.
For example, in a household with Alice and Manda:
[A] Doctor appointment— only Alice is off[M] Conference— only Manda is off[A&M] Christmas Day— both Alice and Manda are off
This makes it easy to spot:
- Common days off (
[A&M]) — great for planning trips or family time - Solo days off (
[A]or[M]) — one person is home, the other isn't
You can customize the tags to any initials or names that suit your household.
- The module fetches the iCal feed from the configured URL at the configured interval.
- It parses each
VEVENTblock and looks for a tag at the start of theSUMMARYfield matching the pattern[TAG](e.g.[A] Holiday,[M] Sick day,[A&M] Bank holiday). - Only future events with a matching tag are kept.
- Events are sorted by date and the first N (controlled by
maxEvents) are displayed on the mirror.
- Create a Google Calendar (or use an existing one) for tracking days off.
- Add events with a tag prefix in the title using people's initials, for example:
[A] Annual leave,[M] Doctor appointment, or[A&M] Thanksgiving. - Go to the calendar's settings, scroll to "Integrate calendar", and copy the "Secret address in iCal format" URL.
- Paste that URL as the
icalUrlvalue in your module config.
MIT
