Caldav Problems

Hi Guys,

are there still Problems with the caldav binding on OH 2.2.0?

I have the folder Muell (path: /var/lib/openhab2/etc/caldav/Muell) filled with ics Files but the caldav binding could not find the Folder.

2018-03-13 07:39:47.485 [DEBUG] [.io.caldav.internal.CalDavLoaderImpl] - return event list for CalDavQuery [calendarIds=[Muell], from=2018-03-13T07:39:47.340+01:00, to=null, sort=ASCENDING, filterName=null] with 0 entries
2018-03-13 07:39:47.491 [DEBUG] [.io.caldav.internal.CalDavLoaderImpl] - return event list for CalDavQuery [calendarIds=[Muell], from=2018-03-13T07:39:47.239+01:00, to=null, sort=ASCENDING, filterName=null] with 0 entries
2018-03-13 07:39:47.494 [DEBUG] [.io.caldav.internal.CalDavLoaderImpl] - calendar id Muell not found
2018-03-13 07:39:47.496 [DEBUG] [.io.caldav.internal.CalDavLoaderImpl] - return event list for CalDavQuery [calendarIds=[Muell], from=2018-03-13T07:39:47.493+01:00, to=null, sort=null, filterName=null] with 0 entries
2018-03-13 07:39:47.496 [DEBUG] [.io.caldav.internal.CalDavLoaderImpl] - calendar id Muell not found
2018-03-13 07:39:47.502 [DEBUG] [.io.caldav.internal.CalDavLoaderImpl] - return event list for CalDavQuery [calendarIds=[Muell], from=2018-03-13T07:39:47.496+01:00, to=null, sort=ASCENDING, filterName=null] with 0 entries
2018-03-13 07:39:47.507 [DEBUG] [.io.caldav.internal.CalDavLoaderImpl] - calendar id Muell not found

Install over the addons Folder without Paper UI didnĀ“t work also.
I tried to clean the Cache, but when i delete the content of Cache and tmp, OH has no bindings anymore.

i hope you can help me.

best regards
vaillan

Hi,
Can you post your caldavio.cfg and caldavCommand.cfg please?

ok, sorry.
I checked my config 100 times so i assumed that there has to be a binding Problem.:wink:

So i hope there is no config failure, that would be very embarrassing.:blush:

caldavio.cfg:

caldavio:Muell:url=https://www.google.com/calendar/dav/calenderid@group.calendar.google.com/events
caldavio:Muell:username=email adress
caldavio:Muell:password=pwd
caldavio:Muell:reloadInterval=60
caldavio:Muell:preloadTime=2880

caldavPersonal.cfg

caldavPersonal:usedCalendars=Muell

caldavCommand.cfg

caldavCommand:readCalendars=Muell

best regards
vaillan

The caldavio:username=emailaddress

Remove the @gmail.com and only use the first part of the email address

The Connection to the Google calender works, itĀ“s not an authentication Problem - it is possible to Login with email or username.

But i found the Problem.
It seems that, changing the config in the Services Folder does not overwrite the binding config.
So i had some wrong config Parameters in the /var/lib/openhab2/config/org/openhab config file.

Now i cleared up the wrong Parameters in the config file and get a different error:

2018-03-13 12:17:07.315 [DEBUG] [caldav.internal.job.EventReloaderJob] - Processing event ā€˜Restabfallbehaelterā€™
2018-03-13 12:17:07.318 [DEBUG] [caldav.internal.job.EventReloaderJob] - No periods exist for event ā€˜Restabfallbehaelterā€™
2018-03-13 12:17:07.324 [DEBUG] [.io.caldav.internal.CalDavLoaderImpl] - event is already in event map and newer -> delete the old one, reschedule timer
2018-03-13 12:17:07.336 [DEBUG] [.io.caldav.internal.CalDavLoaderImpl] - return event list for CalDavQuery [calendarIds=[Muell], from=2018-03-13T12:17:07.335+01:00, to=null, sort=null, filterName=null] with 1 entries
2018-03-13 12:17:07.339 [DEBUG] [.io.caldav.internal.CalDavLoaderImpl] - return event list for CalDavQuery [calendarIds=[Muell], from=2018-03-13T12:17:07.339+01:00, to=null, sort=ASCENDING, filterName=null] with 1 entries

Here is my items config:

String 		CalendarName1		   	"Tonne [%s]"  								<calendar>	{ caldavPersonal="calendar:Muell type:Event eventNr:1 value:NAME" }
DateTime    CalendarTimeStart1		"Datum der Abholung [%1$td.%1$tm.%1$tY]"    <calendar>	{ caldavPersonal="calendar:Muell type:Event eventNr:1 value:START" }
DateTime    CalendarTimeEnd1		"Datum der Abholung [%1$td.%1$tm.%1$tY]"    <calendar>	{ caldavPersonal="calendar:Muell type:Event eventNr:1 value:END" }

Hope you have a solution for me

Vaillan

Try changing the preload time to 1439 (1 minute less than a day)
I had problems too with repeat events before and that solved it
Maybe thatā€™s it
Change the preload time

caldavio:Muell:preloadTime=1439

and restart openHAB

the preloadtime was also my assumption - i had not enough Meetings in my calender.

I set the preloadtime to 18720 now it works.

puhh this was hard work to get it done.

Here is my Problem summary with the Solutions:

1.Problem:

               401 authentication Error with the Google calender.

Solution:

               You have to enable unsecure Apps at your Google account otherwise Google will        
               block caldav Connection.
  1. Problem:

               org.apache.felix.scr.impl.manager.SingleComponentManager.getService() returned         
               a null service object
    

Solution:

              Compare the addon config in the Services Folder with the config in                            
              the /var/lib/openhab2/config/org/openhab Folder

thx for help
Vaillan

3 Likes