BakSeeDaa´s Google Calendar for Domoticz V 1.0.2 Released

In this subforum you can show projects you have made, or you are busy with. Please create your own topic.
User avatar
Ferpando
Posts: 30
Joined: Friday 23 October 2015 9:45
Target OS: NAS (Synology & others)
Domoticz version:
Location: Spain
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.0 Release

Postby Ferpando » Friday 23 October 2015 10:06

Hello all,
I'm new to domoticz, but I come from a Vera environment.
I installed domoticz a few days ago on my Synology, and today I tried to install the gcal plugin.
I followed all the steps but I get this error in the log:

2015-10-23 09:43:51.472 Error: EventSystem: /usr/local/domoticz/var/scripts/lua/script_device_gcal.lua:34: module 'scripts/lua/gcalconfig' not found:
no field package.preload['scripts/lua/gcalconfig']
no file '/usr/local/share/lua/5.2/scripts/lua/gcalconfig.lua'
no file '/usr/local/share/lua/5.2/scripts/lua/gcalconfig/init.lua'
no file '/usr/local/lib/lua/5.2/scripts/lua/gcalconfig.lua'
no file '/usr/local/lib/lua/5.2/scripts/lua/gcalconfig/init.lua'
no file './scripts/lua/gcalconfig.lua'
no file '/usr/local/lib/lua/5.2/scripts/lua/gcalconfig.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './scripts/lua/gcalconfig.so'


I don't know if this is caused by the fact it is on a synology, because the path LUA scripts are stored is:

/usr/local/domoticz/var/scripts/lua


All the files are in the LUA folder.
Anyone else having this problem?

User avatar
BakSeeDaa
Posts: 275
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi
Domoticz version: beta
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.0 Release

Postby BakSeeDaa » Friday 23 October 2015 10:37

Hi there @Ferpando

I see that your scripts directory is ./var/scripts/lua/ (relative from Your domoticz directory). On a Raspberry environment it is simply ./scripts/lua/

Due to the fact that I've assumed that the lua scripts directory is always ./scripts/lua/ (relative from current directory) the config file and the other help scripts involved cannot be found.

I will have a look into that and see if I can fix it.

Meanwhile... It might work if you create a symbolic link named scripts in your Domoticz directory pointing on your scripts directory. (Assuming there is not already a directory named /usr/local/domoticz/scripts)

Code: Select all

sudo ln -s /usr/local/domoticz/var/scripts /usr/local/domoticz/scripts


Please report back if it works. Thanks.
Best wishes

// บักสีดา

User avatar
Ferpando
Posts: 30
Joined: Friday 23 October 2015 9:45
Target OS: NAS (Synology & others)
Domoticz version:
Location: Spain
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.0 Release

Postby Ferpando » Friday 23 October 2015 10:50

Thank you for the fast response.
I'll try your suggestion to see if it helps.
Here is the main folder structure on my synology, in case it helps you.

folder.gif
folder.gif (4.11 KiB) Viewed 1272 times


folder1.gif
folder1.gif (3.72 KiB) Viewed 1272 times

User avatar
BakSeeDaa
Posts: 275
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi
Domoticz version: beta
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.0 Release

Postby BakSeeDaa » Friday 23 October 2015 16:32

Ferpando wrote:...I'll try your suggestion to see if it helps.


Is it working now?
Best wishes

// บักสีดา

User avatar
Ferpando
Posts: 30
Joined: Friday 23 October 2015 9:45
Target OS: NAS (Synology & others)
Domoticz version:
Location: Spain
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.0 Release

Postby Ferpando » Friday 23 October 2015 17:41

I'm afraid not.

First I don't have sudo in my synology, so the way I made the symbolic link:

mount -o bind /usr/local/domoticz/var/scripts /usr/local/domoticz/scripts


But I still get the same errors... I don't have any folder named 5.2

2015-10-23 17:35:59.031 (Buttons) Lighting 2 (Calendar CHECK)
2015-10-23 17:36:00.331 Error: EventSystem: /usr/local/domoticz/var/scripts/lua/script_time_gcal.lua:31: module 'scripts/lua/gcalconfig' not found:
no field package.preload['scripts/lua/gcalconfig']
no file '/usr/local/share/lua/5.2/scripts/lua/gcalconfig.lua'
no file '/usr/local/share/lua/5.2/scripts/lua/gcalconfig/init.lua'
no file '/usr/local/lib/lua/5.2/scripts/lua/gcalconfig.lua'
no file '/usr/local/lib/lua/5.2/scripts/lua/gcalconfig/init.lua'
no file './scripts/lua/gcalconfig.lua'
no file '/usr/local/lib/lua/5.2/scripts/lua/gcalconfig.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './scripts/lua/gcalconfig.so'

User avatar
BakSeeDaa
Posts: 275
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi
Domoticz version: beta
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.0 Release

Postby BakSeeDaa » Friday 23 October 2015 17:45

Can I see the symbolic link?

