Skip to content

Calendar (sync with Google)

Lieven Hollevoet edited this page Sep 22, 2014 · 1 revision

Note: this module is actively being updated to enable you to control devices from your calendar. To get the latest and greatest code please use the branch 'calendar_fixes_hplato' from hollie/misterhouse.git. Please report problems with this branch here: https://github.com/hollie/misterhouse/pull/362

To set up the new code version for a single calendar, just add to mh.private.ini these line:

ical2vsdb_<calendar> = http://www.google.com/calendar/ical/hpxxxxxxxxxxxx369/basic.ics&lt;/span&gt;</calendar> ical2vsdb_<calendar>_options = name=Relevant_Name &lt;/span&gt;</calendar> ical_read_interval = 10

and enable 'organizer' in the common code section.

Note: the interval is set in minutes and can be shorter or longer depending on your needs.

The great feature that hplato added is that you can use the calendar to control devices. To do so, change the option to ical2vsdb_<calendar>_options = name=control,Relevant_Name&lt;/span&gt;

and add an event that has the name of a device to the calendar. The device will be switched on when the event starts and will be switched off when the event ends. See the comments in this pull request for more info: https://github.com/hollie/misterhouse/pull/360

Note: you might need to install some modules to get this working (see the headers in the relevant code files). Note: if you add the option 'control' to a calendar the entries will no longer show up in the web interface but they will be gathered in local/code/organizer_events.pl

---- Original information on this page, to be updated once the development branch is merged into master and a new stable release is ready:

It is possible to partially syncronize the local MH calendar with the Google Calendar. It's not a true syncronization.. It just ensures the local calendar has the info from Google Calendar. __Single gmail Account__

  • Note: Make sure you have a more recent organizer.pl than 2.103
First you need to retrieve your exisiting private ICAL URL. //http://........ //How to get the GCalendar url:// //In Google Calendar go to:// //Calendar Settings// //Calendar Details tab// //Private Address......right click on ICAL (copy the entire address url line// http://...ics //)//

//now you can put this line in your my.private.ini for a single gmail account using the variable// //ical2vsdb_&lt;some_name_here&gt;&lt;/some_name_here&gt&lt;//

//eg:// //ical2vsdb_gmailmain&gt;</calendar>=// http://...ics//

__Multiple Gmail account__ You can retrieve calendar info from multiple calendars. Just ensure that the variable names are different.. ical2vsdb_<some_name_here></some_name_here>

add the following entries to your ini file: the example is for 3 calendars names calendarA, calendarB, calendarC. .they can be whatever you want and you can have one calendar or more.


ical2vsdb_calendarA=<link></link> ical2vsdb_calendarB=<link></link> ical2vsdb_calendarC=<link></link> ical_read_interval=15 <----in minutes
      • Advisory :
  • Note: **This option is available in ical2vsdb v3.1, in revision 1477.**
    • It is also recommended that the option** sync_dtstamp **is** enabled **for google calendars.**
    • As the iCal::Parser module is very CPU intensive,**
    • setting this option ensures that the calendar is only processed when content within the calendar changes.**
    • to set this for**
    • ical2vsdb_<some_name_here></some_name_here>, add this entry to your ini file:**
    • ical2vsdb_<some_name_here></some_name_here>_options = //sync_dtstamp//**
    • eg:**
    • ical2vsdb_calendarA_options = sync_dtstamp**
    • If the above entries are correct, you will find an autogenerated file in your organizer dierctory.**
    • The file is called** i2v.cfg**
      • TroubleShoot**
If your calendar is not getting updated, make sure you have at least the following packages installed..

Installing the following with yum also installs all necessary dependencies. yum install perl-DateTime-TimeZone yum install perl-Date-Calc

http://www.centos.org/docs/5/html/yum/

Clone this wiki locally