CalDav Help!

I’d be very greatful for some assistance getting CALDAV Personal Set Up…

In PaperUI I have enabled both Caldav Personal and Command

I have created the config files, created a test item, and yet I get nothing on the sitemap.

In my Openhab.log file I see the following which gives me the impression that things are set up correctly.

[INFO ] [.io.caldav.internal.CalDavLoaderImpl] - CalDAV IO is properly configured.
[INFO ] [b.core.service.AbstractActiveService] - CalDav Loader has been started
[INFO ] [.io.caldav.internal.CalDavLoaderImpl] - reload job scheduled for: Tree
[INFO ] [.io.caldav.internal.CalDavLoaderImpl] - reload job scheduled for: Junk
[INFO ] [.io.caldav.internal.CalDavLoaderImpl] - reload job scheduled for: Recycling
[INFO ] [.io.caldav.internal.CalDavLoaderImpl] - reload job scheduled for: Trash

But in my Events.log I see the following:

[vent.ItemStateChangedEvent] - Calendar_Upcoming_Recycle changed from NULL to UNDEF
[vent.ItemStateChangedEvent] - Calendar_Upcoming_Junk changed from NULL to UNDEF

My Items look like this…

DateTime    Calendar_Upcoming_Junk       "Next Junk Waste Pickup [%1$tA, %1$tB %1$te, %1$tY at %1$tl:%1$tM%1$tp]" { caldavPersonal="calendar:Junk type:EVENT eventNr:1 value:START" }
DateTime    Calendar_Upcoming_Recycle    "Next Recyling Pickup (start) [%1$tA, %1$tB %1$te, %1$tY at %1$tl:%1$tM%1$tp]" { caldavPersonal="calendar:Recycling type:UPCOMING eventNr:1 value:START" }

Configuration wise, my cfg files look like this…

caldavio.cfg

# Trash Calendar
caldavio:Trash:url=https://www.google.com/calendar/dav/xxxxxxxxetmmcoi0suk@group.calendar.google.com/
caldavio:Trash:username=user@gmail.com
caldavio:Trash:password=Password
caldavio:Trash:reloadInterval=10
caldavio:Trash:preloadTime=93600
caldavio:Trash:disableCertificateVerification=false
caldavio:Trash:charset=UTF-8

# Recycling Calendar
caldavio:Recycling:url=https://www.google.com/calendar/dav/xxxxxxe0vjo2568q1as@group.calendar.google.com/
caldavio:Recycling:username=user@gmail.com
caldavio:Recycling:password=Password
caldavio:Recycling:reloadInterval=10
caldavio:Recycling:preloadTime=93600
caldavio:Recycling:disableCertificateVerification=false
caldavio:Recycling:charset=UTF-8

# TreeWaste Calendar
caldavio:Tree:url=https://www.google.com/calendar/dav/xxxxxxxxxi41hkstb0t0mva0@group.calendar.google.com/
caldavio:Tree:username=user@gmail.com
caldavio:Tree:password=Password
caldavio:Tree:reloadInterval=10
caldavio:Tree:preloadTime=93600
caldavio:Tree:disableCertificateVerification=false
caldavio:Tree:charset=UTF-8

# JunkWaste Calendar
caldavio:Junk:url=https://www.google.com/calendar/dav/xxxxxxxxxxxxi4s697mk@group.calendar.google.com/
caldavio:Junk:username=user@gmail.com
caldavio:Junk:password=Password
caldavio:Junk:reloadInterval=10
caldavio:Junk:preloadTime=93600
caldavio:Junk:disableCertificateVerification=false
caldavio:Junk:charset=UTF-8

caldavPersonal.cfg

caldavPersonal:usedCalendars=Junk,Recycling,Trash,Tree

Any guidance would be greatly appreciated.

Thansk,

Squid

Does it help if you add <calendar> to your item like this?

DateTime    Calendar_Upcoming_Junk       "Next Junk Waste Pickup [%1$tA, %1$tB %1$te, %1$tY at %1$tl:%1$tM%1$tp]" <calendar> { caldavPersonal="calendar:Junk type:EVENT eventNr:1 value:START" }

Thanks for the suggestion, the only difference I see with that tag is the icon changed to a calendar icon.

image

What do your other caldav items look like, could there be an issue with eventNr:1 and other events?

That’s my only item for testing at the moment.

Try setting the log to debug or trace, maybe it’ll show what needs to be defined.

Ok, set both caldav-personal and caldav-command logging to DEBUG.

Restarted OH, and this is all I see in the log…I feel like I should see more

05-Sep-2018 14:41:00.618 [DEBUG] [org.openhab.binding.caldav-personal               ] - BundleEvent STARTING - org.openhab.binding.caldav-personal
05-Sep-2018 14:41:00.618 [DEBUG] [org.openhab.binding.caldav-personal               ] - BundleEvent STARTED - org.openhab.binding.caldav-personal
05-Sep-2018 14:41:00.634 [DEBUG] [org.openhab.binding.caldav-personal               ] - ServiceEvent REGISTERED - {org.openhab.model.item.binding.BindingConfigReader, org.openhab.binding.caldav_personal.CalDavBindingProvider}={component.name=org.openhab.binding.caldav_personal.caldavbindingprovider, component.id=269, service.id=412, service.bundleid=272, service.scope=bundle} - org.openhab.binding.caldav-personal
05-Sep-2018 14:41:00.634 [DEBUG] [org.openhab.binding.caldav-personal               ] - ServiceEvent REGISTERED - {org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService}={event.topics=openhab/command/*, service.pid=org.openhab.caldavPersonal, component.name=org.openhab.binding.caldav_personal, component.id=268, service.id=414, service.bundleid=272, service.scope=bundle} - org.openhab.binding.caldav-personal
05-Sep-2018 14:41:00.634 [DEBUG] [org.openhab.binding.caldav-command                ] - BundleEvent STARTING - org.openhab.binding.caldav-command
05-Sep-2018 14:41:00.634 [DEBUG] [org.openhab.binding.caldav-command                ] - BundleEvent STARTED - org.openhab.binding.caldav-command
05-Sep-2018 14:41:00.650 [DEBUG] [org.openhab.binding.caldav-command                ] - ServiceEvent REGISTERED - {org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService}={event.topics=openhab/command/*, service.pid=org.openhab.caldavCommand, component.name=org.openhab.binding.caldav_command, component.id=270, service.id=416, service.bundleid=274, service.scope=bundle} - org.openhab.binding.caldav-command
05-Sep-2018 14:41:00.650 [DEBUG] [org.openhab.binding.caldav-command                ] - ServiceEvent REGISTERED - {org.openhab.model.item.binding.BindingConfigReader, org.openhab.binding.caldav_command.CalDavBindingProvider}={component.name=org.openhab.binding.caldav_command.caldavbindingprovider, component.id=271, service.id=415, service.bundleid=274, service.scope=bundle} - org.openhab.binding.caldav-command

I’ve installed the two bindings: caldav-personal and caldav-command…is there a plain caldav binding that I’m missing. Somewhere in the documentation there is reference to a plain caldav binding…but these are the only 2 in PaperUI. I’m wondering if some of the documentation is outdated?

UPDATE

I see on cloudbees there is a CALDAV IO…what is this for? Is it needed?

https://openhab.ci.cloudbees.com/job/openHAB1-Addons/lastBuild/org.openhab.io$org.openhab.io.caldav/

Squid

Yes, it’s needed and you should have it if you installed through PaperUI. Set it to debug too (org.openhab.io.caldav). Also, you will probably need to set lastModifiedFileTimeStampValid to false in your caldavio.cfg.

Ok…may be getting a bit closer…

I see this in the log now…

05-Sep-2018 17:16:10.656 [DEBUG] [rg.openhab.io.caldav.internal.job.EventReloaderJob] - Processing event 'Heavy Trash - Junk Waste'
05-Sep-2018 17:16:10.656 [DEBUG] [rg.openhab.io.caldav.internal.job.EventReloaderJob] - No periods exist for event 'Heavy Trash - Junk Waste'

Heavy Trash – Junk Waste is the name of the event and the next one is on October 5, 2018…why would it say no periods exist for event?

Squid

I believe this is adjusted with the preload interval that you have configured. But since you are at 65 days (93600 minutes), you should be good. Did you set the lastModifiedFileTimeStampValid? Maybe the times are not coming in right.

Sorry for the slow reply…

I now have everything working as intended - thank you for your assistance. It seems it took a couple of restarts to flush the files and then to get everything loading as desired. I think the

LastModifiedFileTimeStampValid=false

was the key to getting everything working.

The CALDAV binding documentation is confusing as hell and could really use some editing. Hopefully if I get a few free hours I’ll go through it and make some suggested changes.

One last question - In one of your online examples you had a CATEGORY definition in your item…where are you setting the category in Google Calendar? All of the online references I found for using categories in Google Calendar was to set up multiple calendars.

Thanks again!

Squid

Unfortunately, I don’t use Google calendar… I have the CalDav binding connecting to our mail server though a local DavMail gateway, do to MS dropping WebDav from Exchange.

Glad you got it working though!