OH2: calDav not working

I’m trying to connect OH2.10 #887 to my Baikal calendar. This has worked before with OH1. Also, it has been verified that Baikal is running as it can be accessed from other applications.

I’m aware that there have been issues as described here:
https://github.com/openhab/openhab1-addons/issues/4074#issuecomment-202737544
However, this issue has been closed.

I’ve tried all sorts of configurations to no avail:

  • started with clean installation of OH2, no other bindings or items
  • installed CalDav personal in Paper UI
  • used configuration files in the /services folder
  • used prefixes like caldavio:myCalendar:…

When starting OH it gives the following error message:

09:48:40.566 [WARN ] [.io.caldav.internal.CalDavLoaderImpl] - Unable to parse configuration parameter: charset
09:48:40.570 [ERROR] [org.apache.felix.configadmin        ] - [org.osgi.service.cm.ManagedService, org.openhab.io.caldav.CalDavLoader, id=119, bundle=213/mvn:org.openhab.io/org.openhab.io.caldav/1.10.0-SNAPSHOT]: Updating property CalDAV IO of configuration org.openhab.caldavio caused a problem: Unable to parse configuration parameter: charset
org.osgi.service.cm.ConfigurationException: CalDAV IO : Unable to parse configuration parameter: charset
        at org.openhab.io.caldav.internal.CalDavLoaderImpl.updated(CalDavLoaderImpl.java:183)[213:org.openhab.io.caldav:1.10.0.201704100111]
        at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1461)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1417)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141)[3:org.apache.felix.configadmin:1.8.12]
        at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109)[3:org.apache.felix.configadmin:1.8.12]
        at java.lang.Thread.run(Unknown Source)[:1.8.0_111]

This message show up even if the charset property is removed from the configuration file. But before this was added a similar error occured about not beeing able to parse the usedCalendars property.
So something just seems to be broken.

Now I’m wondering if anyone uses the CalDAV binding with a current snapshot of OH2 and how their configuration looks like.

Thanks a lot.

1 Like

After some more testing and reconfiguring made some progress.
Here are my findings:

  • The configuration has been done by editing the files caldavio.cfg and caldavPersonal.cfg in the /services folder. It appears that the configuration made in these files also is stored somewhere else: When adding an error to the configuration file it gets flagged. After removing this error it still gets flagged (see example in previous post).
  • Often I get the warning message “Unable to parse configuration parameter” even if it definetely is OK.
  • When starting openHAB2 the calendar entries are loaded. After that the CalDAV binding doesn’t update its items. That means when anything is added or changed in the calender this is not reflected in openHAB. Ony simple calendar entries are used so far, no repeating events, no jobs. Different settings for reloadInterval and preloadTime didn’t have any effect on that.

So I’ve decided to ignore the reproducable and maybe fake error messages for now.
The questions that remain are:

  • How do I clear the shadow copy of my configuration files to remove bogus error messages?
  • How do I get the CalDAV binding to refresh its data?

Openhab has shadowed configuration files that are incorrectly updated for CalDav. If the user makes a mistake in the configuration files, this error is transferred to the shadowed configuration files and what is wrong will remain there even after the user has repaired his configuration file.
Therefore, it is necessary to delete the files in the directory :
/srv/openhab2-userdata/config /openhab
caldavio.config, caldavPersonal.config, caldavCommand.config,
even if a calendar was created, f.e. command, as well as command.config, “name calendar”.config.
The system will re-create these files.

2 Likes

Same here.
Searching for “caldav” in OH folder, deleting all files except *.jar and *.cfg solved my problem.

2 Likes