New CalDAV Binding available

I can live with the inverse configuration, that’s only cosmetic.

I just set the switch to ON and I don’t touch it again. Then it goes OFF “on it’s own” and the status is undefined.

Richard

Ah ok, thanks i got it now and will check this.

Can you extend the logging for the caldav-command binding. I can’t find any code which could change the item to UNDEFINED. What confuses me is that the change to UNDEFINED is 7 seconds later then the ON change.

Actually I’m also getting the change to undefined. However, mine is happening a few minutes later, not seconds.

The delay changes with the time when you set the switch.

The message is also repeated every few seconds. Here a snapshot of my event log:

2016-01-24 17:23:33 - PresenceSimulation state updated to Undefined
2016-01-24 17:23:33 - PresenceSimulation state updated to Undefined
2016-01-24 17:23:52 - PresenceSimulation state updated to Undefined
2016-01-24 17:24:30 - PresenceSimulation received command ON
2016-01-24 17:24:53 - PresenceSimulation state updated to Undefined

For testing, I have set the reloadInterval to 1 minute, I’m not home, so I can’t test what’s happen if I extend it. This evening as well as tomorrow evening I’m also out. I will test it on Thursday.

Ah, i got it. Will provide a SNAPSHOT for testing soon.

Ok, here it is: http://speedy.sh/ads5b/org.openhab.binding.caldav-command-1.8.0-SNAPSHOT.jar

My Events are with Cyrillic titles. They are not garbage text when transferred to a sting item. Any support for Unicode?

I tested the new Snapshot, but without any success.

I get it less and less working. It doesn’t matter of the position of the Presencesimulationswitch

Now I have the following:

23:00:27.936 [TRACE] [o.o.i.c.i.job.EventReloaderJob:233  ] - eventContainer found: true
23:00:27.936 [TRACE] [o.o.i.c.i.job.EventReloaderJob:234  ] - last resource modification: 2016-01-28T22:51:34.000+01:00
23:00:27.936 [TRACE] [o.o.i.c.i.job.EventReloaderJob:235  ] - last change of already loaded event: 2016-01-28T22:51:34.000+01:00
23:00:27.936 [DEBUG] [o.o.i.c.i.job.EventReloaderJob:272  ] - loading resource:/owncloud/remote.php/caldav/calendars/richard/command/openHAB-83e7e389-0cad-4fda-a979-4cfda0820e5b.ics
23:00:29.699 [TRACE] [o.o.i.c.i.job.EventReloaderJob:324  ] - loading event: command-83e7e389-0cad-4fda-a979-4cfda0820e5b--1578809666--1578749666:Licht_Gaestezimmer
23:00:29.715 [TRACE] [.i.c.internal.CalDavLoaderImpl:529  ] - quering events for filter: CalDavQuery [calendarIds=[command], from=2016-01-28T23:00:29.715+01:00, to=null, sort=null]
23:00:29.715 [DEBUG] [.i.c.internal.CalDavLoaderImpl:578  ] - return event listfor CalDavQuery [calendarIds=[command], from=2016-01-28T23:00:29.715+01:00, to=null, sort=null] with 0 entries
23:00:29.715 [TRACE] [o.o.b.c.internal.CalDavBinding:313  ] - update item statefor item: gPS
23:00:29.715 [TRACE] [o.o.b.c.internal.CalDavBinding:347  ] - handling event oftype: DISABLE
23:00:29.715 [DEBUG] [o.o.b.c.internal.CalDavBinding:200  ] - calendar reloaded: command

I think I will restart on the weekend from beginning.

Hi,
I’m reposting my question formerly posted in the topic "CalDAV Simple example to turn something ON and OFF? " (didn’t noticed it was solved.)

I’m quite new to openhab and tried to tweak around the caldav command binding but i get this error log :
2016-01-27 19:05:52.734 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'mysql.persist’
2016-01-27 19:05:57.366 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'default.items’
2016-01-27 19:06:20.850 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'default.sitemap’
2016-01-27 19:06:31.384 [INFO ] [penhab.io.rest.RESTApplication] - Started REST API at /rest
2016-01-27 19:06:37.322 [INFO ] [.o.u.w.i.servlet.WebAppServlet] - Started Classic UI at /classicui/openhab.app
2016-01-27 19:06:48.740 [INFO ] [.service.AbstractActiveService] - CalDav Loader has been started
2016-01-27 19:06:49.170 [INFO ] [.i.c.internal.CalDavLoaderImpl] - reload job scheduled for: com_test
2016-01-27 19:07:04.208 [ERROR] [o.o.i.c.i.job.EventReloaderJob] - error while loading calendar entries: handshake alert: unrecognized_name
javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name

I don’t see what’s wrong in my configuration. When i’m connecting to my caldav account on owncloud with curl and the same url, username and password than the one configured in the openhab.cfg file everything works fine.

Is the “caldavCommand:readCalendars=…” stuff mandatory? According to my understanding of the wiki I thought not?

Thanks for your help.

Eric

You are connecting with ssl right? Is it a self-signed certificate? If yes, have you tried to set disableCertificateValidation to true? Are you working on your local network, so you have the option to use it without ssl?
caldavCommand:readCalendars is not mandatory, but if you want to use the caldav-command binding you should place a calendar reference there, otherwise it will not work.

Sorry i havn’t seen the other post.

You can check this: http://speedy.sh/8GB5s/org.openhab.io.caldav-1.8.0-SNAPSHOT.jar
I have added an additional property for the openhab.cfg: charset

Thank you for your answer.

I’m working with an owncloud provider so with ssl.
I’ve tested setting disableCertificateValidation to true once again and nothing happened.
Tryin another provider : it work’s…

I’m going to add the caldavCommand:readCalendar… to go a step further…

@glufonec: Does it work with the charset property?
@inkskull: Well, do you still have a problem?
@richard_altherr: There isn’t an error. What is the problem?

@querdenker2k

Sorry, but was busy on the weekend withthe family and made only a short test which failed due to an error I made by my self.
I just started testing again, but I have a error which I can’t specify.
The first run worked with one exception: Only the end of the simulation was written into the calendar again (with offset), but not the start.
As I changed the switch to disable the simulation it did nothing - like it should. A new time didn’t worked, I got this error:

2016-02-01 17:51:28.180 [ERROR] [o.o.i.c.i.job.EventReloaderJob] - error while loading calendar entries: null
java.lang.NullPointerException: null
	at org.openhab.io.caldav.internal.job.EventReloaderJob.loadEvents(EventReloaderJob.java:256) ~[na:na]
	at org.openhab.io.caldav.internal.job.EventReloaderJob.execute(EventReloaderJob.java:122) ~[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]

The error occured during the simulation - befor the end of the simulation and after that I got it til now.

Thank you
Richard

@querdenker2k

I made a 2nd test with the same result.
I got the end of the duration of the simulation back in to thee calendar, but not the begining.
The binding also changed the start entry in the calendar.
Before simulation it was:

BEGIN:Licht_Buero:ON

After the simulation it was:

BEGIN:Licht_Buero:ON
BETWEEN:01.02.2016T19:15:00:Licht_Buero:ON

The end isn’t changed, it is written at the same time in 2 days (offset=2). The beginning is not written to the calendar, it is only changed. After the start I got again the above mentioned error.

Thanks it works as intended.

Thank you for writing this binding. Basically it seems to work beside one oddness with especially long events: For example, one event is from 7 to 22 to switch heating on and off. So if I change anything at the event or restart openhab, the event is triggered when it is later than 7 (and earlier to 22). So the binding seems to remember for every event whether the event was triggered already and it will retrigger the start-part if I update it at a later time.

caldavio:automation:charset=utf8

Works great!

This is a feature. An events begin is triggered if an event currently occurs (normally this is triggered when the event occurs, but as you described it is triggered as well when openhab starts).
What do you mean with your last sentence?

Maybe to make it clearer: an event is triggered when:

  • when the event starts
  • when openhab is restarted while the event goes on
  • when the event is changed while it is going on (e.g. change start time by 1 minute) which is a little bit weird.