CalDAV personal: Switch item ON only during server reload, but on time for OFF

Which folder is the right one?

The right one to place the jar file? If not, please tell me the location of the folder so I can understand the question as I don’t use this binding.

Just checked the binding doc’s and see there is an caldavcommand.cfg and caldavcommandPersonnel.cfg file.

Are you showing more than one of each? If so, did you clean the cache after removing the binding via PapeerUI?

EDIT: @Tobi77 looking back up a few post I think you were asking where to place the jar file. It goes in /usr/share/openhab2/addons

Here;s a screen shot example were I have the Alexa jar installed in addons.

Screenshot%20at%202019-01-06%2009-26-58

Hope this helps.

There have been no changes to CalDAV-personal in a year.

My setup is from today and clean, I only installed the CalDAV-binding. Still it does not work.
What can I do?

I notice the behaviour has changed from the original, where you were getting the ON delayed, and now it appears the ON does not occur at all, at least as far as the switch is concerned.

The openhab.log still shows both begin and end occurring as expected:

2019-01-06 15:05:00.014 [INFO ] [nhab.io.caldav.internal.job.EventJob] - event BEGIN for: 4a57a9bc-965e-499c-a4cc-ffe525ac917a.kalender.gmx.net(ccc@06.01.2019/15:05-06.01.2019/15:10)
2019-01-06 15:10:00.002 [INFO ] [nhab.io.caldav.internal.job.EventJob] - event END for: 4a57a9bc-965e-499c-a4cc-ffe525ac917a.kalender.gmx.net(ccc@06.01.2019/15:05-06.01.2019/15:10)

I think I see the problem, but I’m not sure why it’s happening:

2019-01-06 15:02:43.510 [TRACE] [.io.caldav.internal.CalDavLoaderImpl] - listeners for events: 0

Really? You could have just as easily tagged me in THAT thread. Please delete your post and do that.

@namraccr The difference is simple to explain: In the previous example, the calendar server update period occurred during the event. At this occasion, the binding checks whether the switch should be on or off, and does the right command (which is delayed then).

In my last example, I chose a server update period of 60min and there was no coincidence between the server update and the event. So there was no delayed ON.

Maybe I should correct the title of this discussion? Something like “CalDAV personal: Switch item scheduler is not switching to ON” or so?

Would it make sense to attach the ICS files? Or has someone a CalDAV calendar or server available to share? Maybe it is related to my provider GMX.de

@namraccr I also tested another CalDAV server. Same weird behaviour.

To summarize: I changed the installation and started from scratch. I changed the CalDAV provider. Still no success. Whether I do a fundamental mistake in using the Switch, or the Switch implementation in the binding is broken.

To everybody who works with the binding:
Please, could somebody share a working example with me? Maybe you can send your items definition, your caldavio.cfg and your caldavPersonal.cfg - thanks a lot in advance!

If there is any chance you can recommend a CalDAV calendar provider I could try, it would be very glad!

Thanks,
Tobias

Hi Tobias, I am using this CalDav binding with an ICS file imported into my google calender. It is supposed to display the next 5 events (waste disposal in my street) in Habpanel. The binding works well for me, if you like I can send you my files.
However the only problem I have is that the item file gets refreshed if I change it and save it again. I haven’t found out how openhab is doing an automatic refresh every day.
The problem is that if I don’t touch the items file at all, it still shows me events from the past. I only want to see the upcoming ones.
Not sure if my comment helps you at all…

Dear Manuel,

I take any help I can find. So if you don’t mind, I would appreciate if you send your config files and item definition… Thank you!

Hi Tobias,

using google calender please be aware that your account has two factor authorisation enabled. Afterwards you can create an app password, which will be used for authentication (not your usual google password).

There is a superb description from this fellow:
https://onesmarthome.de/smarthome-openhab-2-caldav-binding/

Here are my configs:

caldavio.cfg

caldavio:Muellkalender:url=https://www.google.com/calendar/dav/<yourCalenderID>@group.calendar.google.com/events

caldavio:Muellkalender:username=<yourGoogleUsername>

caldavio:Muellkalender:password=<yourAppPassword>

caldavio:Muellkalender:reloadInterval=10

caldavio:Muellkalender:preloadTime=44640

caldavio:Muellkalender:disableCertificateVerification=true

caldavPersonal.cfg

caldavPersonal:usedCalendars=Muellkalender

muellkalender.items

String CalDav_Muelltonne1 "Tonne [%s]" &lt;calendar&gt; { caldavPersonal="calendar:Muellkalender type:EVENT eventNr:1 value:NAME" }
DateTime CalDav_Date1 "Datum der Abholung [%1$td.%1$tm.%1$tY]" &lt;calendar&gt; { caldavPersonal="calendar:Muellkalender type:EVENT eventNr:1 value:START" }
DateTime CalDav_Date1_End "Datum der Abholung [%1$td.%1$tm.%1$tY]" &lt;calendar&gt; { caldavPersonal="calendar:Muellkalender type:EVENT eventNr:1 value:END" }
String CalDav_Date1_Place "Ort der Abholung [%1$td.%1$tm.%1$tY]" &lt;calendar&gt; { caldavPersonal="calendar:Muellkalender type:EVENT eventNr:1 value:PLACE" }

I hope the google calender will work out for you. This 22mins issue sounds annoying and I would have freaked out already :wink:
Cheers
Manuel

@moodsta Thanks a lot. But you dont’t use the Switch that can be triggered by CalDAV-personal - right? So basically my calendar works, and I can import alle the Strings and DateTimes correctly. Still, the Switch does not work…

Today I tested OH snapshot (2.5 #1491) on an x86 Linux machine using Xubuntu.

I just copied my config and item files. The missing fire for the Switch occurs there as well.

Some people reported that their Switch is working. Is it possible that they chose a periodic server check (reloadInterval) of one minute or so? This would mean the trigger comes on time, but that also the caldendar server is called every minute which makes no sense…

Same issue is reported here:

and here:

The user who reported the issue already here

told that the Switch did not work reliability already in OpenHAB 1 back in 2016… So it seems not to be an issue of the major version change!

Here, a fix is proposed. I someone able to test github code?

I tested the fix. It works for me!

However, it seems to be unclear WHY it works. I put a debug log on the GitHub discussion. @namraccr, I hope this helps.

We need your help!

Would somebody be interested in testing a fix that will make the CalDAV binding reliable? The developers ask for testing before publishing the code, and thus we need some testers that provide debug logs.

Details see on GitHub: https://github.com/openhab/openhab1-addons/issues/5744#issuecomment-459998293

Thanks!

@namraccr posted a week log on the GitHub thread if this helps :slight_smile:

Still get single double BEGINS, but for @MathiasMoog it works. Would you be able to see from the logs whether this is a problem on my side?