Caldav issues with curly braces

caldavbinding
binding
Tags: #<Tag:0x00007f0156c4eba0> #<Tag:0x00007f0156c4ea60>

(Jason Brunk) #1

I have been working with the caldev binding for hours. Can’t get it to work with my nextcloud caldav and can’t get it to work with google. Anyone have caldav working with 1.8? Care to share? :slight_smile:


(namraccr) #2

I’ve had caldav working with 1.8.

What errors are you seeing in the logs? You should try to get a debug log for more detail, and share your configs, so that someone might be able to help you.


(Tilman) #3

I get the following Error Message for my Caldev Binding.

[ERROR] [org.quartz.core.ErrorLogger ] - Job (event-reloader.caloh2 threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.util.ServiceConfigurationError: net.fortuna.ical4j.model.PropertyFactory: Provider net.fortuna.ical4j.model.property.Action$Factory not a subtype]
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)[105:org.eclipse.smarthome.core.scheduler:0.9.0.201706170545]
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)[105:org.eclipse.smarthome.core.scheduler:0.9.0.201706170545]
Caused by: java.util.ServiceConfigurationError: net.fortuna.ical4j.model.PropertyFactory: Provider net.fortuna.ical4j.model.property.Action$Factory not a subtype

My Config:

caldavio.cfg:
################################ CalDav Binding #######################################

caldavio:muellkalender:url=https://www.google.com/calendar/dav/xxxxxxxxxxxx@group.calendar.google.com/events
caldavio:muellkalender:username=user
caldavio:muellkalender:password=password
caldavio:muellkalender:reloadInterval=1
caldavio:muellkalender:preloadTime=50000
caldavio:muellkalender:disableCertificateVerification=true

caldavio:wertstoffhof:url=https://www.google.com/calendar/dav/xxxxxxxxxxxxx@group.calendar.google.com/events
caldavio:wertstoffhof:username=user
caldavio:wertstoffhof:password=password
caldavio:wertstoffhof:reloadInterval=1
caldavio:wertstoffhof:preloadTime=50000
caldavio:wertstoffhof:disableCertificateVerification=true

caldevcommand.cfg:
caldavCommand:readCalendars=muellkalender,wertstoffhof

caldavPersonal.cfg
caldavPersonal:usedCalendars=muellkalender,wertstoffhof


(Jason Brunk) #4

The error I get is below. My entry from openhab.cfg is below as well.

################################caldav
caldavio:jason:reloadInterval=1
caldavio:jason:preloadTime=2880
caldavio:jason:oauth=true
caldavio.jason:disableCertificateVerification=false

caldavio:jason:username=jason.brunk@gmail.com
caldavio:jason:password=password
caldavio:jason:url=https://www.google.com/calendar/dav/jason.brunk@gmail.com/events
caldavPersonal:usedCalendars=jason

2017-08-04 10:08:27.697 [ERROR] [o.o.i.c.i.job.EventReloaderJob] - error while loading calendar entries: Illegal character in path at index 65: https://www.google.com/calendar/dav/jason.brunk@gmail.com/events/{4913D9DD-6C56-4445-97FE-623E60533DB1}.ics
java.lang.IllegalArgumentException: Illegal character in path at index 65: https://www.google.com/calendar/dav/jason.brunk@gmail.com/events/{4913D9DD-6C56-4445-97FE-623E60533DB1}.ics
at java.net.URI.create(URI.java:852) ~[na:1.8.0_131]
at org.apache.http.client.methods.HttpGet.(HttpGet.java:69) ~[na:na]
at com.github.sardine.impl.SardineImpl.get(SardineImpl.java:745) ~[na:na]
at com.github.sardine.impl.SardineImpl.get(SardineImpl.java:741) ~[na:na]
at com.github.sardine.impl.SardineImpl.get(SardineImpl.java:732) ~[na:na]
at com.github.sardine.impl.SardineImpl.get(SardineImpl.java:145) ~[na:na]
at org.openhab.io.caldav.internal.job.EventReloaderJob.loadEvents(EventReloaderJob.java:314) ~[na:na]
at org.openhab.io.caldav.internal.job.EventReloaderJob.execute(EventReloaderJob.java:135) ~[na:na]
at org.quartz.core.JobRunShell.run(JobRunShell.java:213) [quartz-all-2.1.7.jar:na]
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) [quartz-all-2.1.7.jar:na]
Caused by: java.net.URISyntaxException: Illegal character in path at index 65: https://www.google.com/calendar/dav/jason.brunk@gmail.com/events/{4913D9DD-6C56-4445-97FE-623E60533DB1}.ics
at java.net.URI$Parser.fail(URI.java:2848) ~[na:1.8.0_131]
at java.net.URI$Parser.checkChars(URI.java:3021) ~[na:1.8.0_131]
at java.net.URI$Parser.parseHierarchical(URI.java:3105) ~[na:1.8.0_131]
at java.net.URI$Parser.parse(URI.java:3053) ~[na:1.8.0_131]
at java.net.URI.(URI.java:588) ~[na:1.8.0_131]
at java.net.URI.create(URI.java:850) ~[na:1.8.0_131]
… 9 common frames omitted

