We have moved at community.getvera.com

Author Topic: Gcal3, problem with repeated events  (Read 2230 times)

Offline Wellcoll

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Gcal3, problem with repeated events
« on: January 06, 2015, 02:02:19 pm »
Hi,

I recently started using the Gcal3 plugin V1.1 on UI5.
I am able to detect events as long as they happen once. However, as soon as I change an event in my calendar to a repeated event, such as a daily event, it is no longer detected.
I was wondering if anyone could tell me what I am doing wrong?

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Re: Gcal3, problem with repeated events
« Reply #1 on: January 07, 2015, 10:19:24 pm »
Hi,

I recently started using the Gcal3 plugin V1.1 on UI5.
I am able to detect events as long as they happen once. However, as soon as I change an event in my calendar to a repeated event, such as a daily event, it is no longer detected.
I was wondering if anyone could tell me what I am doing wrong?

Do you have gc_retrip set to true (this is the default) ?  If set to false it will treat back-to-back all day events as one long event.

What do you mean by "it is no longer detected" ?  What exactly are the steps you are taking ?

I just performed the following:
created an all day event for today - go to GCal3 and press 'check' -- GCal3 sees the event and trips
change the event in google to a repeating event for 2 days - go to GCal3 and press 'check' -- GCal3 sees the event.  Note that it does not 'retrip' since it was already tripped from the step before



Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Re: Gcal3, problem with repeated events
« Reply #2 on: January 08, 2015, 08:30:25 am »
As a follow up - the repeating event tripped again at midnight - as it should.

So it seems the plugin is working correctly (at my end)  - now all we have to figure out what's different at your end. 8)

One thing worth mentioning.  Then you recheck the calendar for events (e.g. by pressing 'check') there is a 15 sec delay before it trips (assuming you are in an event).

Offline Wellcoll

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: Gcal3, problem with repeated events
« Reply #3 on: January 08, 2015, 03:55:59 pm »
First of all, thanks for your help.

Gc_retrip was set to true.

The steps that I am taking are almost the same.
I create an event for one hour - go to GCal3 and press 'check' - GCal3 sees the event.
Next, I change the event to repeat weekly - go to GCal3 and press 'check' -  then it says 'no more events today'.
It does not matter whether I am in the event or whether the event is still to come.

I now also tried the same steps with an all day event, like you did. And in this case, it does work. Even after I change the all day event to a repeated all day event.

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Re: Gcal3, problem with repeated events
« Reply #4 on: January 08, 2015, 08:11:52 pm »
First of all, thanks for your help.

Gc_retrip was set to true.

The steps that I am taking are almost the same.
I create an event for one hour - go to GCal3 and press 'check' - GCal3 sees the event.
Next, I change the event to repeat weekly - go to GCal3 and press 'check' -  then it says 'no more events today'.
It does not matter whether I am in the event or whether the event is still to come.

I now also tried the same steps with an all day event, like you did. And in this case, it does work. Even after I change the all day event to a repeated all day event.

Hmm - I tried reproducing your observations but it works just fine on my system ....
If there are no events returned by google - the message would  be 'No events found today'
'No more events today' means that there were events returned by google but none in the next 24 hours (or thereabouts)
To see what's happening - we will need a log file (with gc_debug set to 3) - that way we can see what google is returning and how GCal3 is responding.
Sorry but it looks like it's to do with the data you are getting back - do you have your vera set to the same timezone as your calendar ?

The only way I can try to trouble shoot this with you is if you can get a log
If there are no events returned by google - the message should be 'no events found today'

Offline Wellcoll

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: Gcal3, problem with repeated events
« Reply #5 on: January 17, 2015, 04:40:55 am »
Sorry it took so long to reply. I am a student and had some exams this week.

I have attached a log file of four events:
- All day event, not repeated
- All day event, repeated weekly
- One hour event, not repeated
- One hour event, repeated weekly

Only in the last case, I get the message "No events found today".

The calendar and vera are set to the same timezone.

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Re: Gcal3, problem with repeated events
« Reply #6 on: January 18, 2015, 10:39:12 pm »
I had a look and noticed you were using an iCal feed.    If you are using google calendar, then you should use the google feed as it's more efficient (and likely more reliable).

The problem with iCal is that it's just a definition and a file gets downloaded which is then parsed by GCal3 and what's in that file can vary depending on the underlying program that creates the file.  Also - there's a lot of unnecessary information using iCal  - including a lot of past and future events - that get filtered out because we are only interested (more or less) with the next 24 hrs in GCal3.

I tested with my google calendar and a one hour event repeating weekly for two occurrences.   The google feed 'sees' the event but the iCal feed (created by google) does not.  I took a look at the data feed and google change the date representation they use from one to the next.  Unfortunately - the iCal spec has multiple date time representations and not all are handled in GCal3.

I'll take a look to see if I can reasonably handle this in the iCal parsing routine so that it's more general - but will not be able to look at this for a while.

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Re: Gcal3, problem with repeated events
« Reply #7 on: January 24, 2015, 11:23:05 am »
@Wellcoll

I have made some changes that should better handle the variation in date formats used in iCal.   Note that there is an underlying assumption that the Vera unit and the calendar feed are in the same time-zone.  I other words, there is no attempt to interpret calendar events set in different timezones (which can happen in iCal).

For most users, this should be fine.

Try uploading the attached and let me know whether it solves the issue you were seeing .....

EDIT: Attachment Removed
« Last Edit: February 01, 2016, 05:40:55 pm by Stuart »

Offline Wellcoll

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: Gcal3, problem with repeated events
« Reply #8 on: January 26, 2015, 05:36:50 am »
I haven't had the time to try it untill now, but I was indeed using the wrong feed. Now all the events are recognized.
Thanks for all your help.