CalDav Personal binding works weirdly with Google Calendar

Dear Everyone!

Are there anyone who is using CalDav-Personal binding? For me, it seems to work, because sometimes I can see my events on my sitemap (unfortunately only the next event and just the name not the date and other things), but this usually works just after a reboot (if there is a next event in the upcoming days) and it don’t get updated as the time passes…

My questions are:

  • Do someone know why this happens? I don’t think that this is a configuration error, because sometimes it works…
  • Are there any alternatives for Google Calendars?
  • The documentation says that there is a type ‘NAMEANDTIME (itemtype:String)’ but this doesn’t seem to work for me…
  • I saw some people has a really good widget in HabPanel where it lists the upcoming events (not one, more…) and their dates… Are this is done by this binding or somehow else?


I don’t use CalDav personally but I have seen others mention it working with this jar file in addons.

Hope it helps

Thanks, I’ll try it!

BTW should be 9th one from top of list.

I use both CalDav Personal binding, and have it setup to give the next occurrence of a couple events through a DateTime item, and they are updated properly.

DateTime    Calendar_Upcoming_School        "Upcoming Preschool (start) [%1$tA, %1$tB %1$te, %1$tY at %1$tl:%1$tM%1$tp]"     <calendar>    (gCalendar) { caldavPersonal="calendar:mycalendar type:UPCOMING eventNr:1 value:START filter-category:'School'" }
DateTime    Calendar_Upcoming_Gymnastics    "Upcoming Gymnastics (start) [%1$tA, %1$tB %1$te, %1$tY at %1$tl:%1$tM%1$tp]"    <calendar>    (gCalendar) { caldavPersonal="calendar:mycalendar type:UPCOMING eventNr:1 value:START filter-category:'Gymnastics'" }

The easiest way to get the binding is to install it through PaperUI. The link @HM102 provided is outdated. If you want the latest snapshot build of this, or any of the other bindings, then download it from here…

Although, I’m not sure if there have been any changes in this binding since the 2.3.0 release.

My guess is that it is an issue using it with Google calendar. Maybe there are some errors in the logs? The caldavio.cfg file may have a hint too. I have this set to false, but I’m not using Google…

# A caldav Server is just a webdav Server which list files. Some servers does not use the valid timestamp for modifications.
# If your calendar does not provide correct timestamps you have to set this false.
# Default is true

Thanks! I had the addon installed through PaperUI.

Now I have tried the version recommended by @H102, but it didn’t helped…

Now I have reinstalled the binding from PaperUI and I get errors like this:

Cannot load events

java.util.ServiceConfigurationError: net.fortuna.ical4j.model.PropertyFactory: Provider$Factory not a subtype

	at ~[?:?]

	at java.util.ServiceLoader.access$300( ~[?:?]

	at java.util.ServiceLoader$LazyIterator.nextService( ~[?:?]

	at java.util.ServiceLoader$ ~[?:?]

	at java.util.ServiceLoader$ ~[?:?]

	at net.fortuna.ical4j.model.AbstractContentFactory.getFactory( ~[]

	at net.fortuna.ical4j.model.PropertyFactoryImpl.createProperty( ~[]

	at$ContentHandlerImpl.startProperty( ~[]

	at$PropertyParser.parse( ~[]

	at$PropertyParser.access$1100( ~[]

	at$PropertyListParser.parse( ~[]

	at ~[]

	at ~[]

	at ~[]

	at []

	at [107:org.eclipse.smarthome.core.scheduler:0.10.0.oh230]

	at org.quartz.simpl.SimpleThreadPool$ [107:org.eclipse.smarthome.core.scheduler:0.10.0.oh230]

Manual installs can be tricky to remove, since they will be cached. You may need to go into Karaf to remove it properly (deleting the jar is not enough). Let me know if you need help with this. The calDav bindings are also a bit picky about restarting, and I usually do an OH restart after making any configuration changes to them.

You can use this to clear cache and tmp files from terminal, all on one line, even the grey part.

sudo service openhab2 stop && sudo rm -rf /var/lib/openhab2/cache/* && sudo rm -rf /var/lib/openhab2/tmp/* && sudo reboot

I have removed the cache and used your method, however now I don’t have PaperUI and I get this error when starting…

2018-09-03 22:26:50.618 [INFO ] [org.eclipse.smarthome.ui.paper      ] - FrameworkEvent INFO - org.eclipse.smarthome.ui.paper

org.osgi.framework.BundleException: The bundle class path entry "patch/" could not be found for the bundle "osgi.identity; type="osgi.bundle"; version:Version="0.10.0.oh230"; osgi.identity="org.eclipse.smarthome.ui.paper"; singleton:="true""

	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassPathEntry( [?:?]

	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.buildClasspath( [?:?]

	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.<init>( [?:?]

	at org.eclipse.osgi.internal.loader.EquinoxClassLoader.<init>( [?:?]

	at org.eclipse.osgi.internal.loader.BundleLoader.createClassLoaderPrivledged( [?:?]

	at org.eclipse.osgi.internal.loader.BundleLoader.getModuleClassLoader( [?:?]

	at org.eclipse.osgi.internal.loader.BundleLoader.findEntries( [?:?]

	at org.eclipse.osgi.container.ModuleWiring.findEntries( [?:?]

	at [?:?]

	at [?:?]

	at [?:?]

	at [?:?]

	at$Generation.getHeaders( [?:?]

	at org.eclipse.osgi.internal.framework.EquinoxBundle.privGetHeaders( [?:?]

	at org.eclipse.osgi.internal.framework.EquinoxBundle.getHeaders( [?:?]

	at org.eclipse.osgi.internal.framework.EquinoxBundle.getHeaders( [?:?]

	at org.apache.felix.metatype.internal.MetaTypeServiceImpl.getMetaTypeInformation( [2:org.apache.felix.metatype:1.1.6]

	at org.apache.karaf.config.command.completers.MetaCompleter$1.callWith( [44:org.apache.karaf.config.core:4.1.5]

	at org.apache.karaf.config.command.completers.MetaCompleter$1.callWith( [44:org.apache.karaf.config.core:4.1.5]

	at org.apache.karaf.config.core.impl.MetaServiceCaller.withMetaTypeService( [44:org.apache.karaf.config.core:4.1.5]

	at org.apache.karaf.config.command.completers.MetaCompleter.updateMeta( [44:org.apache.karaf.config.core:4.1.5]

	at org.apache.karaf.config.command.completers.MetaCompleter.init( [44:org.apache.karaf.config.core:4.1.5]

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]

	at sun.reflect.NativeMethodAccessorImpl.invoke( ~[?:?]

	at sun.reflect.DelegatingMethodAccessorImpl.invoke( ~[?:?]

	at java.lang.reflect.Method.invoke( ~[?:?]

	at []

	at []

	at []

	at []

	at []

	at org.apache.felix.utils.extender.AbstractExtender.createExtension( []

	at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle( []

	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified( [?:?]

	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified( [?:?]

	at org.osgi.util.tracker.AbstractTracked.track( [?:?]

	at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged( [?:?]

	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent( [?:?]

	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent( [?:?]

	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous( [?:?]

	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged( [?:?]

	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent( [?:?]

	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent( [?:?]

	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent( [?:?]

	at org.eclipse.osgi.container.Module.publishEvent( [?:?]

	at org.eclipse.osgi.container.Module.start( [?:?]

	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel( [?:?]

	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel( [?:?]

	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel( [?:?]

	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent( [?:?]

	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent( [?:?]

	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent( [?:?]

	at org.eclipse.osgi.framework.eventmgr.EventManager$ [?:?]

Now I’m back at where I started, but still the same. Binding installed through PaperUI, I have updated to 2.4.0 M3 but the binding works the same… Now I don’t have any event in that calendar which is set, but I can’t see any event, or anything that the binding is doing something or not…

I do not understand what you mean by this. If you don’t have anything in the calendar, then how would you see any events in OH?

Sorry it was a little misleading… for example today I had an event in that calendar for tonight (~8pm to 10pm), but I didn’t saw that event in my sitemap… not today or any other day…

Yes, that is also unfortunately my own experience with this binding. I use(d) it with my Synology NAS as CalDav server and it used to read the next n dates after reboot ( I had defined 5 items for the next 5 appointments). Without a reboot the items shifted forward with time (item 1 disappearing and being replaced with item 2), but the most future item 5 did not pick up the next date but became empty, and then 4, then 3 and then there were no more entries. After a reboot all 5 items were populated freshly as expected.

Did you set lastModifiedFileTimeStampValid to false?

Better yet, post your caldavio.cfg file, but remove your account and password first.

No, I just added that now, I’m trying it out it, right now…

However here is my config:


Another thing which I noticed when I opened the config, that I have Two-Factor Auth enabled on my Google Account so here the password is just an app-generated password. Maybe this can cause some problem? (However I don’t think so, because when I restart openhab, it can pull the events…)

If 2-factor authentication has been enabled, create an application password using Use this password instead of your account password.

Yes, I’m using it with an application password

Did you allow “Third Party Apps” in your Google account settings?

Yes, because I’m using other third party apps as well…

Then I am out of ideas.