Please enter the following command to list

Code: Select all

ls -la /usr/local/domoticz/
;)
Best wishes

// บักสีดา

User avatar
Ferpando
Posts: 30
Joined: Friday 23 October 2015 9:45
Target OS: NAS (Synology & others)
Domoticz version:
Location: Spain
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.0 Release

Postby Ferpando » Friday 23 October 2015 17:48

sure, here it is:

drwxrwxrwx 15 domoticz root 4096 Oct 23 17:34 .
drwxr-xr-x 44 root root 4096 Oct 23 13:38 ..
drwxr-xr-x 48 domoticz root 4096 Oct 22 16:23 Config
drwxr-xr-x 3 domoticz root 4096 Oct 22 16:23 app
-rw-r--r-- 1 domoticz root 77 Oct 22 16:23 appversion.h
drwxr-xr-x 2 domoticz root 4096 Oct 23 13:10 bin
-rw-r--r-- 1 domoticz root 258424 Oct 22 16:14 cert.pem
drwxr-xr-x 2 domoticz root 4096 Oct 22 16:23 etc
drwxr-xr-x 3 domoticz root 4096 Oct 22 16:23 include
drwxr-xr-x 5 domoticz root 4096 Oct 22 16:23 lib
drwxr-xr-x 2 domoticz root 4096 Oct 22 16:23 modules
-rw-r--r-- 1 domoticz root 10835 Oct 22 16:06 openssl.cnf
drwxr-xr-x 2 root root 4096 Oct 22 16:23 rules.d
drwxr-xr-x 5 domoticz root 4096 Oct 22 16:23 samplescripts
drwxr-xr-x 3 domoticz root 4096 Dec 29 2014 scripts
drwxr-xr-x 4 domoticz root 4096 Oct 22 16:23 share
drwxr-sr-x 4 domoticz root 4096 Oct 23 14:38 var
drwxr-xr-x 13 domoticz root 4096 Oct 22 16:23 www


and the content of the scripts folder:

ls -la /usr/local/domoticz/scripts

drwxr-xr-x 3 domoticz root 4096 Dec 29 2014 .
drwxrwxrwx 15 domoticz root 4096 Oct 23 17:34 ..
-rw-r--r-- 1 domoticz root 234 Dec 29 2014 _domoticz_main
-rw-r--r-- 1 domoticz root 195 Dec 29 2014 _domoticz_main.bat
drwxr-xr-x 2 domoticz root 4096 Oct 23 17:39 lua
-rw-r--r-- 1 domoticz root 246 Dec 29 2014 readme.txt
-rwxr-xr-x 1 domoticz root 125 Dec 29 2014 restart_domoticz
-rwxr-xr-x 1 domoticz root 918 Dec 29 2014 update_domoticz

User avatar
BakSeeDaa
Posts: 275
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi
Domoticz version: beta
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.0 Release

Postby BakSeeDaa » Friday 23 October 2015 17:53

And what if you write

Code: Select all

ls -la /usr/local/domoticz/scripts/lua/
Best wishes

// บักสีดา

User avatar
Ferpando
Posts: 30
Joined: Friday 23 October 2015 9:45
Target OS: NAS (Synology & others)
Domoticz version:
Location: Spain
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.0 Release

Postby Ferpando » Friday 23 October 2015 17:55

ls -la /usr/local/domoticz/scripts/lua/

drwxr-xr-x 2 domoticz root 4096 Oct 23 17:39 .
drwxr-xr-x 3 domoticz root 4096 Dec 29 2014 ..
-rw-r--r-- 1 domoticz root 1870 Dec 29 2014 script_device_demo.lua
-rw-r--r-- 1 root root 1841 Oct 21 18:44 script_device_sensorWU.lua
-rw-r--r-- 1 domoticz root 1932 Dec 29 2014 script_time_demo.lua


I deleted the calendar files to prevent flood of log file, but they were there before :-)

User avatar
BakSeeDaa
Posts: 275
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi
Domoticz version: beta
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.0 Release

Postby BakSeeDaa » Friday 23 October 2015 18:11

Hmmmm...

Attached is a zip file. Please unzip it and put the unzipped file into your lua scripts folder.
Click a button or something and look into your log for some output like:

Code: Select all

2015-10-23 18:03:24.253 LUA: pwd result is: /home/pi/domoticz


Please report the result here. It would help a lot to know.

Then delete the file :D
Attachments
script_device_pwd.zip
(366 Bytes) Downloaded 18 times
Best wishes

// บักสีดา

User avatar
BakSeeDaa
Posts: 275
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi
Domoticz version: beta
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.0 Release

Postby BakSeeDaa » Friday 23 October 2015 18:13

@Ferpando... I will be back again tomorrow to see what I can do about it.
Best wishes

// บักสีดา

User avatar
Ferpando
Posts: 30
Joined: Friday 23 October 2015 9:45
Target OS: NAS (Synology & others)
Domoticz version:
Location: Spain
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.0 Release

Postby Ferpando » Friday 23 October 2015 18:14

here it is..

2015-10-23 18:13:22.438 (Buttons) Lighting 2 (Calendar CHECK)
2015-10-23 18:13:24.142 LUA: pwd result is: /root


Thanks for the help

User avatar
BakSeeDaa
Posts: 275
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi
Domoticz version: beta
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.0 Release

Postby BakSeeDaa » Friday 23 October 2015 18:18

Ferpando wrote:here it is..

2015-10-23 18:13:22.438 (Buttons) Lighting 2 (Calendar CHECK)
2015-10-23 18:13:24.142 LUA: pwd result is: /root


Thanks for the help


That explains it. Now I know what's going on ... I'll get back to you tomorrow then.
Best wishes

// บักสีดา

User avatar
BakSeeDaa
Posts: 275
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi
Domoticz version: beta
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.0 Release

Postby BakSeeDaa » Saturday 24 October 2015 8:50

Good morning @Ferpando :D

You can remove the symbolic link that you created before. Just be careful not to remove your original scripts folder when doing that. I'm not familiar with the Synology environment but it might be enough to reboot your system for the symbolic link to disappear.

In the Raspberry Pi environment the "working directory" for the Domoticz process is /home/pi/domoticz
In your case, in Synology the "working directory" is /root and the lua scripts folder is
/usr/local/domoticz/var/scripts/lua which is also different.

I believe we can get a step further if you create a symbolic link named /root/scripts pointing to /usr/local/domoticz/var/scripts

After doing that

If you do ls -la /root/scripts/lua/ you should be able to see your Lua scripts there.

Would You like to try that @Ferpando?
Best wishes

// บักสีดา

User avatar
Ferpando
Posts: 30
Joined: Friday 23 October 2015 9:45
Target OS: NAS (Synology & others)
Domoticz version:
Location: Spain
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.0 Release

Postby Ferpando » Saturday 24 October 2015 12:49

ok, we went a step away... but not quite there yet :-)

Now the errors are different. Domoticz is on port 8084 on the synology.
No user variables were created.

2015-10-24 12:44:04.356 LUA: GCal3 V 1.0.0: Calendar device Calendar Vera (idx:24 ) initializing
2015-10-24 12:44:04.359 LUA: GCal3 V 1.0.0: Command /bin/ls /root/GCal3/ returned nil
2015-10-24 12:44:04.363 LUA: GCal3 V 1.0.0: Command /bin/mkdir /root/GCal3/ returned true
2015-10-24 12:44:04.366 LUA: GCal3 V 1.0.0: Command /bin/chmod 777 /root/GCal3/ returned true
2015-10-24 12:44:04.369 LUA: GCal3 V 1.0.0: Command /bin/rm -f /root/GCal3/GCal3.sem returned true
2015-10-24 12:44:04.372 LUA: GCal3 V 1.0.0: Command bin/rm -f /root/GCal3/*.token returned nil
2015-10-24 12:44:04.372 LUA: GCal3 V 1.0.0: Checking semaphore
2015-10-24 12:44:04.375 LUA: GCal3 V 1.0.0: Command /bin/ls /root/GCal3/GCal3.sem returned nil
2015-10-24 12:44:04.375 LUA: GCal3 V 1.0.0: Semaphore file returned nil
2015-10-24 12:44:04.376 LUA: GCal3 V 1.0.0: Device 24 requested semaphore
2015-10-24 12:44:04.379 LUA: GCal3 V 1.0.0: Command /bin/ls /root/GCal3/GCal3.sem returned true
2015-10-24 12:44:04.379 LUA: GCal3 V 1.0.0: Device 24 claimed semaphore
2015-10-24 12:44:04.379 LUA: GCal3 V 1.0.0: New user variables were created. Please run again.
2015-10-24 12:44:04.380 EventSystem: Fetching url...
2015-10-24 12:44:04.380 EventSystem: Fetching url...
2015-10-24 12:44:04.380 EventSystem: Fetching url...
2015-10-24 12:44:04.380 EventSystem: Fetching url...
2015-10-24 12:44:04.380 EventSystem: Fetching url...
2015-10-24 12:44:04.380 EventSystem: Fetching url...
2015-10-24 12:44:04.380 EventSystem: Fetching url...
2015-10-24 12:44:04.380 EventSystem: Fetching url...
2015-10-24 12:44:04.380 EventSystem: Fetching url...
2015-10-24 12:44:04.380 EventSystem: Fetching url...
2015-10-24 12:44:04.380 EventSystem: Fetching url...
2015-10-24 12:44:04.380 EventSystem: Fetching url...
2015-10-24 12:44:04.380 EventSystem: Fetching url...
2015-10-24 12:44:04.380 EventSystem: Fetching url...
2015-10-24 12:44:04.380 EventSystem: Fetching url...
2015-10-24 12:44:04.380 EventSystem: Fetching url...
2015-10-24 12:44:04.380 EventSystem: Fetching url...
2015-10-24 12:44:04.380 EventSystem: Fetching url...
2015-10-24 12:44:04.380 EventSystem: Fetching url...
2015-10-24 12:44:04.380 EventSystem: Fetching url...
2015-10-24 12:44:04.380 EventSystem: Fetching url...
2015-10-24 12:44:04.380 EventSystem: Fetching url...
2015-10-24 12:44:04.380 EventSystem: Fetching url...
2015-10-24 12:44:04.380 EventSystem: Fetching url...
2015-10-24 12:44:04.380 EventSystem: Fetching url...
2015-10-24 12:44:04.380 EventSystem: Fetching url...
2015-10-24 12:44:04.380 EventSystem: Script event triggered: /usr/local/domoticz/var/scripts/lua/script_device_gcal.lua
2015-10-24 12:44:04.345 (Buttons) Lighting 2 (Calendar CHECK)
2015-10-24 12:44:04.755 Error: Error opening url: http://localhost:8080/json.htm?type=command ¶m=saveuservariable&vname=GCal24Armed&vtype=0&vvalue=1
2015-10-24 12:44:04.755 Error: Error opening url: http://localhost:8080/json.htm?type=command ¶m=saveuservariable&vname=GCal24Tripped&vtype=0&vvalue=0
2015-10-24 12:44:04.756 Error: Error opening url: http://localhost:8080/json.htm?type=command ¶m=saveuservariable&vname=GCal24TrippedEvent&vtype=2&vvalue=Empty+String
2015-10-24 12:44:04.756 Error: Error opening url: http://localhost:8080/json.htm?type=command ¶m=saveuservariable&vname=GCal24TrippedID&vtype=2&vvalue=Empty+String
2015-10-24 12:44:04.757 Error: Error opening url: http://localhost:8080/json.htm?type=command ¶m=saveuservariable&vname=GCal24NextEvent&vtype=2&vvalue=Empty+String
2015-10-24 12:44:04.757 Error: Error opening url: http://localhost:8080/json.htm?type=command ¶m=saveuservariable&vname=GCal24NextEventTime&vtype=2&vvalue=Empty+String
2015-10-24 12:44:04.757 Error: Error opening url: http://localhost:8080/json.htm?type=command ¶m=saveuservariable&vname=GCal24Interval&vtype=0&vvalue=180
2015-10-24 12:44:04.758 Error: Error opening url: http://localhost:8080/json.htm?type=command ¶m=saveuservariable&vname=GCal24StartDelta&vtype=0&vvalue=0
2015-10-24 12:44:04.758 Error: Error opening url: http://localhost:8080/json.htm?type=command ¶m=saveuservariable&vname=GCal24EndDelta&vtype=0&vvalue=0
2015-10-24 12:44:04.759 Error: Error opening url: http://localhost:8080/json.htm?type=command ¶m=saveuservariable&vname=GCal24Keyword&vtype=2&vvalue=Empty+String
2015-10-24 12:44:04.759 Error: Error opening url: http://localhost:8080/json.htm?type=command ¶m=saveuservariable&vname=GCal24exactKeyword&vtype=2&vvalue=true
2015-10-24 12:44:04.759 Error: Error opening url: http://localhost:8080/json.htm?type=command ¶m=saveuservariable&vname=GCal24ignoreKeyword&vtype=2&vvalue=false
2015-10-24 12:44:04.760 Error: Error opening url: http://localhost:8080/json.htm?type=command ¶m=saveuservariable&vname=GCal24triggerNoKeyword&vtype=2&vvalue=false
2015-10-24 12:44:04.761 Error: Error opening url: http://localhost:8080/json.htm?type=command ¶m=saveuservariable&vname=GCal24ignoreAllDayEvent&vtype=2&vvalue=false
2015-10-24 12:44:04.761 Error: Error opening url: http://localhost:8080/json.htm?type=command ¶m=saveuservariable&vname=GCal24retrip&vtype=2&vvalue=true
2015-10-24 12:44:04.762 Error: Error opening url: http://localhost:8080/json.htm?type=command ¶m=saveuservariable&vname=GCal24CalendarID&vtype=2&vvalue=Empty+String
2015-10-24 12:44:04.763 Error: Error opening url: http://localhost:8080/json.htm?type=command ¶m=saveuservariable&vname=GCal24jsonActiveEvents&vtype=2&vvalue=%5B%5D
2015-10-24 12:44:04.763 Error: Error opening url: http://localhost:8080/json.htm?type=command ¶m=saveuservariable&vname=GCal24ActiveEvents&vtype=2&vvalue=Empty+String
2015-10-24 12:44:04.764 Error: Error opening url: http://localhost:8080/json.htm?type=command ¶m=saveuservariable&vname=GCal24EventsToday&vtype=0&vvalue=0
2015-10-24 12:44:04.764 Error: Error opening url: http://localhost:8080/json.htm?type=command ¶m=saveuservariable&vname=GCal24EventsLeftToday&vtype=0&vvalue=0
2015-10-24 12:44:04.765 Error: Error opening url: http://localhost:8080/json.htm?type=command ¶m=saveuservariable&vname=GCal24lastCheck&vtype=2&vvalue=2015%2D10%2D24T12%3A44%3A04
2015-10-24 12:44:04.765 Error: Error opening url: http://localhost:8080/json.htm?type=command ¶m=saveuservariable&vname=GCal24nextCheck&vtype=2&vvalue=2015%2D10%2D24T12%3A44%3A04
2015-10-24 12:44:04.765 Error: Error opening url: http://localhost:8080/json.htm?type=command ¶m=saveuservariable&vname=GCal24nextRun&vtype=0&vvalue=1445683444
2015-10-24 12:44:04.766 Error: Error opening url: http://localhost:8080/json.htm?type=command ¶m=saveuservariable&vname=GCal24debug&vtype=0&vvalue=3
2015-10-24 12:44:04.766 Error: Error opening url: http://localhost:8080/json.htm?type=command ¶m=saveuservariable&vname=GCal24displaystatus&vtype=0&vvalue=0
2015-10-24 12:44:04.767 Error: Error opening url: http://localhost:8080/json.htm?type=command ¶m=saveuservariable&vname=GCal24NextEvent&vtype=2&vvalue=New+user+variables+were+created%2E+Please+run+again%2E
2015-10-24 12:44:05.768 (Buttons) Lighting 2 (Calendar CHECK)

User avatar
BakSeeDaa
Posts: 275
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi
Domoticz version: beta
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.0 Release

Postby BakSeeDaa » Saturday 24 October 2015 14:28

OK, thanks.

Please try the following:

1) Add a user variable named GCalHostAndPort of the type string and enter localhost:8084 as the value.
2) Attached is a new zip file. Unzip it and put the extracted file in the lua scripts folder. (Replacing the old file with same name).

Then please try again. I believe we are getting closer now :D
Attachments
bakseeda.zip
Test version of bakseeda.lua
(2.88 KiB) Downloaded 19 times
Best wishes

// บักสีดา

User avatar
Ferpando
Posts: 30
Joined: Friday 23 October 2015 9:45
Target OS: NAS (Synology & others)
Domoticz version:
Location: Spain
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.0 Release

Postby Ferpando » Saturday 24 October 2015 14:52

ok, we are progressing in the right direction

2015-10-24 14:43:27.082 EventSystem: Fetching url...
2015-10-24 14:43:27.082 EventSystem: Fetching url...
2015-10-24 14:43:27.082 EventSystem: Script event triggered: /usr/local/domoticz/var/scripts/lua/script_device_gcal.lua
2015-10-24 14:43:27.055 (Buttons) Lighting 2 (Calendar CHECK)
2015-10-24 14:43:29.047 (Buttons) Lighting 2 (Calendar CHECK)
2015-10-24 14:43:55.754 Hardware Monitor: Fetching data (System sensors)
2015-10-24 14:44:00.123 LUA: Calendar Vera needs to run
2015-10-24 14:44:00.164 EventSystem: Script event triggered: /usr/local/domoticz/var/scripts/lua/script_time_gcal.lua
2015-10-24 14:44:01.100 LUA: localhost:8084
2015-10-24 14:44:01.103 LUA: GCal3 V 1.0.0: Calendar device Calendar Vera (idx:24 ) initializing
2015-10-24 14:44:01.106 LUA: GCal3 V 1.0.0: Command /bin/ls /root/GCal3/ returned true
2015-10-24 14:44:01.185 LUA: GCal3 V 1.0.0: Command /bin/rm -f /root/GCal3/GCal3.sem returned true
2015-10-24 14:44:01.187 LUA: GCal3 V 1.0.0: Command bin/rm -f /root/GCal3/*.token returned nil
2015-10-24 14:44:01.187 LUA: GCal3 V 1.0.0: Checking semaphore
2015-10-24 14:44:01.190 LUA: GCal3 V 1.0.0: Command /bin/ls /root/GCal3/GCal3.sem returned nil
2015-10-24 14:44:01.191 LUA: GCal3 V 1.0.0: Semaphore file returned nil
2015-10-24 14:44:01.191 LUA: GCal3 V 1.0.0: Device 24 requested semaphore
2015-10-24 14:44:01.194 LUA: GCal3 V 1.0.0: Command /bin/ls /root/GCal3/GCal3.sem returned true
2015-10-24 14:44:01.194 LUA: GCal3 V 1.0.0: Device 24 claimed semaphore
2015-10-24 14:44:01.194 LUA: GCal3 V 1.0.0: Variables initialized ...
2015-10-24 14:44:01.197 LUA: GCal3 V 1.0.0: Command /bin/ls /root/scripts/lua/json.lua returned nil
2015-10-24 14:44:01.197 LUA: GCal3 V 1.0.0: Downloading json.lua ...
2015-10-24 14:44:01.542 LUA: GCal3 V 1.0.0: Command curl https://raw.githubusercontent.com/craig ... on.lua|sed 's/loadstring/load/g'|tr -d '\r' > /root/scripts/lua/json.lua returned true
2015-10-24 14:44:01.545 LUA: GCal3 V 1.0.0: Command /bin/ls /root/scripts/lua/json.lua returned true
2015-10-24 14:44:01.549 LUA: GCal3 V 1.0.0: Existing openssl version is: false
2015-10-24 14:44:01.549 LUA: GCal3 V 1.0.0: Fatal Error - openssl not found
2015-10-24 14:44:01.706 LUA: GCal3 V 1.0.0: Device 24 released the semaphore - reason: Fatal error getting openssl
2015-10-24 14:44:01.708 EventSystem: Script event triggered: /usr/local/domoticz/var/scripts/lua/script_device_gcal.lua
2015-10-24 14:44:01.091 (Buttons) Lighting 2 (Calendar CHECK)
2015-10-24 14:44:03.712 (Buttons) Lighting 2 (Calendar CHECK)
2015-10-24 14:44:25.876 Hardware Monitor: Fetching data (System sensors)
2015-10-24 14:44:56.015 Hardware Monitor: Fetching data (System sensors)
2015-10-24 14:45:02.345 LUA: Calendar Vera needs to run
2015-10-24 14:45:02.345 EventSystem: Script event triggered: /usr/local/domoticz/var/scripts/lua/script_time_gcal.lua
2015-10-24 14:45:02.800 LUA: localhost:8084
2015-10-24 14:45:02.803 LUA: GCal3 V 1.0.0: Calendar device Calendar Vera (idx:24 ) initializing
2015-10-24 14:45:02.806 LUA: GCal3 V 1.0.0: Command /bin/ls /root/GCal3/ returned true
2015-10-24 14:45:02.809 LUA: GCal3 V 1.0.0: Command /bin/rm -f /root/GCal3/GCal3.sem returned true
2015-10-24 14:45:02.812 LUA: GCal3 V 1.0.0: Command bin/rm -f /root/GCal3/*.token returned nil
2015-10-24 14:45:02.812 LUA: GCal3 V 1.0.0: Checking semaphore
2015-10-24 14:45:02.815 LUA: GCal3 V 1.0.0: Command /bin/ls /root/GCal3/GCal3.sem returned nil
2015-10-24 14:45:02.815 LUA: GCal3 V 1.0.0: Semaphore file returned nil
2015-10-24 14:45:02.815 LUA: GCal3 V 1.0.0: Device 24 requested semaphore
2015-10-24 14:45:02.818 LUA: GCal3 V 1.0.0: Command /bin/ls /root/GCal3/GCal3.sem returned true
2015-10-24 14:45:02.818 LUA: GCal3 V 1.0.0: Device 24 claimed semaphore
2015-10-24 14:45:02.818 LUA: GCal3 V 1.0.0: Variables initialized ...
2015-10-24 14:45:02.822 LUA: GCal3 V 1.0.0: Command /bin/ls /root/scripts/lua/json.lua returned true
2015-10-24 14:45:02.825 LUA: GCal3 V 1.0.0: Existing openssl version is: false
2015-10-24 14:45:02.825 LUA: GCal3 V 1.0.0: Fatal Error - openssl not found
2015-10-24 14:45:02.904 LUA: GCal3 V 1.0.0: Device 24 released the semaphore - reason: Fatal error getting openssl
2015-10-24 14:45:02.905 EventSystem: Script event triggered: /usr/local/domoticz/var/scripts/lua/script_device_gcal.lua
2015-10-24 14:45:02.791 (Buttons) Lighting 2 (Calendar CHECK)
2015-10-24 14:45:04.908 (Buttons) Lighting 2 (Calendar CHECK)
2015-10-24 14:45:26.133 Hardware Monitor: Fetching data (System sensors)
2015-10-24 14:45:56.253 Hardware Monitor: Fetching data (System sensors)
2015-10-24 14:46:00.469 LUA: Calendar Vera needs to run
2015-10-24 14:46:00.470 EventSystem: Script event triggered: /usr/local/domoticz/var/scripts/lua/script_time_gcal.lua
2015-10-24 14:46:00.986 LUA: localhost:8084
2015-10-24 14:46:00.989 LUA: GCal3 V 1.0.0: Calendar device Calendar Vera (idx:24 ) initializing
2015-10-24 14:46:00.992 LUA: GCal3 V 1.0.0: Command /bin/ls /root/GCal3/ returned true
2015-10-24 14:46:00.995 LUA: GCal3 V 1.0.0: Command /bin/rm -f /root/GCal3/GCal3.sem returned true
2015-10-24 14:46:00.997 LUA: GCal3 V 1.0.0: Command bin/rm -f /root/GCal3/*.token returned nil
2015-10-24 14:46:00.997 LUA: GCal3 V 1.0.0: Checking semaphore
2015-10-24 14:46:01.001 LUA: GCal3 V 1.0.0: Command /bin/ls /root/GCal3/GCal3.sem returned nil
2015-10-24 14:46:01.001 LUA: GCal3 V 1.0.0: Semaphore file returned nil
2015-10-24 14:46:01.001 LUA: GCal3 V 1.0.0: Device 24 requested semaphore
2015-10-24 14:46:01.004 LUA: GCal3 V 1.0.0: Command /bin/ls /root/GCal3/GCal3.sem returned true
2015-10-24 14:46:01.004 LUA: GCal3 V 1.0.0: Device 24 claimed semaphore
2015-10-24 14:46:01.004 LUA: GCal3 V 1.0.0: Variables initialized ...
2015-10-24 14:46:01.007 LUA: GCal3 V 1.0.0: Command /bin/ls /root/scripts/lua/json.lua returned true
2015-10-24 14:46:01.011 LUA: GCal3 V 1.0.0: Existing openssl version is: false
2015-10-24 14:46:01.011 LUA: GCal3 V 1.0.0: Fatal Error - openssl not found
2015-10-24 14:46:01.032 LUA: GCal3 V 1.0.0: Device 24 released the semaphore - reason: Fatal error getting openssl
2015-10-24 14:46:01.032 EventSystem: Script event triggered: /usr/local/domoticz/var/scripts/lua/script_device_gcal.lua
2015-10-24 14:46:00.977 (Buttons) Lighting 2 (Calendar CHECK)
2015-10-24 14:46:03.038 (Buttons) Lighting 2 (Calendar CHECK)


now, where should i put the gcal.json file? in /root?
A folder GCal3 was created there...

also openssl.cnf is located at

/usr/local/domoticz

User avatar
BakSeeDaa
Posts: 275
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi
Domoticz version: beta
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.0 Release

Postby BakSeeDaa » Saturday 24 October 2015 15:40

Normally the credentials file named GCal3.json shall be put in /home/pi/domoticz/GCal3/ In Your case on Synology, put your GCal3.json in /root/GCal3/
Keep that folder, don't delete it later.

Before BGCD did a check that openssl is installed on the system. I've removed that check because the command to check differs depending on what system Domoticz is running on.

1) Check that you have openssl installed on your system. If not, install it.
2) Attached is a new zip file. Unzip it and put the extracted file in the lua scripts folder. (Replacing the old file with same name).

Please try again. :D
Attachments
script_device_gcal.zip
(13.8 KiB) Downloaded 11 times
Best wishes

// บักสีดา

User avatar
Ferpando
Posts: 30
Joined: Friday 23 October 2015 9:45
Target OS: NAS (Synology & others)
Domoticz version:
Location: Spain
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.0 Release

Postby Ferpando » Saturday 24 October 2015 16:49

here is the result

2015-10-24 16:38:48.348 (Buttons) Lighting 2 (Calendar CHECK)
2015-10-24 16:38:49.643 (Buttons) Lighting 2 (Calendar CHECK)
2015-10-24 16:38:58.038 Hardware Monitor: Fetching data (System sensors)
2015-10-24 16:39:00.469 LUA: Calendar Vera needs to run
2015-10-24 16:39:00.469 EventSystem: Script event triggered: /usr/local/domoticz/var/scripts/lua/script_time_gcal.lua
2015-10-24 16:39:00.673 LUA: localhost:8084
2015-10-24 16:39:00.676 LUA: GCal3 V 1.0.1: Calendar device Calendar Vera (idx:24 ) initializing
2015-10-24 16:39:00.679 LUA: GCal3 V 1.0.1: Command /bin/ls /root/GCal3/ returned true
2015-10-24 16:39:00.682 LUA: GCal3 V 1.0.1: Command /bin/rm -f /root/GCal3/GCal3.sem returned true
2015-10-24 16:39:00.685 LUA: GCal3 V 1.0.1: Command bin/rm -f /root/GCal3/*.token returned nil
2015-10-24 16:39:00.685 LUA: GCal3 V 1.0.1: Checking semaphore
2015-10-24 16:39:00.688 LUA: GCal3 V 1.0.1: Command /bin/ls /root/GCal3/GCal3.sem returned nil
2015-10-24 16:39:00.688 LUA: GCal3 V 1.0.1: Semaphore file returned nil
2015-10-24 16:39:00.688 LUA: GCal3 V 1.0.1: Device 24 requested semaphore
2015-10-24 16:39:00.692 LUA: GCal3 V 1.0.1: Command /bin/ls /root/GCal3/GCal3.sem returned true
2015-10-24 16:39:00.692 LUA: GCal3 V 1.0.1: Device 24 claimed semaphore
2015-10-24 16:39:00.692 LUA: GCal3 V 1.0.1: Variables initialized ...
2015-10-24 16:39:00.695 LUA: GCal3 V 1.0.1: Command /bin/ls /root/scripts/lua/json.lua returned true
2015-10-24 16:39:00.696 LUA: GCal3 V 1.0.1: local function: checkforcredentials
2015-10-24 16:39:00.700 LUA: GCal3 V 1.0.1: Command /bin/ls /root/GCal3/GCal3.json returned nil
2015-10-24 16:39:00.700 LUA: GCal3 V 1.0.1: Could not find the credentials file: /root/GCal3/GCal3.json
2015-10-24 16:39:00.700 LUA: GCal3 V 1.0.1: Fatal Error - Could not get credentials/root/scripts/lua/json.lua
2015-10-24 16:39:00.716 LUA: GCal3 V 1.0.1: Device 24 released the semaphore - reason: Fatal error getting credentials
2015-10-24 16:39:00.717 EventSystem: Script event triggered: /usr/local/domoticz/var/scripts/lua/script_device_gcal.lua
2015-10-24 16:39:00.664 (Buttons) Lighting 2 (Calendar CHECK)
2015-10-24 16:39:02.721 (Buttons) Lighting 2 (Calendar CHECK)
2015-10-24 16:39:28.154 Hardware Monitor: Fetching data (System sensors)
2015-10-24 16:39:58.270 Hardware Monitor: Fetching data (System sensors)
2015-10-24 16:40:00.432 LUA: Calendar Vera needs to run


openssl comes installed by default

> openssl version
OpenSSL 1.0.1p-fips 9 Jul 2015

User avatar
Ferpando
Posts: 30
Joined: Friday 23 October 2015 9:45
Target OS: NAS (Synology & others)
Domoticz version:
Location: Spain
Contact:

Re: BakSeeDaa´s Google Calendar for Domoticz V 1.0.0 Release

Postby Ferpando » Saturday 24 October 2015 16:56

I had a little typo in the name of the json file.
Here's the log now

2015-10-24 16:54:00.886 (Buttons) Lighting 2 (Calendar CHECK)
2015-10-24 16:54:02.373 LUA: localhost:8084
2015-10-24 16:54:02.376 LUA: GCal3 V 1.0.1: Calendar device Calendar Vera (idx:24 ) initializing
2015-10-24 16:54:02.379 LUA: GCal3 V 1.0.1: Command /bin/ls /root/GCal3/ returned true
2015-10-24 16:54:02.382 LUA: GCal3 V 1.0.1: Command /bin/rm -f /root/GCal3/GCal3.sem returned true
2015-10-24 16:54:02.385 LUA: GCal3 V 1.0.1: Command bin/rm -f /root/GCal3/*.token returned nil
2015-10-24 16:54:02.385 LUA: GCal3 V 1.0.1: Checking semaphore
2015-10-24 16:54:02.388 LUA: GCal3 V 1.0.1: Command /bin/ls /root/GCal3/GCal3.sem returned nil
2015-10-24 16:54:02.388 LUA: GCal3 V 1.0.1: Semaphore file returned nil
2015-10-24 16:54:02.388 LUA: GCal3 V 1.0.1: Device 24 requested semaphore
2015-10-24 16:54:02.392 LUA: GCal3 V 1.0.1: Command /bin/ls /root/GCal3/GCal3.sem returned true
2015-10-24 16:54:02.392 LUA: GCal3 V 1.0.1: Device 24 claimed semaphore
2015-10-24 16:54:02.392 LUA: GCal3 V 1.0.1: Variables initialized ...
2015-10-24 16:54:02.395 LUA: GCal3 V 1.0.1: Command /bin/ls /root/scripts/lua/json.lua returned true
2015-10-24 16:54:02.396 LUA: GCal3 V 1.0.1: local function: checkforcredentials
2015-10-24 16:54:02.400 LUA: GCal3 V 1.0.1: Command /bin/ls /root/GCal3/GCal3.json returned true
2015-10-24 16:54:02.403 LUA: GCal3 V 1.0.1: Command /bin/ls /root/GCal3/GCal3.json returned true
2015-10-24 16:54:02.407 LUA: GCal3 V 1.0.1: Command find /root/GCal3/ -type f ! -newer GCal3.json -name GCal3.pem -delete returned nil
2015-10-24 16:54:02.410 LUA: GCal3 V 1.0.1: Command /bin/ls /root/GCal3/GCal3.pem returned true
2015-10-24 16:54:02.410 LUA: GCal3 V 1.0.1: Timezone is 2 hrs and 0 min
2015-10-24 16:54:02.410 LUA: GCal3 V 1.0.1: Running Plugin ...
2015-10-24 16:54:02.410 LUA: GCal3 V 1.0.1: The Calendar ID is not set
2015-10-24 16:54:02.465 LUA: GCal3 V 1.0.1: Device 24 released the semaphore - reason: initialization complete
2015-10-24 16:54:02.465 LUA: GCal3 V 1.0.1: Switch recent status: Off


Return to “Show your projects”

Who is online

Users browsing this forum: No registered users and 6 guests