Caldav not working with OH2

Hi, I tried to work with caldav using onwcloud which is running on the same rpi3 as my OH2 installation. Everytime OH2 is started or restarted I get the following in openhab.log:

2017-04-02 15:25:27.475 [ERROR] [org.apache.felix.configadmin ] - [org.osgi.service.cm.ManagedService, org.openhab.io.caldav.CalDavLoader, id=119, bundle=219/mvn:org.openhab.io/org.openhab.io.caldav/1.10.0-SNAPSHOT]: Unexpected problem updating configuration org.openhab.caldavio
java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)[:1.8.0_121]
at java.lang.Integer.parseInt(Integer.java:592)[:1.8.0_121]
at java.lang.Integer.parseInt(Integer.java:615)[:1.8.0_121]
at org.openhab.io.caldav.internal.CalDavLoaderImpl.updated(CalDavLoaderImpl.java:204)[219:org.openhab.io.caldav:1.10.0.201703240211]
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(Thread.java:745)[:1.8.0_121]

My caldavio.cfg looks like this:
caldavio:heat:url=http://openhabianpi/owncloud/remote.php/dav/calendars/abcdef/kche
caldavio:heat:username=abcdef
caldavio:heat:password=secret
caldavio:heat:reloadInterval=10
caldavio:heat:preloadTime=20000
caldavio:timeZone=Europe/Berlin

And caldavCommand.cfg contains only:
caldavCommand:readCalendars=heat

I can’t imagine what is going wrong. How can I check if the problem is caused by the bindung or by owncloud?
Can anyone help please?

Regards
Frank

I did:
curl -u abcdef -X PROPFIND http://openhabianpi/owncloud/remote.php/dav/calendars/abcdef
to check my onwcloud and it told me that all my calendars are ok!

No sugestions?

What can I do to retrieve more information from the logs. Is there a debug mode?

Sorry guys, but I have to bring this up again.

caldav-binding seems to be running since I went back to 1.9.0. and the official openhab2-version.
But this time I can’t retrieve any calendar infomation. My openhab.log now says that the calendar is unknown:

2017-04-18 22:59:15.705 [ERROR] [org.apache.felix.configadmin        ] - [org.osgi.service.cm.ManagedService, org.openhab.io.caldav.CalDavLoader, id=125, bundle=217/mvn:org.openhab.io/org.openhab.io.caldav/1.9.0]: Updating property readCalendars of configuration org.openhab.caldavio caused a problem: unknown identifier
org.osgi.service.cm.ConfigurationException: readCalendars : unknown identifier
	at org.openhab.io.caldav.internal.CalDavLoaderImpl.updated(CalDavLoaderImpl.java:166)[217:org.openhab.io.caldav:1.9.0]
	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(Thread.java:745)[:1.8.0_121]

my caldavio.cfg:

caldavio:heat:url=http://openhabianpi/owncloud/remote.php/dav/calendars/user/kueche
caldavio:heat:username=user
caldavio:heat:password=pass
caldavio:heat:reloadInterval=10
caldavio:heat:preloadTime=1440
caldavio:timeZone=Europe/Berlin

my caldavCommand.cfg:

caldavCommand:readCalendars=heat

my caldavPersonal.cfg:

caldavPersonal:usedCalendars=heat

I’m facing the exact same problem with my google calendar.
Where is the mistake? Need help, please!

regards
Frank

Hello Frank,

It’s good to hear I’m not the only one struggeling with the CalDAV binding.
To me your configuration looks OK.
However, in my configuration I’ve also added this (not sure if that’s really needed):

caldavio:myCalendar:lastModifiedFileTimeStampValid=true
caldavio:myCalendar:disableCertificateVerification=false

This configuration option doesn’t seem to work and gets flagged - even after it is removed:

caldavio:charset=UTF-8

In my case I also get error messages that I don’t understand and that even remain after removing the error in the configuration file.
At least CalDAV connects to my calendar. But then it doesn’t update the according items.

I hope that those problems soon will be solved and that there will be a working example on how to configure this binding.

Here’s a link to the problems I’m facing:
https://community.openhab.org/t/oh2-caldav-not-working/27085/1

Hi Markus,

good to read!

I worked myself though tons of postings regarding caldav-binding and tried almost everything recommend, but nothing seems to work.

Hello Frank,

I agree. Sometimes it’s quite frustrating to get a binding to work. There are numerous releases where the postings refer to. Some issues appear to be fixed while other workarounds don’t seem to work.
So often it’s unclear if there’s a problem in my configuration and setup or if there’s an actual issue with the distribution I’m using. I just hope that the developers of openHAB check this community for potential issues and add them to their list.

Still, openHAB is a great framework and I guess we just have to be patient and keep trying until we find the correct configuration or until there’s a fix. Unfortunately I’m not a programmer and not in the position to contribute solutions.

In this case with the CalDAV binding I’m pretty sure there’s something wrong with the binding itself.

@Automark, you are absolutely right!

Had problem with Caldav too.
Decided to switch to unstable release (openHABian), - that made a difference.:grin:
Nextcloud calendar and openHAB caldav are connected now.

Ole

I’m running OH2 stable with caldav Binding against my Nextcloud server. It connects fine and downloads/caches the appointments. But it seems to hang after certain amount of days, then it does not update any longer with new “todays appointments” until I restsart OH2.
Other than that, its working.

Same here. Really frustrating. There seems to be a problem, especially with the Loader of the binding. My events are not being reloaded after one-time-success. The reminder-process is not even running. Rebooting shows the loader-problems. So to mee, it seems, the binding isnt loaded at all because of the problems. In the leading post linked to this topic in the forum here, there seems to be a invisible wal. It’s not going on, most stick to OH1, others use a python-script. I’m stuck with nothing at that moment concerning this calender-ability.
I would like to contribute to a solution, but I see myself als beginner right now.
Anyone seen a script that works with owncloud?

@Yoyoo What version do you mean by unstable? OH1? OH2?

openHAB 2.1.0~20170507040348-1 (Build #909)

@waitz_sebastian I wasn’t aware it might stop updating after a few days. Celebrating too soon…