Looks like something to do with the { }


(namraccr) #5

I’m unable to reproduce this error using 1.10. Which version are you running?
But I think I see the fix we need anyway. I’ll try to issue a test jar before the end of the weekend.

There is no oauth configuration parameter, so this line does absolutely nothing.
The default value for disableCertificateVerification is false, so this line is unnecessary.


(namraccr) #6

Oh, and since this appears to be a defect, @crankycoder, would you like to file a defect in the OH1-Addons repository?

You could just copy in the contents of your last note here. If not, no problem. I’ll open one.


(Jason Brunk) #7

root@openhab2:/usr/share/openhab/addons# ls | grep cal
org.openhab.binding.caldav-command-1.10.0.jar
org.openhab.binding.caldav-personal-1.10.0.jar
org.openhab.io.caldav-1.10.0.jar
org.openhab.persistence.caldav-1.10.0.jar

I also tried using my ical from my nextcloud install. got different error but moved on to trying gmail.

Let me know if you have a test jar i should try :slight_smile: I am opening a defect now.


(Jason Brunk) #8

(namraccr) #9

I posted a test jar in the issue.


(Jason Brunk) #10

the issue has gone away. now i am getting strange results and ALOT of error messages when it’s processing the ics

odd issues

  1. last night while testing, i created an event for 11pm-12pm called “test - a” - when i downloaded the events url and opened in notepad i can see that test event however the binding did not see it.
  2. the binding is showing my next 2 events as the exact same thing. the strange thing is, i do not see that event on my calendar. I know at one time it was on my calendar as a daily event, but i don’t show it on my calendar now.

I am not quite sure what’s going on. I may need to try a different calendar in google.

Error messages i saw while processing

