Python Plugin : iCal Multi Purpose Python Plugin for Domoticz

Python and python framework

Moderator: leecollings

Post Reply
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 »

brucez wrote: Thursday 15 November 2018 21:16 Hi all!

The download link is not working. :(
Can you please check it?

Thanks! ;)
checked and working.
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: Friday 16 November 2018 16:04 Do you think it would be possible for this script to, instead, write calendar event time to a user variable?
Or maybe both?
Hi, not sure to really had understood all.. but here are some possibilities:

Create a switch in domoticz (dummy switch)
On the On action you can put the script command to create the uservariable into domoticz (few lines only will do the trick)
On your calendar you have to create an entry like that : #cmd#yourswitchname:On:0
for your required date/time
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: Friday 16 November 2018 18:40
TheeDude wrote: Friday 16 November 2018 16:04 Do you think it would be possible for this script to, instead, write calendar event time to a user variable?
Or maybe both?
Hi, not sure to really had understood all.. but here are some possibilities:

Create a switch in domoticz (dummy switch)
On the On action you can put the script command to create the uservariable into domoticz (few lines only will do the trick)
On your calendar you have to create an entry like that : #cmd#yourswitchname:On:0
for your required date/time
The problem I am having with this is that if I want to leave 12:00, I need to set calendar switch on time to 08:00, it will start a (timer) switch that is calculating outside temperature, and depending of the outside temperature the preheating progress is starting some time between 30 minutes and 4 hours before I leave.

I would like to set my departure time instead of -4 hours in my calendar, and that time will then end up in a user variable and control it from that.
Now I always have to think in my head when I make the calendar entry, -4 hours, not a big problem I agree, but would be nice to solve!

Why I am having this problem is that I am working shift hours, irregular hours, and I have my shift schedule in a google calendar.

If I create a dummy switch as you said, it wouldn´t solve the problem that I have to think 4 hours ahead, or would it?
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: Friday 16 November 2018 18:51 If I create a dummy switch as you said, it wouldn´t solve the problem that I have to think 4 hours ahead, or would it?
this will not work in this case...Now, if your working time is more or less, always the same, you can create this scenario from your shift start.
Let's suppose: working time is 8 hours.
You can in this case create your calendar entry from the start and say to execute the command 4 hours after.

Edit:
even more simple is to create an event (device) based on your At work device name e.g.

commandArray = {}

if devicechanged['Google at work'] == "On" then

commandArray['Yourdevice'] = 'On AFTER 4 HOURS'

end

return commandArray
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 17 November 2018 11:14
TheeDude wrote: Friday 16 November 2018 18:51 If I create a dummy switch as you said, it wouldn´t solve the problem that I have to think 4 hours ahead, or would it?
this will not work in this case...Now, if your working time is more or less, always the same, you can create this scenario from your shift start.
Let's suppose: working time is 8 hours.
You can in this case create your calendar entry from the start and say to execute the command 4 hours after.

Edit:
even more simple is to create an event (device) based on your At work device name e.g.

commandArray = {}

if devicechanged['Google at work'] == "On" then

commandArray['Yourdevice'] = 'On AFTER 4 HOURS'

end

return commandArray
But I want this to execute 4 hours before, not after!
This is what I want to accomplish, https://github.com/riksarchen/carheater_domoticz <-- Step 1, INSTALLATION: First of all you need to install BakSeeDaa's google calendar script is obsolete, and dont´work anymore..

That is a secondary issue though,
I haven´t got it running just yet.
In my .ics file I have a couple of entries that loops/repeat in a 5 week period, and none of them are working.
If I create a "test" entry, it does however work, and I am having problem figuring out why.
Is it because of the timezone entry? Can you check this out?

Here you have a working entry:
Spoiler: show
BEGIN:VEVENT
DTSTART:20181119T160000Z
DTEND:20181119T200000Z
DTSTAMP:20181120T051819Z
UID:xxxxxxxxxxxxxxxxxxxxxx
CREATED:20181119T144653Z
DESCRIPTION:#cmd#Timer Motorvärmare Jonas:switch:On
LAST-MODIFIED:20181119T144716Z
LOCATION:
SEQUENCE:1
STATUS:CONFIRMED
SUMMARY:test igen..
TRANSP:TRANSPARENT
END:VEVENT
And here you a non working entry:
Spoiler: show
BEGIN:VEVENT
DTSTART;TZID=Europe/Stockholm:20151029T003000
DTEND;TZID=Europe/Stockholm:20151029T043000
RRULE:FREQ=WEEKLY;WKST=MO;INTERVAL=5;BYDAY=TH
DTSTAMP:20181120T051819Z
UID:xxxxxxxxxxxxxxxxxxxxxxx
CREATED:20150612T124040Z
DESCRIPTION:#cmd#Timer Motorvärmare Jonas:switch:On
LAST-MODIFIED:20181116T173433Z
LOCATION:
SEQUENCE:3
STATUS:CONFIRMED
SUMMARY:Förmiddagsskift vardag
TRANSP:OPAQUE
END:VEVENT
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: Tuesday 20 November 2018 6:38
But I want this to execute 4 hours before, not after!
If you think in different way, mean from start, this is why I said AFTER.
working hour for today :
start at 08:00 AM
end 04:00 PM
when switch Google-At work will be set to 'On', this will execute some other task 4 hours AFTER, which is 4 hours BEFORE the end.

