[SOLVED] Caldav binding keeps loading "old" configuration

Hi,

I’m using the 1.14.0-snapshot caldav binding
It was working when using 1 calendar (google).
Now I’ve added a second one. I made a mistake in the caldavio.cfg file at first.
I’ve removed the mistake but the logfiles keeps showing the mistake which is corrected?!
the line in the log does not exist anymore…

  • shutdown openhab and issued a “openhab-cli clean-cache” command.

  • removed the caldavio.cfg file and recreated it

But still, the same error is coming back…and the items are not filled…
How do I remove the “cache” of that binding?

caldavio.cfg:

################################### CalDAV IO Binding ###################################

caldavio:test:url=https://www.google.com/calendar/dav/calendar1@group.calendar.google.com/events
caldavio:test:username=my.user
caldavio:test:password=my.pass
caldavio:test:reloadInterval=1
caldavio:test:preloadTime=2880
caldavio:calendar1@group.calendar.google.com:disableCertificateVerification=true

#Trash-bin
caldavio:kliko:url=https://www.google.com/calendar/dav/calendar2@group.calendar.google.com/events
caldavio:kliko:username=my.user
caldavio:kliko:password=my.pass
caldavio:kliko:reloadInterval=1
caldavio:kliko:preloadTime=2880
caldavio:calendar2@group.calendar.google.com:disableCertificateVerification=true

# Timezone for events which does not have a timeZone information.
# Normally this is not required
#timeZone=

# Charset which should be used for reading an event.
#charset=UTF-8

The caldavpersonal.cfg:

############################# CalDAV Personal Binding ################################
# see CalDAV IO Binding
# Used to toggle switch items for presence. Switched to ON if an event in the calendar occurs.
# And back to OFF if the event ends.
# Can also be used to show upcoming or active events
# 
# Which calendars should be used to detect presence (comma separated)
usedCalendars=test,kliko
# 
# If the location of the event is one of this identifiers, the presence will not be changed.
# Can be used for events which are at home or are just reminders. (comma separated, optional)
# homeIdentifiers=

The error message in the log: caldavio:kliko:calendar2@…

[ERROR] [org.apache.felix.configadmin                      ] - [org.osgi.service.cm.ManagedService, org.openhab.io.caldav.CalDavLoader, id=129, bundle=259/mvn:org.openhab.io/org.openhab.io.caldav/1.14.0-SNAPSHOT]: Updating property CalDAV IO of configuration org.openhab.caldavio caused a problem: Unable to parse configuration parameter: kliko:calendar1@group.calendar.google.com:disableCertificateVerification
        at org.openhab.io.caldav.internal.CalDavLoaderImpl.updated(CalDavLoaderImpl.java:187) ~[?:?]

The mistake was that I had caldavio:kliko:calendar1@...disableCertificateVerification=true
and removed “kliko” from the line…but still the log files are complaining about it…

/Jasper

Do a backup of: /userdata/config/org/openhab/caldavio.config

(or /var/lib/openhab2/config/org/openhab/caldavio.config )

Then delete the file “caldavio.config”.
Restart openhab.

The file should be recreated with the correct contents of your caldavio.cfg.

Eventually do the same with caldavPersonal.config

Thank you, i’ll give it a try and report back @Celaeno1!

I followed your guidlines. That did remove the “error” of the old configuration. However, it produces a new one. It is now complaining that for calendar. As you can see my config files, I configured two calendars WITH url’s specified…

14-Nov-2019 09:56:29.910 [WARN ] [org.openhab.io.caldav.internal.CalDavLoaderImpl   ] - A URL must be configured for calendar 'calendar1@group.calendar.google.com'
14-Nov-2019 09:56:29.927 [ERROR] [org.apache.felix.configadmin                      ] - [org.osgi.service.cm.ManagedService, org.openhab.io.caldav.CalDavLoader, id=129, bundle=277/mvn:org.openhab.io/org.openhab.io.caldav/1.14.0-SNAPSHOT]: Updating property CalDAV IO of configuration org.openhab.caldavio caused a problem: A URL must be configured for calendar 'calendar1@group.calendar.google.com'
        at org.openhab.io.caldav.internal.CalDavLoaderImpl.updated(CalDavLoaderImpl.java:229) ~[?:?]

Seems that this binding has become a bit buggy with OpenHab2.
Not complaining! but it just seems that the binding is struggling a bit since it’s based on the 1.x release…
Anyway, Still not receiving anything from the calendar as the new error now causes an issue…

Ok, the error messages seems to be gone.
There was an error in the caldavio.config, when it was recreated…not sure why that is. But I removed the “mess” in the config file and now it seems that at least the config is loaded correct. Now the problem is that I don’t get anything loaded in my items…
The remain “UNDEF”…the logfiles show:

14-Nov-2019 10:23:31.758 [DEBUG] [caldav_personal.internal.CalDavBindingProviderImpl] - adding item: OfficeCalName0
14-Nov-2019 10:23:31.759 [DEBUG] [hab.binding.caldav_personal.internal.CalDavBinding] - no event found for OfficeCalName0, setting to UNDEF
14-Nov-2019 10:23:31.761 [TRACE] [caldav_personal.internal.CalDavBindingProviderImpl] - handling config: calendar:test type:ACTIVE eventNr:1 value:START
14-Nov-2019 10:23:31.761 [TRACE] [caldav_personal.internal.CalDavBindingProviderImpl] - found values: calendar=[test], type=ACTIVE, eventNr=1, value=START, filterName=null, filterCategory=[]
14-Nov-2019 10:23:31.762 [DEBUG] [caldav_personal.internal.CalDavBindingProviderImpl] - adding item: OfficeCalTime0
14-Nov-2019 10:23:31.763 [DEBUG] [hab.binding.caldav_personal.internal.CalDavBinding] - no event found for OfficeCalTime0, setting to UNDEF
14-Nov-2019 10:23:31.764 [TRACE] [caldav_personal.internal.CalDavBindingProviderImpl] - handling config: calendar:test type:UPCOMING eventNr:1 value:NAME
14-Nov-2019 10:23:31.765 [TRACE] [caldav_personal.internal.CalDavBindingProviderImpl] - found values: calendar=[test], type=UPCOMING, eventNr=1, value=NAME, filterName=null, filterCategory=[]
14-Nov-2019 10:23:31.766 [DEBUG] [caldav_personal.internal.CalDavBindingProviderImpl] - adding item: OfficeCalName1
14-Nov-2019 10:23:31.767 [DEBUG] [hab.binding.caldav_personal.internal.CalDavBinding] - no event found for OfficeCalName1, setting to UNDEF
14-Nov-2019 10:23:31.768 [TRACE] [caldav_personal.internal.CalDavBindingProviderImpl] - handling config: calendar:test type:UPCOMING eventNr:1 value:START
14-Nov-2019 10:23:31.769 [TRACE] [caldav_personal.internal.CalDavBindingProviderImpl] - found values: calendar=[test], type=UPCOMING, eventNr=1, value=START, filterName=null, filterCategory=[]
14-Nov-2019 10:23:31.770 [DEBUG] [caldav_personal.internal.CalDavBindingProviderImpl] - adding item: OfficeCalTime1
14-Nov-2019 10:23:31.773 [DEBUG] [hab.binding.caldav_personal.internal.CalDavBinding] - no event found for OfficeCalTime1, setting to UNDEF
14-Nov-2019 10:23:31.775 [TRACE] [caldav_personal.internal.CalDavBindingProviderImpl] - handling config: calendar:test type:UPCOMING eventNr:2 value:NAME
14-Nov-2019 10:23:31.775 [TRACE] [caldav_personal.internal.CalDavBindingProviderImpl] - found values: calendar=[test], type=UPCOMING, eventNr=2, value=NAME, filterName=null, filterCategory=[]
14-Nov-2019 10:23:31.776 [DEBUG] [caldav_personal.internal.CalDavBindingProviderImpl] - adding item: OfficeCalName2
14-Nov-2019 10:23:31.779 [DEBUG] [hab.binding.caldav_personal.internal.CalDavBinding] - no event found for OfficeCalName2, setting to UNDEF
14-Nov-2019 10:23:31.780 [TRACE] [caldav_personal.internal.CalDavBindingProviderImpl] - handling config: calendar:test type:UPCOMING eventNr:2 value:START
14-Nov-2019 10:23:31.783 [TRACE] [caldav_personal.internal.CalDavBindingProviderImpl] - found values: calendar=[test], type=UPCOMING, eventNr=2, value=START, filterName=null, filterCategory=[]
14-Nov-2019 10:23:31.785 [DEBUG] [caldav_personal.internal.CalDavBindingProviderImpl] - adding item: OfficeCalTime2
14-Nov-2019 10:23:31.785 [DEBUG] [hab.binding.caldav_personal.internal.CalDavBinding] - no event found for OfficeCalTime2, setting to UNDEF

My items are created as follow:

String KlikoItem1	"Next event [%s]"	<calendar>	{ caldavPersonal="calendar:kliko type:EVENT eventNr:1 value:NAME" }
String KlikoItem2	"Next event [%s]"	<calendar>	{ caldavPersonal="calendar:kliko type:EVENT eventNr:2 value:NAME" }
String KlikoItem3	"Next event [%s]"	<calendar>	{ caldavPersonal="calendar:kliko type:EVENT eventNr:3 value:NAME" }
String OfficeCalName0	"Current [%s]"		<calendar>	{ caldavPersonal="calendar:test type:ACTIVE eventNr:1 value:NAME" } 
DateTime OfficeCalTime0	"Start [%1$tT, %1$td.%1$tm.%1$tY]"			<calendar>	{ caldavPersonal="calendar:test type:ACTIVE eventNr:1 value:START" } 
String OfficeCalName1	"Next event [%s]"	<calendar>	{ caldavPersonal="calendar:test type:UPCOMING eventNr:1 value:NAME" }
DateTime OfficeCalTime1	"Start [%1$tT, %1$td.%1$tm.%1$tY]"			<calendar>	{ caldavPersonal="calendar:test type:UPCOMING eventNr:1 value:START" }
String OfficeCalName2	"2nd next event [%s]" <calendar> { caldavPersonal="calendar:test type:UPCOMING eventNr:2 value:NAME" }
DateTime OfficeCalTime2	"Start [%1$tT, %1$td.%1$tm.%1$tY]" 			<calendar> { caldavPersonal="calendar:test type:UPCOMING eventNr:2 value:START" }

So, it seems to do something, but not what I expect…

@JdeJong

I thought the caldavio.cfg should be:

################################### CalDAV IO Binding ###################################

caldavio:test:url=https://www.google.com/calendar/dav/calendar1@group.calendar.google.com/events
caldavio:test:username=my.user
caldavio:test:password=my.pass
caldavio:test:reloadInterval=1
caldavio:test:preloadTime=2880
caldavio:test:charset=utf8
caldavio:test:disableCertificateVerification=true


#Trash-bin
caldavio:kliko:url=https://www.google.com/calendar/dav/calendar2@group.calendar.google.com/events
caldavio:kliko:username=my.user
caldavio:kliko:password=my.pass
caldavio:kliko:reloadInterval=1
caldavio:kliko:preloadTime=2880
caldavio:kliko:charset=utf8
caldavio:kliko:disableCertificateVerification=true

.
.
and the caldavPersonal.cfg should be:

############################# CalDAV Personal Binding ################################
# see CalDAV IO Binding
# Used to toggle switch items for presence. Switched to ON if an event in the calendar occurs.
# And back to OFF if the event ends.
# Can also be used to show upcoming or active events
# 
# Which calendars should be used to detect presence (comma separated)
caldavPersonal:usedCalendars=test,kliko
# 
# If the location of the event is one of this identifiers, the presence will not be changed.
# Can be used for events which are at home or are just reminders. (comma separated, optional)
# homeIdentifiers=

please try this!

Hi again,

I’ve tried that with the disableCertificateVerification=true as per your example, but that also produces an error:

14-Nov-2019 10:47:52.940 [ERROR] [org.apache.felix.configadmin                      ] - [org.osgi.service.cm.ManagedService, org.openhab.io.caldav.CalDavLoader, id=129, bundle=277/mvn:org.openhab.io/org.openhab.io.caldav/1.14.0-SNAPSHOT]: Updating property CalDAV IO of configuration org.openhab.caldavio caused a problem: Unable to parse configuration parameter: kliko:calendar1@group.calendar.google.com:disableCertificateVerification
        at org.openhab.io.caldav.internal.CalDavLoaderImpl.updated(CalDavLoaderImpl.java:187) ~[?:?]

I’ve also update the caldavPersonal.cfg with the “caldavPersonal:usedCalendars…” in front…
I’m removing all the cache again and will restart…

@JdeJong

You have to delete the caldavio.config and caldavPersonal.config again and restart openhab.

Both in folder: /userdata/config/org/openhab/
(or: /var/lib/openhab2/config/org/openhab/ )

Yes, doing so…
it’s in var/lib… :wink:
I’m on Debian…with apt installation

Is it running now?
If not, please post your caldavio.cfg and caldavPersonal.cfg here again. Thanks!

not yet, I’m rebooting the complete server as well…
one sec…

Now it’s complaining again about the url missing…pfff

14-Nov-2019 11:04:29.139 [WARN ] [org.openhab.io.caldav.internal.CalDavLoaderImpl   ] - A URL must be configured for calendar 'calendar1@group.calendar.google.com'
14-Nov-2019 11:04:29.154 [ERROR] [org.apache.felix.configadmin                      ] - [org.osgi.service.cm.ManagedService, org.openhab.io.caldav.CalDavLoader, id=129, bundle=277/mvn:org.openhab.io/org.openhab.io.caldav/1.14.0-SNAPSHOT]: Updating property CalDAV IO of configuration org.openhab.caldavio caused a problem: A URL must be configured for calendar 'calendar1@group.calendar.google.com'
        at org.openhab.io.caldav.internal.CalDavLoaderImpl.updated(CalDavLoaderImpl.java:229) ~[?:?]

caldavio.cfg:

################################### CalDAV IO Binding ###################################
caldavio:test:url=https://www.google.com/calendar/dav/calendar1@group.calendar.google.com/events
caldavio:test:username=my.user
caldavio:test:password=my.pass
caldavio:test:reloadInterval=10
caldavio:test:preloadTime=1440
caldavio:calendar1@group.calendar.google.com:disableCertificateVerification=true

#Trash-bin
caldavio:kliko:url=https://www.google.com/calendar/dav/calendar2@group.calendar.google.com/events
caldavio:kliko:username=my.user
caldavio:kliko:password=my.pass
caldavio:kliko:reloadInterval=11
caldavio:kliko:preloadTime=2880
caldavio:calendar2@group.calendar.google.com:disableCertificateVerification=true

# Timezone for events which does not have a timeZone information.
# Normally this is not required
#timeZone=

# Charset which should be used for reading an event.
#charset=UTF-8

caldavPersonal.cfg:

############################# CalDAV Personal Binding ################################
# see CalDAV IO Binding
# Used to toggle switch items for presence. Switched to ON if an event in the calendar occurs.
# And back to OFF if the event ends.
# Can also be used to show upcoming or active events
# 
# Which calendars should be used to detect presence (comma separated)
caldavPersonal:usedCalendars=test,kliko
# 
# If the location of the event is one of this identifiers, the presence will not be changed.
# Can be used for events which are at home or are just reminders. (comma separated, optional)
# homeIdentifiers=

Your caldavPersonal.cfg is OK now. But caldavio.cfg should be:

################################### CalDAV IO Binding ###################################
caldavio:test:url=https://www.google.com/calendar/dav/calendar1@group.calendar.google.com/events
caldavio:test:username=my.user
caldavio:test:password=my.pass
caldavio:test:reloadInterval=10
caldavio:test:preloadTime=1440
caldavio:test:disableCertificateVerification=true

#Trash-bin
caldavio:kliko:url=https://www.google.com/calendar/dav/calendar2@group.calendar.google.com/events
caldavio:kliko:username=my.user
caldavio:kliko:password=my.pass
caldavio:kliko:reloadInterval=11
caldavio:kliko:preloadTime=2880
caldavio:kliko:disableCertificateVerification=true

# Timezone for events which does not have a timeZone information.
# Normally this is not required
#timeZone=

# Charset which should be used for reading an event.
#charset=UTF-8

using it like this creates parse errors. I’ve tried this as well…

Unable to parse configuration parameter: kliko:calendar1@group.calendar.google.com:disableCertificateVerification

This seems to be wrong, because it is test:calendar1

What is in caldavio.config and caldavPersonal.config? Could you also please post it here?

1 Like

You are right…was misreading your cfg…
Changed it now, removed the .config files and restarting again…fingers crossed!

promising logfiles so far!

14-Nov-2019 11:22:04.535 [DEBUG] [b.binding.caldav_personal.internal.CalDavActivator] - CalDav-Presence binding has been stopped.
14-Nov-2019 11:22:41.624 [INFO ] [org.openhab.io.caldav.internal.CalDavLoaderImpl   ] - CalDAV IO is properly configured.
14-Nov-2019 11:22:42.122 [INFO ] [org.openhab.io.caldav.internal.CalDavLoaderImpl   ] - reload job scheduled for: test
14-Nov-2019 11:22:42.124 [INFO ] [org.openhab.io.caldav.internal.CalDavLoaderImpl   ] - reload job scheduled for: kliko

YES!!!
It seems to be working…the logfiles show events now!!
and my items are getting filled with info!

image

the first item “NEXT kliko” is from calendar1
the next item “Next normal” is from calendar2

So…it’s working!
Cannot thank you enough @Celaeno1!
For the solution and debugging with me…but also for your time you spent for me! HIGHLY appreciated!!!

The solutions was exactly what you pointed out:

caldavio:test:disableCertificateVerification=true
caldavio:kliko:disableCertificateVerification=true

Becaused I used the actual calendar name from the Google calendar…it did not make any sense for the binding…now, using the correct names…it is working.

1 Like

I’m happy for you! :slight_smile:

Could you please also tick the “Solution Square” here? Other users may find this helpful, too.

1 Like

Did already :wink:
Again, thanks so much @Celaeno1!
So much to learn every day!

1 Like