We have moved at community.getvera.com

Author Topic: Google Calendar Switch  (Read 139021 times)

Offline CudaNet

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1401
  • Karma: +42/-11
  • Chimichanga !
Re: Google Calendar Switch
« Reply #495 on: August 19, 2014, 02:10:30 pm »
'gc_triggerNoKeyword' set to 'true' works perfectly. All is well, however the JS didn't take.

Patched lines 447 and 488
if (GC.Keyword ~= "")  or (GC.triggerNoKeyword == "true") then luup.variable_set(SECURITY_SID, "Tripped", 0, lul_device) end
if (GC.Keyword ~= "") or (GC.triggerNoKeyword == "true") then

Will test and report back (I'll load the JS file after I unit these changes).

Hmm, encountering an LUA engine failed to load..
01      08/19/14 12:00:06.421   LuaInterface::LoadCode: [string "local GCAL_VERSION = "V 2.2.1"..."]:447: ')' expected near '=' <0x2b00d000>
01      08/19/14 12:00:06.932   Device_Interface::CreateLuaInterface 133 failed to start engine <0x2b00d000>

Same thing happened to me, everything stopped as I too had no keywords defined. As a workaround I had to add my keywords (semi colon delimited) within gc_Keyword (plugin>advanced). Another issue is the calendar (plugin>calendar) is no longer being displayed (definitely not a show stopper).


The calendar tab not showing is an definite 'oops' on my part - caused when I was transferring code to the new directory for GCal3

This attachment should fix it ...  but cannot be sent as a js file.  So download it and remove the .txt part (corrected file name is J_GCal_II.js) before adding to your vera  - refresh the browser when done.

When you confirm that all is well  - I'll push out these two patched as (hopefully) the last of the GCal_II official releases (like to end on a "all working" note)
openLuup, AltUI, Zway and HomeWave, enough said...

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Re: Google Calendar Switch
« Reply #496 on: August 19, 2014, 02:36:39 pm »
Patched lines 447 and 488
if (GC.Keyword ~= "")  or (GC.triggerNoKeyword == "true") then luup.variable_set(SECURITY_SID, "Tripped", 0, lul_device) end
if (GC.Keyword ~= "") or (GC.triggerNoKeyword == "true") then


Sorry Guys -- too much haste on my part --

Corrected version attached


Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Re: Google Calendar Switch
« Reply #497 on: August 19, 2014, 02:44:37 pm »
@CudaNet
'gc_triggerNoKeyword' set to 'true' works perfectly. All is well, however the JS didn't take

Can you retry again ?  You will at least have to F5 refresh the browser for it to show up in the browser.

If still not showing up - could you check to make sure that the js  file in your vera now reads (on line 4)

var src = get_device_state(device, "urn:srs-com:serviceId:GCal2", "gc_Source", 0);

Offline CudaNet

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1401
  • Karma: +42/-11
  • Chimichanga !
Re: Google Calendar Switch
« Reply #498 on: August 19, 2014, 02:46:21 pm »
No need to be sorry, I just appreciate you taking the time to make adjustments.. Will load and report back only if issues arise.

Patched lines 447 and 488
if (GC.Keyword ~= "")  or (GC.triggerNoKeyword == "true") then luup.variable_set(SECURITY_SID, "Tripped", 0, lul_device) end
if (GC.Keyword ~= "") or (GC.triggerNoKeyword == "true") then


Sorry Guys -- too much haste on my part --

Corrected version attached
openLuup, AltUI, Zway and HomeWave, enough said...

Offline CudaNet

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1401
  • Karma: +42/-11
  • Chimichanga !
Re: Google Calendar Switch
« Reply #499 on: August 19, 2014, 03:14:04 pm »
Odd, I DL'd the JS file again, re-loaded and voila - it took... Not sure what happened the first two times I tried. Perhaps Vera is getting super flaky on me these days. Case and point... My father came by my house this morning to pick up a USB cable and Vera greeted him like 8 times (infinite loop), had to reboot her on the spot...

@CudaNet
'gc_triggerNoKeyword' set to 'true' works perfectly. All is well, however the JS didn't take

Can you retry again ?  You will at least have to F5 refresh the browser for it to show up in the browser.

If still not showing up - could you check to make sure that the js  file in your vera now reads (on line 4)

var src = get_device_state(device, "urn:srs-com:serviceId:GCal2", "gc_Source", 0);
openLuup, AltUI, Zway and HomeWave, enough said...

Offline CudaNet

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1401
  • Karma: +42/-11
  • Chimichanga !
Re: Google Calendar Switch
« Reply #500 on: August 19, 2014, 03:22:36 pm »
Stuart, just re-ran my tests.. From what I can tell, everything is working as intended. Thanks for making the changes available so quickly...
So what needs to happen in order for this plugin to have it's own board ? It certainly should considering your efforts moving forward for V3 support.

Just sayin !
openLuup, AltUI, Zway and HomeWave, enough said...

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Re: Google Calendar Switch
« Reply #501 on: August 19, 2014, 06:03:35 pm »
Stuart, just re-ran my tests.. From what I can tell, everything is working as intended. Thanks for making the changes available so quickly...
So what needs to happen in order for this plugin to have it's own board ? It certainly should considering your efforts moving forward for V3 support.

Just sayin !

No idea how to get a board allocated but  have forwarded to a moderator ....   who knows ......

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Re: Google Calendar Switch
« Reply #502 on: August 19, 2014, 06:13:51 pm »
I posted an update for release with the two patches discussed above.

guest141575

  • Guest
Re: Google Calendar Switch
« Reply #503 on: August 20, 2014, 12:44:50 pm »
I posted an update for release with the two patches discussed above.

Thank You Stuart. The altered files work well.  :)

Offline destinet

  • Jr. Member
  • **
  • Posts: 78
  • Karma: +0/-0
Re: Google Calendar Switch
« Reply #504 on: August 22, 2014, 10:25:11 am »
Hi! I just install the plugin but missing some doc. I put me private xml link to my calendar. In the keyword i put test and in my google calendar i put a meeting a t 10am for test. In the plugin i see the even in the calendar tab but it didn't light up at 10am. If i click check it's stuck a checking....not sure what i'm doing wrong.

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Re: Google Calendar Switch
« Reply #505 on: August 22, 2014, 12:36:44 pm »
Hi! I just install the plugin but missing some doc. I put me private xml link to my calendar. In the keyword i put test and in my google calendar i put a meeting a t 10am for test. In the plugin i see the even in the calendar tab but it didn't light up at 10am. If i click check it's stuck a checking....not sure what i'm doing wrong.

If it's stuck at 'Checking' it usually means that the calendar cannot be accessed properly.  Can you change gc_debug to 3 and get the output from the log file ?

If you are not familiar with getting to the log file - the easiest way (and the way I usually use) is the info viewer plugin.  It also allows remote log viewing and log filtering (among other things).  You can get it here:
http://forum.micasaverde.com/index.php/topic,13477.0.html

Either filter on 'GCal3' for the debug messages or 'gc_' to get both the debug messages and detail of each change in variable values.

See the documentation here http://forum.micasaverde.com/index.php/topic,7558.msg175074.html#msg175074 for an explanation of how to set up (it's on release behind but will not matter)

Also - GCal_II is being deprecated (as of today) because of changes on the Google end.  You may want to go straight to GCal3
here    http://forum.micasaverde.com/index.php/topic,26692.0.html

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Google Calendar II Deprecated
« Reply #506 on: August 22, 2014, 12:41:25 pm »
As of today - Google Calendar II is deprecated

That means I will no longer be adding functionality to GCal_II or fixing bugs.
The reason is that the Google API's that are used by GCal_II go out of service in a couple of months (Nov 2014).
Instead - I would encourage you to switch over to GCal3 which is posted here

http://forum.micasaverde.com/index.php/topic,26692.0.html

GCal3 uses the new Google V3 API's and the new authentication scheme required by Google.

The first release of GCal3 has the same functionality as the last release of GCal_II.

Offline destinet

  • Jr. Member
  • **
  • Posts: 78
  • Karma: +0/-0
Re: Google Calendar Switch
« Reply #507 on: August 22, 2014, 02:47:20 pm »
Hi! I just install the plugin but missing some doc. I put me private xml link to my calendar. In the keyword i put test and in my google calendar i put a meeting a t 10am for test. In the plugin i see the even in the calendar tab but it didn't light up at 10am. If i click check it's stuck a checking....not sure what i'm doing wrong.

If it's stuck at 'Checking' it usually means that the calendar cannot be accessed properly.  Can you change gc_debug to 3 and get the output from the log file ?

If you are not familiar with getting to the log file - the easiest way (and the way I usually use) is the info viewer plugin.  It also allows remote log viewing and log filtering (among other things).  You can get it here:
http://forum.micasaverde.com/index.php/topic,13477.0.html

Either filter on 'GCal3' for the debug messages or 'gc_' to get both the debug messages and detail of each change in variable values.

See the documentation here http://forum.micasaverde.com/index.php/topic,7558.msg175074.html#msg175074 for an explanation of how to set up (it's on release behind but will not matter)

Also - GCal_II is being deprecated (as of today) because of changes on the Google end.  You may want to go straight to GCal3
here    http://forum.micasaverde.com/index.php/topic,26692.0.html

thanks, i will wait for the 26 when it reach the market.

Regards