BakSeeDaa´s Google Calendar for Domoticz (deprecated)

In this subforum you can show projects you have made, or you are busy with. Please create your own topic.
jasifil
Posts: 29
Joined: Thursday 03 March 2016 23:25
Target OS: Raspberry Pi
Domoticz version: 4.9700
Location: Sweden
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz (deprecated)

Post by jasifil » Monday 24 September 2018 20:20

I get the same issue with your file as well.

Code: Select all

2018-09-24 20:17:33.969 Status: User: Admin initiated a switch command (35/GCalCheck calendarname/On) 
2018-09-24 20:17:34.378 (RFXtrx433E) Temp (Inne b.v.) 
2018-09-24 20:17:34.006 Status: LUA: GCal3 V 1.0.3: Calendar device GCal calendarname (idx:33 ) initializing 
2018-09-24 20:17:34.023 Status: LUA: GCal3 V 1.0.3: Command /bin/ls /home/pi/domoticz/GCal3/ returned true 
2018-09-24 20:17:34.039 Status: LUA: GCal3 V 1.0.3: Command /bin/rm -f /home/pi/domoticz/GCal3/GCal3.sem returned true 
2018-09-24 20:17:34.052 Status: LUA: GCal3 V 1.0.3: Command bin/rm -f /home/pi/domoticz/GCal3/*.token returned nil 
2018-09-24 20:17:34.052 Status: LUA: GCal3 V 1.0.3: Checking semaphore 
2018-09-24 20:17:34.069 Status: LUA: GCal3 V 1.0.3: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.sem returned nil 
2018-09-24 20:17:34.069 Status: LUA: GCal3 V 1.0.3: Semaphore file returned nil 
2018-09-24 20:17:34.070 Status: LUA: GCal3 V 1.0.3: Device 33 requested semaphore 
2018-09-24 20:17:34.087 Status: LUA: GCal3 V 1.0.3: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.sem returned true 
2018-09-24 20:17:34.087 Status: LUA: GCal3 V 1.0.3: Device 33 claimed semaphore 
2018-09-24 20:17:34.087 Status: LUA: GCal3 V 1.0.3: Variables initialized ... 
2018-09-24 20:17:34.104 Status: LUA: GCal3 V 1.0.3: Command /bin/ls /home/pi/domoticz/scripts/lua/json.lua returned true 
2018-09-24 20:17:34.109 Status: LUA: GCal3 V 1.0.3: local function: checkforcredentials 
2018-09-24 20:17:34.126 Status: LUA: GCal3 V 1.0.3: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.json returned true 
2018-09-24 20:17:34.143 Status: LUA: GCal3 V 1.0.3: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.json returned true 
2018-09-24 20:17:34.166 Status: LUA: GCal3 V 1.0.3: Command find /home/pi/domoticz/GCal3/ -type f ! -newer GCal3.json -name GCal3.pem -delete returned nil 
2018-09-24 20:17:34.183 Status: LUA: GCal3 V 1.0.3: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.pem returned true 
2018-09-24 20:17:34.183 Status: LUA: GCal3 V 1.0.3: Timezone is 2 hrs and 0 min 
2018-09-24 20:17:34.183 Status: LUA: GCal3 V 1.0.3: Running Plugin ... 
2018-09-24 20:17:34.188 Status: LUA: GCal3 V 1.0.3: local function: checkGCal 
2018-09-24 20:17:34.188 Status: LUA: GCal3 V 1.0.3: Checking semaphore 
2018-09-24 20:17:34.205 Status: LUA: GCal3 V 1.0.3: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.sem returned true 
2018-09-24 20:17:34.205 Status: LUA: GCal3 V 1.0.3: Semaphore file returned 33 
2018-09-24 20:17:34.222 Status: LUA: GCal3 V 1.0.3: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.sem returned true 
2018-09-24 20:17:34.222 Status: LUA: GCal3 V 1.0.3: Device 33 claimed semaphore 
2018-09-24 20:17:34.223 Status: LUA: GCal3 V 1.0.3: StartMin is 2018-09-23T22:00:00Z StartMax is 2018-09-25T18:17:00Z 
2018-09-24 20:17:34.223 Status: LUA: GCal3 V 1.0.3: End of day is 2018-09-25T23:59:59 
2018-09-24 20:17:34.223 Status: LUA: GCal3 V 1.0.3: local function: requestCalendar 
2018-09-24 20:17:34.223 Status: LUA: GCal3 V 1.0.3: local function: get_access_token 
2018-09-24 20:17:34.223 Status: LUA: GCal3 V 1.0.3: Getting a new token 
2018-09-24 20:17:34.547 Status: LUA: GCal3 V 1.0.3: The token request returned an error: { 
2018-09-24 20:17:34.547 "error" : "invalid_request", 
2018-09-24 20:17:34.547 "error_description" : "Bad Request" 
2018-09-24 20:17:34.547 } 
2018-09-24 20:17:34.547 Status: LUA: GCal3 V 1.0.3: Fatal error trying to get access token 
2018-09-24 20:17:34.547 Status: LUA: GCal3 V 1.0.3: Device 33 released the semaphore - reason: calendar check complete 
2018-09-24 20:17:34.548 Status: LUA: GCal3 V 1.0.3: Next check will be in 500 sec on 2018-09-24 at 20:25:54 
2018-09-24 20:17:34.550 Status: LUA: GCal3 V 1.0.3: Device 33 released the semaphore - reason: initialization complete 
2018-09-24 20:17:34.550 Status: LUA: GCal3 V 1.0.3: Switch recent status: Off 
2018-09-24 20:17:34.554 Status: EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_device_gcal.lua

TheeDude
Posts: 44
Joined: Wednesday 07 October 2015 0:43
Target OS: Linux
Domoticz version:
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz (deprecated)

Post by TheeDude » Monday 24 September 2018 20:42

I will look into it!
But, the problem might be on your side rather than the script.
If I look at google´s api troubleshooting page it just refers Bad request error to "User error"
I guess it can be other errors on your side, maybe some of the other files.

Credential file? User variable with calendar id?
You should check all the other settings aswell.

400: Bad Request
User error. This can mean that a required field or parameter has not been provided, the value supplied is invalid, or the combination of provided fields is invalid.

jasifil
Posts: 29
Joined: Thursday 03 March 2016 23:25
Target OS: Raspberry Pi
Domoticz version: 4.9700
Location: Sweden
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz (deprecated)

Post by jasifil » Monday 24 September 2018 20:55

TheeDude wrote:
Monday 24 September 2018 20:42
I will look into it!
But, the problem might be on your side rather than the script.
If I look at google´s api troubleshooting page it just refers Bad request error to "User error"
I guess it can be other errors on your side, maybe some of the other files.

Credential file? User variable with calendar id?
You should check all the other settings aswell.

400: Bad Request
User error. This can mean that a required field or parameter has not been provided, the value supplied is invalid, or the combination of provided fields is invalid.
Ok, thanks for your help! I will try to find out if there are any problems with the files on my side.

jasifil
Posts: 29
Joined: Thursday 03 March 2016 23:25
Target OS: Raspberry Pi
Domoticz version: 4.9700
Location: Sweden
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz (deprecated)

Post by jasifil » Monday 24 September 2018 21:50

I have tried to check the credentials. No luck! I give up I think. Here is the content in the file "GCal3.json" Does your GCal3.json have the same content? Or is there any other file I should check out?

Code: Select all

{
  "type": "service_account",
  "project_id": "deleted",
  "private_key_id": "deleted",
  "private_key": "-----BEGIN PRIVATE KEY-----deleted-----END PRIVATE KEY-----\n",
  "client_email": "@",
  "client_id": "deleted",
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://www.googleapis.com/oauth2/v3/token",
  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
  "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/@"
}

TheeDude
Posts: 44
Joined: Wednesday 07 October 2015 0:43
Target OS: Linux
Domoticz version:
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz (deprecated)

Post by TheeDude » Tuesday 25 September 2018 0:13

jasifil wrote:
Monday 24 September 2018 21:50
I have tried to check the credentials. No luck! I give up I think. Here is the content in the file "GCal3.json" Does your GCal3.json have the same content? Or is there any other file I should check out?

Code: Select all

{
  "type": "service_account",
  "project_id": "deleted",
  "private_key_id": "deleted",
  "private_key": "-----BEGIN PRIVATE KEY-----deleted-----END PRIVATE KEY-----\n",
  "client_email": "@",
  "client_id": "deleted",
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://www.googleapis.com/oauth2/v3/token",
  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
  "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/@"
}
I have also tried now to change my files/rename them, and I get errors, but never the error that you had before, so no luck there.

No actually, my GCal3.json don´t look like that!

Here are mine.
{
"private_key_id": "deleted",
"private_key": "deleted like 10 rows ",
"client_email": "deleted",
"client_id": "deleted",
"type": "service_account"
}
Maybe try to slim it down so it looks like my file?

jasifil
Posts: 29
Joined: Thursday 03 March 2016 23:25
Target OS: Raspberry Pi
Domoticz version: 4.9700
Location: Sweden
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz (deprecated)

Post by jasifil » Tuesday 25 September 2018 10:22

TheeDude wrote:
Tuesday 25 September 2018 0:13

I have also tried now to change my files/rename them, and I get errors, but never the error that you had before, so no luck there.

No actually, my GCal3.json don´t look like that!

Here are mine.
{
"private_key_id": "deleted",
"private_key": "deleted like 10 rows ",
"client_email": "deleted",
"client_id": "deleted",
"type": "service_account"
}
Maybe try to slim it down so it looks like my file?
It didn´t work! Those paths are essential since it doesn´t work at all when I remove them.
I think that I will give up on this since it seems impossible for me to solve. Is there by any chance anyeone that has saved the full instruction how to do this. Bakseedas pdf:s are deleted so no luck there. But if someone has a backup of them I would appreciate if I could get a "copy". :D If so I could just start all over from the beginning.

TheeDude
Posts: 44
Joined: Wednesday 07 October 2015 0:43
Target OS: Linux
Domoticz version:
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz (deprecated)

Post by TheeDude » Tuesday 25 September 2018 15:14

jasifil wrote:
Tuesday 25 September 2018 10:22
It didn´t work! Those paths are essential since it doesn´t work at all when I remove them.
I think that I will give up on this since it seems impossible for me to solve. Is there by any chance anyeone that has saved the full instruction how to do this. Bakseedas pdf:s are deleted so no luck there. But if someone has a backup of them I would appreciate if I could get a "copy". :D If so I could just start all over from the beginning.
Too bad, I am running out of ideas, I think of course it should work when it is working correct at my location.
I know I did install luarocks in all the troubleshooting, but I don´t know if it has something to do with the situation, but I don´t think so.

I did look through my old files and found two pdf files that might help you out!
Attachments
V0.9 - GCal3.pdf
(138.55 KiB) Downloaded 11 times
Setting up a Google V3 API Service Account.pdf
(138.66 KiB) Downloaded 8 times

zak45
Posts: 574
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V4.10171
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz (deprecated)

Post by zak45 » Tuesday 25 September 2018 16:46


jasifil
Posts: 29
Joined: Thursday 03 March 2016 23:25
Target OS: Raspberry Pi
Domoticz version: 4.9700
Location: Sweden
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz (deprecated)

Post by jasifil » Tuesday 25 September 2018 17:56

TheeDude wrote:
Tuesday 25 September 2018 15:14
jasifil wrote:
Tuesday 25 September 2018 10:22
It didn´t work! Those paths are essential since it doesn´t work at all when I remove them.
I think that I will give up on this since it seems impossible for me to solve. Is there by any chance anyeone that has saved the full instruction how to do this. Bakseedas pdf:s are deleted so no luck there. But if someone has a backup of them I would appreciate if I could get a "copy". :D If so I could just start all over from the beginning.
Too bad, I am running out of ideas, I think of course it should work when it is working correct at my location.
I know I did install luarocks in all the troubleshooting, but I don´t know if it has something to do with the situation, but I don´t think so.

I did look through my old files and found two pdf files that might help you out!
Thanks for your help!

TheeDude
Posts: 44
Joined: Wednesday 07 October 2015 0:43
Target OS: Linux
Domoticz version:
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz (deprecated)

Post by TheeDude » Tuesday 25 September 2018 21:27

zak45 wrote:
Tuesday 25 September 2018 16:46
Or you can give a try here:
https://www.domoticz.com/wiki/Plugins/iCal.html
Thanks for the tip!

I will probably try it out if this one gives me problems again!

jasifil
Posts: 29
Joined: Thursday 03 March 2016 23:25
Target OS: Raspberry Pi
Domoticz version: 4.9700
Location: Sweden
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz (deprecated)

Post by jasifil » Tuesday 25 September 2018 22:04

zak45 wrote:
Tuesday 25 September 2018 16:46
Or you can give a try here:
https://www.domoticz.com/wiki/Plugins/iCal.html
Could be an alternative for me. Have you got any examples of how this works?

Edit: Forget my last sentence :) I just had to keep reading the page you linked to :)

TheeDude
Posts: 44
Joined: Wednesday 07 October 2015 0:43
Target OS: Linux
Domoticz version:
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz (deprecated)

Post by TheeDude » Saturday 03 November 2018 11:02

Today it stopped working again for me.

I think I am giving up on this now, and trying to search for a better reliable solution.
Probably am going to try out the script that was suggested here in the thread before.
https://www.domoticz.com/wiki/Plugins/iCal.html

Code: Select all

 2018-11-03 06:10:08.737 Status: LUA: GCal3 V 1.0.3: local function: requestCalendar 

 2018-11-03 06:10:08.737 Status: LUA: GCal3 V 1.0.3: local function: get_access_token 

 2018-11-03 06:10:08.737 Status: LUA: GCal3 V 1.0.3: Getting a new token 

 2018-11-03 06:10:09.178 Status: LUA: GCal3 V 1.0.3: The token request did not provide an access token: { 

 2018-11-03 06:10:09.178 Status: LUA: GCal3 V 1.0.3: Fatal error trying to get access token 

fremar
Posts: 5
Joined: Monday 27 February 2017 9:27
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz (deprecated)

Post by fremar » Monday 05 November 2018 9:27

TheeDude wrote:
Saturday 03 November 2018 11:02
Today it stopped working again for me.

I think I am giving up on this now, and trying to search for a better reliable solution.
Probably am going to try out the script that was suggested here in the thread before.
https://www.domoticz.com/wiki/Plugins/iCal.html

Code: Select all

 2018-11-03 06:10:08.737 Status: LUA: GCal3 V 1.0.3: local function: requestCalendar 

 2018-11-03 06:10:08.737 Status: LUA: GCal3 V 1.0.3: local function: get_access_token 

 2018-11-03 06:10:08.737 Status: LUA: GCal3 V 1.0.3: Getting a new token 

 2018-11-03 06:10:09.178 Status: LUA: GCal3 V 1.0.3: The token request did not provide an access token: { 

 2018-11-03 06:10:09.178 Status: LUA: GCal3 V 1.0.3: Fatal error trying to get access token 
Same problem here, no carheater was on this morning :( I use this script https://github.com/riksarchen/carheater_domoticz that uses BakSeeDaa´s Google Calendar, havent found a better solution and it has been working great. Not that great on scripting either so don't think I will be able to get the carheater one working again :(

TheeDude
Posts: 44
Joined: Wednesday 07 October 2015 0:43
Target OS: Linux
Domoticz version:
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz (deprecated)

Post by TheeDude » Tuesday 06 November 2018 16:32

fremar wrote:
Monday 05 November 2018 9:27
TheeDude wrote:
Saturday 03 November 2018 11:02
Today it stopped working again for me.

I think I am giving up on this now, and trying to search for a better reliable solution.
Probably am going to try out the script that was suggested here in the thread before.
https://www.domoticz.com/wiki/Plugins/iCal.html

Code: Select all

 2018-11-03 06:10:08.737 Status: LUA: GCal3 V 1.0.3: local function: requestCalendar 

 2018-11-03 06:10:08.737 Status: LUA: GCal3 V 1.0.3: local function: get_access_token 

 2018-11-03 06:10:08.737 Status: LUA: GCal3 V 1.0.3: Getting a new token 

 2018-11-03 06:10:09.178 Status: LUA: GCal3 V 1.0.3: The token request did not provide an access token: { 

 2018-11-03 06:10:09.178 Status: LUA: GCal3 V 1.0.3: Fatal error trying to get access token 
Same problem here, no carheater was on this morning :( I use this script https://github.com/riksarchen/carheater_domoticz that uses BakSeeDaa´s Google Calendar, havent found a better solution and it has been working great. Not that great on scripting either so don't think I will be able to get the carheater one working again :(

Exactly, that was also the script I was running and it was so great!
I have sent a PM to "archen" that is the developer of that script, and asked him a couple of questions.
In the meantime I am running manually with timers, but I want to get it working.

I have got this https://www.domoticz.com/wiki/Plugins/iCal.html script running, but the problem now is to integrate it with "archens" script.
That I don´t really know how to do.
Maybe he answers, but he hasn´t been active on this forum for a while.

Or else I have to revert to my "old" script.
I did use this one https://forum.m.nu/viewtopic.php?t=3969
It is written in Swedish.
The problem with that one was that I had to calculate the time in the calendar myself.
If My heater should be starting 06:00 I had to do the calendar input at 02:00 when the script began to "think" and calculate what temperature it was outside and decide when to kick in the heater.
It works well besides that!

fremar
Posts: 5
Joined: Monday 27 February 2017 9:27
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz (deprecated)

Post by fremar » Wednesday 14 November 2018 9:24

TheeDude wrote:
Tuesday 06 November 2018 16:32
fremar wrote:
Monday 05 November 2018 9:27
TheeDude wrote:
Saturday 03 November 2018 11:02
Today it stopped working again for me.

I think I am giving up on this now, and trying to search for a better reliable solution.
Probably am going to try out the script that was suggested here in the thread before.
https://www.domoticz.com/wiki/Plugins/iCal.html

Code: Select all

 2018-11-03 06:10:08.737 Status: LUA: GCal3 V 1.0.3: local function: requestCalendar 

 2018-11-03 06:10:08.737 Status: LUA: GCal3 V 1.0.3: local function: get_access_token 

 2018-11-03 06:10:08.737 Status: LUA: GCal3 V 1.0.3: Getting a new token 

 2018-11-03 06:10:09.178 Status: LUA: GCal3 V 1.0.3: The token request did not provide an access token: { 

 2018-11-03 06:10:09.178 Status: LUA: GCal3 V 1.0.3: Fatal error trying to get access token 
Same problem here, no carheater was on this morning :( I use this script https://github.com/riksarchen/carheater_domoticz that uses BakSeeDaa´s Google Calendar, havent found a better solution and it has been working great. Not that great on scripting either so don't think I will be able to get the carheater one working again :(

Exactly, that was also the script I was running and it was so great!
I have sent a PM to "archen" that is the developer of that script, and asked him a couple of questions.
In the meantime I am running manually with timers, but I want to get it working.

I have got this https://www.domoticz.com/wiki/Plugins/iCal.html script running, but the problem now is to integrate it with "archens" script.
That I don´t really know how to do.
Maybe he answers, but he hasn´t been active on this forum for a while.

Or else I have to revert to my "old" script.
I did use this one https://forum.m.nu/viewtopic.php?t=3969
It is written in Swedish.
The problem with that one was that I had to calculate the time in the calendar myself.
If My heater should be starting 06:00 I had to do the calendar input at 02:00 when the script began to "think" and calculate what temperature it was outside and decide when to kick in the heater.
It works well besides that!
Hi any progress in getting archens script running again?

TheeDude
Posts: 44
Joined: Wednesday 07 October 2015 0:43
Target OS: Linux
Domoticz version:
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz (deprecated)

Post by TheeDude » Friday 16 November 2018 15:59

fremar wrote:
Wednesday 14 November 2018 9:24


Hi any progress in getting archens script running again?


Hello!

Well yeah, I got an answer from one of his friends that said he would try to get in touch with him.
And he told me a couple of days ago, that "archen" has also left domoticz for another project.
So, we aren´t going to get help from his side either.
It is time to find something else I guess..
I think I am going back to my old script for now, and will be looking for something else in the meantime..

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests