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

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 723
  • Karma: +71/-2
GCAL3 - General Discussion
« on: August 22, 2014, 10:26:48 am »
This topic is for general discussion about Google Calendar 3
« Last Edit: October 01, 2018, 07:21:35 pm by Stuart »

Offline CudaNet

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1401
  • Karma: +42/-10
  • Chimichanga !
Re: GCAL3 - Google Calendar 3
« Reply #1 on: August 22, 2014, 01:10:13 pm »
Stuart, really looking forward to installing this. Will give it a go in the next day or so.... So glad this plugin is in it's own forum (just noticed that)...
openLuup, AltUI, Zway and HomeWave, enough said...

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 723
  • Karma: +71/-2
Re: GCAL3 - Google Calendar 3
« Reply #2 on: August 22, 2014, 02:09:47 pm »
Stuart, really looking forward to installing this. Will give it a go in the next day or so.... So glad this plugin is in it's own forum (just noticed that)...

Just posted the release files above.   Hope the install is smooth ......

Offline korttoma

  • Hero Member
  • *****
  • Posts: 705
  • Karma: +26/-5
  • Keep it simple, stupid
Re: GCAL3 - Google Calendar 3
« Reply #3 on: August 22, 2014, 04:15:20 pm »
Thumbs up Stuart!!!
- Tomas

Offline duiffie

  • Full Member
  • ***
  • Posts: 126
  • Karma: +2/-0
Re: GCAL3 - Google Calendar 3
« Reply #4 on: August 25, 2014, 05:22:24 am »
Followed all the steps, but:

Code: [Select]
50      08/25/14 11:24:40.417   luup_log:75: GCal3 gc_V 0.6:Getting new token __LEAK__ this:40960 start:3620864 to 0x12e1000 <0x8c24>
50      08/25/14 11:24:40.420   luup_log:75: GCal3 gc_V 0.6:Client email is: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@developer.gserviceaccount.com __LEAK__ this:4096 start:3624960 to 0x12e2000 <0x8c24>
50      08/25/14 11:24:40.792   luup_log:75: GCal3 gc_V 0.6:Command rm /etc/cmh-ludl/GCal3/GCal3.token returned 256 <0x8c24>
50      08/25/14 11:24:41.027   luup_log:75: GCal3 gc_V 0.6:Command /usr/lib/lua/googlejwt.sh xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@developer.gserviceaccount.com  https://www.googleapis.com/auth/calendar /etc/cmh-ludl/GCal3/GCal3.pem /etc/cmh-ludl/GCal3/GCal3.token returned 32512 <0x8c24>
50      08/25/14 11:24:41.028   luup_log:75: GCal3 gc_V 0.6:Could not execute the googlejwt.sh script <0x8c24>
50      08/25/14 11:24:41.029   luup_log:75: GCal3 gc_V 0.6:Fatal error trying to get access token <0x8c24>
06      08/25/14 11:24:41.032   Device_Variable::m_szValue_set device: 75 service: urn:srs-com:serviceId:GCalIII variable: gc_nextCheck was: 2014-08-25T14:13:52 now: 2014-08-25T14:24:32 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x8c24>
50      08/25/14 11:24:41.033   luup_log:75: GCal3 gc_V 0.6:Next check will be in 10800 sec at 2014-08-25T14:24:32 <0x8c24>

The calendar shows up fine though after opening the calendar-tab, the device hangs on 'Checking...'.

Any idea? :-)
« Last Edit: August 25, 2014, 06:31:32 am by duiffie »
Vera2 (1.5.622)

Offline roquej

  • Sr. Newbie
  • *
  • Posts: 35
  • Karma: +0/-0
Re: GCAL3 - Google Calendar 3
« Reply #5 on: August 25, 2014, 09:11:55 am »
Stuart,

Will GCal3 install over GCal_II or would it be appear as another device?

Thank you!

JR

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 723
  • Karma: +71/-2
Re: GCAL3 - Google Calendar 3
« Reply #6 on: August 25, 2014, 10:47:20 am »
Followed all the steps, but:

