Python Plugin : iCal Multi Purpose Python Plugin for Domoticz

Python and python framework

Moderator: leecollings

tomdh76
Posts: 20
Joined: Saturday 09 September 2017 19:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : iCal Multi Purpose Python Plugin for Domoticz

Post by tomdh76 »

tomdh76 wrote: Friday 02 November 2018 9:33
zak45 wrote: Thursday 01 November 2018 23:14
tomdh76 wrote: Thursday 01 November 2018 20:03 2018-11-01 20:01:40.812 (Google calendar) Transport set to: 'TCP/IP', :9003.
2018-11-01 20:01:40.812 (Google calendar) Listen directive received, action initiated successfully.
can you try http://192.168.2.197:9003 and let me know the result ?
Strange thing is that I sometimes see : Succesfull GET. And other times a long spin.
I also set up a port forward in my router and if I go to my dyndns:9003, I immediately get "Succesfull GET"

But I see that I have to get the new ical.py. Thanx I try out (right now at work)

2 questions:
1) do i need a port forward in my router?
2) is it possible to use the plugin when I have a login name and password for domoticz?
Thanks, I now see the devices with the updated plugin. However it is still not working for me. I see google holidays correctly. I see also the device google calendar ical status (on), the google calendar at work, the google seasons. If I enter a event in the google calendar and use "wrk" or "hol" or "cmd" in the description nothing happens. I see in the plugin folder the ical.ics file. If i open that I also see all the events.

Could it be a permission issue? I see that the ical.ics file is owned by root

#edit: changing ownership to user does not seem to make a difference
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : iCal Multi Purpose Python Plugin for Domoticz

Post by zak45 »

tomdh76 wrote: Saturday 03 November 2018 8:14
Could it be a permission issue? I see that the ical.ics file is owned by root

#edit: changing ownership to user does not seem to make a difference
If you see devices mean that comunication between process is ok.
do you have devices labels in your language ??
can you post the *output.* files ?
tomdh76
Posts: 20
Joined: Saturday 09 September 2017 19:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : iCal Multi Purpose Python Plugin for Domoticz

Post by tomdh76 »

zak45 wrote: Saturday 03 November 2018 10:42
tomdh76 wrote: Saturday 03 November 2018 8:14
Could it be a permission issue? I see that the ical.ics file is owned by root

#edit: changing ownership to user does not seem to make a difference
If you see devices mean that comunication between process is ok.
do you have devices labels in your language ??
can you post the *output.* files ?
No I do not have device labels in Dutch (still English) but the reported holidays are correct in Dutch.

Output:

----------------Main---------------------------
__Request Domoticz to : type=command&param=getuservariables used encoding is : utf-8__
['switch', 'push', 'level', 'rgb']
__the uservariable exist: 21|iCal|sync --> 60__
__the uservariable exist: 21|iCal|cmd --> switch,push,level,rgb__
__the uservariable exist: 21|iCal|tz --> CET__
__the uservariable exist: 21|iCal|postalcode --> 3045BC__
__the uservariable exist: 21|iCal|village --> Rotterdam__
__the uservariable exist: 21|iCal|country --> nl__
__we re-use existing file : /home/tomdh76/domoticz/plugins/iCal/en_nl.lng__
__we do not work on windows__
__Request Domoticz to : type=schedules&filter=device used encoding is : utf-8__
__Request Domoticz to : type=devices&filter=all&used=true&order=Name used encoding is : utf-8__
__Device name for Atwork : google calendar - at work__
/home/tomdh76/domoticz/plugins/iCal/21iCal.ics
__web process to generate iCal.ics file__
__command to execute : https://calendar.google.xxxxxx.basic.ics__
__TimeZone from X-WR-TIMEZONE : Europe/Amsterdam__
-----------------iCal---------------------------
__Atwork detected : and defaultToBlank is: Yes__
__we manage AtWork switch : google calendar - at work__
__Atwork detected : and defaultToBlank is: Yes__
__we manage AtWork switch : google calendar - at work__
__Atwork detected : and defaultToBlank is: Yes__
__we manage AtWork switch : google calendar - at work__

(this going on for a while) and then:

-----------------End iCal-----------------------
-----------------atWrk--------------------------
__Request Domoticz to : type=command&param=cleartimers&idx=445 used encoding is : utf-8__
cmd:0 level:-1 hue:0 scope:-1 atWork:True
__Actual status for google calendar - at work is: Off__
__we schedule from start to end__
__Request Domoticz to : type=command&param=addtimer&idx=445&active=true&timertype=5&date=2018-12-29&hour=00&min=00&randomness=false&command=1&days=0&level=-1&color= used encoding is : utf-8__
__Request Domoticz to : type=command&param=addtimer&idx=445&active=true&timertype=5&date=2018-12-28&hour=00&min=00&randomness=false&command=0&days=0&level=-1&color= used encoding is : utf-8__
cmd:0 level:-1 hue:0 scope:-1 atWork:True
__Actual status for google calendar - at work is: Off__
__we schedule from start to end__
__Request Domoticz to : type=command&param=addtimer&idx=445&active=true&timertype=5&date=2018-12-25&hour=00&min=00&randomness=false&command=1&days=0&level=-1&color= used encoding is : utf-8__
__Request Domoticz to : type=command&param=addtimer&idx=445&active=true&timertype=5&date=2018-12-24&hour=00&min=00&randomness=false&command=0&days=0&level=-1&color= used encoding is : utf-8__
cmd:0 level:-1 hue:0 scope:-1 atWork:True
__Actual status for google calendar - at work is: Off__


(also going on for a while):

__Request Domoticz to : type=command&param=addtimer&idx=445&active=true&timertype=5&date=2018-11-05&hour=00&min=00&randomness=false&command=0&days=0&level=-1&color= used encoding is : utf-8__
laston : 20181105 0000 today : 20181103 1100 modatwork : 0
-----------------End atWrk----------------------
-----------------End Main-----------------------
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : iCal Multi Purpose Python Plugin for Domoticz

Post by zak45 »

@tomdh76
looks like it's working.; do not see error.

for the language:
if the file : /home/tomdh76/domoticz/plugins/iCal/en_nl.lng had a size of 0, just remove it and reload the plugin using HW tab.
--> do you have follow the fix on first post ???

for atwork switch, please verify your timers on correspondig device and let me know.

if you want to test (#cmd# etc ...), do not forget that default sync is 60 minutes, just click on Ical status device twice to speed-up the process.
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : iCal Multi Purpose Python Plugin for Domoticz

Post by zak45 »

TheeDude wrote: Saturday 03 November 2018 7:24 Hello!

I was just trying out this script on my Raspberry Pi, because of another script loosing it´s author and is no longer maintained.

After installation and I adding calendar to the hardware, when pressing the save button and switches should be created, domoticz crashes.

xxxx <--some time, didn´t get the copy/paste Status (Google Calendar) Started.
2018-11-03 07:11:20.866 Error: Domoticz(pid:32594, tid: 32609('PluginMgr')) received fatal signal 11 (Segmentation fault)

Any idea?
Lot's of error on plugin system related to Segmentation fault. Not really the plugin itself but this one show you had some problem with your python installation. Made some research on the forum and I hope you will found solution ( could be OS version / python version etc ...)
tomdh76
Posts: 20
Joined: Saturday 09 September 2017 19:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : iCal Multi Purpose Python Plugin for Domoticz

Post by tomdh76 »

zak45 wrote: Saturday 03 November 2018 13:51 @tomdh76
looks like it's working.; do not see error.

for the language:
if the file : /home/tomdh76/domoticz/plugins/iCal/en_nl.lng had a size of 0, just remove it and reload the plugin using HW tab.
--> do you have follow the fix on first post ???

for atwork switch, please verify your timers on correspondig device and let me know.

if you want to test (#cmd# etc ...), do not forget that default sync is 60 minutes, just click on Ical status device twice to speed-up the process.
Unfortunately still not working. I see every 60 minutes the ics file being updated. And if I read the ics file (by first changing ownership from root to user) I see all events including the description such as #wrk#. But the at work switch timers stay empty... So the switch never goes to "on" ... The language file also is being made always with a size of 0 even I use the fix in the first post. I wonder if it is a permission issue as all files being made by the plugin are owned by root with only read and write possiblities for root. The plugins are however owned by user.

The only error I see if I click on Ical status twice: I get a "error in diff Ical"
TheeDude
Posts: 46
Joined: Wednesday 07 October 2015 0:43
Target OS: Linux
Domoticz version:
Contact:

Re: Python Plugin : iCal Multi Purpose Python Plugin for Domoticz

Post by TheeDude »

zak45 wrote: Saturday 03 November 2018 14:05 Lot's of error on plugin system related to Segmentation fault. Not really the plugin itself but this one show you had some problem with your python installation. Made some research on the forum and I hope you will found solution ( could be OS version / python version etc ...)
Yes, you are right, Here are some more information that I got just now when trying to figure out the problem.

Don´t really know what it means, but I am searching trough google right now to help me..

Code: Select all

2018-11-03 19:35:08.724  Status: (Jonas Google Calendar) Started.
2018-11-03 19:35:09.328  Error: Domoticz(pid:32310, tid:32316('PluginMgr')) received fatal signal 11 (Segmentation fault)
2018-11-03 19:35:09.328  Error: siginfo address=0x366, address=0x7204b0
2018-11-03 19:35:12.581  Error: Thread 24 (Thread 0x759c9430 (LWP 32316)):
2018-11-03 19:35:12.581  Error: #0  0x76e36ef8 in __libc_waitpid (pid=707, stat_loc=0x759c66b8, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:40
2018-11-03 19:35:12.581  Error: #1  0x002c6968 in dumpstack_gdb(bool) ()
2018-11-03 19:35:12.581  Error: #2  0x002c6f54 in signal_handler(int, siginfo_t*, void*) ()
2018-11-03 19:35:12.581  Error: #3  <signal handler called>
2018-11-03 19:35:12.581  Error: #4  0x00000366 in ?? ()
2018-11-03 19:35:12.581  Error: #5  0x007204b0 in EVP_MD_CTX_reset ()
2018-11-03 19:35:12.581  Error: #6  0x00720a70 in EVP_MD_CTX_copy ()
2018-11-03 19:35:12.581  Error: #7  0x684aba5c in ?? () from /usr/lib/python3.4/lib-dynload/_hashlib.cpython-34m-arm-linux-gnueabihf.so
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : iCal Multi Purpose Python Plugin for Domoticz

Post by zak45 »

tomdh76 wrote: Saturday 03 November 2018 20:13 Unfortunately still not working. I see every 60 minutes the ics file being updated. And if I read the ics file (by first changing ownership from root to user) I see all events including the description such as #wrk#. But the at work switch timers stay empty... So the switch never goes to "on" ... The language file also is being made always with a size of 0 even I use the fix in the first post. I wonder if it is a permission issue as all files being made by the plugin are owned by root with only read and write possiblities for root. The plugins are however owned by user.

The only error I see if I click on Ical status twice: I get a "error in diff Ical"
Could be permission error... ?

the "error in diff ical" is normal when you click twice on ical status...

Can you show me one of entry of your calendar ?
tomdh76
Posts: 20
Joined: Saturday 09 September 2017 19:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : iCal Multi Purpose Python Plugin for Domoticz

Post by tomdh76 »

zak45 wrote: Saturday 03 November 2018 23:08
tomdh76 wrote: Saturday 03 November 2018 20:13 Unfortunately still not working. I see every 60 minutes the ics file being updated. And if I read the ics file (by first changing ownership from root to user) I see all events including the description such as #wrk#. But the at work switch timers stay empty... So the switch never goes to "on" ... The language file also is being made always with a size of 0 even I use the fix in the first post. I wonder if it is a permission issue as all files being made by the plugin are owned by root with only read and write possiblities for root. The plugins are however owned by user.

The only error I see if I click on Ical status twice: I get a "error in diff Ical"
Could be permission error... ?

the "error in diff ical" is normal when you click twice on ical status...

Can you show me one of entry of your calendar ?
Here is a test entry:

SUMMARY:Test
TRANSP:OPAQUE
END:VEVENT
BEGIN:VEVENT
DTSTART:20181103T175200Z
DTEND:20181103T185200Z
DTSTAMP:20181103T190136Z
UID:[email protected]
CREATED:20181103T174305Z
DESCRIPTION:#wrk#
LAST-MODIFIED:20181103T174316Z
LOCATION:
SEQUENCE:0
STATUS:CONFIRMED

Can you check in your ical folder who are owners of the files ical.py and plugin.py and owner of the ical.ics file?
I also wondered whether I should use sudo pip3 install colours etc... or just pip3 install colours etc..
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : iCal Multi Purpose Python Plugin for Domoticz

Post by zak45 »

tomdh76 wrote: Sunday 04 November 2018 8:16 Can you check in your ical folder who are owners of the files ical.py and plugin.py and owner of the ical.ics file?
I also wondered whether I should use sudo pip3 install colours etc... or just pip3 install colours etc..
Entry looks OK so do not see any problem.
I just wonder if you have play with the 'Timer Plan' settings ???
Except that, do not see why timers are not created...
I need a full Domoticz log and *output.* files (after removed any private entry)
Put plugin in debug mode
click twice on ical status device

In meantime, you can made some test on your side:
take a line that contains timer creation e.g.
__Request Domoticz to : type=command&param=addtimer&idx=445&active=true&timertype=5&date=2018-12-29&hour=00&min=00&randomness=false&command=1&days=0&level=-1&color= used encoding is : utf-8__

this is what we will request to Domotics to execute :

type=command&param=addtimer&idx=445&active=true&timertype=5&date=2018-12-29&hour=00&min=00&randomness=false&command=1&days=0&level=-1&color=

idx=445 --> should be the device number of ical atwork device name

now add your domoticz ip address and port to the command with http and json htm e.g. :

http://127.0.0.1:8080/json.htm?type=command&param=addtimer&idx=445&active=true&timertype=5&date=2018-12-29&hour=00&min=00&randomness=false&command=1&days=0&level=-1&color=

execute that on your prefered web browser
take a look in Domoticz, this should have created a timer entry for device IDX 445

For the right, not able to help you as I'm runnning in Windows, sorry...
but as you have all output files , looks like OK.

for testing purpose, could be nice to set
Default to AtWork: False
on the HW page parameters
tomdh76
Posts: 20
Joined: Saturday 09 September 2017 19:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : iCal Multi Purpose Python Plugin for Domoticz

Post by tomdh76 »

zak45 wrote: Sunday 04 November 2018 11:31
tomdh76 wrote: Sunday 04 November 2018 8:16 Can you check in your ical folder who are owners of the files ical.py and plugin.py and owner of the ical.ics file?
I also wondered whether I should use sudo pip3 install colours etc... or just pip3 install colours etc..
Entry looks OK so do not see any problem.
I just wonder if you have play with the 'Timer Plan' settings ???
Except that, do not see why timers are not created...
I need a full Domoticz log and *output.* files (after removed any private entry)
Put plugin in debug mode
click twice on ical status device

In meantime, you can made some test on your side:
take a line that contains timer creation e.g.
__Request Domoticz to : type=command&param=addtimer&idx=445&active=true&timertype=5&date=2018-12-29&hour=00&min=00&randomness=false&command=1&days=0&level=-1&color= used encoding is : utf-8__

this is what we will request to Domotics to execute :

type=command&param=addtimer&idx=445&active=true&timertype=5&date=2018-12-29&hour=00&min=00&randomness=false&command=1&days=0&level=-1&color=

idx=445 --> should be the device number of ical atwork device name

now add your domoticz ip address and port to the command with http and json htm e.g. :

http://127.0.0.1:8080/json.htm?type=command&param=addtimer&idx=445&active=true&timertype=5&date=2018-12-29&hour=00&min=00&randomness=false&command=1&days=0&level=-1&color=

execute that on your prefered web browser
take a look in Domoticz, this should have created a timer entry for device IDX 445

For the right, not able to help you as I'm runnning in Windows, sorry...
but as you have all output files , looks like OK.

for testing purpose, could be nice to set
Default to AtWork: False
on the HW page parameters
Here is the domoticz output.

I do not know what you mean by timer plan settings? Is this a general setting?

If I enter in my webbrowser: http://192.168.2.197:8080/json.htm?[/b]type=command&param=addtimer&idx=445&active=true&timertype=5&date=2018-12-29&hour=00&min=00&randomness=false&command=1&days=0&level=-1&color=

I get status "Ok"and the timer is added

2018-11-04 12:04:20.251 Status: User: Admin initiated a switch command (446/Google calendar - Ical status/Off)
2018-11-04 12:04:24.150 (Google calendar) Oncommand called for unit 4 : parameter On , level: 0
2018-11-04 12:04:24.150 (Google calendar - Ical status) Updating device from 0:'Pause' to have values 1:'Resume'.
2018-11-04 12:04:24.153 (Google calendar) We update 1:'Resume' (Google calendar - Ical status)
2018-11-04 12:04:24.153 (Google calendar) We clean related files in plugin folder
2018-11-04 12:04:24.153 (Google calendar) We have deleted this file: /home/tomdh76/domoticz/plugins/iCal/20iCal.ics
2018-11-04 12:04:24.153 (Google calendar) We have deleted this file: /home/tomdh76/domoticz/plugins/iCal/20output.txt
2018-11-04 12:04:24.153 (Google calendar) We have deleted this file: /home/tomdh76/domoticz/plugins/iCal/20output.err
2018-11-04 12:04:24.153 (Google calendar) We have deleted this file: /home/tomdh76/domoticz/plugins/iCal/20iCal.ics.bkp
2018-11-04 12:04:24.153 (Google calendar) Command to execute : "/home/tomdh76/domoticz/plugins/iCal/iCal.sh" "/home/tomdh76/domoticz/plugins/iCal/iCal.py" "9003,Netherlands,,,20,https://calendar.google.com/calendar/ic ... 2;4.447958" no
2018-11-04 12:04:24.539 (Google calendar) Pushing 'ProtocolDirective' on to queue
2018-11-04 12:04:24.539 (Google calendar) Pushing 'onConnectCallback' on to queue
2018-11-04 12:04:24.539 (Google calendar) Pushing 'ReadEvent' on to queue
2018-11-04 12:04:24.539 (Google calendar) Pushing 'ReadEvent' on to queue
2018-11-04 12:04:24.568 (Google calendar) Processing 'ProtocolDirective' message
2018-11-04 12:04:24.568 (Google calendar) Protocol set to: 'HTTP'.
2018-11-04 12:04:24.568 (Google calendar) Processing 'onConnectCallback' message
2018-11-04 12:04:24.568 (Google calendar) Calling message handler 'onConnect'.
2018-11-04 12:04:24.568 (Google calendar) Connected successfully to 127.0.0.1:60062
2018-11-04 12:04:24.568 (Google calendar) Deallocating connection object '127.0.0.1:59834' (127.0.0.1:59834).
2018-11-04 12:04:24.568 (Google calendar) Processing 'ReadEvent' message
2018-11-04 12:04:24.568 (Google calendar) Received 208 bytes of data
2018-11-04 12:04:24.568 (Google calendar) 50 4f 53 54 20 2f 20 48 54 54 50 2f 31 2e 31 0d 0a 48 6f 73 POST./.HTTP/1.1..Hos
2018-11-04 12:04:24.568 (Google calendar) 74 3a 20 31 32 37 2e 30 2e 30 2e 31 3a 39 30 30 33 0d 0a 55 t:.127.0.0.1:9003..U
2018-11-04 12:04:24.568 (Google calendar) 73 65 72 2d 41 67 65 6e 74 3a 20 70 79 74 68 6f 6e 2d 72 65 ser-Agent:.python-re
2018-11-04 12:04:24.568 (Google calendar) 71 75 65 73 74 73 2f 32 2e 31 38 2e 31 0d 0a 41 63 63 65 70 quests/2.18.1..Accep
2018-11-04 12:04:24.568 (Google calendar) 74 2d 45 6e 63 6f 64 69 6e 67 3a 20 67 7a 69 70 2c 20 64 65 t-Encoding:.gzip,.de
2018-11-04 12:04:24.568 (Google calendar) 66 6c 61 74 65 0d 0a 41 63 63 65 70 74 3a 20 2a 2f 2a 0d 0a flate..Accept:.*/*..
2018-11-04 12:04:24.568 (Google calendar) 43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 6b 65 65 70 2d 61 6c 69 Connection:.keep-ali
2018-11-04 12:04:24.568 (Google calendar) 76 65 0d 0a 43 6f 6e 74 65 6e 74 2d 74 79 70 65 3a 20 74 65 ve..Content-type:.te
2018-11-04 12:04:24.568 (Google calendar) 78 74 2f 70 6c 61 69 6e 3b 20 63 68 61 72 73 65 74 3d 75 74 xt/plain;.charset=ut
2018-11-04 12:04:24.568 (Google calendar) 66 2d 38 0d 0a 43 6f 6e 74 65 6e 74 2d 4c 65 6e 67 74 68 3a f-8..Content-Length:
2018-11-04 12:04:24.568 (Google calendar) 20 31 32 31 0d 0a 0d 0a .. .. .. .. .. .. .. .. .. .. .. .. .121....
2018-11-04 12:04:24.568 (Google calendar) Processing 'ReadEvent' message
2018-11-04 12:04:24.568 (Google calendar) Received 121 bytes of data
2018-11-04 12:04:24.568 (Google calendar) 7b 22 73 74 61 74 75 73 22 3a 7b 22 73 74 65 70 22 3a 22 64 {"status":{"step":"d
2018-11-04 12:04:24.568 (Google calendar) 69 66 66 43 61 6c 22 2c 22 6d 73 67 22 3a 22 5f 5f 45 72 72 iffCal","msg":"__Err
2018-11-04 12:04:24.568 (Google calendar) 6f 72 20 69 6e 20 64 69 66 66 20 69 43 61 6c 2c 20 66 69 72 or.in.diff.iCal,.fir
2018-11-04 12:04:24.568 (Google calendar) 73 74 20 74 69 6d 65 20 65 78 65 63 75 74 69 6f 6e 20 74 68 st.time.execution.th
2018-11-04 12:04:24.568 (Google calendar) 69 73 20 63 61 6e 20 62 65 20 6e 6f 72 6d 61 6c 2c 20 77 65 is.can.be.normal,.we
2018-11-04 12:04:24.568 (Google calendar) 20 63 6f 6e 74 69 6e 75 65 20 61 6e 79 77 61 79 5f 5f 22 7d .continue.anyway__"}
2018-11-04 12:04:24.568 (Google calendar) 7d .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. }
2018-11-04 12:04:24.568 (Google calendar) Pushing 'onMessageCallback' on to queue
2018-11-04 12:04:24.568 (Google calendar) Processing 'onMessageCallback' message
2018-11-04 12:04:24.568 (Google calendar) Calling message handler 'onMessage'.
2018-11-04 12:04:24.568 (Google calendar) Onmessage called for connection: 127.0.0.1:60062
2018-11-04 12:04:24.568 (Google calendar) POST request received.
2018-11-04 12:04:24.568 (Google calendar) Pushing 'WriteDirective' on to queue
2018-11-04 12:04:24.568 (Google calendar) data:b'{"status":{"step":"diffCal","msg":"__Error in diff iCal, first time execution this can be normal, we continue anyway__"}}'
2018-11-04 12:04:24.568 (Google calendar) {"status":{"step":"diffCal","msg":"__Error in diff iCal, first time execution this can be normal, we continue anyway__"}}
2018-11-04 12:04:24.568 (Google calendar) Processing data : {"status":{"step":"diffCal","msg":"__Error in diff iCal, first time execution this can be normal, we continue anyway__"}}
2018-11-04 12:04:24.568 (Google calendar - Ical status) Updating device from 1:'Resume' to have values 1:'**diffCal-> msg:__Error in diff iCal, first time execution this can be normal, we continue anyway__'.
2018-11-04 12:04:24.571 (Google calendar) We update 1:'**diffCal-> msg:__Error in diff iCal, first time execution this can be normal, we continue anyway__' (Google calendar - Ical status)
2018-11-04 12:04:24.571 (Google calendar) Data process ok
2018-11-04 12:04:24.571 (Google calendar) Processing 'WriteDirective' message
2018-11-04 12:04:24.571 (Google calendar) Sending 249 bytes of data
2018-11-04 12:04:24.571 (Google calendar) 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d 0a 44 61 74 HTTP/1.1.200.OK..Dat
2018-11-04 12:04:24.571 (Google calendar) 65 3a 20 53 75 6e 2c 20 30 34 20 4e 6f 76 20 32 30 31 38 20 e:.Sun,.04.Nov.2018.
2018-11-04 12:04:24.571 (Google calendar) 31 31 3a 30 34 3a 32 34 20 47 4d 54 0d 0a 53 65 72 76 65 72 11:04:24.GMT..Server
2018-11-04 12:04:24.571 (Google calendar) 3a 20 44 6f 6d 6f 74 69 63 7a 2f 31 2e 30 0d 0a 43 6f 6e 6e :.Domoticz/1.0..Conn
2018-11-04 12:04:24.571 (Google calendar) 65 63 74 69 6f 6e 3a 20 6b 65 65 70 2d 61 6c 69 76 65 0d 0a ection:.keep-alive..
2018-11-04 12:04:24.571 (Google calendar) 41 63 63 65 70 74 3a 20 43 6f 6e 74 65 6e 74 2d 54 79 70 65 Accept:.Content-Type
2018-11-04 12:04:24.571 (Google calendar) 3a 20 74 65 78 74 2f 68 74 6d 6c 3b 20 63 68 61 72 73 65 74 :.text/html;.charset
2018-11-04 12:04:24.571 (Google calendar) 3d 55 54 46 2d 38 0d 0a 43 6f 6e 74 65 6e 74 2d 4c 65 6e 67 =UTF-8..Content-Leng
2018-11-04 12:04:24.571 (Google calendar) 74 68 3a 20 37 39 0d 0a 0d 0a 3c 21 44 4f 43 54 59 50 45 20 th:.79....<!DOCTYPE.
2018-11-04 12:04:24.571 (Google calendar) 68 74 6d 6c 3e 3c 68 74 6d 6c 3e 3c 68 65 61 64 3e 3c 2f 68 html><html><head></h
2018-11-04 12:04:24.571 (Google calendar) 65 61 64 3e 3c 62 6f 64 79 3e 3c 68 33 3e 69 43 61 6c 20 72 ead><body><h3>iCal.r
2018-11-04 12:04:24.571 (Google calendar) 65 73 70 6f 6e 73 65 20 4f 4b 21 3c 2f 68 33 3e 3c 62 6f 64 esponse.OK!</h3><bod
2018-11-04 12:04:24.571 (Google calendar) 79 3e 3c 2f 68 74 6d 6c 3e .. .. .. .. .. .. .. .. .. .. .. y></html>
2018-11-04 12:04:24.571 (Google calendar) Queued asyncronous read aborted (127.0.0.1:60062).
2018-11-04 12:04:24.571 (Google calendar) Pushing 'DisconnectedEvent' on to queue
2018-11-04 12:04:24.621 (Google calendar) Processing 'DisconnectedEvent' message
2018-11-04 12:04:24.621 (Google calendar) Disconnect event received for '127.0.0.1:60062'.
2018-11-04 12:04:24.621 (Google calendar) Pushing 'onDisconnectCallback' on to queue
2018-11-04 12:04:24.621 (Google calendar) Processing 'onDisconnectCallback' message
2018-11-04 12:04:24.621 (Google calendar) Calling message handler 'onDisconnect'.
2018-11-04 12:04:24.621 (Google calendar) Ondisconnect called for connection '127.0.0.1:60062'
2018-11-04 12:04:24.621 (Google calendar) Server connections:
2018-11-04 12:04:24.621 (Google calendar) --> 127.0.0.1:60062'.
2018-11-04 12:04:24.109 Status: User: Admin initiated a switch command (446/Google calendar - Ical status/On)
2018-11-04 12:04:44.155 (Google calendar) Pushing 'onHeartbeatCallback' on to queue
2018-11-04 12:04:44.169 (Google calendar) Processing 'onHeartbeatCallback' message
2018-11-04 12:04:44.169 (Google calendar) Calling message handler 'onHeartbeat'.
2018-11-04 12:04:44.169 (Google calendar - Ical status) Updating device from 1:'**diffCal-> msg:__Error in diff iCal, first time execution this can be normal, we continue anyway__' to have values 1:'Executing, sync every 60 minutes '.
2018-11-04 12:04:44.172 (Google calendar) We update 1:'Executing, sync every 60 minutes ' (Google calendar - Ical status)
2018-11-04 12:05:14.163 (Google calendar) Pushing 'onHeartbeatCallback' on to queue
2018-11-04 12:05:14.203 (Google calendar) Processing 'onHeartbeatCallback' message
2018-11-04 12:05:14.203 (Google calendar) Calling message handler 'onHeartbeat'.
2018-11-04 12:05:44.169 (Google calendar) Pushing 'onHeartbeatCallback' on to queue
2018-11-04 12:05:44.171 (Google calendar) Processing 'onHeartbeatCallback' message
2018-11-04 12:05:44.172 (Google calendar) Calling message handler 'onHeartbeat'.
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : iCal Multi Purpose Python Plugin for Domoticz

Post by zak45 »

@tomdh76
thanks tom.

But to be able to debug, I really need ALL informations requested.
domoticz.log (full) and all *output.* files (remove private entries)
--> create zip file and attach

until now, I do not see "right" problem: plugin has been able to erase and re-create

for your test I think you need to remove [/b]

"If I enter in my webbrowser: http://192.168.2.197:8080/json.htm?[/b]type=command&param=addtimer&idx=445&active=true&timertype=5&date=2018-12-29&hour=00&min=00&randomness=false&command=1&days=0&level=-1&color=
"
this should be something like that for you:

http://192.168.2.197:8080/json.htm?type ... =-1&color=

But you need to verify that idx 445 is the right one for ical atwork device before ...
tomdh76
Posts: 20
Joined: Saturday 09 September 2017 19:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : iCal Multi Purpose Python Plugin for Domoticz

Post by tomdh76 »

zak45 wrote: Sunday 04 November 2018 13:00 @tomdh76
thanks tom.

But to be able to debug, I really need ALL informations requested.
domoticz.log (full) and all *output.* files (remove private entries)
--> create zip file and attach

until now, I do not see "right" problem: plugin has been able to erase and re-create

for your test I think you need to remove [/b]

"If I enter in my webbrowser: http://192.168.2.197:8080/json.htm?[/b]type=command&param=addtimer&idx=445&active=true&timertype=5&date=2018-12-29&hour=00&min=00&randomness=false&command=1&days=0&level=-1&color=
"
this should be something like that for you:

http://192.168.2.197:8080/json.htm?type ... =-1&color=

But you need to verify that idx 445 is the right one for ical atwork device before ...
Here is the log after I pressed the ical button.

The link of the json webbrowser works and adds a timer to the google device at work. So the problem seems to be that he plugin cannot communicate with the device?
Attachments
log.zip
(150.81 KiB) Downloaded 38 times
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : iCal Multi Purpose Python Plugin for Domoticz

Post by zak45 »

@tomdh76
thanks.
but you need to redo the test.
you have put too much value on this entry :

__Command detected : #cmd#Vakantie:switch:On
-------
Copied from your Outlook.com calendar (AQMkADAwATExAGM3NwAtNTg2Yi1kZAFjLTAwAi0wMAoARgAAA_iRdkhHIfJKitLX2bwQe_IHABZ04tHDxn1Cur4jCdFYG8EAAAIBDQAAABZ04tHDxn1Cur4jCdFYG8EAAADQcgB3AAAA)
Master Event ()
Check out how template works and limitations: https://aka.ms/flowcalendar __

you need to delete this one and lets focus only on #wrk# for the moment, so no more #cmd# (or #hol#) plz.
tomdh76
Posts: 20
Joined: Saturday 09 September 2017 19:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : iCal Multi Purpose Python Plugin for Domoticz

Post by tomdh76 »

zak45 wrote: Sunday 04 November 2018 23:27 @tomdh76
thanks.
but you need to redo the test.
you have put too much value on this entry :

__Command detected : #cmd#Vakantie:switch:On
-------
Copied from your Outlook.com calendar (AQMkADAwATExAGM3NwAtNTg2Yi1kZAFjLTAwAi0wMAoARgAAA_iRdkhHIfJKitLX2bwQe_IHABZ04tHDxn1Cur4jCdFYG8EAAAIBDQAAABZ04tHDxn1Cur4jCdFYG8EAAADQcgB3AAAA)
Master Event ()
Check out how template works and limitations: https://aka.ms/flowcalendar __

you need to delete this one and lets focus only on #wrk# for the moment, so no more #cmd# (or #hol#) plz.
Yes that was it! After I deleted the #cmd# event timers were made in the at work switch as expected!

The downside is that I hoped that I could turn a switch on with this plugin (so I would like to turn on a "away" switch). The #cmd# was useful to do that.
Do you think it is possible to make that work somehow?
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : iCal Multi Purpose Python Plugin for Domoticz

Post by zak45 »

tomdh76 wrote: Monday 05 November 2018 7:54
__Command detected : #cmd#Vakantie:switch:On

The #cmd# was useful to do that.
Do you think it is possible to make that work somehow?
yes, you just need to put the #cmd# keyword on the description field of your calendar entry.. but nothing else.

e.g:#cmd#Vakantie:switch:On
TheeDude
Posts: 46
Joined: Wednesday 07 October 2015 0:43
Target OS: Linux
Domoticz version:
Contact:

Re: Python Plugin : iCal Multi Purpose Python Plugin for Domoticz

Post by TheeDude »

Hello again!

I have now solved my Python problem that I had, I ended up upgrading the raspbian system to stretch and that way upgraded to python-3.5, and now my script is not killing domoticz and I got a step forward.

I can acccess localip:9003 and get "iCal response OK!"

The script seems to run fine, but I don´t get any devices created.
I get the message that the script is going to create devices, but nothing happens.

The files in the directory are

Code: Select all

pi@raspberrypi ~/domoticz/plugins/iCal $ ls
en_en.lng  iCal.py  iCal.sh  iCal.zip  plugin.py  __pycache__
No output file that you are talking about, I have tried user rights, chmodded directory to "777", and that didn´t work either.
I have reloaded the script after every step.

Any idea of what I should try next?
tomdh76
Posts: 20
Joined: Saturday 09 September 2017 19:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : iCal Multi Purpose Python Plugin for Domoticz

Post by tomdh76 »

TheeDude wrote: Monday 05 November 2018 13:27 Hello again!

I have now solved my Python problem that I had, I ended up upgrading the raspbian system to stretch and that way upgraded to python-3.5, and now my script is not killing domoticz and I got a step forward.

I can acccess localip:9003 and get "iCal response OK!"

The script seems to run fine, but I don´t get any devices created.
I get the message that the script is going to create devices, but nothing happens.

The files in the directory are

Code: Select all

pi@raspberrypi ~/domoticz/plugins/iCal $ ls
en_en.lng  iCal.py  iCal.sh  iCal.zip  plugin.py  __pycache__
No output file that you are talking about, I have tried user rights, chmodded directory to "777", and that didn´t work either.
I have reloaded the script after every step.

Any idea of what I should try next?
I had the same problem, but using the update plugin.py and iCal.py the devices were created.
TheeDude
Posts: 46
Joined: Wednesday 07 October 2015 0:43
Target OS: Linux
Domoticz version:
Contact:

Re: Python Plugin : iCal Multi Purpose Python Plugin for Domoticz

Post by TheeDude »

tomdh76 wrote:
TheeDude wrote: Monday 05 November 2018 13:27 Hello again!

I have now solved my Python problem that I had, I ended up upgrading the raspbian system to stretch and that way upgraded to python-3.5, and now my script is not killing domoticz and I got a step forward.

I can acccess localip:9003 and get "iCal response OK!"

The script seems to run fine, but I don´t get any devices created.
I get the message that the script is going to create devices, but nothing happens.

The files in the directory are

Code: Select all

pi@raspberrypi ~/domoticz/plugins/iCal $ ls
en_en.lng  iCal.py  iCal.sh  iCal.zip  plugin.py  __pycache__
No output file that you are talking about, I have tried user rights, chmodded directory to "777", and that didn´t work either.
I have reloaded the script after every step.

Any idea of what I should try next?
I had the same problem, but using the update plugin.py and iCal.py the devices were created.
Yes, I read that so I have already tried them with no success..

Skickat från min SM-G950F via Tapatalk

zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : iCal Multi Purpose Python Plugin for Domoticz

Post by zak45 »

TheeDude wrote: Monday 05 November 2018 13:27 Any idea of what I should try next?
put debug mode and post the log (take care of any private information)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest