Hello All,
i’ve tried now for many hours in the past few days to get a long with the CalDav Binding in combination with my Synology NAS. I was struggeling with the setup of the *.cfg files and especially with the url adresses of the calendars. But finally i made it working and thought i could share my findings:
Starting with the caldavio.cfg
caldavio:UserCalendar:url=https://ip:5001/caldav/<USERNAME>/home/
caldavio:UserCalendar:username=<USERNAME>
caldavio:UserCalendar:password=<PASSWORD>
caldavio:UserCalendar:reloadInterval=60
caldavio:UserCalendar:preloadTime=44640
caldavio:UserCalendar:disableCertificateVerification=true
caldavio:Work:url=https://ip:5001/caldav/<USERNAME>/qaqmt/
caldavio:Work:username=<USERNAME>
caldavio:Work:password=<PASSWORD>
caldavio:Work:reloadInterval=60
caldavio:Work:preloadTime=44640
caldavio:Work:disableCertificateVerification=true
caldavio:Hobby:url=https://ip:5001/caldav/<USERNAME>/zduly/
caldavio:Hobby:username=<USERNAME>
caldavio:Hobby:password=<PASSWORD>
caldavio:Hobby:reloadInterval=60
caldavio:Hobby:preloadTime=44640
caldavio:Hobby:disableCertificateVerification=true
First, the name of the calender has to be specified after “caldavio:”. Second, the url of the calendar has to be given with the “Thunderbird” setting, which can be taken from the web ui of Synology Calender by clicking on the desired calender and then selecting “CalDav-Account” (CalDav-Konto) (see link below to synology website). Important note. The initial user calender has the ending “home”, the next ones do have a number of random letters. Additionally, the port which i had to use in a default Synology environment was 5001 (also given in the “Thunderbird” path).
If you then have a second calender, you have to duplicate your entry, modifying the name of the calender + the suffix random letters.
Next the caldavPersonal.cfg
caldavPersonal:usedCalendars=UserCalendar,Work,Hobby
Very simple, just the “caldavPersonal:” appended at the front.
The same is with caldavCommand.cfg
caldavCommand:readCalendars=Hobby
Also here it is very simple with just appending “caldavCommand:” at the front.
During my trials i had often the problem that the binding was not loading proper anymore. Thus i found information to clear the cache of the config files, which i did with the following commands
cd /srv/openhab2-userdata/config/org/openhab
rm -f caldav.*config
sudo systemctl restart openhab2.service
It is very important to only delet the *.config files and not the *.cfg files. The files are automatically created again from the *.cfg files while booting up. Other sources also mentioned to
sudo openhab-cli clean-cache
sudo systemctl restart openhab2.service
but i did not use this, just the upper commands.
Concluding for me it was the url + the clear of the config files which made the trick.
Hopefully i could help somebody else
Have fun and good night
Sources:
https://openhabforum.de/viewtopic.php?t=2768
https://www.synology.com/de-de/knowledgebase/DSM/tutorial/Collaboration/How_to_Sync_Synology_Calendar_with_CalDAV_Clients#t2
https://community.openhab.org/t/oh2-caldav-not-working/27085/2
but finally mainly with this
https://knx-user-forum.de/forum/supportforen/openhab/1343980-caldav-binding-mehrere-kalender