Code: [Select]
50      08/25/14 11:24:40.417   luup_log:75: GCal3 gc_V 0.6:Getting new token __LEAK__ this:40960 start:3620864 to 0x12e1000 <0x8c24>
50      08/25/14 11:24:40.420   luup_log:75: GCal3 gc_V 0.6:Client email is: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@developer.gserviceaccount.com __LEAK__ this:4096 start:3624960 to 0x12e2000 <0x8c24>
50      08/25/14 11:24:40.792   luup_log:75: GCal3 gc_V 0.6:Command rm /etc/cmh-ludl/GCal3/GCal3.token returned 256 <0x8c24>
50      08/25/14 11:24:41.027   luup_log:75: GCal3 gc_V 0.6:Command /usr/lib/lua/googlejwt.sh xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@developer.gserviceaccount.com  https://www.googleapis.com/auth/calendar /etc/cmh-ludl/GCal3/GCal3.pem /etc/cmh-ludl/GCal3/GCal3.token returned 32512 <0x8c24>
50      08/25/14 11:24:41.028   luup_log:75: GCal3 gc_V 0.6:Could not execute the googlejwt.sh script <0x8c24>
50      08/25/14 11:24:41.029   luup_log:75: GCal3 gc_V 0.6:Fatal error trying to get access token <0x8c24>
06      08/25/14 11:24:41.032   Device_Variable::m_szValue_set device: 75 service: urn:srs-com:serviceId:GCalIII variable: gc_nextCheck was: 2014-08-25T14:13:52 now: 2014-08-25T14:24:32 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x8c24>
50      08/25/14 11:24:41.033   luup_log:75: GCal3 gc_V 0.6:Next check will be in 10800 sec at 2014-08-25T14:24:32 <0x8c24>

The calendar shows up fine though after opening the calendar-tab, the device hangs on 'Checking...'.

Any idea? :-)

@duiffie
This log tells me there was a error trying to execute the command /ur/lib/lua/googlejwt.sh -- possibly that it could not be found .....
The number and type of arguments looks correct

What does the log file indicate at the very start ?   It's possible there was a failure in downloading googlejwt.sh or setting it's permissions. 

Unfortunately googlejwt.sh is currently a 'black box' there is no debugging.  That's the next thing I'm working on, although - given a correctly formed GCal3.json file - I've not seen it fail.

Lets see if googlejwt.json exists first - can you telnet in ?  do an 'ls -l' ?

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 723
  • Karma: +71/-2
Re: GCAL3 - Google Calendar 3
« Reply #7 on: August 25, 2014, 10:54:07 am »
Stuart,

Will GCal3 install over GCal_II or would it be appear as another device?

Thank you!

JR

You "should" be fine - I think (I'm on the road for a couple of days)  there may be one global variable that I have not tidied up that is common with GCal_II but it's only used briefly when decoding calendar results - so it would be bad luck if there was a 'collision'.  Even then - I'm not certain how Lua / mios seprates the execution space .....  so it might be perfectly fine even as is.

Offline duiffie

  • Full Member
  • ***
  • Posts: 126
  • Karma: +2/-0
Re: GCAL3 - Google Calendar 3
« Reply #8 on: August 25, 2014, 12:11:20 pm »
Followed all the steps, but:

Code: [Select]
50      08/25/14 11:24:40.417   luup_log:75: GCal3 gc_V 0.6:Getting new token __LEAK__ this:40960 start:3620864 to 0x12e1000 <0x8c24>
50      08/25/14 11:24:40.420   luup_log:75: GCal3 gc_V 0.6:Client email is: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@developer.gserviceaccount.com __LEAK__ this:4096 start:3624960 to 0x12e2000 <0x8c24>
50      08/25/14 11:24:40.792   luup_log:75: GCal3 gc_V 0.6:Command rm /etc/cmh-ludl/GCal3/GCal3.token returned 256 <0x8c24>
50      08/25/14 11:24:41.027   luup_log:75: GCal3 gc_V 0.6:Command /usr/lib/lua/googlejwt.sh xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@developer.gserviceaccount.com  https://www.googleapis.com/auth/calendar /etc/cmh-ludl/GCal3/GCal3.pem /etc/cmh-ludl/GCal3/GCal3.token returned 32512 <0x8c24>
50      08/25/14 11:24:41.028   luup_log:75: GCal3 gc_V 0.6:Could not execute the googlejwt.sh script <0x8c24>
50      08/25/14 11:24:41.029   luup_log:75: GCal3 gc_V 0.6:Fatal error trying to get access token <0x8c24>
06      08/25/14 11:24:41.032   Device_Variable::m_szValue_set device: 75 service: urn:srs-com:serviceId:GCalIII variable: gc_nextCheck was: 2014-08-25T14:13:52 now: 2014-08-25T14:24:32 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x8c24>
50      08/25/14 11:24:41.033   luup_log:75: GCal3 gc_V 0.6:Next check will be in 10800 sec at 2014-08-25T14:24:32 <0x8c24>

The calendar shows up fine though after opening the calendar-tab, the device hangs on 'Checking...'.

Any idea? :-)

@duiffie
This log tells me there was a error trying to execute the command /ur/lib/lua/googlejwt.sh -- possibly that it could not be found .....
The number and type of arguments looks correct

What does the log file indicate at the very start ?   It's possible there was a failure in downloading googlejwt.sh or setting it's permissions. 

Unfortunately googlejwt.sh is currently a 'black box' there is no debugging.  That's the next thing I'm working on, although - given a correctly formed GCal3.json file - I've not seen it fail.

Lets see if googlejwt.json exists first - can you telnet in ?  do an 'ls -l' ?

it does exist and it is executable:
Code: [Select]
ls -ltr /usr/lib/lua/googlejwt.sh
-rwxr-xr-x    1 root     root         1240 Aug 25 18:04 /usr/lib/lua/googlejwt.sh

i see that the openssl command is used within this shell script. My box (vera 2) doesn't seem to have openssl installed, can that be a reason?
Vera2 (1.5.622)

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 723
  • Karma: +71/-2
Re: GCAL3 - Google Calendar 3
« Reply #9 on: August 25, 2014, 12:22:47 pm »
@ Duiffie
Wow!   I have a vera light and do not know if there is supposed to be a difference.

The reason I went that route is because vera does not have a lua module that would otherwise be used.  So I assumed that the *nix libraries would be the safest approach.......

I'll send an email to vera support and ask.  It may be a simple opt install -  if so we can do that manually and later I can pout a check in the plugin.


Offline duiffie

  • Full Member
  • ***
  • Posts: 126
  • Karma: +2/-0
Re: GCAL3 - Google Calendar 3
« Reply #10 on: August 25, 2014, 12:40:10 pm »
@ Duiffie
Wow!   I have a vera light and do not know if there is supposed to be a difference.

The reason I went that route is because vera does not have a lua module that would otherwise be used.  So I assumed that the *nix libraries would be the safest approach.......

I'll send an email to vera support and ask.  It may be a simple opt install -  if so we can do that manually and later I can pout a check in the plugin.

I did 2 things and then things started to work:
- installed openssl: opkg install openssl-util
- changed the first line of the googlejwt.sh script (#!/bin/bash to #!/bin/ash) because bash seems not present on vera 2 as well
Vera2 (1.5.622)

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 723
  • Karma: +71/-2
Re: GCAL3 - Google Calendar 3
« Reply #11 on: August 25, 2014, 03:51:48 pm »
@Duiffie

Great! And Thanks! !!!

I suspect that ash vs bash is just a symlink  to busybox-  strange that MCV would do that. ..... might be an openwrt thing. ....

Might be that the script can be made generic by invoking busybox direct.

I'm traveling this week but will look at some options when I return including auto installing opened out it's not there. ...

guest141575

  • Guest
Re: GCAL3 - Google Calendar 3 (Unit Busy)
« Reply #12 on: August 26, 2014, 01:03:19 pm »
I've upgraded from GCal II to GCal 3.

Now, whenever Vera needs to make a reload it will take like ages. I have 4 defined calendar devices. The reload happens an arbitrary number of times, typically 4 times in a row. It says "Unit Busy", then it says "Running LUA Startup" or "Starting LUA Engine". Then it starts with "Unit Busy" and so on..  Before it was only a single cycle.

Offline Stuart

  • Moderator
  • Hero Member
  • *****
  • Posts: 723
  • Karma: +71/-2
Re: GCAL3 - Google Calendar 3 (Unit Busy)
« Reply #13 on: August 26, 2014, 03:08:58 pm »
I've upgraded from GCal II to GCal 3.

Now, whenever Vera needs to make a reload it will take like ages. I have 4 defined calendar devices. The reload happens an arbitrary number of times, typically 4 times in a row. It says "Unit Busy", then it says "Running LUA Startup" or "Starting LUA Engine". Then it starts with "Unit Busy" and so on..  Before it was only a single cycle.

Once it's done does it work correctly?
Can you capture a log file?
I did not test with multiple plugins since hopefully the ability to define multiple keywords makes that unnecessary.  I will try to test but may not get to it until next week.

guest141575

  • Guest
Re: GCAL3 - Google Calendar 3 (Unit Busy)
« Reply #14 on: August 26, 2014, 04:15:37 pm »
I've upgraded from GCal II to GCal 3.

Now, whenever Vera needs to make a reload it will take like ages. I have 4 defined calendar devices. The reload happens an arbitrary number of times, typically 4 times in a row. It says "Unit Busy", then it says "Running LUA Startup" or "Starting LUA Engine". Then it starts with "Unit Busy" and so on..  Before it was only a single cycle.

Once it's done does it work correctly?
Can you capture a log file?
I did not test with multiple plugins since hopefully the ability to define multiple keywords makes that unnecessary.  I will try to test but may not get to it until next week.

First I want to say Thank You for your great work.  ;D

Yes, everything seems to work after it's done reloading etc , so it's not that urgent. It can wait until you have time to look into it. I use multiple GCal 3 devices since I have several calendars to watch :D

If You can't reproduce the behaviour I will learn how to produce a log file. Thanks!  ;D ;D ;D