CalDav Personal - receiving exception

It’s complaining about being unable to parse a configuration parameter so please post your configs. And please How to use code fences.

Trying to define a logger in the config file, which is not where that goes.
Start here.

Unfortunately it is not that simple. Otherwise I would have found out myself by now. I found a thread that discussed a behavior like mine. It was discribed that if you once have a false cfg file, the error is somehow stored in other files. I found those files in the userconfig and deleted them. For the devcon.io it worked. In the personal.cfg it still appears after saving the actual config file. So there seems to be some kind of issue here.

Other than that I still cannot receive any data, although the configuration seems to be right. So on this side of the problem it does seem to be me :frowning:

When I am back home, I will poste my config files. Out of the log file I don’t get anything useful.

Cheers

Thank you for that hint. This is what I was missing. I just saw the information in the binding documentation. I actually had no idea where to put that so I just tried and failed.

You have an error saying that it can’t parse your config files.

You ask for help.

But because the problem “is not that simple” you choose to with hold that information from us? How the hell are we supposed to help?

I’m glad you found a solution to your problem but please in the future, and for all people who read this thread in the future

Don’t withhold asked for information because you think you know better.

If we ask for it, we need it to help. Withholding it is a waste of all of our time.

I am really greatful for the help here! But why the hate. I just simply didn’t have the time to respond properly yet. Like I said I wasn’t at home. This is why I couldn’t access my system. At least not the openhab server. And sure I am willing to post the solution I found.

Here is the post that actualy helped me to solve the problem:

No hate. But your response to “show your configs” to help us solve a config file problem was answered with “Unfortunately it is not that simple. Otherwise I would have found out myself by now.”

It may not be what you meant but that can be rephrased as “I don’t need to show you my configs, if it were as simple as something wrong with the config file I would have found it without help.”

Ok, I really didn’t mean to make that impression. So sorry for that missunderstanding.

So here are my config files:
caldavPersonal.cfg:

caldavPersonal:usedCalendars=Muellkalender

caldavio.cfg:

caldavio:Muellkalender:url=https://calendar.google.com/calendar/embed?src=xxxxxxxxxxxxxxxxxxxxxx%40group.calendar.google.com&ctz=Europe%2FBerlin
caldavio:Muellkalender:username=xxxxxxxxxxxxx
caldavio:Muellkalender:password=xxxxxxxxxxxxx
caldavio:Muellkalender:reloadInterval=2
caldavio:Muellkalender:preloadTime=200000
caldavio:timeZone=Europe/Berlin

current log output:

2019-07-16 20:53:19.548 [WARN ] [caldav.internal.job.EventReloaderJob] - Sardine error while loading calendar entries: Unexpected response (501 - Method PROPFIND is not defined in RFC 2068 and is not supported by the Servlet API)
com.github.sardine.impl.SardineException: Unexpected response
        at com.github.sardine.impl.handler.ValidatingResponseHandler.validateResponse(ValidatingResponseHandler.java:48) ~[241:org.openhab.io.caldav:1.13.0]
        at com.github.sardine.impl.handler.MultiStatusResponseHandler.handleResponse(MultiStatusResponseHandler.java:40) ~[241:org.openhab.io.caldav:1.13.0]
        at com.github.sardine.impl.handler.MultiStatusResponseHandler.handleResponse(MultiStatusResponseHandler.java:35) ~[241:org.openhab.io.caldav:1.13.0]
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:218) ~[241:org.openhab.io.caldav:1.13.0]
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:160) ~[241:org.openhab.io.caldav:1.13.0]
        at com.github.sardine.impl.SardineImpl.execute(SardineImpl.java:962) ~[241:org.openhab.io.caldav:1.13.0]
        at com.github.sardine.impl.SardineImpl.list(SardineImpl.java:417) ~[241:org.openhab.io.caldav:1.13.0]
        at com.github.sardine.impl.SardineImpl.list(SardineImpl.java:409) ~[241:org.openhab.io.caldav:1.13.0]
        at com.github.sardine.impl.SardineImpl.list(SardineImpl.java:386) ~[241:org.openhab.io.caldav:1.13.0]
        at org.openhab.io.caldav.internal.job.EventReloaderJob.loadEvents(EventReloaderJob.java:246) ~[241:org.openhab.io.caldav:1.13.0]
        at org.openhab.io.caldav.internal.job.EventReloaderJob.execute(EventReloaderJob.java:137) [241:org.openhab.io.caldav:1.13.0]
        at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [107:org.eclipse.smarthome.core.scheduler:0.10.0.oh240]
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [107:org.eclipse.smarthome.core.scheduler:0.10.0.oh240]

Not quite the code fences that I mean.

Can you edit the post and use

```
logs, config and code go here
```

This will preserve new lines and other formatting which makes everything much easier to read.

The 501 error code means that you are trying to access the calendar in a way that the calendar does not support. I know that people have used Google Calendar with CalDav in the past, maybe Google changed their access? Did you follow the Google part of the instructions here? It requires work on both the Google side and the openHAB side to get it to work.

ok, now I went back to my previous config.

caldavio:Muellkalender:url=https://calendar.google.com/calendar/dav/xxxxxxxxx@gmail.com/events
caldavio:Muellkalender:username=XXXXXXXXXX
caldavio:Muellkalender:password=XXXXXXXXXXX
caldavio:Muellkalender:reloadInterval=2
caldavio:Muellkalender:preloadTime=200000
caldavio:Muellkalender:disableCertificateVerification=true
caldavio:timeZone=Europe/Berlin

my log says:

2019-07-16 22:24:41.465 [INFO ] [.io.caldav.internal.CalDavLoaderImpl] - CalDAV IO is properly configured.

But still I don’t receive any data.

Here is one of my items:

DateTime Biomuell "Biomüll [%1$td.%1$tm.%1$tY]" <calendar> (gAbfall) { caldavPersonal="calendar:Muellkalender type:EVENT eventNr:1 value:START filter-name:'Bioabfall'" }

We are beyond my experience with this binding. I don’t think I can help much more.

Try setting logging to TRACE and see if it provides any additional help. Make sure to do it for both packages.

2019-07-17 08:57:39.773 [INFO ] [.io.caldav.internal.CalDavLoaderImpl] - CalDAV IO is properly configured.
2019-07-17 08:59:19.279 [DEBUG] [caldav.internal.job.EventReloaderJob] - running EventReloaderJob for config : Muellkalender
2019-07-17 08:59:19.281 [DEBUG] [caldav.internal.job.EventReloaderJob] - loading events for config: Muellkalender
2019-07-17 08:59:19.284 [TRACE] [org.openhab.io.caldav.internal.Util ] - connecting to caldav 'Muellkalender' with disabled certificate verification (url=https://calendar.google.com/calendar/dav/XXXXXXXX@gmail.com/events, username=XXXXXXXXX)
2019-07-17 08:59:19.654 [TRACE] [caldav.internal.job.EventReloaderJob] - before load events : oldeventids contains : []
2019-07-17 08:59:19.656 [TRACE] [caldav.internal.job.EventReloaderJob] - after load events : oldeventids contains : []
2019-07-17 08:59:19.658 [DEBUG] [ldav_personal.internal.CalDavBinding] - calendar reloaded: Muellkalender
2019-07-17 08:59:19.662 [DEBUG] [ldav_personal.internal.CalDavBinding] - No events found in event cache for item 'GelberSack'. Attempting to load from calendar.
2019-07-17 08:59:19.710 [TRACE] [.io.caldav.internal.CalDavLoaderImpl] - Querying events for filter: CalDavQuery [calendarIds=[Muellkalender], from=2019-07-17T08:59:19.663+02:00, to=null, sort=ASCENDING, filterName=Gelber Sack]
2019-07-17 08:59:19.712 [DEBUG] [.io.caldav.internal.CalDavLoaderImpl] - return event list for CalDavQuery [calendarIds=[Muellkalender], from=2019-07-17T08:59:19.663+02:00, to=null, sort=ASCENDING, filterName=Gelber Sack] with 0 entries
2019-07-17 08:59:19.713 [DEBUG] [ldav_personal.internal.CalDavBinding] - no event found for GelberSack, setting to UNDEF2019-07-17 08:59:19.715 [DEBUG] [ldav_personal.internal.CalDavBinding] - No events found in event cache for item 'Biomuell'. Attempting to load from calendar.
2019-07-17 08:59:19.718 [TRACE] [.io.caldav.internal.CalDavLoaderImpl] - Querying events for filter: CalDavQuery [calendarIds=[Muellkalender], from=2019-07-17T08:59:19.718+02:00, to=null, sort=ASCENDING, filterName=Bioabfall]
2019-07-17 08:59:19.720 [DEBUG] [.io.caldav.internal.CalDavLoaderImpl] - return event list for CalDavQuery [calendarIds=[Muellkalender], from=2019-07-17T08:59:19.718+02:00, to=null, sort=ASCENDING, filterName=Bioabfall] with 0 entries
2019-07-17 08:59:19.722 [DEBUG] [ldav_personal.internal.CalDavBinding] - no event found for Biomuell, setting to UNDEF
2019-07-17 08:59:19.724 [DEBUG] [ldav_personal.internal.CalDavBinding] - No events found in event cache for item 'Papiermuell'. Attempting to load from calendar.
2019-07-17 08:59:19.727 [TRACE] [.io.caldav.internal.CalDavLoaderImpl] - Querying events for filter: CalDavQuery [calendarIds=[Muellkalender], from=2019-07-17T08:59:19.727+02:00, to=null, sort=ASCENDING, filterName=Papiertonne]
2019-07-17 08:59:19.729 [DEBUG] [.io.caldav.internal.CalDavLoaderImpl] - return event list for CalDavQuery [calendarIds=[Muellkalender], from=2019-07-17T08:59:19.727+02:00, to=null, sort=ASCENDING, filterName=Papiertonne] with 0 entries
2019-07-17 08:59:19.731 [DEBUG] [ldav_personal.internal.CalDavBinding] - no event found for Papiermuell, setting to UNDEF
2019-07-17 08:59:19.734 [DEBUG] [ldav_personal.internal.CalDavBinding] - No events found in event cache for item 'Restmuell'. Attempting to load from calendar.
2019-07-17 08:59:19.737 [TRACE] [.io.caldav.internal.CalDavLoaderImpl] - Querying events for filter: CalDavQuery [calendarIds=[Muellkalender], from=2019-07-17T08:59:19.737+02:00, to=null, sort=ASCENDING, filterName=Hausm]
2019-07-17 08:59:19.739 [DEBUG] [.io.caldav.internal.CalDavLoaderImpl] - return event list for CalDavQuery [calendarIds=[Muellkalender], from=2019-07-17T08:59:19.737+02:00, to=null, sort=ASCENDING, filterName=Hausm] with 0 entries
2019-07-17 08:59:19.742 [DEBUG] [ldav_personal.internal.CalDavBinding] - no event found for Restmuell, setting to UNDEF
2019-07-17 08:59:19.745 [DEBUG] [caldav.internal.job.EventReloaderJob] - jobs scheduled :
2019-07-17 08:59:19.749 [DEBUG] [caldav.internal.job.EventReloaderJob] - [job] : Muellkalender - [groupName] : event-reloader - Wed Jul 17 09:01:19 CEST 2019
2019-07-17 08:59:19.753 [DEBUG] [caldav.internal.job.EventReloaderJob] - [job] : trash.rules#Abfall steht an - Blinkeding#0 0 17 1/1 * ? * - [groupName] : DEFAULT - Wed Jul 17 17:00:00 CEST 2019
2019-07-17 08:59:19.757 [DEBUG] [caldav.internal.job.EventReloaderJob] - [job] : trash.rules#Abfall steht an - Informiere -Frau- und Jochen#0 30 21 1/1 * ? * - [groupName] : DEFAULT - Wed Jul 17 21:30:00 CEST 2019
2019-07-17 08:59:19.762 [DEBUG] [caldav.internal.job.EventReloaderJob] - [job] : trash.rules#Abfall steht an - Informiere Jochen#0 30 20 1/1 * ? * - [groupName] : DEFAULT - Wed Jul 17 20:30:00 CEST 2019
2019-07-17 08:59:19.766 [DEBUG] [caldav.internal.job.EventReloaderJob] - [job] : trash.rules#Tage bis Abfall berechnen#0 5 * 1/1 * ? * - [groupName] : DEFAULT - Wed Jul 17 09:05:00 CEST 2019

So I finally got it to work. I did have the wrong url. I used

caldavio:Muellkalender:url=https://calendar.google.com/calendar/dav/calendar-id@group.calendar.google.com/events

Now one thing left. The calendar entry for a specific item doesn’t work. If I look at my google calendar the item is called “Hausmüll (2 wöchentlich)”.

My item looks like this:

DateTime Restmuell "Restmüll [%1$td.%1$tm.%1$tY]" <calendar> (gAbfall) { caldavPersonal="calendar:Muellkalender type:EVENT eventNr:1 value:START filter-name:'Hausmüll (2 wöchentlich)'" }

Any suggestions on that? I guess my regex doesn’t work.

Parenthesis have a special meaning in regular expressions. You need to escape them if you want it to look for that character instead of interpreting it.

'Hausmüll \(2 wöchentlich\)'

If I do that I get:

2019-07-17 16:09:02.333 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'trash.items' has errors, therefore ignoring it: [1,89]: mismatched character '(' expecting set null
[1,170]: mismatched input '2' expecting RULE_STRING
[4,174]: mismatched character '<EOF>' expecting '''

I don’t use this binding so I don’t know it’s quirks.

The error seems to imply that it is requiring some parens. The parens is how you usually tell a regular expression what part of the String you want. So put the whole thing in parens and see if that makes a difference.

'(Hausmüll \(2 wöchentlich\))'

Unfortunately I already have that:

DateTime Restmuell "Restmüll [%1$td.%1$tm.%1$tY]" <calendar> (gAbfall) { caldavPersonal="calendar:Muellkalender type:EVENT eventNr:1 value:START filter-name:'Hausmüll \(2 wöchentlich\)'" }

No you don’t.

You have

filter-name:'Hausmüll \(2 wöchentlich\)'

You need

filter-name:'(Hausmüll \(2 wöchentlich\))'