Caldav google calendar problem

Hi @querdenker2k,

I stumbled upon another issue.
It seems that recurring tasks are not recognized correctly by the binding.
I’ve got a daily task “Alarm” every weekday during daytime.
Only the first day of the task is recognized or a day which I explicitly changed and saved manually (e.g. add a comment on that day).

Could you please check that?

Thank you a lot
Thomas

What is your configured preloadTime and reloadInterval? The reloadInterval has to be smaller then the preloadTime.

caldavio:GoogleSmarthomeCal:reloadInterval=5
caldavio:GoogleSmarthomeCal:preloadTime=10080

Seems to be good in terms of this restriction.

Can you paste your recurance rule here (from the ICS). The reccurance is calculated via an 3rd party library. Maybe you can write the rule otherwise?

Hm,
I’m not sure if I correctly understand your hint.
The recurrance is configured directly in the calendar of my Google account.
It tells:

  • every Monday to Friday
  • starting 01. Sept. 2016
  • ends never
  • time from 08:00 - 16:30 (4:30 pm)

Can you try creating an every week repeating event for every day. Well 5 events for one week.

It really weird. I did some tests using several entries.
First I thought that it could be different if I edit the calender entry from my Smartphone. Every time I changed the recurring entry it was recognized correctly.
I also thought that there could be a difference if I choose only weekdays (not working) or e.g. additionally a sunday (working).

Now I’ve got the strong suspicion that the issue could be if a recurring calender entry misses a description.
For the tests today it seems to me as the most possible reason that the entries were not recognized in the past.
Perhaps you may check the code if this could be confirmed (NPE?).

PS: I’m curious how it goes the next days.
PPS: Now when I create a recurring task without description it is actually also being recognized … weird. I’ll see how it goes the next days.

Of course i would fix this, but i can’t imagine that there is a NPE. You mean description and not title? I have a lot of events which are without a description.

Ok - status update:
Yesterday I’ve ceate a recurring task having the following configuration:

  • Start as of 30. Sept. 2016
  • Every Weekday 08:00 - 16:30
  • Ends Never

Regardless the fact that it was an official holiday yesterday, it was also monday. And by that the entry was created and also correctly recognized by OpenHAB.

Today the same recurring entry again wasn’t recognized.
After I changed the whole recurring task by adding every sunday it was recognized.
Then, after I changed it back only to touch weekdays it also got recognized.
Every configuration haven’t had any description.

Just a thought:
Could it be that only recurring tasks that have an updated date of the current day were recognized by the plugin just on that day?

1 Like

Hi @querdenker2k,
today again this weird behaviour.
The recurring task wasn’t recegnized until I changed it some way (today changed to everey Tuesday and Thursday).
After OpenHAB detected the entry I changed it back to “Every weekday” and it still got recognized.

Have you used the caldav binding without the oauth feature? is it working then for you?
Can you try please: Creating a single event for every day and let them repeat every week.

I am using it with OAuth.
Just configured the recurring tasks as requested. I will post if there’s something unusal happening.

Statusupdate:
On friday I configuered 7 recurrings tasks - one for each day starting as of saturday, 1st Oct:

  • Sat. 06:00AM - 12PM
  • Sun 10:00AM - 12PM
  • Mon - Fri 08:00AM - 04:30PM

Saturday, 8th: Task got recognized correctly - stopping 12PM in the night
Sunday, 9th: Task wasn’t recognized the whole day.
I added a second task also without success of recognition.
Then when I deleted the recurring task the second, new one was recognized.

I let the sunday task deleted now.
Curious how it goes the next days.

Hi,can someone post the last version of this binding, I cannot find it.

Many Thanks

Hi I very need the modified version of Calendar that support Google Calendar. Someone can give me a download link?
Very appreciated.

Marco

I would rather suggest that you use a snapshot directly from the build server: https://openhab.ci.cloudbees.com/job/openHAB1-Addons/

Many thanks to all

Marco

Hi,
I tried with both version provided, the one from @villaRob and one from @paphko, and configured caldavio.cfg as follow

caldavio:casaOH:url=https://apidata.googleusercontent.com/caldav/v2/--------MyCalendarID---------/events
caldavio:casaOH:oauth=true
caldavio:casaOH:username=------------------------------------------------------------MyClientID-------------------------------------------
caldavio:casaOH:password=--------MySecret-----------------------
caldavio:casaOH:reloadInterval=30
caldavio:casaOH:preloadTime=1440

But when binding start, i get this error in the logs, an message to authorizization URL do not appear:

2016-10-14 15:05:03.779 [DEBUG] [b.io.caldav.internal.CalDavActivator] - CalDav Calendar IO has been started.
2016-10-14 15:05:03.780 [DEBUG] [org.openhab.io.caldav               ] - BundleEvent STARTED - org.openhab.io.caldav
2016-10-14 15:05:03.793 [DEBUG] [org.openhab.io.caldav               ] - ServiceEvent REGISTERED - {org.osgi.service.cm.ManagedService, org.openhab.io.caldav.CalDavLoader}={service.pid=org.openhab.caldavio, component.name=org.openhab.io.caldav.caldavloader, component.id=14, service.id=135, service.bundleid=219, service.scope=bundle} - org.openhab.io.caldav
2016-10-14 15:05:03.796 [DEBUG] [.io.caldav.internal.CalDavLoaderImpl] - overriding default timezone Europe/Rome with Europe/Rome
2016-10-14 15:05:03.798 [DEBUG] [.io.caldav.internal.CalDavLoaderImpl] - found timeZone: Europe/Rome
2016-10-14 15:05:03.799 [DEBUG] [org.openhab.io.caldav               ] - BundleEvent [unknown:512] - org.openhab.io.caldav
2016-10-14 15:05:03.801 [DEBUG] [dav_command.internal.CalDavActivator] - CalDav-Command binding has been started.
2016-10-14 15:05:03.828 [INFO ] [.io.caldav.internal.CalDavLoaderImpl] - reload job scheduled for: casaOH
2016-10-14 15:05:12.080 [DEBUG] [aldav_command.internal.CalDavBinding] - reading configuration data...
2016-10-14 15:05:12.080 [ERROR] [aldav_command.internal.CalDavBinding] - item registry is not set
2016-10-14 15:05:13.927 [DEBUG] [caldav.internal.job.EventReloaderJob] - reload cached events for config: casaOH
2016-10-14 15:05:13.938 [DEBUG] [caldav.internal.job.EventReloaderJob] - loading events for config: casaOH
2016-10-14 15:05:15.431 [ERROR] [caldav.internal.job.EventReloaderJob] - error while loading calendar entries: Unexpected response (401 - Unauthorized)
com.github.sardine.impl.SardineException: Unexpected response (401 Unauthorized)
        at com.github.sardine.impl.handler.ValidatingResponseHandler.validateResponse(ValidatingResponseHandler.java:48)[219:org.openhab.io.caldav:1.9.0.201610140111]
        at com.github.sardine.impl.handler.MultiStatusResponseHandler.handleResponse(MultiStatusResponseHandler.java:40)[219:org.openhab.io.caldav:1.9.0.201610140111]
        at com.github.sardine.impl.handler.MultiStatusResponseHandler.handleResponse(MultiStatusResponseHandler.java:35)[219:org.openhab.io.caldav:1.9.0.201610140111]
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:218)[219:org.openhab.io.caldav:1.9.0.201610140111]
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:160)[219:org.openhab.io.caldav:1.9.0.201610140111]
        at com.github.sardine.impl.SardineImpl.execute(SardineImpl.java:962)[219:org.openhab.io.caldav:1.9.0.201610140111]
        at com.github.sardine.impl.SardineImpl.list(SardineImpl.java:417)[219:org.openhab.io.caldav:1.9.0.201610140111]
        at com.github.sardine.impl.SardineImpl.list(SardineImpl.java:409)[219:org.openhab.io.caldav:1.9.0.201610140111]
        at com.github.sardine.impl.SardineImpl.list(SardineImpl.java:386)[219:org.openhab.io.caldav:1.9.0.201610140111]
        at org.openhab.io.caldav.internal.job.EventReloaderJob.loadEvents(EventReloaderJob.java:208)[219:org.openhab.io.caldav:1.9.0.201610140111]
        at org.openhab.io.caldav.internal.job.EventReloaderJob.execute(EventReloaderJob.java:111)[219:org.openhab.io.caldav:1.9.0.201610140111]
        at org.quartz.core.JobRunShell.run(JobRunShell.java:202)[101:org.eclipse.smarthome.core.scheduler:0.9.0.201610080632]
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)[101:org.eclipse.smarthome.core.scheduler:0.9.0.201610080632]

Any help would be appreciated.

Marco

Hi,
I did more test during weekend without success. Someone can help me?
Many Thanks

Marco