We have moved at community.getvera.com

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

Offline CudaNet

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1401
  • Karma: +42/-11
  • Chimichanga !
Re: GCAL3 - V 1.3 Released - Now with Overlapping Event Notification
« Reply #375 on: September 21, 2015, 11:19:18 am »
Alright, spoke too soon. Looks like I got a double event this morning when I locked my front door...

Will have to try and debug that later assuming I can recreate while I'm home. Also I'm having issues bringing my internet down (primary link) and not having Vera3 freak on me. Once the link went down, it appeared that Vera3 went into a blink fest (UI7; .619) and wouldn't respond to anything or any type of event (doorbell etc.). I couldn't connect to it.. It was very strange and I didn't have a lot of time to troubleshoot. Also spent most of my weekend working with a managed switch which I later determined had a bug in it's firmware. I worked for over a day before finding that out .... Ugh !
openLuup, AltUI, Zway and HomeWave, enough said...

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Re: GCAL3 - V 1.3 Released - Now with Overlapping Event Notification
« Reply #376 on: September 21, 2015, 12:04:25 pm »
It seems to me that I've only seen double events at about the time I made a change (e.g. uploaded new version of plugin) when there was a calendar event at or near that same time.  What I've seen in the logs is that vera runs a scene twice.  I suspect (but have never tracked down) that it's Vera having more than one "trigger" pending (like one from just before the upload and one just after) and so it fires twice.

It seems (again have not truly dug in) that it does not happen when I put a test event out (say 1 hr) from the upload of a new plugin test patch.


Offline CudaNet

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1401
  • Karma: +42/-11
  • Chimichanga !
Re: GCAL3 - V 1.3 Released - Now with Overlapping Event Notification
« Reply #377 on: September 22, 2015, 09:41:40 am »
Stuart,

Did gc_interval get changed by chance ? Just curious as I was using 180 as my value and I'm observing the next check 3 hours (not 3 minutes as I thought it was previously doing).

openLuup, AltUI, Zway and HomeWave, enough said...

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Re: GCAL3 - V 1.3 Released - Now with Overlapping Event Notification
« Reply #378 on: September 22, 2015, 11:56:11 am »
Stuart,

Did gc_interval get changed by chance ? Just curious as I was using 180 as my value and I'm observing the next check 3 hours (not 3 minutes as I thought it was previously doing).

I cannot remember if gc_Interval has ever been anything except minutes.   The plugin sets a default of 180 (minutes) and internally changes that to seconds.  Note that gc_Interval sets the maximum time between checks (meaning updates of its internal copy) of the calendar.  The plugin checks at the start time and end time of every event (just in case something has changed) and looks forward for at least 24 hrs (depending on the value of gc_ExtraDays default 0).

So in principle there's usually no need to change gc_Interval unless you are frequently adding new calendar events (that you want the plugin to react to) sooner than 3 hrs from the end of the last event.

Offline CudaNet

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1401
  • Karma: +42/-11
  • Chimichanga !
Re: GCAL3 - V 1.3 Released - Now with Overlapping Event Notification
« Reply #379 on: September 22, 2015, 12:01:12 pm »
I must be losing it then - rather I must have always mis-interpreted that param... Thanks for the clarity, I'll adjust and keep testing..

Stuart,

Did gc_interval get changed by chance ? Just curious as I was using 180 as my value and I'm observing the next check 3 hours (not 3 minutes as I thought it was previously doing).

I cannot remember if gc_Interval has ever been anything except minutes.   The plugin sets a default of 180 (minutes) and internally changes that to seconds.  Note that gc_Interval sets the maximum time between checks (meaning updates of its internal copy) of the calendar.  The plugin checks at the start time and end time of every event (just in case something has changed) and looks forward for at least 24 hrs (depending on the value of gc_ExtraDays default 0).

So in principle there's usually no need to change gc_Interval unless you are frequently adding new calendar events (that you want the plugin to react to) sooner than 3 hrs from the end of the last event.
openLuup, AltUI, Zway and HomeWave, enough said...

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Re: GCAL3 - V 1.3 Released - Now with Overlapping Event Notification
« Reply #380 on: September 22, 2015, 12:32:30 pm »
I must be losing it then - rather I must have always mis-interpreted that param... Thanks for the clarity, I'll adjust and keep testing..



If ever I think I'm 'loosing it' - I just re-read the forums that have dialog with Vera Management   8)

Offline fabstar81

  • Full Member
  • ***
  • Posts: 122
  • Karma: +2/-0
Re: GCAL3 - V 1.3 Released - Now with Overlapping Event Notification
« Reply #381 on: October 08, 2015, 03:03:01 am »
Maybe this has been attended before but I can't find any topics on my probably basic mistake in the configuration of the plug-in.

I installed the v3 plugin months ago and it has been this way since installation. The plugin sees all my appointments in my calendar but never gets the appropriate names for it. Whatever appointment the plug-in trips on, it always says "NO NAME". Very annoying as you can imagine.

It's probably a setting in the calendar itself I recon, but cannot find some option that might solve it.

Someone here maybe has a good idea?

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Re: GCAL3 - V 1.3 Released - Now with Overlapping Event Notification
« Reply #382 on: October 08, 2015, 11:14:35 am »
Maybe this has been attended before but I can't find any topics on my probably basic mistake in the configuration of the plug-in.

I installed the v3 plugin months ago and it has been this way since installation. The plugin sees all my appointments in my calendar but never gets the appropriate names for it. Whatever appointment the plug-in trips on, it always says "NO NAME". Very annoying as you can imagine.

It's probably a setting in the calendar itself I recon, but cannot find some option that might solve it.

Someone here maybe has a good idea?

I don't keep all this in my head so I searched for "NO NAME"  and found the post with an answer ..........
"If your calendar is set to be public and only show free/busy time then the events will show up but with 'NO NAME' "

The instructions in the attachment to the very first post (setting up the service account) include the correct calendar settings.

Offline fabstar81

  • Full Member
  • ***
  • Posts: 122
  • Karma: +2/-0
Re: GCAL3 - V 1.3 Released - Now with Overlapping Event Notification
« Reply #383 on: October 09, 2015, 02:06:19 am »
searched again in the forum and still didn't find the post. anyways...just rechecked the settings in the calender and i see what's wrong here. unfortunately, all options are greyed out, except the one that says "only status information occupied/unoccupied". I wonder if that has something to do with my account being a apps.google.com account?

i have deleted and re-added the service account to no  prevail.

luckily i am the apps.-admin. changed the overall setting to higher information. now it's working. thanks!
« Last Edit: October 09, 2015, 03:30:00 am by fabstar81 »

Offline veramoyo

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: GCAL3 - V 1.3 Released - Now with Overlapping Event Notification
« Reply #384 on: October 13, 2015, 05:39:39 am »
Hi guys, still very new to vera so I am hoping you can help me with this. I have  installed the google calendar plugin and set it up successfully with everything working well on one GCal3 sensor device checking my calendar and PLEG running some actions fine. I have now created a second GCal3 sensor device which will check my wife's calendar so I can have PLEG do other stuff for her. My question is where do I put the credentials for this second one and how do I point this pointer to it. I have tried to search and can't seem to find any instructions on how to do this. Can someone please help with where I can find this or point me in the right direction.

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Re: GCAL3 - V 1.3 Released - Now with Overlapping Event Notification
« Reply #385 on: October 15, 2015, 04:44:57 pm »
Hi guys, still very new to vera so I am hoping you can help me with this. I have  installed the google calendar plugin and set it up successfully with everything working well on one GCal3 sensor device checking my calendar and PLEG running some actions fine. I have now created a second GCal3 sensor device which will check my wife's calendar so I can have PLEG do other stuff for her. My question is where do I put the credentials for this second one and how do I point this pointer to it. I have tried to search and can't seem to find any instructions on how to do this. Can someone please help with where I can find this or point me in the right direction.

Your search was successful - there is no capability for a second set of credentials :-(

You could create a second calendar under your credentials ( I do this for testing) and point a second plugin at that -- not the best I know ....

Part of this is historic and ties into the way some of the original authentication code was implemented.  I did a major restructure of that code a while back but have not revisited the idea of different credentials tied to different plugin instances.  I'll take a look - I suspect it might be trivial to implement - and let you know.

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Re: GCAL3 - V 1.3 Released - Now with Overlapping Event Notification
« Reply #386 on: October 16, 2015, 06:38:49 pm »
Hi guys, still very new to vera so I am hoping you can help me with this. I have  installed the google calendar plugin and set it up successfully with everything working well on one GCal3 sensor device checking my calendar and PLEG running some actions fine. I have now created a second GCal3 sensor device which will check my wife's calendar so I can have PLEG do other stuff for her. My question is where do I put the credentials for this second one and how do I point this pointer to it. I have tried to search and can't seem to find any instructions on how to do this. Can someone please help with where I can find this or point me in the right direction.

Your search was successful - there is no capability for a second set of credentials :-(

You could create a second calendar under your credentials ( I do this for testing) and point a second plugin at that -- not the best I know ....

Part of this is historic and ties into the way some of the original authentication code was implemented.  I did a major restructure of that code a while back but have not revisited the idea of different credentials tied to different plugin instances.  I'll take a look - I suspect it might be trivial to implement - and let you know.

@ veramoyo --

The changes were pretty simple. I did some testing but would like you to do some too (if you are willing).


I'm assuming you have already setup a calendar - got a credentials file and set calendar permission for your wife's calendar (in the same way as you would have for your own).  Se note below about using a different name than GCal3.json for this second calendar and it's credentials.

Attached are two files to upload to vera.  Once that's done -  you should not see any difference.

Create a new plugin.  There is a new new variable called gc_credentialFile . The default is GCal3.json.   Change this value to a different file with an extension of ".json" (e.g. "somename.json"). Then reboot.  You should now have a message of "Fatal error: credentials" on the plugin you changed.  The other plugins should work fine.

Next upload the credentials file ( "somename.json") to vera and reboot again.  The plugin you changed should now have a message "The CalendarID is not set".   Go to the control tab - enter the ID, click "set"  and all should be well .....
« Last Edit: October 25, 2015, 10:05:13 pm by Stuart »

Offline veramoyo

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: GCAL3 - V 1.3 Released - Now with Overlapping Event Notification
« Reply #387 on: October 16, 2015, 08:55:21 pm »
Brilliant stuff!! Uploaded the two files and did all the changes and presto!! Works like magic. Awesome work. Now I have two plugins checking two different calendars. The calendar events(On the calendar) however are  displayed for the account I am currently logged in on the browser, but the plugin can still retrieve them for PLEG/scenes. I guess that's to be expected and for me it is not important to view both at the same time, as long as I can retrieve them. Thanks hips

Offline MSW

  • Full Member
  • ***
  • Posts: 114
  • Karma: +6/-6
Re: GCAL3 - V 1.3 Released - Now with Overlapping Event Notification
« Reply #388 on: October 18, 2015, 03:26:46 am »
Thanks, Stuart. Just did that again, but still not working. Here are the two sides of the string:
http://o7.no/1EWHFeJ
http://o7.no/1OAPlU8

2nd tab still works fine:
http://o7.no/1OAPuHk

What do you recommend?

Did you ever get this sorted?  I have the same issue with UI7.  (new install).  The only way I can get the second tab to show correctly is pasting the URL link directly in the advanced tab, but I still get the "Access or Calendar error" in the main tab and no events.

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 728
  • Karma: +71/-2
Re: GCAL3 - V 1.3 Released - Now with Overlapping Event Notification
« Reply #389 on: October 18, 2015, 01:08:34 pm »
Thanks, Stuart. Just did that again, but still not working. Here are the two sides of the string:
http://o7.no/1EWHFeJ
http://o7.no/1OAPlU8

2nd tab still works fine:
http://o7.no/1OAPuHk

What do you recommend?

Did you ever get this sorted?  I have the same issue with UI7.  (new install).  The only way I can get the second tab to show correctly is pasting the URL link directly in the advanced tab, but I still get the "Access or Calendar error" in the main tab and no events.

When we last exchanged on this, I asked for a log file so that I could see exactly what was going on - you did not send a log file so I assumed you were "ok".

Before we take this further - just to make sure we are not chasing ghosts ----   the calendar tab can only display the calendar for the 'currently logged on to google user of the browser'.  If you can see a calendar in the tab of one plugin but not another then there is something different in the permissions on the calendar side.

The calendar tab is a hangover from the very first version of gcal from another author.  Since then I've completely restructured, enhanced and added many debug and notification messages.  As well, security changes on the google side have made the simple functionality in the tap more complex.  In any case, it does not show enough detail to be truly interesting and it does not provide an indication that 'all is well'.

Frankly - I'm seriously considering removing the tab as it's confusing to people as to why it may or may not seem to work.  How do you use it ?  Would it matter if it were removed ?

What opinion do others have ?