for you calendar entry, this is the reason :
RRULE:FREQ=WEEKLY;WKST=MO;INTERVAL=5;BYDAY=TH

the rrule has not been yet implemented (reccuring rule:), will see how to deal with that when had some times...
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: Tuesday 20 November 2018 11:47
TheeDude wrote: Tuesday 20 November 2018 6:38
But I want this to execute 4 hours before, not after!
If you think in different way, mean from start, this is why I said AFTER.
working hour for today :
start at 08:00 AM
end 04:00 PM
when switch Google-At work will be set to 'On', this will execute some other task 4 hours AFTER, which is 4 hours BEFORE the end.

for you calendar entry, this is the reason :
RRULE:FREQ=WEEKLY;WKST=MO;INTERVAL=5;BYDAY=TH

the rrule has not been yet implemented (reccuring rule:), will see how to deal with that when had some times...
Oh, that is an idea!
I will try this some day!

Thanks, good to know that there was a reason for this, now I can stop pulling my hair. :)
I will put in theese manually for a couple of weeks then, and hope that this rrule can be implemented in the future. :)
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 »

New version uploaded.
Manage now recurrent rule (rrule).
for existing installation, only replace iCal.py & en_en.lng
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: Thursday 29 November 2018 17:54 New version uploaded.
Manage now recurrent rule (rrule).
for existing installation, only replace iCal.py & en_en.lng
Thank you! I will try it out next week!
moo2089
Posts: 32
Joined: Sunday 25 March 2018 23:30
Target OS: Windows
Domoticz version: 11804
Location: Budapest/Hungary
Contact:

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

Post by moo2089 »

hi there,

i use this plugin since couple of months, seems, working fine, except what i found few days ago in log:
Spoiler: show
2019-01-09 13:00:32.340 Error: (ical) 'onHeartbeat' failed 'TimeoutExpired'.
2019-01-09 13:00:32.340 Error: (ical) ----> Line 231 in C:\Program Files (x86)\Domoticz\plugins\iCal\plugin.py, function onHeartbeat
2019-01-09 13:00:32.356 Error: (ical) ----> Line 500 in C:\Program Files (x86)\Domoticz\plugins\iCal\plugin.py, function startShell
2019-01-09 13:00:32.356 Error: (ical) ----> Line 556 in C:\Python34\Lib\subprocess.py, function check_call
2019-01-09 13:00:32.356 Error: (ical) ----> Line 543 in C:\Python34\Lib\subprocess.py, function call
2019-01-09 13:00:32.356 Error: (ical) ----> Line 1167 in C:\Python34\Lib\subprocess.py, function wait
i dont remember i saw these lines in log in beginning of use
what could be wrong?

Version: 4.9700
Build Hash: a3a45906
Compile Date: 2018-06-23 16:24:51
dzVents Version: 2.4.6
Python Version: 3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 19:28:18) [MSC v.1600 32 bit (Intel)]

thanks in advance!
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 »

moo2089 wrote: Wednesday 09 January 2019 20:40 2019-01-09 13:00:32.340 Error: (ical) 'onHeartbeat' failed 'TimeoutExpired'.
2019-01-09 13:00:32.340 Error: (ical) ----> Line 231 in C:\Program Files (x86)\Domoticz\plugins\iCal\plugin.py, function onHeartbeat
2019-01-09 13:00:32.356 Error: (ical) ----> Line 500 in C:\Program Files (x86)\Domoticz\plugins\iCal\plugin.py, function startShell
this should not happend and indicate a problem.
Problem is that plugin do not have been able to launch the subprocess (another py program) in timely manner (2 seconds) and fall in timeout.
Put the plugin in debug mode and show the output.
moo2089
Posts: 32
Joined: Sunday 25 March 2018 23:30
Target OS: Windows
Domoticz version: 11804
Location: Budapest/Hungary
Contact:

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

Post by moo2089 »

here it is:
Spoiler: show
2019-01-09 23:08:31.351 (ical) Töröltük ezt a fájlt: C:\Program Files (x86)\Domoticz\plugins\iCal\47iCal.ics
2019-01-09 23:08:31.351 (ical) Töröltük ezt a fájlt: C:\Program Files (x86)\Domoticz\plugins\iCal\47output.txt
2019-01-09 23:08:31.351 (ical) Töröltük ezt a fájlt: C:\Program Files (x86)\Domoticz\plugins\iCal\47output.err
2019-01-09 23:08:31.367 (ical) Töröltük ezt a fájlt: C:\Program Files (x86)\Domoticz\plugins\iCal\47iCal.ics.bkp
2019-01-09 23:08:31.367 (ical) Parancs végrehajtása: "C:\Program Files (x86)\Domoticz\plugins\iCal\iCal.cmd" "C:\Program Files (x86)\Domoticz\plugins\iCal\iCal.py" "9003,Hungary,,,47,https://calendar.google.com/calendar/ic ... C:\Program Files (x86)\Domoticz\plugins\iCal\,Yes,888,163,164,165,166,0,3,127.0.0.1,8080,47.492199;19.056477" no
2019-01-09 23:08:31.242 Status: User: Admin initiated a switch command (166/ical - Ical állapota/On)
2019-01-09 23:08:38.304 (ical) 79 3e 3c 2f 68 74 6d 6c 3e .. .. .. .. .. .. .. .. .. .. .. y></html>
2019-01-09 23:08:38.304 (ical) Queued asyncronous read aborted (127.0.0.1:54850).
2019-01-09 23:08:38.304 (ical) Pushing 'DisconnectedEvent' on to queue
2019-01-09 23:08:38.304 (ical) Pushing 'ProtocolDirective' on to queue
2019-01-09 23:08:38.304 (ical) Pushing 'onConnectCallback' on to queue
2019-01-09 23:08:38.304 (ical) Pushing 'ReadEvent' on to queue
2019-01-09 23:08:38.366 (ical) Processing 'DisconnectedEvent' message
2019-01-09 23:08:38.366 (ical) Disconnect event received for '127.0.0.1:54850'.
2019-01-09 23:08:38.366 (ical) Pushing 'onDisconnectCallback' on to queue
2019-01-09 23:08:38.366 (ical) Processing 'ProtocolDirective' message
2019-01-09 23:08:38.366 (ical) Protocol set to: 'HTTP'.
2019-01-09 23:08:38.366 (ical) Processing 'onConnectCallback' message
2019-01-09 23:08:38.366 (ical) Calling message handler 'onConnect'.
2019-01-09 23:08:38.366 (ical) A (z) 127.0.0.1 sikeresen csatlakozott: 54851
2019-01-09 23:08:38.366 (ical) Processing 'ReadEvent' message
2019-01-09 23:08:38.366 (ical) Received 886 bytes of data
2019-01-09 23:08:38.366 (ical) 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
2019-01-09 23:08:38.366 (ical) 74 3a 20 31 32 37 2e 30 2e 30 2e 31 3a 39 30 30 33 0d 0a 43 t:.127.0.0.1:9003..C
2019-01-09 23:08:38.366 (ical) 6f 6e 6e 65 63 74 69 6f 6e 3a 20 6b 65 65 70 2d 61 6c 69 76 onnection:.keep-aliv
2019-01-09 23:08:38.366 (ical) 65 0d 0a 55 73 65 72 2d 41 67 65 6e 74 3a 20 70 79 74 68 6f e..User-Agent:.pytho
2019-01-09 23:08:38.366 (ical) 6e 2d 72 65 71 75 65 73 74 73 2f 32 2e 32 30 2e 30 0d 0a 41 n-requests/2.20.0..A
2019-01-09 23:08:38.366 (ical) 63 63 65 70 74 3a 20 2a 2f 2a 0d 0a 41 63 63 65 70 74 2d 45 ccept:.*/*..Accept-E
2019-01-09 23:08:38.366 (ical) 6e 63 6f 64 69 6e 67 3a 20 67 7a 69 70 2c 20 64 65 66 6c 61 ncoding:.gzip,.defla
2019-01-09 23:08:38.366 (ical) 74 65 0d 0a 43 6f 6e 74 65 6e 74 2d 74 79 70 65 3a 20 74 65 te..Content-type:.te
2019-01-09 23:08:38.366 (ical) 78 74 2f 70 6c 61 69 6e 3b 20 63 68 61 72 73 65 74 3d 75 74 xt/plain;.charset=ut
2019-01-09 23:08:38.366 (ical) 66 2d 38 0d 0a 43 6f 6e 74 65 6e 74 2d 4c 65 6e 67 74 68 3a f-8..Content-Length:
2019-01-09 23:08:38.366 (ical) 20 36 37 38 0d 0a 0d 0a 7b 22 68 6f 6c 69 64 61 79 73 22 3a .678....{"holidays":
2019-01-09 23:08:38.366 (ical) 7b 22 31 30 22 3a 7b 22 64 61 74 65 22 3a 22 32 30 31 39 2d {"10":{"date":"2019-
2019-01-09 23:08:38.366 (ical) 30 31 2d 30 31 22 2c 22 6e 61 6d 65 22 3a 22 c3 9a 6a c3 a9 01-01","name":"Újé
2019-01-09 23:08:38.366 (ical) 76 22 7d 2c 22 32 30 22 3a 7b 22 64 61 74 65 22 3a 22 32 30 v"},"20":{"date":"20
2019-01-09 23:08:38.366 (ical) 31 39 2d 30 33 2d 31 35 22 2c 22 6e 61 6d 65 22 3a 22 4e 65 19-03-15","name":"Ne
2019-01-09 23:08:38.366 (ical) 6d 7a 65 74 69 20 c3 bc 6e 6e 65 70 22 7d 2c 22 33 30 22 3a mzeti.ünnep"},"30":
2019-01-09 23:08:38.366 (ical) 7b 22 64 61 74 65 22 3a 22 32 30 31 39 2d 30 34 2d 31 39 22 {"date":"2019-04-19"
2019-01-09 23:08:38.366 (ical) 2c 22 6e 61 6d 65 22 3a 22 4e 61 67 79 70 c3 a9 6e 74 65 6b ,"name":"Nagypéntek
2019-01-09 23:08:38.366 (ical) 22 7d 2c 22 34 30 22 3a 7b 22 64 61 74 65 22 3a 22 32 30 31 "},"40":{"date":"201
2019-01-09 23:08:38.366 (ical) 39 2d 30 34 2d 32 31 22 2c 22 6e 61 6d 65 22 3a 22 48 c3 ba 9-04-21","name":"Hú
2019-01-09 23:08:38.366 (ical) 73 76 c3 a9 74 22 7d 2c 22 35 30 22 3a 7b 22 64 61 74 65 22 svét"},"50":{"date"
2019-01-09 23:08:38.366 (ical) 3a 22 32 30 31 39 2d 30 34 2d 32 32 22 2c 22 6e 61 6d 65 22 :"2019-04-22","name"
2019-01-09 23:08:38.366 (ical) 3a 22 48 c3 ba 73 76 c3 a9 74 20 48 c3 a9 74 66 c5 91 22 7d :"Húsvét.Hétfő"}
2019-01-09 23:08:38.366 (ical) 2c 22 36 30 22 3a 7b 22 64 61 74 65 22 3a 22 32 30 31 39 2d ,"60":{"date":"2019-
2019-01-09 23:08:38.366 (ical) 30 35 2d 30 31 22 2c 22 6e 61 6d 65 22 3a 22 41 20 4d 75 6e 05-01","name":"A.Mun
2019-01-09 23:08:38.366 (ical) 6b 61 20 c3 bc 6e 6e 65 70 65 22 7d 2c 22 37 30 22 3a 7b 22 ka.ünnepe"},"70":{"
2019-01-09 23:08:38.366 (ical) 64 61 74 65 22 3a 22 32 30 31 39 2d 30 36 2d 30 39 22 2c 22 date":"2019-06-09","
2019-01-09 23:08:38.366 (ical) 6e 61 6d 65 22 3a 22 50 c3 bc 6e 6b c3 b6 73 64 22 7d 2c 22 name":"Pünkösd"},"
2019-01-09 23:08:38.366 (ical) 38 30 22 3a 7b 22 64 61 74 65 22 3a 22 32 30 31 39 2d 30 36 80":{"date":"2019-06
2019-01-09 23:08:38.366 (ical) 2d 31 30 22 2c 22 6e 61 6d 65 22 3a 22 50 c3 bc 6e 6b c3 b6 -10","name":"Pünkö
2019-01-09 23:08:38.366 (ical) 73 64 68 c3 a9 74 66 c5 91 22 7d 2c 22 39 30 22 3a 7b 22 64 sdhétfő"},"90":{"d
2019-01-09 23:08:38.366 (ical) 61 74 65 22 3a 22 32 30 31 39 2d 30 38 2d 32 30 22 2c 22 6e ate":"2019-08-20","n
2019-01-09 23:08:38.366 (ical) 61 6d 65 22 3a 22 41 7a 20 c3 a1 6c 6c 61 6d 61 6c 61 70 c3 ame":"Az.államalap�
2019-01-09 23:08:38.382 (ical) ad 74 c3 a1 73 20 c3 bc 6e 6e 65 70 65 22 7d 2c 22 31 30 30 �tás.ünnepe"},"100
2019-01-09 23:08:38.382 (ical) 22 3a 7b 22 64 61 74 65 22 3a 22 32 30 31 39 2d 31 30 2d 32 ":{"date":"2019-10-2
2019-01-09 23:08:38.382 (ical) 33 22 2c 22 6e 61 6d 65 22 3a 22 4e 65 6d 7a 65 74 69 20 c3 3","name":"Nemzeti.�
2019-01-09 23:08:38.382 (ical) bc 6e 6e 65 70 22 7d 2c 22 31 31 30 22 3a 7b 22 64 61 74 65 �nnep"},"110":{"date
2019-01-09 23:08:38.382 (ical) 22 3a 22 32 30 31 39 2d 31 31 2d 30 31 22 2c 22 6e 61 6d 65 ":"2019-11-01","name
2019-01-09 23:08:38.382 (ical) 22 3a 22 4d 69 6e 64 65 6e 73 7a 65 6e 74 65 6b 22 7d 2c 22 ":"Mindenszentek"},"
2019-01-09 23:08:38.382 (ical) 31 32 30 22 3a 7b 22 64 61 74 65 22 3a 22 32 30 31 39 2d 31 120":{"date":"2019-1
2019-01-09 23:08:38.382 (ical) 32 2d 32 35 22 2c 22 6e 61 6d 65 22 3a 22 4b 61 72 c3 a1 63 2-25","name":"Karác
2019-01-09 23:08:38.382 (ical) 73 6f 6e 79 22 7d 2c 22 31 33 30 22 3a 7b 22 64 61 74 65 22 sony"},"130":{"date"
2019-01-09 23:08:38.382 (ical) 3a 22 32 30 31 39 2d 31 32 2d 32 36 22 2c 22 6e 61 6d 65 22 :"2019-12-26","name"
2019-01-09 23:08:38.382 (ical) 3a 22 4b 61 72 c3 a1 63 73 6f 6e 79 20 6d c3 a1 73 6e 61 70 :"Karácsony.másnap
2019-01-09 23:08:38.382 (ical) 6a 61 22 7d 7d 7d .. .. .. .. .. .. .. .. .. .. .. .. .. .. ja"}}}
2019-01-09 23:08:38.382 (ical) Pushing 'onMessageCallback' on to queue
2019-01-09 23:08:38.382 (ical) Processing 'onDisconnectCallback' message
2019-01-09 23:08:38.382 (ical) Calling message handler 'onDisconnect'.
2019-01-09 23:08:38.382 (ical) Az ondisconnect felhívta a kapcsolatot '127.0.0.1:54850'
2019-01-09 23:08:38.382 (ical) Szerver kapcsolatok:
2019-01-09 23:08:38.382 (ical) --> 127.0.0.1:54851'.
2019-01-09 23:08:38.382 (ical) --> 127.0.0.1:54850'.
2019-01-09 23:08:38.382 (ical) Deallocating connection object '127.0.0.1:54850' (127.0.0.1:54850).
2019-01-09 23:08:38.382 (ical) Processing 'onMessageCallback' message
2019-01-09 23:08:38.382 (ical) Calling message handler 'onMessage'.
2019-01-09 23:08:38.382 (ical) Onmessage kapcsolatra szólított: 127.0.0.1: 54851
2019-01-09 23:08:38.382 (ical) POST request received.
2019-01-09 23:08:38.382 (ical) Pushing 'WriteDirective' on to queue
2019-01-09 23:08:38.382 (ical) data:b'{"holidays":{"10":{"date":"2019-01-01","name":"\xc3\x9aj\xc3\xa9v"},"20":{"date":"2019-03-15","name":"Nemzeti \xc3\xbcnnep"},"30":{"date":"2019-04-19","name":"Nagyp\xc3\xa9ntek"},"40":{"date":"2019-04-21","name":"H\xc3\xbasv\xc3\xa9t"},"50":{"date":"2019-04-22","name":"H\xc3\xbasv\xc3\xa9t H\xc3\xa9tf\xc5\x91"},"60":{"date":"2019-05-01","name":"A Munka \xc3\xbcnnepe"},"70":{"date":"2019-06-09","name":"P\xc3\xbcnk\xc3\xb6sd"},"80":{"date":"2019-06-10","name":"P\xc3\xbcnk\xc3\xb6sdh\xc3\xa9tf\xc5\x91"},"90":{"date":"2019-08-20","name":"Az \xc3\xa1llamalap\xc3\xadt\xc3\xa1s \xc3\xbcnnepe"},"100":{"date":"2019-10-23","name":"Nemzeti \xc3\xbcnnep"},"110":{"date":"2019-11-01","name":"Mindenszentek"},"120":{"date":"2019-12-25","name":"Kar\xc3\xa1csony"},"130":{"date":"2019-12-26","name":"Kar\xc3\xa1csony m\xc3\xa1snapja"}}}'
2019-01-09 23:08:38.382 (ical) {"holidays":{"10":{"date":"2019-01-01","name":"Újév"},"20":{"date":"2019-03-15","name":"Nemzeti ünnep"},"30":{"date":"2019-04-19","name":"Nagypéntek"},"40":{"date":"2019-04-21","name":"Húsvét"},"50":{"date":"2019-04-22","name":"Húsvét Hétfő"},"60":{"date":"2019-05-01","name":"A Munka ünnepe"},"70":{"date":"2019-06-09","name":"Pünkösd"},"80":{"date":"2019-06-10","name":"Pünkösdhétfő"},"90":{"date":"2019-08-20","name":"Az államalapítás ünnepe"},"100":{"date":"2019-10-23","name":"Nemzeti ünnep"},"110":{"date":"2019-11-01","name":"Mindenszentek"},"120":{"date":"2019-12-25","name":"Karácsony"},"130":{"date":"2019-12-26","name":"Karácsony másnapja"}}}
2019-01-09 23:08:38.382 (ical) Feldolgozási adatok: {"holidays":{"10":{"date":"2019-01-01","name":"Újév"},"20":{"date":"2019-03-15","name":"Nemzeti ünnep"},"30":{"date":"2019-04-19","name":"Nagypéntek"},"40":{"date":"2019-04-21","name":"Húsvét"},"50":{"date":"2019-04-22","name":"Húsvét Hétfő"},"60":{"date":"2019-05-01","name":"A Munka ünnepe"},"70":{"date":"2019-06-09","name":"Pünkösd"},"80":{"date":"2019-06-10","name":"Pünkösdhétfő"},"90":{"date":"2019-08-20","name":"Az államalapítás ünnepe"},"100":{"date":"2019-10-23","name":"Nemzeti ünnep"},"110":{"date":"2019-11-01","name":"Mindenszentek"},"120":{"date":"2019-12-25","name":"Karácsony"},"130":{"date":"2019-12-26","name":"Karácsony másnapja"}}}
2019-01-09 23:08:38.382 (ical - Ünnepek) Updating device from 0:'Off' to have values 0:'Off'.
2019-01-09 23:08:38.445 (ical) Domoticz kérése: idx=163&type=command&param=cleartimers kódolással: utf-8
2019-01-09 23:08:38.445 (ical) Param :{'randomness': 'false', 'hour': '00', 'idx': '163', 'min': '00', 'timertype': '5', 'days': '0', 'type': 'command', 'level': '20', 'active': 'true', 'param': 'addtimer', 'date': '2019-03-15', 'command': '0'}
2019-01-09 23:08:38.476 (ical) Domoticz kérése: randomness=false&hour=00&idx=163&min=00&timertype=5&days=0&type=command&level=20&active=true&param=addtimer&date=2019-03-15&command=0 kódolással: utf-8
2019-01-09 23:08:38.476 (ical) Param :{'randomness': 'false', 'hour': '00', 'idx': '163', 'min': '00', 'timertype': '5', 'days': '0', 'type': 'command', 'level': '30', 'active': 'true', 'param': 'addtimer', 'date': '2019-04-19', 'command': '0'}
2019-01-09 23:08:38.491 (ical) Domoticz kérése: randomness=false&hour=00&idx=163&min=00&timertype=5&days=0&type=command&level=30&active=true&param=addtimer&date=2019-04-19&command=0 kódolással: utf-8
2019-01-09 23:08:38.491 (ical) Param :{'randomness': 'false', 'hour': '00', 'idx': '163', 'min': '00', 'timertype': '5', 'days': '0', 'type': 'command', 'level': '40', 'active': 'true', 'param': 'addtimer', 'date': '2019-04-21', 'command': '0'}
2019-01-09 23:08:38.523 (ical) Domoticz kérése: randomness=false&hour=00&idx=163&min=00&timertype=5&days=0&type=command&level=40&active=true&param=addtimer&date=2019-04-21&command=0 kódolással: utf-8
2019-01-09 23:08:38.523 (ical) Param :{'randomness': 'false', 'hour': '00', 'idx': '163', 'min': '00', 'timertype': '5', 'days': '0', 'type': 'command', 'level': '50', 'active': 'true', 'param': 'addtimer', 'date': '2019-04-22', 'command': '0'}
2019-01-09 23:08:38.538 (ical) Domoticz kérése: randomness=false&hour=00&idx=163&min=00&timertype=5&days=0&type=command&level=50&active=true&param=addtimer&date=2019-04-22&command=0 kódolással: utf-8
2019-01-09 23:08:38.538 (ical) Param :{'randomness': 'false', 'hour': '00', 'idx': '163', 'min': '00', 'timertype': '5', 'days': '0', 'type': 'command', 'level': '60', 'active': 'true', 'param': 'addtimer', 'date': '2019-05-01', 'command': '0'}
2019-01-09 23:08:38.570 (ical) Domoticz kérése: randomness=false&hour=00&idx=163&min=00&timertype=5&days=0&type=command&level=60&active=true&param=addtimer&date=2019-05-01&command=0 kódolással: utf-8
2019-01-09 23:08:38.570 (ical) Param :{'randomness': 'false', 'hour': '00', 'idx': '163', 'min': '00', 'timertype': '5', 'days': '0', 'type': 'command', 'level': '70', 'active': 'true', 'param': 'addtimer', 'date': '2019-06-09', 'command': '0'}
2019-01-09 23:08:38.585 (ical) Domoticz kérése: randomness=false&hour=00&idx=163&min=00&timertype=5&days=0&type=command&level=70&active=true&param=addtimer&date=2019-06-09&command=0 kódolással: utf-8
2019-01-09 23:08:38.585 (ical) Param :{'randomness': 'false', 'hour': '00', 'idx': '163', 'min': '00', 'timertype': '5', 'days': '0', 'type': 'command', 'level': '80', 'active': 'true', 'param': 'addtimer', 'date': '2019-06-10', 'command': '0'}
2019-01-09 23:08:38.601 (ical) Domoticz kérése: randomness=false&hour=00&idx=163&min=00&timertype=5&days=0&type=command&level=80&active=true&param=addtimer&date=2019-06-10&command=0 kódolással: utf-8
2019-01-09 23:08:38.601 (ical) Param :{'randomness': 'false', 'hour': '00', 'idx': '163', 'min': '00', 'timertype': '5', 'days': '0', 'type': 'command', 'level': '90', 'active': 'true', 'param': 'addtimer', 'date': '2019-08-20', 'command': '0'}
2019-01-09 23:08:38.632 (ical) Domoticz kérése: randomness=false&hour=00&idx=163&min=00&timertype=5&days=0&type=command&level=90&active=true&param=addtimer&date=2019-08-20&command=0 kódolással: utf-8
2019-01-09 23:08:38.632 (ical) Param :{'randomness': 'false', 'hour': '00', 'idx': '163', 'min': '00', 'timertype': '5', 'days': '0', 'type': 'command', 'level': '100', 'active': 'true', 'param': 'addtimer', 'date': '2019-10-23', 'command': '0'}
2019-01-09 23:08:38.648 (ical) Domoticz kérése: randomness=false&hour=00&idx=163&min=00&timertype=5&days=0&type=command&level=100&active=true&param=addtimer&date=2019-10-23&command=0 kódolással: utf-8
2019-01-09 23:08:38.648 (ical) Param :{'randomness': 'false', 'hour': '00', 'idx': '163', 'min': '00', 'timertype': '5', 'days': '0', 'type': 'command', 'level': '110', 'active': 'true', 'param': 'addtimer', 'date': '2019-11-01', 'command': '0'}
2019-01-09 23:08:38.679 (ical) Domoticz kérése: randomness=false&hour=00&idx=163&min=00&timertype=5&days=0&type=command&level=110&active=true&param=addtimer&date=2019-11-01&command=0 kódolással: utf-8
2019-01-09 23:08:38.679 (ical) Param :{'randomness': 'false', 'hour': '00', 'idx': '163', 'min': '00', 'timertype': '5', 'days': '0', 'type': 'command', 'level': '120', 'active': 'true', 'param': 'addtimer', 'date': '2019-12-25', 'command': '0'}
2019-01-09 23:08:39.788 EventSystem: Event triggered: holiday_2
2019-01-09 23:08:39.835 (Holiday) Light/Switch (Holiday)
2019-01-09 23:08:40.570 EventSystem: Event triggered: holiday_2
2019-01-09 23:08:40.616 (Holiday) Light/Switch (Holiday)
2019-01-09 23:08:58.146 (Broadlink IR1) Pushing 'onHeartbeatCallback' on to queue
2019-01-09 23:08:58.162 (Broadlink IR1) Processing 'onHeartbeatCallback' message
2019-01-09 23:08:58.162 (Broadlink IR1) Calling message handler 'onHeartbeat'.
2019-01-09 23:08:59.819 (ical) Pushing 'onHeartbeatCallback' on to queue
2019-01-09 23:08:59.850 (ical) Processing 'onHeartbeatCallback' message
2019-01-09 23:08:59.850 (ical) Calling message handler 'onHeartbeat'.
2019-01-09 23:08:59.850 (ical - Ical állapota) Updating device from 1:'**main-> msg:Vége valaminek : main procedure' to have values 1:'Végrehajtva, szinkronizálva 60 percenként'.
2019-01-09 23:08:59.881 (ical) Frissítünk 1: 'Végrehajtva, szinkronizálva 60 percenként' (ical - Ical állapota)
2019-01-09 23:09:01.162 EventSystem: Event triggered: estifény_1
2019-01-09 23:09:01.459 (Xiaomi Gateway) Color Switch (Xiaomi RGB Gateway)
2019-01-09 23:09:28.710 (Broadlink IR1) Pushing 'onHeartbeatCallback' on to queue
2019-01-09 23:09:28.773 (Broadlink IR1) Processing 'onHeartbeatCallback' message
2019-01-09 23:09:28.773 (Broadlink IR1) Calling message handler 'onHeartbeat'.
Last edited by moo2089 on Thursday 10 January 2019 0:05, edited 1 time in total.
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 »

moo2089 wrote: Wednesday 09 January 2019 23:11 here it is:
OK... hummm.. do not have seen any error here.
Subprocess has been able to run.. maybe some ressource problem that have been cleared now ?? !!!
moo2089
Posts: 32
Joined: Sunday 25 March 2018 23:30
Target OS: Windows
Domoticz version: 11804
Location: Budapest/Hungary
Contact:

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

Post by moo2089 »

dont know, going to monitor issue
moo2089
Posts: 32
Joined: Sunday 25 March 2018 23:30
Target OS: Windows
Domoticz version: 11804
Location: Budapest/Hungary
Contact:

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

Post by moo2089 »

you are right, problem was comodo internet security with lot of 100% cpu usage, with windows firewall no error at all, now i am testing comodo firewall only.
aim is to get secure solution to keep domoticz server in safe, i am not really trusting in windows built-in firewall even if it was combined with firewall control,
lets see the result
Martial
Posts: 31
Joined: Saturday 11 March 2017 18:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Martial »

Hello all,
I am trying to instal this plugin on my domoticz (raspberry PI with domoticz V4.10355)
I have my own calendar server (radicale) on the same raspberry.
And I have 2 problem:
1) __Domoticz not return OK for create uservariable__
2)Error : <class 'requests.exceptions.SSLError'> ("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",)
(I use a auto-certified certificate)

See my log
Have you an idea ?
Thank
Spoiler: show
-----------------Main---------------------------
__Request Domoticz to : param=getuservariables&type=command used encoding is : utf-8__
__No uservariable : 19|iCal|cmd__
__Request Domoticz to : vvalue=60&param=saveuservariable&type=command&vtype=2&vname=19%7CiCal%7Csync used encoding is : utf-8__
__Domoticz not return OK for create uservariable__
Error : None None None
__Request Domoticz to : vvalue=switch%2Cpush%2Clevel%2Crgb&param=saveuservariable&type=command&vtype=2&vname=19%7CiCal%7Ccmd used encoding is : utf-8__
__Domoticz not return OK for create uservariable__
Error : None None None
CET CET
__Request Domoticz to : vvalue=CET&param=saveuservariable&type=command&vtype=2&vname=19%7CiCal%7Ctz used encoding is : utf-8__
__Domoticz not return OK for create uservariable__
Error : None None None
Request from openstreetmap to :format=json&lon=6.768370&lat=43.425190 with encoding : utf-8
__Request Domoticz to : vvalue=83700&param=saveuservariable&type=command&vtype=2&vname=19%7CiCal%7Cpostalcode used encoding is : utf-8__
__Domoticz not return OK for create uservariable__
Error : None None None
__Request Domoticz to : vvalue=%2Aunknown%2A&param=saveuservariable&type=command&vtype=2&vname=19%7CiCal%7Cvillage used encoding is : utf-8__
__Domoticz not return OK for create uservariable__
Error : None None None
__Request Domoticz to : vvalue=fr&param=saveuservariable&type=command&vtype=2&vname=19%7CiCal%7Ccountry used encoding is : utf-8__
__Domoticz not return OK for create uservariable__
Error : None None None
Request Domoticz to : param=getuservariables&type=command used encoding is : utf-8
No uservariable : 19|iCal|cmd
Error to load language file
Error : <class 'IndexError'> string index out of range <traceback object at 0x75c4adc8>
we do not work on windows
Request Domoticz to : filter=device&type=schedules used encoding is : utf-8
Request Domoticz to : filter=all&used=true&type=devices&order=Name used encoding is : utf-8
Device name for Atwork : calendrier - at work
/home/pi/domoticz/plugins/iCal/19iCal.ics
web process to generate iCal.ics file
Error to save iCal.ics
Error : <class 'requests.exceptions.SSLError'> ("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",) <traceback object at 0x75a76cb0>
No iCal file
-----------------Holidays-----------------------
Number of days generated : 11
we send holidays data
-----------------End Holidays-------------------
-----------------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 »

Martial wrote: Saturday 02 March 2019 12:06 Hello all,
I am trying to instal this plugin on my domoticz (raspberry PI with domoticz V4.10355)
I have my own calendar server (radicale) on the same raspberry.
And I have 2 problem:
1) __Domoticz not return OK for create uservariable__

2)Error : <class 'requests.exceptions.SSLError'> ("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",)
(I use a auto-certified certificate)
hi,
1) Plugin use HTTP (not HTTPS) connection to Domoticz and without authentication.
take a look on your settings and verify this parameter (you need to adapt it to your need):
Capture.JPG
Capture.JPG (23.1 KiB) Viewed 2001 times
2) command you have put do not allow to download the ics file.
I suggest that you try your command via curl if network related or shell .
Once you are able to get your ics file, just put this instruction to the plugin.
Martial
Posts: 31
Joined: Saturday 11 March 2017 18:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Martial »

Hello zak45 and thank you to look at my problems,
1) I don't use authentification nor https for local connection to domoticz, https is only for my calendar and I have exactly the same configuration as you including the language
2) With curl, i need to use -k (--insecure) option because self signed certificate. Can I do that with your plugin ?

Thank
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 »

Martial wrote: Saturday 02 March 2019 13:32 Hello zak45 and thank you to look at my problems,
1) I don't use authentification nor https for local connection to domoticz, https is only for my calendar and I have exactly the same configuration as you including the language
2) With curl, i need to use -k (--insecure) option because self signed certificate. Can I do that with your plugin ?

Thank
ok
1: I think that i see what's wrong.... some changes has been done into last Domoticz version. can you confirm the one you use ?
2:the plugin can do what you need.
if http/https is entered then plugin will execute network connection
else plugin will execute shell command.
What you can do is to create a small shell script to create the ics file by yourself.
in this case, just put full path to it
e.g. /somehome/someusr/somedomoticz/plugins/iCal/mycmd.sh &
Martial
Posts: 31
Joined: Saturday 11 March 2017 18:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Martial »

1: I think that i see what's wrong.... some changes has been done into last Domoticz version. can you confirm the one you use ?
My current version is the latest stable: 4.10355
2:the plugin can do what you need.
if http/https is entered then plugin will execute network connection
else plugin will execute shell command.
What you can do is to create a small shell script to create the ics file by yourself.
in this case, just put full path to it
e.g. /somehome/someusr/somedomoticz/plugins/iCal/mycmd.sh &
OK, but how i give the ics file to the plugin?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest