Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


Google Calendar Synchronization 1.2

   (0 reviews)

1 Screenshot

About This File

Hi All,

 

I came across the problem of making my private Google Calendar's entries available in HC2 with the intention of using it in some of my home's automation scenarios. Since I was unable to find any simple solution on the internet I did create my own and here it is :)

 

The scene runs on my HC2 since few weeks without any issues. I did schedule the scene using Sankotronic's Main Scene for Time Based Events and it is synchronizing my Google Cal every hour.

 

 

There are three basic steps to make the scene working for you:

 

·       Provide the link to your google calendar by modifying the address hold in the local variable

local gCalUrl = https://calendar.google.com/calendar/ical/xxxxxxx.ics

 

  • Create global variable GCalendar which will hold the synchronized Google Calendar entries

 

  • Maintain the translation table monthMapping to map the names of the months to your local language. This is needed due to the fact that global variable “Month” could the name of current month in your local language – which is the case for me.

 

Once GCalendar global variable is synchronized with Google Calendar I can use it in "good morning" scene which is reading the agenda for the day once I'm brushing my teeth in the morning :-P 

 

Any comments highly appreciated. :D

 

Global variable GCalendar is holding the information on upcoming events. The information is structured in the following way:

GCalendar = { Name, StartDate, EndDate, WholeDay };

Name holds the name of Calendar event, StartDate and EndDate are the event's start and end-date accordingly, WholeDay is a flag with values "Yes" in case the event was defined as "whole day" and "No" if this isn't the case.

 

@jompa68 

jompa68 did create VD which shows today's events from your calendar for current date. VD is attached below (hope you don't mind jompa68 but having it in the first post makes it easier to find :-) ). 

calendar.png.fb617828f5489dc0bad9fca15c1c02c3.png

 

 

Update 8.3.2017

Thanks to @jompa68 I realized there is no handling of recurring events. Honestly I did not think this small topic can be so much complicated... anyway. Some basic recurrence rules should now be supported by the script.

 

Update 12.3.2017

@emielstroeve figured out that calendar events marked as "whole day" were not recognized by the script. Version 1.2 solves this problem by adding the missing functionality. I did extend the structure of GCalendar variable with additional field "WholeDay". The field contains "Yes" in case the event is defined as "whole day" otherwise the field is set to "No".

  • Thanks 1

User Feedback

You may only provide a review once you have downloaded the file.

There are no reviews to display.

×
×
  • Create New...