We have moved at community.getvera.com

Author Topic: GCAL3 - General Discussion  (Read 192693 times)

Offline geoay

  • Jr. Member
  • **
  • Posts: 68
  • Karma: +0/-0
Re: GCAL3 - Google Calendar 3
« Reply #150 on: October 06, 2014, 05:22:33 pm »
Very strange behavior of the Plug-in     ???
On the interface the Plug-in is displaying :Gcal3.sem ??
When I click Check,  Checking is displayed then again Gcal3.sem ??
I can see my agenda but strangely :
- an event positioned in the agenda at the current time slot doesn't appear
- an  event positioned a week later is visible
NextEvent always display nothing.
I don't understand how I can use the Plug-in..?

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Re: GCAL3 - Google Calendar 3
« Reply #151 on: October 06, 2014, 08:44:21 pm »
Very strange behavior of the Plug-in     ???
On the interface the Plug-in is displaying :Gcal3.sem ??
When I click Check,  Checking is displayed then again Gcal3.sem ??
I can see my agenda but strangely :
- an event positioned in the agenda at the current time slot doesn't appear
- an  event positioned a week later is visible
NextEvent always display nothing.
I don't understand how I can use the Plug-in..?

Gcal3.sem ?? means that the plugin could not read the file GCal3.sem from your vera.  This should never happen.  Does a reload fix it ?

When you say an event positioned in the agenda at the current time slot doesn't appear - do you mean in the tab that says 'Calendar' ?  If so - this is just looking at your calendar from google and showing what is there.  The plugin is not doing any interpretation in this tab.  If there is no event showing up then the plugin cannot do anything.   Do you have more than one calendar and when you look at it in google you are seeing events from multiple calendars ?   The plugin can only react to events in the calendar you specify (even if others are visible from the google interface).

Have you read the instructions ?  The instructions will tell you different ways to use the plugin.  If the instructions are not clear - let me know and I can make them better.
The simplest way to test is to put an all day event in the calendar and you should see it in the plugin (after pressing check)





Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Error with no events
« Reply #152 on: October 06, 2014, 11:00:55 pm »
For those who are experiencing an error when there are no events in the calendar ... the error (from Eldoctor62 log file - thanks !) shows up when the json.lua module attempts to decode the json results returned by google.  In the log file it looks like the google results are the same as I get I get in my tests - BUT my json.lua does not create errors.

I am wondering if there is any chance that your vera's have a different json.lua to the one i'm using?.  If there was no json.lua in your system - the plugin downloads the version I am using.  If there was already a json.lua it does not.

So there is a possibility that some other plugin downloaded a different  json.lua module in the past ......

Attached is v0.7.5.  In prior versions, I tested to see if the first event was nil.  This test happened after converting the json to a Lua table.
In this version I am testing for the string that represents no events "items":[] .  If that string is there then I do not attempt to decode.

Lets see if this helps narrow down the problem


EDIT: Attachment Removed
« Last Edit: October 08, 2014, 09:52:12 pm by Stuart »

Offline Eldoctor62

  • Sr. Newbie
  • *
  • Posts: 23
  • Karma: +0/-0
GCAL3 - Google Calendar 3
« Reply #153 on: October 07, 2014, 01:48:53 am »
Hello Stuart,

Thank you for your 0.7.5 file;-) he has passed the test without problem !! 

I'll leave it working normally and make available to the user French ... I will return to you

Nice work anyway, and thank you for your listening

have a nice day
« Last Edit: October 07, 2014, 03:57:12 am by Eldoctor62 »

Offline geoay

  • Jr. Member
  • **
  • Posts: 68
  • Karma: +0/-0
Re: GCAL3 - Google Calendar 3
« Reply #154 on: October 07, 2014, 05:19:21 am »
Very strange behavior of the Plug-in     ???
On the interface the Plug-in is displaying :Gcal3.sem ??
When I click Check,  Checking is displayed then again Gcal3.sem ??
I can see my agenda but strangely :
- an event positioned in the agenda at the current time slot doesn't appear
- an  event positioned a week later is visible
NextEvent always display nothing.
I don't understand how I can use the Plug-in..?

New Gcal3.lua loaded.
No more Gcal3.sem ?? displayed. Great !
And for the second issue...I apologize... ::)
I am not very familiar with Google Agenda and I put my events in an other Agenda than the one checked by the plugin (all agendas were displayed simultaneously, that why I have been confused) !
Now I can perfectly see all my events.
Next step : use them to trip scene !
Thank's again for your help  :) :)

Gcal3.sem ?? means that the plugin could not read the file GCal3.sem from your vera.  This should never happen.  Does a reload fix it ?

When you say an event positioned in the agenda at the current time slot doesn't appear - do you mean in the tab that says 'Calendar' ?  If so - this is just looking at your calendar from google and showing what is there.  The plugin is not doing any interpretation in this tab.  If there is no event showing up then the plugin cannot do anything.   Do you have more than one calendar and when you look at it in google you are seeing events from multiple calendars ?   The plugin can only react to events in the calendar you specify (even if others are visible from the google interface).

Have you read the instructions ?  The instructions will tell you different ways to use the plugin.  If the instructions are not clear - let me know and I can make them better.
The simplest way to test is to put an all day event in the calendar and you should see it in the plugin (after pressing check)

Offline jrt8587

  • Sr. Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
Re: GCAL3 - Google Calendar 3
« Reply #155 on: October 07, 2014, 11:53:07 am »
Putting this here in case anyone else has trouble. 

I created two GCal 3 instances - one for my calendar, the other for my wife's.

I followed the setup instructions completely for each instance, including the creation of a separate Google service API account for each instance.  When I configured the second instance, the first instance started giving an http 404 error.  After poking around in the logs, I discovered that (it appears) each GCal instance must use the same Google API account.  So it was as simple as sharing both calendars with the same Google API account email address (instead of using a different one for each calendar).  Hope this helps someone.

Thanks to Stuart for all his great work on this.

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Re: GCAL3 - Google Calendar 3
« Reply #156 on: October 07, 2014, 09:59:20 pm »
Putting this here in case anyone else has trouble. 

I created two GCal 3 instances - one for my calendar, the other for my wife's.

I followed the setup instructions completely for each instance, including the creation of a separate Google service API account for each instance.  When I configured the second instance, the first instance started giving an http 404 error.  After poking around in the logs, I discovered that (it appears) each GCal instance must use the same Google API account.  So it was as simple as sharing both calendars with the same Google API account email address (instead of using a different one for each calendar).  Hope this helps someone.

Thanks to Stuart for all his great work on this.


This is correct - there is only one set of credentials (GCal3.json) shared across all the plugin instances.

Thank you for describing it perfectly.

Offline Eldoctor62

  • Sr. Newbie
  • *
  • Posts: 23
  • Karma: +0/-0
Re: GCAL3 - Google Calendar 3
« Reply #157 on: October 07, 2014, 11:46:31 pm »
Hi Stuart,

I currently have an event but the plug is not "Tripped" how is this possible?

Yet the bulb is turned on, the gc_TrippedEvent is knowledgeable ...

Offline conchordian

  • Sr. Member
  • ****
  • Posts: 326
  • Karma: +4/-1
Re: GCAL3 - Google Calendar 3
« Reply #158 on: October 08, 2014, 03:22:30 am »
Hi Stuart,

I currently have an event but the plug is not "Tripped" how is this possible?

Yet the bulb is turned on, the gc_TrippedEvent is knowledgeable ...

Try putting the event name beside: gc_Keyword

Offline geoay

  • Jr. Member
  • **
  • Posts: 68
  • Karma: +0/-0
Re: GCAL3 - Google Calendar 3
« Reply #159 on: October 08, 2014, 08:12:59 am »
I have some issue with the reliability of gc_Value.  :(
I tried one time and it works perfectly.
Today new test...and nothing in the gc_Value. I checked the syntax of the event. It's fitting the model :  EVENT {value}.
Any explanation for this strange behavior.
(I had to reboot my Vera because again I was facing a Gcalsem??)

Offline Eldoctor62

  • Sr. Newbie
  • *
  • Posts: 23
  • Karma: +0/-0
Re: GCAL3 - Google Calendar 3
« Reply #160 on: October 08, 2014, 12:23:31 pm »
Try putting the event name beside: gc_Keyword
Yea thanks but Tripped it's just 0 or 1 ... This can be more boring for some events  ;)

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Re: GCAL3 - Google Calendar 3
« Reply #161 on: October 08, 2014, 12:53:23 pm »
I have some issue with the reliability of gc_Value.  :(
I tried one time and it works perfectly.
Today new test...and nothing in the gc_Value. I checked the syntax of the event. It's fitting the model :  EVENT {value}.
Any explanation for this strange behavior.
(I had to reboot my Vera because again I was facing a Gcalsem??)

I will need a log file to really help.  Are you on V0.7.5 ?
Are you using a keyword ?  What do the other settings look like ?

The more info the better !!  :-)

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Re: GCAL3 - Google Calendar 3
« Reply #162 on: October 08, 2014, 12:55:08 pm »
Try putting the event name beside: gc_Keyword
Yea thanks but Tripped it's just 0 or 1 ... This can be more boring for some events  ;)
Tripper or not tripped is a function of vera - not the plugin.
In the documentation there are described various alternatives that will likely give you some less boring possibilities :-)

Offline geoay

  • Jr. Member
  • **
  • Posts: 68
  • Karma: +0/-0
Re: GCAL3 - Google Calendar 3
« Reply #163 on: October 08, 2014, 05:42:26 pm »
How can I use the gc_Value provided by the Plug-in after a  tripped event?
I would like to use it in Lua code for parametring a scene.
More generally  how to access all the data than the Plug-in can deliver?

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Re: GCAL3 - Google Calendar 3
« Reply #164 on: October 08, 2014, 09:25:33 pm »
How can I use the gc_Value provided by the Plug-in after a  tripped event?
I would like to use it in Lua code for parametring a scene.
More generally  how to access all the data than the Plug-in can deliver?

Use some code like this

Code: [Select]
local GCAL_SID = "urn:srs-com:serviceId:GCalIII"
 -- change myGooglePlugin to be your GCal3 plugin device #
local myGooglePlugin = 8
local eventValue = luup.variable_get(GCAL_SID, "gc_Value",myGooglePlugin)