Caldav google calendar problem

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

<calender-id>: look into the calender details at google
You also have to create an additional Client-Id. Look at https://developers.google.com/google-apps/calendar/caldav/v2/guide#creating_your_client_id
Then set the log level of the OH plugin to TRACE and look at the logfile after OH has been restartet.
There should come up a message that access to goolge has to be authenticvted giving an URL to a google page. Call this, grant access and you will be provided with a access token which should be used a the password along with the client-id as username.

################################ CalDav Binding #######################################
#
#********************************************
#Googlekalender 
#********************************************
caldavio:GoogleSmarthomeCal:url=https://apidata.googleusercontent.com/caldav/v2/<calender-id>/events
caldavio:GoogleSmarthomeCal:oauth=true
caldavio:GoogleSmarthomeCal:reloadInterval=5
caldavio:GoogleSmarthomeCal:preloadTime=10080
caldavio:GoogleSmarthomeCal:disableCertificateVerification=false
caldavio:GoogleSmarthomeCal:username=<client-id> 
caldavio:GoogleSmarthomeCal:password=<access token>

# Additionally needed binding: org.openhab.binding.caldav-personal-<version>.jar
# used to record and simulate presence and to show upcoming/active events
# multiple calendars (calerdar-id) can be seperated by commas
caldavPersonal:usedCalendars=GoogleSmarthomeCal

Hope this helps.

Did you try to go to your google account security settings and allow less secure apps to connect?

Hi @thucke,
unfortunately I did all steps you mentioned, but i do not get “3 happy messages” into logs.
I’m stuck on this from 4 days.

Marco

Hi @sudocristian
I did, but without luck

Marco

if you go to your caldavio:GoogleSmarthomeCal:url with your browser and log in with the same credentials you provided, does it download your events?

@sudocristian
if i put the URL into the browser, there is not auth request. I got this page:

Change your url like this and try it https://www.google.com/calendar/dav/email@address.com/events

Hi @querdenker2k,

now after one week running this configuration I can report that only the first ocurrence of the recurring entries has been recognized. I left all entries untouched.
Does this help you?
Thanks
Thomas

hi @sudocristian
with this URL same result on OpenHab. From Browser ask me Authentication, but I do not know which credential to use.
My Account Username and password do not work, and ClientID and Client Secret do not work too.
In log I do not got message and URL for authentication.

you need to enter your email@gmail.com and password that owns this calendar