@sdetweil thanks, will do so later/tomorrow
Edit: done https://github.com/MichMich/MagicMirror/issues/2110 :crossed_fingers_light_skin_tone:
@sdetweil thanks, will do so later/tomorrow
Edit: done https://github.com/MichMich/MagicMirror/issues/2110 :crossed_fingers_light_skin_tone:
@sdetweil Thanks for your reply. I have specified the timezone now:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Static Birthdays//Some Name//EN
CALSCALE:GREGORIAN
X-WR-CALNAME;VALUE=TEXT:Birthdays_static_short
X-WR-TIMEZONE:Europe/Berlin
BEGIN:VTIMEZONE
TZID:Europe/Berlin
LAST-MODIFIED:20200806T101500Z
BEGIN:STANDARD
DTSTART:20191027T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
TZNAME:CET
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20200329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
TZNAME:CEST
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
SUMMARY:Max Mustermann
DESCRIPTION:
DTSTAMP:20050806T080000Z
DTSTART;VALUE=DATE:20050806
DTEND;VALUE=DATE:20050806
RRULE:FREQ=YEARLY
END:VEVENT
END:VCALENDAR
Also on your other post, this was just any birthday I pulled. I have created a fake one for today but still the same issue.
I have also played around with my icloud calender and found the following:
The only difference in both Events is the RRULE:
Not Reoccurring:
BEGIN:VEVENT
CREATED:20200806T083628Z
DTEND;VALUE=DATE:20200807
DTSTAMP:20200806T083634Z
DTSTART;VALUE=DATE:20200806
LAST-MODIFIED:20200806T083628Z
SEQUENCE:0
SUMMARY:SingleTestDayEvent
UID:05BF5856-EE12-495C-A681-5D1DE3BD2418
URL;VALUE=URI:
TRANSP:OPAQUE
END:VEVENT
Reoccurring:
BEGIN:VEVENT
CREATED:20200806T083338Z
DTEND;VALUE=DATE:20200807
DTSTAMP:20200806T083339Z
DTSTART;VALUE=DATE:20200806
LAST-MODIFIED:20200806T083338Z
RRULE:FREQ=YEARLY
SEQUENCE:0
SUMMARY:TestDayEvent
UID:7927874B-86FB-494B-AACE-CCA8BD525A3F
URL;VALUE=URI:
TRANSP:OPAQUE
END:VEVENT
Hey all,
I am using the default calendar module for my MM. So far I got quite some things to work. To feed my contacts birthdays I created a static file which I am using which works well. The only issue I have is, that on the day of the event (the actual birthday) the names are not showing up anymore.
Sample ical-entry and calendar-config below:
{
module: "calendar",
header: "Termine & Feiertage",
position: "top_left",
config: {
fetchInterval: 60000,
displaySymbol: true,
showLocation: false,
fade: true,
fadePoint: 0.4,
dateFormat: "D. MMM HH:mm",
fullDayEventDateFormat: "D. MMM",
timeFormat: "absolute",
getRelative: 12,
urgency: 0,
maximumEntries: 5,
calendars: [
{
symbol: "cocktail",
url: "webcal://www.ecoline-media.de/ics/nordrhein-westfalen.ics"
},
{
symbol: 'calendar-check',
url: 'webcal://localhost:8080/modules/calendars/9*******-****-****-****-***********D.ics',
},
{
symbol: 'birthday-cake',
url: 'webcal://localhost:8080/modules/calendars/birthdays.ics',
}
]
}
},
BEGIN:VEVENT
SUMMARY:Max Mustermann
DESCRIPTION:
DTSTAMP:19630626T000000
DTSTART;VALUE=DATE:19630626
DTEND;VALUE=DATE:19630626
RRULE:FREQ=YEARLY
END:VEVENT
Would appreciate some help.
@sdetweil Thanks for the notes, but can you explain a bit more into detail. You mean, if I add
#!/bin/bash
as first line to the script, I can also add the logging part and remove it from the cron?
To be honest, I’m quite a noob to Linux based systems and scripts. Nonetheless, hope my answer will help some people to get the sync going who have issues with the timer service from vdirsyncer.
@elliot1996 @duxnobis not sure if anyone is still following, but I was able to get the automated sync with a work around through cronjob. Step-by-step guide below:
First we need to create the script which is actually executed by the cronjob. To do this we open a terminal and type
nano ~/MagicMirror/modules/calendars/vdirsyncer.sh
Within the editor we just write a one-liner:
vdirsyncer -vinfo sync
Close by CTRL+X and save by confirming with Y
Within terminal type
chmod +x ~/MagicMirror/modules/calendars/vdirsyncer.sh
Run a test if your script works. Within terminal type
bash ~/MagicMirror/modules/calendars/vdirsyncer.sh
If working as intended you should receive the feedback
Syncing iCloud_to_MagicMirror/YOUR-CALENDAR-UUID
This was actually my biggest issue. I could sync successfully when running the script manually but the actual cronjob failed. Looking into Debug-Logs I found that the manual run used Version 0.16.8 of vdirsyncer while the cronjob used 0.16.7. After manually chaning the versioning if worked as inteded. To ensue you are not running into that issue, let’s check the versioning from the get-go. Within Terminal type
sudo nano /usr/bin/vdirsyncer
An editor will show you the following code:
#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'vdirsyncer==0.16.7','console_scripts','vdirsyncer'
__requires__ = 'vdirsyncer==0.16.7'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(
load_entry_point('vdirsyncer= q=0.16.7', 'console_scripts', 'vdirsyncer')()
)
Change all three instances of 0.16.7
to 0.16.8
, close via CTRL+X and save with Y.
Cronjobs are a great thing. It is pre-installed with UNIX based systems, therefore also with our Raspberry Pi. More information about Cronjobs can be found here. To set up a new cronjob, within Terminal type
crontab -e
The result will be the following code:
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').
#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
Type a new line at the bottom with the cron syntax. Here is an overview for the timings:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12)
# │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday;
# │ │ │ │ │ 7 is also Sunday on some systems)
# │ │ │ │ │
# │ │ │ │ │
# * * * * * <command to execute>
As for us it makes senst to run vdirsyncer every X minutes (I am going with 5 minutes in my case) the syntax looks as follows:
*/5 * * * *
followed by the script to execute:
bash ~/MagicMirror/modules/calendars/vdirsyncer.sh >> ~/vdirsyncer.log 2>&1
The first part should be familiar to you. What follows after the >>
is a log we are creating. This will be helpful in case anything does not work as inteded. The full cronjob should look as follows:
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').
#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
*/5 * * * * bash ~/MagicMirror/modules/calendars/vdirsyncer.sh >> ~/vdirsyncer.log 2>&1
Close again by CTRL+X. You are now ready and have everything set up. The cronjob will start automatically on every startup and run the sync in the interval you have set it up.
@duxnobis @elliot1996 @Beh
Hey guys,
just checking in on this topic, as I also have issues with getting the timer to run while manual sync works fine.
/etc/systemd/user/
(vdirsyncer.service & vdirsyncer.timer)systemctl --user enable vdirsyncer.timer?
(no error or any other feedback in Terminal)jorunalctl --user -u vdirsyncer
with the result:No journal files were found. -- No Entries --
I even went forward and tried to sync using a cronjob but this is unfortuately also not working:
error: Unknown error occured for iCloud_to_MagicMirror/9*******-****-****-****-************D: HTTPSConnectionPool(host='p65-caldav.icloud.com', port=443): Max retries exceeded with url: /1355377534/calendars/9*******-****-****-****-************D/ (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))
error: Use `-vdebug` to see the full traceback.
error: 1 out of 2 tasks failed.
Syncing iCloud_to_MagicMirror/9*******-****-****-****-************D
Anyone has an Idea?
@dave_ Hey there,
would be happy to help. What is your issue currently? Also would help to post a snippet of the config you are using.+
@Mykle1 Understood. Guess that is the part making it responsive as you change the size?
@BKeyport in my opinion it clearly is. Let’s see if some new modules pop up (openweather onecall API, climacell…)