If You rename the json.lua file, the file will be downloaded automatically. You can also download it manually if you prefer.deennoo wrote:Got a small problem now, surely nothing impossible to solve :
I made some modification on my json.lua file to test something else, but i didn't made any backup.
I'm facing this log error :
Does someone can share his file please ?Code: Select all
2016-02-28 21:22:01.314 Error: EventSystem: in /home/pi/domoticz/scripts/lua/script_device_gcal.lua: /home/pi/domoticz/scripts/lua/json.lua:383: JSON:decode must be called in method format
BakSeeDaa´s Google Calendar for Domoticz (deprecated)
Moderator: leecollings
-
- Posts: 485
- Joined: Thursday 17 September 2015 10:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.2 Released
-
- Posts: 784
- Joined: Wednesday 10 December 2014 13:06
- Target OS: Linux
- Domoticz version: beta
- Location: Bordeaux France
- Contact:
Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.2 Released
OK Thanks for your help, fast and clear as usual
even if i copy and past yours it doesn't works.
My solution was to erase it, and BakSeeDaa's Google Calendar for Domoticz run again !
even if i copy and past yours it doesn't works.
My solution was to erase it, and BakSeeDaa's Google Calendar for Domoticz run again !
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
-
- Posts: 7
- Joined: Sunday 10 April 2016 11:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: Suisse
- Contact:
Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.2 Released
Hello,
I'm trying to install your codes but i don't have any success!
here my domoticz log. i'm retreive 404 error!:
here my calendarID (xxxxxx is masqued characters):
And y tryed too with this:
And with this:
and dosent work. info:Wenh i get this url on my browser i have the good calendar.
Can you help me to resolve this please?
(sorry for my aproximate english)
I'm trying to install your codes but i don't have any success!
here my domoticz log. i'm retreive 404 error!:
Code: Select all
2016-04-10 10:07:00.539 LUA: GCal - Domotique needs to run
2016-04-10 10:07:00.541 EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_time_gcal.lua
2016-04-10 10:07:01.281 (Capteurs perso) General/Percentage (Cuve - Pourcentage remplissage)
2016-04-10 10:07:03.086 LUA: GCal3 V 1.0.2: Calendar device GCal - Domotique (idx:158 ) initializing
2016-04-10 10:07:03.170 LUA: GCal3 V 1.0.2: Command /bin/ls /home/pi/domoticz/GCal3/ returned true
2016-04-10 10:07:03.232 LUA: GCal3 V 1.0.2: Command /bin/rm -f /home/pi/domoticz/GCal3/GCal3.sem returned true
2016-04-10 10:07:03.280 LUA: GCal3 V 1.0.2: Command bin/rm -f /home/pi/domoticz/GCal3/*.token returned nil
2016-04-10 10:07:03.280 LUA: GCal3 V 1.0.2: Checking semaphore
2016-04-10 10:07:03.360 LUA: GCal3 V 1.0.2: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.sem returned nil
2016-04-10 10:07:03.361 LUA: GCal3 V 1.0.2: Semaphore file returned nil
2016-04-10 10:07:03.362 LUA: GCal3 V 1.0.2: Device 158 requested semaphore
2016-04-10 10:07:03.448 LUA: GCal3 V 1.0.2: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.sem returned true
2016-04-10 10:07:03.449 LUA: GCal3 V 1.0.2: Device 158 claimed semaphore
2016-04-10 10:07:03.450 LUA: GCal3 V 1.0.2: Variables initialized ...
2016-04-10 10:07:03.498 LUA: GCal3 V 1.0.2: Command /bin/ls /home/pi/domoticz/scripts/lua/json.lua returned true
2016-04-10 10:07:03.520 LUA: GCal3 V 1.0.2: local function: checkforcredentials
2016-04-10 10:07:03.570 LUA: GCal3 V 1.0.2: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.json returned true
2016-04-10 10:07:03.619 LUA: GCal3 V 1.0.2: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.json returned true
2016-04-10 10:07:03.689 LUA: GCal3 V 1.0.2: Command find /home/pi/domoticz/GCal3/ -type f ! -newer GCal3.json -name GCal3.pem -delete returned nil
2016-04-10 10:07:03.740 LUA: GCal3 V 1.0.2: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.pem returned true
2016-04-10 10:07:03.740 LUA: GCal3 V 1.0.2: Timezone is 2 hrs and 0 min
2016-04-10 10:07:03.740 LUA: GCal3 V 1.0.2: Running Plugin ...
2016-04-10 10:07:03.760 LUA: GCal3 V 1.0.2: local function: checkGCal
2016-04-10 10:07:03.760 LUA: GCal3 V 1.0.2: Checking semaphore
2016-04-10 10:07:03.808 LUA: GCal3 V 1.0.2: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.sem returned true
2016-04-10 10:07:03.809 LUA: GCal3 V 1.0.2: Semaphore file returned 158
2016-04-10 10:07:03.858 LUA: GCal3 V 1.0.2: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.sem returned true
2016-04-10 10:07:03.859 LUA: GCal3 V 1.0.2: Device 158 claimed semaphore
2016-04-10 10:07:03.861 LUA: GCal3 V 1.0.2: StartMin is 2016-04-09T22:00:00Z StartMax is 2016-04-11T08:07:00Z
2016-04-10 10:07:03.861 LUA: GCal3 V 1.0.2: End of day is 2016-04-10T23:59:59
2016-04-10 10:07:03.861 LUA: GCal3 V 1.0.2: local function: requestCalendar
2016-04-10 10:07:03.861 LUA: GCal3 V 1.0.2: local function: get_access_token
2016-04-10 10:07:03.861 LUA: GCal3 V 1.0.2: Getting a new token
2016-04-10 10:07:05.437 LUA: GCal3 V 1.0.2: Got new token
2016-04-10 10:07:05.439 LUA: GCal3 V 1.0.2: Checking google calendar
2016-04-10 10:07:05.989 LUA: GCal3 V 1.0.2: Error getting calendar data: {
"error": {
"errors": [
{
"domain": "global",
"reason": "notFound",
"message": "Not Found"
}
],
"code": 404,
"message": "Not Found"
}
}
2016-04-10 10:07:05.992 LUA: GCal3 V 1.0.2: Device 158 released the semaphore - reason: calendar check complete
2016-04-10 10:07:05.993 LUA: GCal3 V 1.0.2: Next check will be in 500 sec on 2016-04-10 at 10:15:25
2016-04-10 10:07:06.185 LUA: GCal3 V 1.0.2: Device 158 released the semaphore - reason: initialization complete
2016-04-10 10:07:06.185 LUA: GCal3 V 1.0.2: Setting new Switch status to: Off
here my calendarID (xxxxxx is masqued characters):
Code: Select all
<iframe src="https://calendar.google.com/calendar/embed?src=xxxxxxxxxxxxxxxxxxxxxxxxxx%40group.calendar.google.com&ctz=Europe/Zurich" style="border: 0" width="800" height="600" frameborder="0" scrolling="no"></iframe>
Code: Select all
https://calendar.google.com/calendar/embed?src=xxxxxxxxxxxxxxxxxxxxxxxxxx%40group.calendar.google.com&ctz=Europe/Zurich
Code: Select all
xxxxxxxxxxxxxxxxxxxxxxxxxx%40group.calendar.google.com
and dosent work. info:Wenh i get this url on my browser i have the good calendar.
Can you help me to resolve this please?
(sorry for my aproximate english)
Personal custom devellopements for arduino: Wired Gardena irrigation system, Emphase solar system, ESP8266 DIY for many uses, EnOcean
-
- Posts: 485
- Joined: Thursday 17 September 2015 10:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.2 Released
Set the user variable named GCalnnCalendarID to the Calendar ID. It should look something likeoxedgar wrote:Hello,
I'm trying to install your codes but i don't have any success!
here my domoticz log. i'm retreive 404 error!:
Code: Select all
2016-04-10 10:07:00.539 LUA: GCal - Domotique needs to run 2016-04-10 10:07:00.541 EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_time_gcal.lua 2016-04-10 10:07:01.281 (Capteurs perso) General/Percentage (Cuve - Pourcentage remplissage) 2016-04-10 10:07:03.086 LUA: GCal3 V 1.0.2: Calendar device GCal - Domotique (idx:158 ) initializing 2016-04-10 10:07:03.170 LUA: GCal3 V 1.0.2: Command /bin/ls /home/pi/domoticz/GCal3/ returned true 2016-04-10 10:07:03.232 LUA: GCal3 V 1.0.2: Command /bin/rm -f /home/pi/domoticz/GCal3/GCal3.sem returned true 2016-04-10 10:07:03.280 LUA: GCal3 V 1.0.2: Command bin/rm -f /home/pi/domoticz/GCal3/*.token returned nil 2016-04-10 10:07:03.280 LUA: GCal3 V 1.0.2: Checking semaphore 2016-04-10 10:07:03.360 LUA: GCal3 V 1.0.2: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.sem returned nil 2016-04-10 10:07:03.361 LUA: GCal3 V 1.0.2: Semaphore file returned nil 2016-04-10 10:07:03.362 LUA: GCal3 V 1.0.2: Device 158 requested semaphore 2016-04-10 10:07:03.448 LUA: GCal3 V 1.0.2: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.sem returned true 2016-04-10 10:07:03.449 LUA: GCal3 V 1.0.2: Device 158 claimed semaphore 2016-04-10 10:07:03.450 LUA: GCal3 V 1.0.2: Variables initialized ... 2016-04-10 10:07:03.498 LUA: GCal3 V 1.0.2: Command /bin/ls /home/pi/domoticz/scripts/lua/json.lua returned true 2016-04-10 10:07:03.520 LUA: GCal3 V 1.0.2: local function: checkforcredentials 2016-04-10 10:07:03.570 LUA: GCal3 V 1.0.2: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.json returned true 2016-04-10 10:07:03.619 LUA: GCal3 V 1.0.2: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.json returned true 2016-04-10 10:07:03.689 LUA: GCal3 V 1.0.2: Command find /home/pi/domoticz/GCal3/ -type f ! -newer GCal3.json -name GCal3.pem -delete returned nil 2016-04-10 10:07:03.740 LUA: GCal3 V 1.0.2: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.pem returned true 2016-04-10 10:07:03.740 LUA: GCal3 V 1.0.2: Timezone is 2 hrs and 0 min 2016-04-10 10:07:03.740 LUA: GCal3 V 1.0.2: Running Plugin ... 2016-04-10 10:07:03.760 LUA: GCal3 V 1.0.2: local function: checkGCal 2016-04-10 10:07:03.760 LUA: GCal3 V 1.0.2: Checking semaphore 2016-04-10 10:07:03.808 LUA: GCal3 V 1.0.2: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.sem returned true 2016-04-10 10:07:03.809 LUA: GCal3 V 1.0.2: Semaphore file returned 158 2016-04-10 10:07:03.858 LUA: GCal3 V 1.0.2: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.sem returned true 2016-04-10 10:07:03.859 LUA: GCal3 V 1.0.2: Device 158 claimed semaphore 2016-04-10 10:07:03.861 LUA: GCal3 V 1.0.2: StartMin is 2016-04-09T22:00:00Z StartMax is 2016-04-11T08:07:00Z 2016-04-10 10:07:03.861 LUA: GCal3 V 1.0.2: End of day is 2016-04-10T23:59:59 2016-04-10 10:07:03.861 LUA: GCal3 V 1.0.2: local function: requestCalendar 2016-04-10 10:07:03.861 LUA: GCal3 V 1.0.2: local function: get_access_token 2016-04-10 10:07:03.861 LUA: GCal3 V 1.0.2: Getting a new token 2016-04-10 10:07:05.437 LUA: GCal3 V 1.0.2: Got new token 2016-04-10 10:07:05.439 LUA: GCal3 V 1.0.2: Checking google calendar 2016-04-10 10:07:05.989 LUA: GCal3 V 1.0.2: Error getting calendar data: { "error": { "errors": [ { "domain": "global", "reason": "notFound", "message": "Not Found" } ], "code": 404, "message": "Not Found" } } 2016-04-10 10:07:05.992 LUA: GCal3 V 1.0.2: Device 158 released the semaphore - reason: calendar check complete 2016-04-10 10:07:05.993 LUA: GCal3 V 1.0.2: Next check will be in 500 sec on 2016-04-10 at 10:15:25 2016-04-10 10:07:06.185 LUA: GCal3 V 1.0.2: Device 158 released the semaphore - reason: initialization complete 2016-04-10 10:07:06.185 LUA: GCal3 V 1.0.2: Setting new Switch status to: Off
here my calendarID (xxxxxx is masqued characters):And y tryed too with this:Code: Select all
<iframe src="https://calendar.google.com/calendar/embed?src=xxxxxxxxxxxxxxxxxxxxxxxxxx%40group.calendar.google.com&ctz=Europe/Zurich" style="border: 0" width="800" height="600" frameborder="0" scrolling="no"></iframe>
And with this:Code: Select all
https://calendar.google.com/calendar/embed?src=xxxxxxxxxxxxxxxxxxxxxxxxxx%40group.calendar.google.com&ctz=Europe/Zurich
Code: Select all
xxxxxxxxxxxxxxxxxxxxxxxxxx%40group.calendar.google.com
and dosent work. info:Wenh i get this url on my browser i have the good calendar.
Can you help me to resolve this please?
(sorry for my aproximate english)
[email protected]
or
[email protected]
Don't write "http" or "%40" into the variable. Did that help?
-
- Posts: 7
- Joined: Sunday 10 April 2016 11:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: Suisse
- Contact:
Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.2 Released
Thank you for your response.BakSeeDaa wrote:
Set the user variable named GCalnnCalendarID to the Calendar ID. It should look something like
[email protected]
or
[email protected]
Don't write "http" or "%40" into the variable. Did that help?
I've tryed this two settings but this still not working if you have any other way ?
Personal custom devellopements for arduino: Wired Gardena irrigation system, Emphase solar system, ESP8266 DIY for many uses, EnOcean
-
- Posts: 476
- Joined: Monday 14 March 2016 13:55
- Target OS: Linux
- Domoticz version: beta
- Location: Rome, Italy
- Contact:
Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.2 Released
Hi BakSeeDaa
I'm in the same situation of oxedgar.
The GCalnnCalendarID is set to [email protected]
The calendar is set in the same account where I created the Google API Credential.
As device name I used "GCalCheck xxx" where xxx is the exact name of the calendar.
Where I can check?
Thanks
I'm in the same situation of oxedgar.
Code: Select all
2016-04-13 20:50:48.525 User: Admin initiated a switch command
2016-04-13 20:50:48.881 LUA: GCal3 V 1.0.2: Calendar device GCal ticz (idx:xx ) initializing
2016-04-13 20:50:48.918 LUA: GCal3 V 1.0.2: Command /bin/ls /home/osmc/domoticz/GCal3/ returned true
2016-04-13 20:50:48.945 LUA: GCal3 V 1.0.2: Command /bin/rm -f /home/osmc/domoticz/GCal3/GCal3.sem returned true
2016-04-13 20:50:48.969 LUA: GCal3 V 1.0.2: Command bin/rm -f /home/osmc/domoticz/GCal3/*.token returned nil
2016-04-13 20:50:48.969 LUA: GCal3 V 1.0.2: Checking semaphore
2016-04-13 20:50:49.004 LUA: GCal3 V 1.0.2: Command /bin/ls /home/osmc/domoticz/GCal3/GCal3.sem returned nil
2016-04-13 20:50:49.005 LUA: GCal3 V 1.0.2: Semaphore file returned nil
2016-04-13 20:50:49.006 LUA: GCal3 V 1.0.2: Device 88 requested semaphore
2016-04-13 20:50:49.041 LUA: GCal3 V 1.0.2: Command /bin/ls /home/osmc/domoticz/GCal3/GCal3.sem returned true
2016-04-13 20:50:49.042 LUA: GCal3 V 1.0.2: Device 88 claimed semaphore
2016-04-13 20:50:49.044 LUA: GCal3 V 1.0.2: Variables initialized ...
2016-04-13 20:50:49.078 LUA: GCal3 V 1.0.2: Command /bin/ls /home/osmc/domoticz/scripts/lua/json.lua returned true
2016-04-13 20:50:49.094 LUA: GCal3 V 1.0.2: local function: checkforcredentials
2016-04-13 20:50:49.132 LUA: GCal3 V 1.0.2: Command /bin/ls /home/osmc/domoticz/GCal3/GCal3.json returned true
2016-04-13 20:50:49.175 LUA: GCal3 V 1.0.2: Command /bin/ls /home/osmc/domoticz/GCal3/GCal3.json returned true
2016-04-13 20:50:49.216 LUA: GCal3 V 1.0.2: Command find /home/osmc/domoticz/GCal3/ -type f ! -newer GCal3.json -name GCal3.pem -delete returned nil
2016-04-13 20:50:49.251 LUA: GCal3 V 1.0.2: Command /bin/ls /home/osmc/domoticz/GCal3/GCal3.pem returned true
2016-04-13 20:50:49.252 LUA: GCal3 V 1.0.2: Timezone is 2 hrs and 0 min
2016-04-13 20:50:49.252 LUA: GCal3 V 1.0.2: Running Plugin ...
2016-04-13 20:50:49.264 LUA: GCal3 V 1.0.2: local function: checkGCal
2016-04-13 20:50:49.264 LUA: GCal3 V 1.0.2: Checking semaphore
2016-04-13 20:50:49.300 LUA: GCal3 V 1.0.2: Command /bin/ls /home/osmc/domoticz/GCal3/GCal3.sem returned true
2016-04-13 20:50:49.301 LUA: GCal3 V 1.0.2: Semaphore file returned xx
2016-04-13 20:50:49.336 LUA: GCal3 V 1.0.2: Command /bin/ls /home/osmc/domoticz/GCal3/GCal3.sem returned true
2016-04-13 20:50:49.337 LUA: GCal3 V 1.0.2: Device xx claimed semaphore
2016-04-13 20:50:49.340 LUA: GCal3 V 1.0.2: StartMin is 2016-04-12T22:00:00Z StartMax is 2016-04-14T18:50:00Z
2016-04-13 20:50:49.340 LUA: GCal3 V 1.0.2: End of day is 2016-04-13T23:59:59
2016-04-13 20:50:49.340 LUA: GCal3 V 1.0.2: local function: requestCalendar
2016-04-13 20:50:49.341 LUA: GCal3 V 1.0.2: local function: get_access_token
2016-04-13 20:50:49.341 LUA: GCal3 V 1.0.2: Getting a new token
2016-04-13 20:50:50.417 LUA: GCal3 V 1.0.2: Got new token
2016-04-13 20:50:50.420 LUA: GCal3 V 1.0.2: Checking google calendar
2016-04-13 20:50:51.020 LUA: GCal3 V 1.0.2: Error getting calendar data: {
"error": {
"errors": [
{
"domain": "global",
"reason": "notFound",
"message": "Not Found"
}
],
"code": 404,
"message": "Not Found"
}
}
2016-04-13 20:50:51.022 LUA: GCal3 V 1.0.2: Device xx released the semaphore - reason: calendar check complete
2016-04-13 20:50:51.024 LUA: GCal3 V 1.0.2: Next check will be in 500 sec on 2016-04-13 at 20:59:11
2016-04-13 20:50:51.029 LUA: GCal3 V 1.0.2: Device xx released the semaphore - reason: initialization complete
2016-04-13 20:50:51.030 LUA: GCal3 V 1.0.2: Switch recent status: Off
2016-04-13 20:50:51.050 EventSystem: Script event triggered: /home/osmc/domoticz/scripts/lua/script_device_gcal.lua
The calendar is set in the same account where I created the Google API Credential.
As device name I used "GCalCheck xxx" where xxx is the exact name of the calendar.
Where I can check?
Thanks
Cubietruck - Linux cubietruck 4.13.16 (Debian GNU/Linux 8 (jessie)) + Domoticz + RFLink, Xiaomi Gateway, Owl USB, Yeelight Color and B/W, ESP8266, Broadlink RM2, Netatmo Thermostat
-
- Posts: 476
- Joined: Monday 14 March 2016 13:55
- Target OS: Linux
- Domoticz version: beta
- Location: Rome, Italy
- Contact:
Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.2 Released
Just set the calendar Public, and it's working.
What can I check since I would like to let the calendar remain private?
Thanks
What can I check since I would like to let the calendar remain private?
Thanks
Cubietruck - Linux cubietruck 4.13.16 (Debian GNU/Linux 8 (jessie)) + Domoticz + RFLink, Xiaomi Gateway, Owl USB, Yeelight Color and B/W, ESP8266, Broadlink RM2, Netatmo Thermostat
-
- Posts: 476
- Joined: Monday 14 March 2016 13:55
- Target OS: Linux
- Domoticz version: beta
- Location: Rome, Italy
- Contact:
Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.2 Released
In a few minutes I found my issue.
It's related to the last page of the Setting up a Google V3 API Service Account.PDF
You have to grab the client_email from GCal3.json and share the calendar with this email address with option to modify and manage.
That's made me the trick!!!
It's related to the last page of the Setting up a Google V3 API Service Account.PDF
You have to grab the client_email from GCal3.json and share the calendar with this email address with option to modify and manage.
That's made me the trick!!!
Cubietruck - Linux cubietruck 4.13.16 (Debian GNU/Linux 8 (jessie)) + Domoticz + RFLink, Xiaomi Gateway, Owl USB, Yeelight Color and B/W, ESP8266, Broadlink RM2, Netatmo Thermostat
-
- Posts: 485
- Joined: Thursday 17 September 2015 10:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.2 Released
I'm glad it worked out for You.woody4165 wrote:In a few minutes I found my issue.
It's related to the last page of the Setting up a Google V3 API Service Account.PDF
You have to grab the client_email from GCal3.json and share the calendar with this email address with option to modify and manage.
That's made me the trick!!!

-
- Posts: 476
- Joined: Monday 14 March 2016 13:55
- Target OS: Linux
- Domoticz version: beta
- Location: Rome, Italy
- Contact:
Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.2 Released
I saw in one of the lua script to put in the lua folder something related to AutoRemote with a fixed ip in it.
What's this for?
What's this for?
Cubietruck - Linux cubietruck 4.13.16 (Debian GNU/Linux 8 (jessie)) + Domoticz + RFLink, Xiaomi Gateway, Owl USB, Yeelight Color and B/W, ESP8266, Broadlink RM2, Netatmo Thermostat
-
- Posts: 485
- Joined: Thursday 17 September 2015 10:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.2 Released
AutoRemote is not being used for BakSeeDaa´s Google Calendar for Domoticz. In the file bakseeda.lua there are several more or less generic functions that I use in my personal installation. If You find some of them useful, you may use them to whatever you want.woody4165 wrote:I saw in one of the lua script to put in the lua folder something related to AutoRemote with a fixed ip in it.
What's this for?

-
- Posts: 7
- Joined: Sunday 10 April 2016 11:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: Suisse
- Contact:
Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.2 Released
woody4165 wrote:In a few minutes I found my issue.
It's related to the last page of the Setting up a Google V3 API Service Account.PDF
You have to grab the client_email from GCal3.json and share the calendar with this email address with option to modify and manage.
That's made me the trick!!!
Hi , thank you, it's work with this .
Personal custom devellopements for arduino: Wired Gardena irrigation system, Emphase solar system, ESP8266 DIY for many uses, EnOcean
-
- Posts: 7
- Joined: Sunday 10 April 2016 11:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: Suisse
- Contact:
Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.2 Released
I can try your script's now but i cannot set on / off a virtual device.
I created one virtual device for this special use. I need to set on my wather gerden system from april to september to allow it. i've created two events on google calendar and i can get it correctly on Domoticz.
I have created a blocky for test this using a uservariable GCal158TrippedEvent to set on my device.
Wehn i change manually the value of this uservariable ( to "ARROSAGE AUTOMATIQUE=ON" or "ARROSAGE AUTOMATIQUE=OFF", the blocky works but it not work automaticly when your script make the change of uservariable GCal158TrippedEvent !
Have you any idea wath append?
here my blocky here the log
here the log when i change manually the GCal158TrippedEvent
Your script work only with lua ? i need to make one or i can simply use blocky?
I created one virtual device for this special use. I need to set on my wather gerden system from april to september to allow it. i've created two events on google calendar and i can get it correctly on Domoticz.
I have created a blocky for test this using a uservariable GCal158TrippedEvent to set on my device.
Wehn i change manually the value of this uservariable ( to "ARROSAGE AUTOMATIQUE=ON" or "ARROSAGE AUTOMATIQUE=OFF", the blocky works but it not work automaticly when your script make the change of uservariable GCal158TrippedEvent !
Have you any idea wath append?
here my blocky here the log
Code: Select all
2016-04-15 05:48:31.334 User: Admin initiated a switch command
2016-04-15 05:48:31.667 LUA: GCal3 V 1.0.2: Calendar device GCal - Domotique (idx:158 ) initializing
2016-04-15 05:48:31.728 LUA: GCal3 V 1.0.2: Command /bin/ls /home/pi/domoticz/GCal3/ returned true
2016-04-15 05:48:31.783 LUA: GCal3 V 1.0.2: Command /bin/rm -f /home/pi/domoticz/GCal3/GCal3.sem returned true
2016-04-15 05:48:31.822 LUA: GCal3 V 1.0.2: Command bin/rm -f /home/pi/domoticz/GCal3/*.token returned nil
2016-04-15 05:48:31.822 LUA: GCal3 V 1.0.2: Checking semaphore
2016-04-15 05:48:31.883 LUA: GCal3 V 1.0.2: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.sem returned nil
2016-04-15 05:48:31.883 LUA: GCal3 V 1.0.2: Semaphore file returned nil
2016-04-15 05:48:31.884 LUA: GCal3 V 1.0.2: Device 158 requested semaphore
2016-04-15 05:48:31.937 LUA: GCal3 V 1.0.2: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.sem returned true
2016-04-15 05:48:31.938 LUA: GCal3 V 1.0.2: Device 158 claimed semaphore
2016-04-15 05:48:31.939 LUA: GCal3 V 1.0.2: Variables initialized ...
2016-04-15 05:48:31.998 LUA: GCal3 V 1.0.2: Command /bin/ls /home/pi/domoticz/scripts/lua/json.lua returned true
2016-04-15 05:48:32.018 LUA: GCal3 V 1.0.2: local function: checkforcredentials
2016-04-15 05:48:32.078 LUA: GCal3 V 1.0.2: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.json returned true
2016-04-15 05:48:32.137 LUA: GCal3 V 1.0.2: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.json returned true
2016-04-15 05:48:32.214 LUA: GCal3 V 1.0.2: Command find /home/pi/domoticz/GCal3/ -type f ! -newer GCal3.json -name GCal3.pem -delete returned nil
2016-04-15 05:48:32.285 LUA: GCal3 V 1.0.2: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.pem returned true
2016-04-15 05:48:32.285 LUA: GCal3 V 1.0.2: Timezone is 2 hrs and 0 min
2016-04-15 05:48:32.285 LUA: GCal3 V 1.0.2: Running Plugin ...
2016-04-15 05:48:32.306 LUA: GCal3 V 1.0.2: local function: checkGCal
2016-04-15 05:48:32.306 LUA: GCal3 V 1.0.2: Checking semaphore
2016-04-15 05:48:32.359 LUA: GCal3 V 1.0.2: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.sem returned true
2016-04-15 05:48:32.360 LUA: GCal3 V 1.0.2: Semaphore file returned 158
2016-04-15 05:48:32.420 LUA: GCal3 V 1.0.2: Command /bin/ls /home/pi/domoticz/GCal3/GCal3.sem returned true
2016-04-15 05:48:32.420 LUA: GCal3 V 1.0.2: Device 158 claimed semaphore
2016-04-15 05:48:32.433 LUA: GCal3 V 1.0.2: StartMin is 2016-04-14T22:00:00Z StartMax is 2016-04-16T03:48:00Z
2016-04-15 05:48:32.433 LUA: GCal3 V 1.0.2: End of day is 2016-04-15T23:59:59
2016-04-15 05:48:32.433 LUA: GCal3 V 1.0.2: local function: requestCalendar
2016-04-15 05:48:32.433 LUA: GCal3 V 1.0.2: local function: get_access_token
2016-04-15 05:48:32.434 LUA: GCal3 V 1.0.2: Getting a new token
2016-04-15 05:48:33.743 LUA: GCal3 V 1.0.2: Got new token
2016-04-15 05:48:33.745 LUA: GCal3 V 1.0.2: Checking google calendar
2016-04-15 05:48:34.094 LUA: GCal3 V 1.0.2: Device 158 released the semaphore - reason: calendar check complete
2016-04-15 05:48:34.094 LUA: GCal3 V 1.0.2: local function: getEvents
2016-04-15 05:48:34.094 LUA: GCal3 V 1.0.2: There were 2 events retrieved
2016-04-15 05:48:34.096 LUA: GCal3 V 1.0.2: Effective Event Name ARROSAGE AUTOMATIQUE=ON[0,0]{}
2016-04-15 05:48:34.098 LUA: GCal3 V 1.0.2: Effective Event Name ARROSAGE AUTOMATIQUE=OFF[0,0]{}
2016-04-15 05:48:34.098 LUA: GCal3 V 1.0.2: Events Today = 2
2016-04-15 05:48:34.099 LUA: GCal3 V 1.0.2: Events Left Today = 2
2016-04-15 05:48:34.099 LUA: GCal3 V 1.0.2: local function: saveEvents
2016-04-15 05:48:34.099 LUA: GCal3 V 1.0.2: Active Events:
2016-04-15 05:48:34.140 LUA: GCal3 V 1.0.2: Command chmod 644 /home/pi/domoticz/GCal3/events158.json returned true
2016-04-15 05:48:34.141 LUA: GCal3 V 1.0.2: json active event list []
2016-04-15 05:48:34.141 LUA: GCal3 V 1.0.2: Next Event: ARROSAGE AUTOMATIQUE=ON
05:53 Apr 15 to 05:55 Apr 15
2016-04-15 05:48:34.141 LUA: GCal3 V 1.0.2: Cancel any active event
2016-04-15 05:48:34.141 LUA: GCal3 V 1.0.2: local function: setTrippedOff
2016-04-15 05:48:34.141 LUA: GCal3 V 1.0.2: Event-End Inactive
2016-04-15 05:48:34.143 LUA: GCal3 V 1.0.2: Next check will be in 266 sec on 2016-04-15 at 05:53:00
2016-04-15 05:48:34.290 LUA: GCal3 V 1.0.2: Device 158 released the semaphore - reason: initialization complete
2016-04-15 05:48:34.291 LUA: GCal3 V 1.0.2: Switch recent status:
2016-04-15 05:48:34.291 LUA: GCal3 V 1.0.2: Setting new Switch status to: Off
2016-04-15 05:48:34.331 EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_device_gcal.lua
Code: Select all
2016-04-15 06:16:32.559 ooooooooooooooooooooooooooooooooooooooooffffffff
2016-04-15 06:16:32.560 EventSystem: Event triggered: GCal - Déclenacheurs_2
2016-04-15 06:16:33.456 (Capteurs perso) Light/Switch (GCal - Arrosage autorisé)
Code: Select all
2016-04-15 06:17:31.568 oooooooooooooooooooooooooooooooooooooooon
2016-04-15 06:17:31.570 EventSystem: Event triggered: GCal - Déclenacheurs_1
2016-04-15 06:17:31.729 (Capteurs perso) Light/Switch (GCal - Arrosage autorisé)
Personal custom devellopements for arduino: Wired Gardena irrigation system, Emphase solar system, ESP8266 DIY for many uses, EnOcean
-
- Posts: 476
- Joined: Monday 14 March 2016 13:55
- Target OS: Linux
- Domoticz version: beta
- Location: Rome, Italy
- Contact:
Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.2 Released
Is it possible (in an easy way) to get the duration of an event from the text device?
I was thinking to use the calendar events to manage my irrigation, like oxedgar.
Combining the calendar event with weather forecast it should be not to difficult...
I was thinking to use the calendar events to manage my irrigation, like oxedgar.
Combining the calendar event with weather forecast it should be not to difficult...
Cubietruck - Linux cubietruck 4.13.16 (Debian GNU/Linux 8 (jessie)) + Domoticz + RFLink, Xiaomi Gateway, Owl USB, Yeelight Color and B/W, ESP8266, Broadlink RM2, Netatmo Thermostat
-
- Posts: 7
- Joined: Sunday 10 April 2016 11:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: Suisse
- Contact:
Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.2 Released
hello,woody4165 wrote:Is it possible (in an easy way) to get the duration of an event from the text device?
I was thinking to use the calendar events to manage my irrigation, like oxedgar.
Combining the calendar event with weather forecast it should be not to difficult...
I prefert to add one event on gcal to set on and another to set off to prevent troubles with reboots or other unwanted reasons!
In my case, in just need to use this virtual device to allow it during the summertime. it's not this to control irrigation directlly but it appear like a master on/off button. My irrigation is all automated by Domoticz using a gardena valves and home made activatiors powred by arduino and wirred by ethernet.
I can talk my domotic system is all home made by myself!
Personal custom devellopements for arduino: Wired Gardena irrigation system, Emphase solar system, ESP8266 DIY for many uses, EnOcean
-
- Posts: 485
- Joined: Thursday 17 September 2015 10:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.2 Released
I'm not a "blockly guy". I know that blockly had some issues before on reacting to changes to a virtual text device. But that is a pure blockly related question. I have no idea.oxedgar wrote: Your script work only with lua ? i need to make one or i can simply use blocky?
-
- Posts: 485
- Joined: Thursday 17 September 2015 10:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.2 Released
There is no such information held by the text device. However You should be able to calculate that by acessing the json events fetched for the calendar device.woody4165 wrote:Is it possible (in an easy way) to get the duration of an event from the text device?
I was thinking to use the calendar events to manage my irrigation, like oxedgar.
Combining the calendar event with weather forecast it should be not to difficult...
-
- Posts: 21
- Joined: Thursday 08 September 2016 13:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.2 Released
Hello, have this been implemented as an hardware plugin yet? Think i haven't seen it, would be amazing if it got implemented!
-
- Posts: 53
- Joined: Wednesday 24 February 2016 9:16
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: NRW, Germany
- Contact:
Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.2 Released
Thank you for this great feature, this is a great help to me!
It seems to work great, even though I see an error occurring every 12 seconds or so:
any idea what this could be? not sure where to start my search
It seems to work great, even though I see an error occurring every 12 seconds or so:
Code: Select all
Error: EventSystem: in /home/pi/domoticz/scripts/lua/._script_device_gcal.lua: /home/pi/domoticz/scripts/lua/._script_device_gcal.lua:1: unexpected symbol
-
- Posts: 53
- Joined: Wednesday 24 February 2016 9:16
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: NRW, Germany
- Contact:
Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.2 Released
upon further research, there were 4 hidden lua files that caused the errors to happen. i renamed them not to be executed and i notice no difference except the errors are gone. did they have any purpose?
Who is online
Users browsing this forum: Google [Bot] and 1 guest