These are some of the configs I’ve tried, but were not working:
caldavio:home:url=https://apidata.googleusercontent.com/caldav/v2/xxxxxxxx@group.calendar.google.com/events
caldavio:home:oauth=true
caldavio:home:username=Client ID from google OAuth API
caldavio:home:password=Client secret from google OAuth API
caldavio:home:reloadInterval=10
caldavio:home:preloadTime=7200
caldavio:home:disableCertificateVerification=true
This is the second format of the configuration I’ve tried:
caldavio:home:url=https://www.google.com/calendar/dav/xxxxxxxx@group.calendar.google.com/events
caldavio:home:username=my e-mail username part (part before @)
caldavio:home:password=my e-mail password
caldavio:home:reloadInterval=10
caldavio:home:preloadTime=7200
caldavio:home:disableCertificateVerification=true
xxxxxxxx is Calendar ID from the specific calendar settings in Google Calendar web interface.
I’ve tried both settings with and without caldavio:home:disableCertificateVerification=true part. I’ve also tried using my e-mail address (email@gmail.com) instead of xxxxxxxx@group.calendar.google.com, so it would use my default calendar, but with the same result.
So, it could be problem with a snapshot I’m using (it’s pretty recent, so, I guess it could be the same problem beta 5 has)? Anyway, thank you for your help.
Yes, I am. I am not familiar with OSGI and don’t know what’s going wrong with OH2. For OH1 it’s still fully working. Someone of the admins should have a look. There are already issues with this problem.
Since I couldn’t make CalDAV Personal binding work with my Google Calendar and OH2, I’ve made simple Python script that will retrieve Google Calendar events information and populate OH items. You can find more informations here.
Is the “caldavio:” prefix really needed in OH2 configurations? Till now i thought, that one of the main difference between OH1 and OH2 configuration is, that there is now one configuration file for each binding in OH2 and you don’t need those “:” prefixes anymore…
For the caldavio.cfg and caldavPersonal.cfg you need to add these prefixes. It’s discrepancy, and there’s an issue on github relating to this problem. But, even with these prefixes, I wasn’t able to make it work with Google calendar on OH2.
I see recent-ish changes to the CalDAV wiki page. Could I request that some CalDAV user(s) submit corrections to the “official” documentation?
Each service has its own page at docs.openhab.orghere, here and here. The source for these pages is, respectively, here, here and here. These documents are meant to only explain how to configure and use these services under openHAB 2+. The 1.x wiki, on the other hand, is meant to remain useful to openHAB 1.x runtime users.
If someone(s) kindly contribute improvements, please look at sibling README.md files to identify the standard structure they should share.
Hope can help.I’m using the binding on a “2.1.0-1 (Release Build)” openhabian installation.
I’ve installed the binding using paperUI, this is the reference:
In the “openHAB-conf\services” you should have 3 cfg files:
I’m using the binding for events scheduling only, so:
caldavCommand.cfg
################################ CalDAV Command Binding ###################################
# see CalDAV IO Binding
# Used to execute commands if events starts or ends with an easy notation in the event description.
# commaseperated (e. g. openhab, anothercalendar)
# readCalendars=<ids from caldav-io>
caldavCommand:readCalendars=mycalendar
Pay attention that i’m using a google application password and not the account password in order to avoid problems with 2-factor authentication.
caldavpersonal.cfg is void:
############################# 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=<ids from caldav-io>
#
# 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=
Last: read carefully the log because the application password is generated for a specific device and sometimes google’s security check fail to identify your openhabian as the authorized device.
Good work.
hi, I also had the HTTP 401 error trying to read my google calendar using the caldav binding.
In my case I had the URL wrong. The correct URL format for me was: https://www.google.com/calendar/dav/@import.calendar.google.com/events
you can get the calendar id value from the settings of your google calendar, in my case google was showing something like : abcdef1245@import.calendar.google.com
take the value left from the @ and this should be your calendar-id
good luck !
Hello there, my solution was to set disableCertificateVerification=true. Although the most tutourials say “false”. And in my tests a value for reloadInterval < 5 doesn’t work. Thank yu for your help.
Thanks for the feedback. It make sense, maybe that https certificate verification rely on some system configuration (eg. it has to know the root ca certificate in order to trust the source of the certificate that is checking) so disabling the check remove a potential point of failure. The side effect is that security is lower because without check you can’t really trust the identity of the server you are talking to and you are prone to server impersonation attack. I think that you can bear it
@querdenker2k:
I’m trying to switch from OH1 to OH2 but I do not get Google OAuthv2 connection up and running.
Do you remember?
We were in contact regarding the same issue in OH1. I got it running using one of your snapshot versions of the addon (1.9.0). Obviously OH 2.2.0 does not support the new URL https://apidata.googleusercontent.com/caldav/v2/<calid>/events out of the box?