Author Topic: iCal Events Spanning Multiple Days  (Read 951 times)

Offline rjfcowdery

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
Re: iCal Events Spanning Multiple Days
« Reply #15 on: February 15, 2018, 05:47:43 pm »
The calendar permissions was the one area I wasn't able to follow your instructions.  Perhaps because the calendar source (AirBnB) is a read-only I don't get option to permit specific users or rights to my calendar.  I noticed the http error but it seemed to function after it did a few retries.  I see from your explanation why that would happen.   I'll need to get to a real computer to get screen shots showing the problem with Google Calendar permissions.  Thanks for the help!!

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 688
  • Karma: +70/-2
Re: iCal Events Spanning Multiple Days
« Reply #16 on: February 15, 2018, 06:05:12 pm »
Here's the thing.  Your source calendar is AirBnB BUT you are effectively re-implementing it in google calendar.  GCAL wants to read your google calendar (i.e. it's not really reading AirBnB directly).   Therefore the permission setting are all about the google calendar settings.

For the google calendar that represents your AirBnB calendar -- you need to have "Share with specific people" identify your service account AND allow it to at least "Make Changes to events"

I know all this sounds a bit convoluted -- but it's a by product of google keeping unauthorized eyes off your calendar :-)

Offline rjfcowdery

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
Re: iCal Events Spanning Multiple Days
« Reply #17 on: February 15, 2018, 06:45:52 pm »
This is the screen I get for setting permissions.  For my personal calendar(s) I am able to set permissions for specific people as your instructions describe, but for this one it is not an option.  Only difference is that I created the calendar "From URL"  instead of the "New Calendar".   It looks like I can create a personal calendar and import the AirBnB  into it as seperate editable events (which should then work as you described)- but it looks like I would need to do the import routinely to keep it up to date.  Will explore if the original airBnB ical source works any better.

Offline rjfcowdery

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
Re: iCal Events Spanning Multiple Days
« Reply #18 on: February 16, 2018, 09:11:59 pm »
Tried direct link to the AirBnB calendar vi iCal but results are the same as accessing the Google Calendar version via iCal.

Offline rjfcowdery

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
Re: iCal Events Spanning Multiple Days
« Reply #19 on: February 18, 2018, 01:26:45 pm »
Here are the ics files (listings... is the one direct from airbnb,  basics...  is the one from google)


Offline rjfcowdery

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
Re: iCal Events Spanning Multiple Days
« Reply #20 on: April 02, 2018, 06:29:10 pm »
Managed to make the GCal app work as I needed for iCal calendars with events spanning multiple days - but needed to make a minor change in your GCal3.lua.   My problem was that the calendar events may have started a few days ago - even though they were still active now.  The calendar data being requested seemed to request events starting just before midnight on the current day though to several days in the future (depending on ExtraDays).  I needed the calendar data request to look for events starting several days in the past.  Hence I added the "ExtraDays"  value into the starttime variable as shown in red below.   I will leave it to you to decide if this hack may cause other issues,  but it seems to make everything work for me and I haven't seen any side effects yet!!

in the GetStartMinMax function...

-- look back 5 minutes to make sure we catch midnight events with the calendar lookup  ......and ExtraDays before today to catch events starting earlier but still active
  starttime = starttime - (60*5)- (3600*24*GC.ExtraDays)

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 688
  • Karma: +70/-2
Re: iCal Events Spanning Multiple Days
« Reply #21 on: May 01, 2018, 10:10:49 am »
Managed to make the GCal app work as I needed for iCal calendars with events spanning multiple days - but needed to make a minor change in your GCal3.lua.   My problem was that the calendar events may have started a few days ago - even though they were still active now.  The calendar data being requested seemed to request events starting just before midnight on the current day though to several days in the future (depending on ExtraDays).  I needed the calendar data request to look for events starting several days in the past.  Hence I added the "ExtraDays"  value into the starttime variable as shown in red below.   I will leave it to you to decide if this hack may cause other issues,  but it seems to make everything work for me and I haven't seen any side effects yet!!

in the GetStartMinMax function...

-- look back 5 minutes to make sure we catch midnight events with the calendar lookup  ......and ExtraDays before today to catch events starting earlier but still active
  starttime = starttime - (60*5)- (3600*24*GC.ExtraDays)


Thanks -- just getting some time to look at this.
I've tried to be considerate of the limited resources on the vera by only loading into memory the needed information.  So am a little reticent to arbitrarily expand the "capture" dates.

It's (events spanning midnight) have not been a problem before with regular google calendars - hence looking back 5 min from midnight  (I was unable to make it fail recently).    I suspect there is something to do with the ical format / structure that is causing it to not see the current event in these conditions -- I'll take a look.  Maybe I end up just expanding for iCal -- don't know .....