2017-08-06 22:13:59.970 [ERROR] [o.o.i.c.i.job.EventReloaderJob] - error reading ics file: 040000008200E00074C5B7101A82E008000000002077839E5749CC01000000000000000010000000154E62224984CA419EBDD92246D6FCBB
com.github.sardine.impl.SardineException: Unexpected response
        at com.github.sardine.impl.handler.ValidatingResponseHandler.validateResponse(ValidatingResponseHandler.java:48) ~[sardine-5.6.jar:5.6]
        at com.github.sardine.impl.handler.VoidResponseHandler.handleResponse(VoidResponseHandler.java:34) ~[sardine-5.6.jar:5.6]
        at com.github.sardine.impl.SardineImpl.get(SardineImpl.java:756) ~[sardine-5.6.jar:5.6]
        at com.github.sardine.impl.SardineImpl.get(SardineImpl.java:741) ~[sardine-5.6.jar:5.6]
        at com.github.sardine.impl.SardineImpl.get(SardineImpl.java:732) ~[sardine-5.6.jar:5.6]
        at com.github.sardine.impl.SardineImpl.get(SardineImpl.java:145) ~[sardine-5.6.jar:5.6]
        at org.openhab.io.caldav.internal.job.EventReloaderJob.loadEvents(EventReloaderJob.java:331) [bundlefile:na]
        at org.openhab.io.caldav.internal.job.EventReloaderJob.execute(EventReloaderJob.java:137) [bundlefile:na]
        at org.quartz.core.JobRunShell.run(JobRunShell.java:213) [quartz-all-2.1.7.jar:na]
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) [quartz-all-2.1.7.jar:na]
2017-08-06 22:14:00.060 [ERROR] [o.o.i.c.i.job.EventReloaderJob] - error reading ics file: 040000008200E00074C5B7101A82E00800000000E002BE631C49CB01000000000000000010000000716E6AB4D9C4314E82A725B134464F61
com.github.sardine.impl.SardineException: Unexpected response
        at com.github.sardine.impl.handler.ValidatingResponseHandler.validateResponse(ValidatingResponseHandler.java:48) ~[sardine-5.6.jar:5.6]
        at com.github.sardine.impl.handler.VoidResponseHandler.handleResponse(VoidResponseHandler.java:34) ~[sardine-5.6.jar:5.6]
        at com.github.sardine.impl.SardineImpl.get(SardineImpl.java:756) ~[sardine-5.6.jar:5.6]
        at com.github.sardine.impl.SardineImpl.get(SardineImpl.java:741) ~[sardine-5.6.jar:5.6]
        at com.github.sardine.impl.SardineImpl.get(SardineImpl.java:732) ~[sardine-5.6.jar:5.6]
        at com.github.sardine.impl.SardineImpl.get(SardineImpl.java:145) ~[sardine-5.6.jar:5.6]
        at org.openhab.io.caldav.internal.job.EventReloaderJob.loadEvents(EventReloaderJob.java:331) [bundlefile:na]
        at org.openhab.io.caldav.internal.job.EventReloaderJob.execute(EventReloaderJob.java:137) [bundlefile:na]
        at org.quartz.core.JobRunShell.run(JobRunShell.java:213) [quartz-all-2.1.7.jar:na]
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) [quartz-all-2.1.7.jar:na]
2017-08-06 22:14:00.148 [ERROR] [o.o.i.c.i.job.EventReloaderJob] - error reading ics file: 0513D8217F3B4559B2071EC29D754B8A00000000000000000000000000000000
com.github.sardine.impl.SardineException: Unexpected response
        at com.github.sardine.impl.handler.ValidatingResponseHandler.validateResponse(ValidatingResponseHandler.java:48) ~[sardine-5.6.jar:5.6]
        at com.github.sardine.impl.handler.VoidResponseHandler.handleResponse(VoidResponseHandler.java:34) ~[sardine-5.6.jar:5.6]
        at com.github.sardine.impl.SardineImpl.get(SardineImpl.java:756) ~[sardine-5.6.jar:5.6]
        at com.github.sardine.impl.SardineImpl.get(SardineImpl.java:741) ~[sardine-5.6.jar:5.6]
        at com.github.sardine.impl.SardineImpl.get(SardineImpl.java:732) ~[sardine-5.6.jar:5.6]
        at com.github.sardine.impl.SardineImpl.get(SardineImpl.java:145) ~[sardine-5.6.jar:5.6]
        at org.openhab.io.caldav.internal.job.EventReloaderJob.loadEvents(EventReloaderJob.java:331) [bundlefile:na]
        at org.openhab.io.caldav.internal.job.EventReloaderJob.execute(EventReloaderJob.java:137) [bundlefile:na]
        at org.quartz.core.JobRunShell.run(JobRunShell.java:213) [quartz-all-2.1.7.jar:na]
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) [quartz-all-2.1.7.jar:na]
2017-08-06 22:14:00.242 [ERROR] [o.o.i.c.i.job.EventReloaderJob] - error reading ics file: 040000008200E00074C5B7101A82E008000000000095EE9E5749CC01000000000000000010000000DD3AE68C421C3A4EA0853CB6F808FF9A
com.github.sardine.impl.SardineException: Unexpected response
        at com.github.sardine.impl.handler.ValidatingResponseHandler.validateResponse(ValidatingResponseHandler.java:48) ~[sardine-5.6.jar:5.6]
        at com.github.sardine.impl.handler.VoidResponseHandler.handleResponse(VoidResponseHandler.java:34) ~[sardine-5.6.jar:5.6]
        at com.github.sardine.impl.SardineImpl.get(SardineImpl.java:756) ~[sardine-5.6.jar:5.6]
        at com.github.sardine.impl.SardineImpl.get(SardineImpl.java:741) ~[sardine-5.6.jar:5.6]
        at com.github.sardine.impl.SardineImpl.get(SardineImpl.java:732) ~[sardine-5.6.jar:5.6]
        at com.github.sardine.impl.SardineImpl.get(SardineImpl.java:145) ~[sardine-5.6.jar:5.6]
        at org.openhab.io.caldav.internal.job.EventReloaderJob.loadEvents(EventReloaderJob.java:331) [bundlefile:na]
        at org.openhab.io.caldav.internal.job.EventReloaderJob.execute(EventReloaderJob.java:137) [bundlefile:na]
        at org.quartz.core.JobRunShell.run(JobRunShell.java:213) [quartz-all-2.1.7.jar:na]
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) [quartz-all-2.1.7.jar:na]
2017-08-06 22:14:00.335 [ERROR] [o.o.i.c.i.job.EventReloaderJob] - error reading ics file: 040000008200E00074C5B7101A82E008000000006035259F5749CC01000000000000000010000000F23EB1D40CBB6A499DF18EBF75C8B1A9


(namraccr) #11

Sardine errors are beyond our level, I fear.

However, it is a github project.


CalDavPersonal - "Sardine error" every minute
[Solved] com.github.sardine.impl.SardineException: Unexpected response
(Jason Brunk) #12

Sometime throughout the day it caught up/started working. So for now I will let it run and see how it goes. Thanks for the help!!