New CalDAV Binding available

ah ok, you mean it is changed to a duration which is now.
yes thats right. Is it a problem for you?
What would be your expected behaviour?

Maybe an example makes it clearer:

  • Heating to 20 degree at 7 o clock
  • At like 10 o clock I decided it is too cold and manually increase the temperature to 21 degree
  • At like 12 o clock I change the calendar event to start at 7:01.
  • Directly after my change the calendar event is retriggered which sets the temperature back to 20 degree.

This is no big problem and there are work arounds but usually I would expect that nothing happens until the next day. I would certainly NOT expect that the start event is triggered at 12 o clock while it is set to occur at 7:01

Yes ok, but imagin this:

  • Heating to 20 degree at 7 o clock
  • At like 12 o clock I restarted openhab
  • Directly after the restart the state of the heater is set to the current value from the event.

If you change an event it is ever retriggered. I didn’t check what has changed.

@querdenker2k

I tested the binding again.The logging works.
But if I have activated the Presencesimulation, I still have the following issue:
The beginning of a simulation action (light on) is processed, but the action is not written back into the calendar with the defined offset. The end action (light off) of the same simulation is written to the calendar with the offset.
Before the presencesimulation I have the following calendar entries:

Licht_Buero
Kalender openhab
von 08-02-2016 21:10 bis 08-02-2016 21:11
BEGIN:Licht_Buero:ON

Licht_Buero
Kalender openhab
von 08-02-2016 21:15 bis 08-02-2016 21:16
BEGIN:Licht_Buero:OFF

After the executed presencesimulation my entries are as follows:

Licht_Buero
Kalender openhab
von 08-02-2016 21:10 bis 08-02-2016 21:11
BEGIN:Licht_Buero:ON
BETWEEN:08.02.2016T21:10:41:Licht_Buero:ON

Licht_Buero
Kalender openhab
von 10-02-2016 21:15 bis 10-02-2016 21:16
BEGIN:Licht_Buero:OFF

Could you please tell me I do wrong ?

The presencesimulation should come as start and end action up after execution again with the defined offset. So if I’m on vacation for lest’s say 4 weeks and I have an offset of two weeks, my presence should be simulated also in week 3 and 4.

Thank you for your patience.

Richard

Have you set “singleEvents=false”

Yes it’s set to false

sorry my fault. The question should have been: is singleEvents set to true.
Well it has to be true.

Thank you for your help. I made yesterday evening some tests and it works now as I expected.
Now I can go on vacation and the simulation will do as if I’m at home :slightly_smiling:.

I have another question:
I updated openhab to V1.8.2 (still wiith the snapshot binding).
After restart I had to wait about half an hour until the CalDAV biding worked again. In the mean time it was loading more than 5’500 events from the OwnCloud server. I have only PresenceSimulation events for the next 2 weeks in the calendar.
For me it looked like it is loading all the past events.
In the log I have the following entry:

16:22:54.083 [DEBUG] [o.o.i.c.i.job.EventReloaderJob:284 ] - loading resource: /owncloud/remote.php/caldav/calendars/richard/openhab/openHAB-aaed8fc9-fd87-4bba-a31f-e4bf71213492.ics

The name of the .ics file is changing with each entry.
My settings are:
reloadInterval=15
preloadTime=20

How could I stop the loading of all these events?
Are the Bindings from OH 1.8.2 supporting the PresenceSimulation or do I still have to use the Snapshots?

Thank you
Richard

You can try setting this:

caldavio:calendar-id:historicLoadTime=1440

Nevertheless all events could be listed, because i have to query all events and decide then if it is old or new.

Why is your reloadInterval so small? I would set it higher, so you have less load on your server.

Thank you for your answer.
I thought I don’t need all at a time. I will change to 1440.

The historicLoadTime stoped the load of all the .ics files. It’s working just from beginning. Yesterday I had to wait more than half an hour after restart until OH was working.

Hi,

I’m trying to use the google calendar. But it doesn’t work. :frowning:

openhab.cfg:
caldavio:gmail:url=https://www.google.com/calendar/dav/mail@gmail.com/events
caldavio:gmail:disableCertificateVerification=true
caldavio:gmail:username=mail@gmail.com
caldavio:gmail:password=pw
caldavio:gmail:reloadInterval=5
caldavio:gmail:preloadTime=20000
caldavio:gmail:historicLoadTime=1440

caldavCommand:readCalendars=gmail

caldavPersonal:usedCalendars=gmail

Mail and pw should be correct.

In the log I can find the following:

2016-06-07 22:23:32.925 [TRACE] [.i.c.internal.CalDavLoaderImpl] - quering events for filter: CalDavQuery [calendarIds=[gmail], from=2016-06-07T22:23:32.924+02:00, to=null, sort=null]
2016-06-07 22:23:32.926 [DEBUG] [.i.c.internal.CalDavLoaderImpl] - calendar id gmail not found

What’s wrong? There are 3 future events and 1 historic…

Thanks
Tucca

can you find log entries like this

configuration parameter:

Log:

2016-06-08 18:47:03.970 [DEBUG] [o.i.c.internal.CalDavActivator] - CalDav Calendar IO has been started.
2016-06-08 18:47:04.068 [INFO ] [rtuna.ical4j.util.Configurator] - ical4j.properties not found.
2016-06-08 18:47:04.070 [TRACE] [.i.c.internal.CalDavLoaderImpl] - configuration parameter: gmail:disableCertificateVerification
2016-06-08 18:47:04.078 [TRACE] [.i.c.internal.CalDavLoaderImpl] - configuration parameter: gmail:historicLoadTime
2016-06-08 18:47:04.079 [TRACE] [.i.c.internal.CalDavLoaderImpl] - configuration parameter: gmail:password
2016-06-08 18:47:04.081 [TRACE] [.i.c.internal.CalDavLoaderImpl] - configuration parameter: gmail:preloadTime
2016-06-08 18:47:04.081 [TRACE] [.i.c.internal.CalDavLoaderImpl] - configuration parameter: gmail:reloadInterval
2016-06-08 18:47:04.082 [TRACE] [.i.c.internal.CalDavLoaderImpl] - configuration parameter: gmail:url
2016-06-08 18:47:04.083 [TRACE] [.i.c.internal.CalDavLoaderImpl] - configuration parameter: gmail:username
2016-06-08 18:47:04.084 [TRACE] [.i.c.internal.CalDavLoaderImpl] - configuration parameter: service.pid
2016-06-08 18:47:04.085 [TRACE] [.i.c.internal.CalDavLoaderImpl] - config for id ‘gmail’: CalDavConfig [key=gmail, username=mail@gmail.com, password=pw, url=https://www.google.com/calendar/dav/mail@gmail.com/events, reloadMinutes=5, preloadMinutes=20000, disableCertificateVerification=true, lastModifiedFileTimeStampValid=true]
2016-06-08 18:47:04.130 [TRACE] [.i.c.internal.CalDavLoaderImpl] - starting execution…
2016-06-08 18:47:04.131 [INFO ] [.service.AbstractActiveService] - CalDav Loader has been started
2016-06-08 18:47:04.167 [INFO ] [.i.c.internal.CalDavLoaderImpl] - reload job scheduled for: gmail

But I think the problem is may be that google says that the authentification use an unsecure method. Could that the problem?
I don’t see a successful login.

Regards
Tucca

2016-06-08 19:12:14.469 [ERROR] [o.o.i.c.i.job.EventReloaderJob] - error while loading calendar entries: Unexpected response
com.github.sardine.impl.SardineException: Unexpected response
at com.github.sardine.impl.handler.ValidatingResponseHandler.validateResponse(ValidatingResponseHandler.java:48) ~[na:na]
at com.github.sardine.impl.handler.MultiStatusResponseHandler.handleResponse(MultiStatusResponseHandler.java:40) ~[na:na]
at com.github.sardine.impl.handler.MultiStatusResponseHandler.handleResponse(MultiStatusResponseHandler.java:35) ~[na:na]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:218) ~[na:na]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:160) ~[na:na]
at com.github.sardine.impl.SardineImpl.execute(SardineImpl.java:962) ~[na:na]
at com.github.sardine.impl.SardineImpl.list(SardineImpl.java:417) ~[na:na]
at com.github.sardine.impl.SardineImpl.list(SardineImpl.java:409) ~[na:na]
at com.github.sardine.impl.SardineImpl.list(SardineImpl.java:386) ~[na:na]
at org.openhab.io.caldav.internal.job.EventReloaderJob.loadEvents(EventReloaderJob.java:225) ~[na:na]
at org.openhab.io.caldav.internal.job.EventReloaderJob.execute(EventReloaderJob.java:126) ~[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]
2016-06-08 19:12:14.476 [INFO ] [org.quartz.core.JobRunShell ] - Job event-reloader.gmail threw a JobExecutionException:
org.quartz.JobExecutionException: error while loading calendar entries
at org.openhab.io.caldav.internal.job.EventReloaderJob.execute(EventReloaderJob.java:144) ~[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: com.github.sardine.impl.SardineException: Unexpected response
at com.github.sardine.impl.handler.ValidatingResponseHandler.validateResponse(ValidatingResponseHandler.java:48) ~[na:na]
at com.github.sardine.impl.handler.MultiStatusResponseHandler.handleResponse(MultiStatusResponseHandler.java:40) ~[na:na]
at com.github.sardine.impl.handler.MultiStatusResponseHandler.handleResponse(MultiStatusResponseHandler.java:35) ~[na:na]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:218) ~[na:na]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:160) ~[na:na]
at com.github.sardine.impl.SardineImpl.execute(SardineImpl.java:962) ~[na:na]
at com.github.sardine.impl.SardineImpl.list(SardineImpl.java:417) ~[na:na]
at com.github.sardine.impl.SardineImpl.list(SardineImpl.java:409) ~[na:na]
at com.github.sardine.impl.SardineImpl.list(SardineImpl.java:386) ~[na:na]
at org.openhab.io.caldav.internal.job.EventReloaderJob.loadEvents(EventReloaderJob.java:225) ~[na:na]
at org.openhab.io.caldav.internal.job.EventReloaderJob.execute(EventReloaderJob.java:126) ~[na:na]
… 2 common frames omitted

Can you enter the url in the browser and use your authentication. Are you then getting an ics file?

When I enter the url in a browser, then I have to enter my user and password. Even the user and password is correct, it prompts me to enter the authentification again. :frowning: I can’t login and download the file. When i’m using the private Link, it works perfect.
Is it really necessary to publish the calendar to everyone??? Or I’m wrong?

Is owncloud a (simple) alternative?

Thanks in advance
Tucca

It should work with Google as well, you are not the first one which uses Google. If i enter the URL in the browser and enter my credentials i am getting an ICS file.
Your are not publishing the calendar to everyone, you still have to enter your credentials.
With owncloud it will work as well.

Hi querdenker2k,

I switch to owncloud9 now.
But I’m sure if the link in the wiki is working with owncloud 9.

Wiki-Entry:

Müllkalender

caldavio:muell:url=http://192.168.2.5/owncloud/remote.php/caldav/calendars/user/m%C3%BCll
caldavio:muell:username=user
caldavio:muell:password=password
caldavio:muell:reloadInterval=1440
caldavio:muell:preloadTime=2880
caldavio:timeZone=Europe/Berlin

My Config-Entry:
caldavio:haeusele:url=http://192.168.2.23/owncloud/remote.php/dav/calendars/Openhab/myCalendar/
caldavio:haeusele:user=openhab
caldavio:haeusele:password=password
caldavio:haeusele:reloadInterval=5
caldavio:haeusele:preloadTime=2880
caldavio:timeZone=Europe/Berlin

caldavCommand:readCalendars=myCalendar

caldavPersonal:usedCalendars=myCalendar

Items:
DateTime Cal_Event1_Start { caldavPersonal=“calendar:‘myCalendar’ type:‘EVENT’ eventNr:‘1’ value:‘START’” }
DateTime Cal_Event1_End { caldavPersonal=“calendar:‘myCalendar’ type:‘EVENT’ eventNr:‘1’ value:‘End’” }
String Cal_Event1_Name { caldavPersonal=“calendar:‘myCalendar’ type:‘EVENT’ eventNr:‘1’ value:‘SUMMARY’” }

But there is nothing like “calender entries” in the log-File. :frowning:

2016-06-12 16:42:57.654 [DEBUG] [o.i.c.internal.CalDavActivator] - CalDav Calendar IO has been started.
2016-06-12 16:42:57.712 [INFO ] [rtuna.ical4j.util.Configurator] - ical4j.properties not found.
2016-06-12 16:42:57.714 [TRACE] [.i.c.internal.CalDavLoaderImpl] - configuration parameter: myCalendar:password
2016-06-12 16:42:57.726 [TRACE] [.i.c.internal.CalDavLoaderImpl] - configuration parameter: myCalendar:preloadTime
2016-06-12 16:42:57.728 [TRACE] [.i.c.internal.CalDavLoaderImpl] - configuration parameter: myCalendar:reloadInterval
2016-06-12 16:42:57.731 [TRACE] [.i.c.internal.CalDavLoaderImpl] - configuration parameter: myCalendar:url
2016-06-12 16:42:57.733 [TRACE] [.i.c.internal.CalDavLoaderImpl] - configuration parameter: myCalendar:user
2016-06-12 16:42:57.735 [TRACE] [.i.c.internal.CalDavLoaderImpl] - configuration parameter: service.pid
2016-06-12 16:42:57.738 [TRACE] [.i.c.internal.CalDavLoaderImpl] - configuration parameter: timeZone
2016-06-12 16:42:57.740 [DEBUG] [.i.c.internal.CalDavLoaderImpl] - overriding default timezone Etc/UTC with Europe/Berlin
2016-06-12 16:42:57.758 [DEBUG] [.i.c.internal.CalDavLoaderImpl] - found timeZone: Europe/Berlin

I’m sorry, but I don’t see my mistake…

Thanks
Tucca