Python Plugin : iCal Multi Purpose Python Plugin for Domoticz

Python and python framework

Moderator: leecollings

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 »

Right .... translation problem with some linguistic speciality !!!
Plugin do not manage that well :(
But happy to see that's now it's woking.
riko
Posts: 90
Joined: Saturday 22 August 2020 13:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by riko »

I used this great plugin for a while, but I managed to break it and whatever I try (including reinstallation) I cannot get it working again.

The problem started when I wanted to change the plugin settings, but pressed 'Add' instead of 'Update' after I changed the settings in Hardware. From that moment there were 2 plugins installed. The At Work device that is created does not update anymore and also the execution of commands doesn't work. I think the Season was updated, but as this only happens every quarter I'm not entirely sure.

I tried to delete the new one (which leads to a crash of domoticz), but after reboot it was removed. Also tried to remove the plugin by deleting the devices and then delete the hardware. I've even tried to delete all files in the domoticz/plugins/iCal folder and replaced it with a fresh version of the plugin.

Whatever I try I cannot get it working. I checked the iCal.ics file in the iCal folder. This is the correct one and recently updated so the import seems to be working. The log is loaded with messages about a 'lock', but doesn't give any errors (see screenshot below).

Does anybody know what the problem could be? Or are there suggestions to troubleshoot/find the root cause?
Schermafbeelding 2022-11-09 205642.png
Schermafbeelding 2022-11-09 205642.png (135.8 KiB) Viewed 1229 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 »

Hi,
maybe some OS update, python version update ???

check this : viewtopic.php?p=287323&hilit=releasing+lock#p287323
riko
Posts: 90
Joined: Saturday 22 August 2020 13:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by riko »

zak45 wrote: Thursday 10 November 2022 13:47 Hi,
maybe some OS update, python version update ???

check this : viewtopic.php?p=287323&hilit=releasing+lock#p287323
Thanks for your suggestion. I've updated Domoticz, Dabian and Python all to the latest stable version. But it doesn't work yet. I'm not sure whether polling requests are related to my issue of devices that are not updating. As I read other people are seeing these logs while the 'at work' device is working.
d3smo
Posts: 19
Joined: Friday 29 May 2015 14:55
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by d3smo »

Hi,

Does this plugin can allow me to read an event in a specific Google Calendar and set a Variable in Domoticz to a dedicated value depending if there is an event on this day on the calendar or not ?
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 »

d3smo wrote: Thursday 24 November 2022 16:57 Hi,

Does this plugin can allow me to read an event in a specific Google Calendar and set a Variable in Domoticz to a dedicated value depending if there is an event on this day on the calendar or not ?
You will have a Domoticz device that will be set to On/Off, depend of the appointement. Can be a full day or even an half hour.
riko
Posts: 90
Joined: Saturday 22 August 2020 13:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by riko »

I still cannot wrap my mind around the problem that my devices are not updated by the plugin. I've tried multiple things:
  • Reinstall the plugin/hardware (by removing the devices)
  • Checking whether the device numbers match with the devices used by the plugin
  • Switch the Default to AtWork: to TRUE and FALSE
  • Check whether the 20iCal.ics file is properly downloaded: yes I've downloaded it from the RPI and checked it manually, the holidays are included
  • Adding #wrk# items in several blocks in the agenda
I now turned on the detailed log and the following is printed. Can somebody help me a bit into troubleshooting to find where the problem comes from?

Code: Select all

2022-11-29 09:09:31.471 ZW agenda: Calling message handler 'onCommand' on 'module' type object.
2022-11-29 09:09:31.471 ZW agenda: __onCommand called for Unit 4 : Parameter Off , Level: 0__
2022-11-29 09:09:31.472 (ZW agenda - Ical status) Updating device from 1:'__executing, sync every 60 minutes __' to have values 0:'Pause'.
2022-11-29 09:09:31.498 ZW agenda: __we update 0:'Pause' (ZW agenda - Ical status)__
2022-11-29 09:09:31.498 ZW agenda: Acquiring GIL for 'onCommandCallback'
2022-11-29 09:09:31.422 Status: User: Admin (IP: 192.168.1.230) initiated a switch command (369/ZW agenda - Ical status/Off)
2022-11-29 09:09:31.652 Status: dzVents: Debug: Processing device-adapter for ZW agenda - Ical status: Switch device adapter
2022-11-29 09:09:31.653 Status: dzVents: Debug: - Device: ZW agenda - Ical status
2022-11-29 09:09:32.218 ZW agenda: Pushing 'onCommandCallback' on to queue
2022-11-29 09:09:32.250 ZW agenda: Processing 'onCommandCallback' message
2022-11-29 09:09:32.250 ZW agenda: Acquiring GIL for 'onCommandCallback'
2022-11-29 09:09:32.250 ZW agenda: Calling message handler 'onCommand' on 'module' type object.
2022-11-29 09:09:32.250 ZW agenda: __onCommand called for Unit 4 : Parameter On , Level: 0__
2022-11-29 09:09:32.250 (ZW agenda - Ical status) Updating device from 0:'Pause' to have values 1:'Resume'.
2022-11-29 09:09:32.263 ZW agenda: __we update 1:'Resume' (ZW agenda - Ical status)__
2022-11-29 09:09:32.263 ZW agenda: __we clean related files in plugin folder__
2022-11-29 09:09:32.264 ZW agenda: __we have deleted this file: /home/pi/domoticz/plugins/iCal/20iCal.ics__
2022-11-29 09:09:32.264 ZW agenda: __we have deleted this file: /home/pi/domoticz/plugins/iCal/20output.txt__
2022-11-29 09:09:32.264 ZW agenda: __we have deleted this file: /home/pi/domoticz/plugins/iCal/20output.err__
2022-11-29 09:09:32.264 ZW agenda: __command to execute : "/home/pi/domoticz/plugins/iCal/iCal.sh" "/home/pi/domoticz/plugins/iCal/iCal.py" "9003,Netherlands,,,20,https://calendar.google.com/calendar/ical/XXXX/basic.ics,/home/pi/domoticz/plugins/iCal/,Yes,888,366,367,368,369,0,3,192.168.1.100,8080,xxx" no__
2022-11-29 09:09:32.288 ZW agenda: Acquiring GIL for 'onCommandCallback'
2022-11-29 09:09:32.217 Status: User: Admin (IP: 192.168.1.230) initiated a switch command (369/ZW agenda - Ical status/On)
2022-11-29 09:09:32.427 Status: dzVents: Debug: Processing device-adapter for ZW agenda - Ical status: Switch device adapter
2022-11-29 09:09:32.427 Status: dzVents: Debug: - Device: ZW agenda - Ical status
2022-11-29 09:09:33.286 ZW agenda: Acquiring GIL for 'CPluginTransportTCP::handleAsyncAccept'
2022-11-29 09:09:33.286 ZW agenda: Pushing 'ProtocolDirective' on to queue
2022-11-29 09:09:33.286 ZW agenda: Pushing 'onConnectCallback' on to queue
2022-11-29 09:09:33.286 ZW agenda: Acquiring GIL for 'CPluginTransportTCP::handleRead'
2022-11-29 09:09:33.286 ZW agenda: Pushing 'ReadEvent' on to queue
2022-11-29 09:09:33.290 ZW agenda: Processing 'ProtocolDirective' message
2022-11-29 09:09:33.290 ZW agenda: Acquiring GIL for 'ProtocolDirective'
2022-11-29 09:09:33.290 ZW agenda: Protocol set to: 'HTTP'.
2022-11-29 09:09:33.290 ZW agenda: Acquiring GIL for 'ProtocolDirective'
2022-11-29 09:09:33.290 ZW agenda: Processing 'onConnectCallback' message
2022-11-29 09:09:33.290 ZW agenda: Acquiring GIL for 'onConnectCallback'
2022-11-29 09:09:33.290 ZW agenda: Calling message handler 'onConnect' on 'module' type object.
2022-11-29 09:09:33.290 ZW agenda: __Connected successfully to 192.168.1.100:40572__
2022-11-29 09:09:33.290 ZW agenda: Deallocating connection object '192.168.1.100:40432' (192.168.1.100:40432).
2022-11-29 09:09:33.290 ZW agenda: Acquiring GIL for 'onConnectCallback'
2022-11-29 09:09:33.290 ZW agenda: Processing 'ReadEvent' message
2022-11-29 09:09:33.290 ZW agenda: Acquiring GIL for 'ReadEvent'
2022-11-29 09:09:33.290 ZW agenda: Received 333 bytes of data
2022-11-29 09:09:33.290 ZW agenda: 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
2022-11-29 09:09:33.291 ZW agenda: 74 3a 20 31 39 32 2e 31 36 38 2e 31 2e 31 30 30 3a 39 30 30 t:.192.168.1.100:900
2022-11-29 09:09:33.291 ZW agenda: 33 0d 0a 55 73 65 72 2d 41 67 65 6e 74 3a 20 70 79 74 68 6f 3..User-Agent:.pytho
2022-11-29 09:09:33.291 ZW agenda: 6e 2d 72 65 71 75 65 73 74 73 2f 32 2e 32 31 2e 30 0d 0a 41 n-requests/2.21.0..A
2022-11-29 09:09:33.291 ZW agenda: 63 63 65 70 74 2d 45 6e 63 6f 64 69 6e 67 3a 20 67 7a 69 70 ccept-Encoding:.gzip
2022-11-29 09:09:33.291 ZW agenda: 2c 20 64 65 66 6c 61 74 65 0d 0a 41 63 63 65 70 74 3a 20 2a ,.deflate..Accept:.*
2022-11-29 09:09:33.291 ZW agenda: 2f 2a 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 6b 65 65 70 /*..Connection:.keep
2022-11-29 09:09:33.291 ZW agenda: 2d 61 6c 69 76 65 0d 0a 43 6f 6e 74 65 6e 74 2d 74 79 70 65 -alive..Content-type
2022-11-29 09:09:33.291 ZW agenda: 3a 20 74 65 78 74 2f 70 6c 61 69 6e 3b 20 63 68 61 72 73 65 :.text/plain;.charse
2022-11-29 09:09:33.291 ZW agenda: 74 3d 75 74 66 2d 38 0d 0a 43 6f 6e 74 65 6e 74 2d 4c 65 6e t=utf-8..Content-Len
2022-11-29 09:09:33.291 ZW agenda: 67 74 68 3a 20 31 32 31 0d 0a 0d 0a 7b 22 73 74 61 74 75 73 gth:.121....{"status
2022-11-29 09:09:33.291 ZW agenda: 22 3a 7b 22 73 74 65 70 22 3a 22 64 69 66 66 43 61 6c 22 2c ":{"step":"diffCal",
2022-11-29 09:09:33.291 ZW agenda: 22 6d 73 67 22 3a 22 5f 5f 45 72 72 6f 72 20 69 6e 20 64 69 "msg":"__Error.in.di
2022-11-29 09:09:33.291 ZW agenda: 66 66 20 69 43 61 6c 2c 20 66 69 72 73 74 20 74 69 6d 65 20 ff.iCal,.first.time.
2022-11-29 09:09:33.291 ZW agenda: 65 78 65 63 75 74 69 6f 6e 20 74 68 69 73 20 63 61 6e 20 62 execution.this.can.b
2022-11-29 09:09:33.291 ZW agenda: 65 20 6e 6f 72 6d 61 6c 2c 20 77 65 20 63 6f 6e 74 69 6e 75 e.normal,.we.continu
2022-11-29 09:09:33.291 ZW agenda: 65 20 61 6e 79 77 61 79 5f 5f 22 7d 7d .. .. .. .. .. .. .. e.anyway__"}}
2022-11-29 09:09:33.291 ZW agenda: Pushing 'onMessageCallback' on to queue
2022-11-29 09:09:33.291 ZW agenda: Acquiring GIL for 'ReadEvent'
2022-11-29 09:09:33.291 ZW agenda: Processing 'onMessageCallback' message
2022-11-29 09:09:33.291 ZW agenda: Acquiring GIL for 'onMessageCallback'
2022-11-29 09:09:33.291 ZW agenda: Calling message handler 'onMessage' on 'module' type object.
2022-11-29 09:09:33.291 ZW agenda: __onMessage called for connection: 192.168.1.100:40572__
2022-11-29 09:09:33.291 ZW agenda: POST request received.
2022-11-29 09:09:33.291 ZW agenda: Pushing 'WriteDirective' on to queue
2022-11-29 09:09:33.291 ZW agenda: data:b'{"status":{"step":"diffCal","msg":"__Error in diff iCal, first time execution this can be normal, we continue anyway__"}}'
2022-11-29 09:09:33.291 ZW agenda: {"status":{"step":"diffCal","msg":"__Error in diff iCal, first time execution this can be normal, we continue anyway__"}}
2022-11-29 09:09:33.291 ZW agenda: __processing data : {"status":{"step":"diffCal","msg":"__Error in diff iCal, first time execution this can be normal, we continue anyway__"}}__
2022-11-29 09:09:33.291 (ZW agenda - 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__'.
2022-11-29 09:09:33.304 ZW agenda: __we update 1:'**diffCal-> msg:__Error in diff iCal, first time execution this can be normal, we continue anyway__' (ZW agenda - Ical status)__
2022-11-29 09:09:33.304 ZW agenda: __data process OK__
2022-11-29 09:09:33.304 ZW agenda: Acquiring GIL for 'onMessageCallback'
2022-11-29 09:09:33.304 ZW agenda: Processing 'WriteDirective' message
2022-11-29 09:09:33.304 ZW agenda: Acquiring GIL for 'WriteDirective'
2022-11-29 09:09:33.304 ZW agenda: Sending 249 bytes of data
2022-11-29 09:09:33.304 ZW agenda: 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
2022-11-29 09:09:33.304 ZW agenda: 65 3a 20 54 75 65 2c 20 32 39 20 4e 6f 76 20 32 30 32 32 20 e:.Tue,.29.Nov.2022.
2022-11-29 09:09:33.304 ZW agenda: 30 38 3a 30 39 3a 33 33 20 47 4d 54 0d 0a 53 65 72 76 65 72 08:09:33.GMT..Server
2022-11-29 09:09:33.304 ZW agenda: 3a 20 44 6f 6d 6f 74 69 63 7a 2f 31 2e 30 0d 0a 43 6f 6e 6e :.Domoticz/1.0..Conn
2022-11-29 09:09:33.304 ZW agenda: 65 63 74 69 6f 6e 3a 20 6b 65 65 70 2d 61 6c 69 76 65 0d 0a ection:.keep-alive..
2022-11-29 09:09:33.304 ZW agenda: 41 63 63 65 70 74 3a 20 43 6f 6e 74 65 6e 74 2d 54 79 70 65 Accept:.Content-Type
2022-11-29 09:09:33.304 ZW agenda: 3a 20 74 65 78 74 2f 68 74 6d 6c 3b 20 63 68 61 72 73 65 74 :.text/html;.charset
2022-11-29 09:09:33.304 ZW agenda: 3d 55 54 46 2d 38 0d 0a 43 6f 6e 74 65 6e 74 2d 4c 65 6e 67 =UTF-8..Content-Leng
2022-11-29 09:09:33.304 ZW agenda: 74 68 3a 20 37 39 0d 0a 0d 0a 3c 21 44 4f 43 54 59 50 45 20 th:.79....<!DOCTYPE.
2022-11-29 09:09:33.304 ZW agenda: 68 74 6d 6c 3e 3c 68 74 6d 6c 3e 3c 68 65 61 64 3e 3c 2f 68 html><html><head></h
2022-11-29 09:09:33.304 ZW agenda: 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
2022-11-29 09:09:33.304 ZW agenda: 65 73 70 6f 6e 73 65 20 4f 4b 21 3c 2f 68 33 3e 3c 62 6f 64 esponse.OK!</h3><bod
2022-11-29 09:09:33.304 ZW agenda: 79 3e 3c 2f 68 74 6d 6c 3e .. .. .. .. .. .. .. .. .. .. .. y></html>
2022-11-29 09:09:33.305 ZW agenda: Acquiring GIL for 'WriteDirective'
2022-11-29 09:09:33.311 ZW agenda: Acquiring GIL for 'CPluginTransportTCP::handleRead'
2022-11-29 09:09:33.311 ZW agenda: Pushing 'DisconnectedEvent' on to queue
2022-11-29 09:09:33.355 ZW agenda: Processing 'DisconnectedEvent' message
2022-11-29 09:09:33.355 ZW agenda: Acquiring GIL for 'DisconnectedEvent'
2022-11-29 09:09:33.355 ZW agenda: Disconnect event received for '192.168.1.100:40572'.
2022-11-29 09:09:33.355 ZW agenda: Pushing 'onDisconnectCallback' on to queue
2022-11-29 09:09:33.355 ZW agenda: Acquiring GIL for 'DisconnectedEvent'
2022-11-29 09:09:33.355 ZW agenda: Processing 'onDisconnectCallback' message
2022-11-29 09:09:33.355 ZW agenda: Acquiring GIL for 'onDisconnectCallback'
2022-11-29 09:09:33.355 ZW agenda: Calling message handler 'onDisconnect' on 'module' type object.
2022-11-29 09:09:33.355 ZW agenda: __onDisconnect called for connection '192.168.1.100:40572'__
2022-11-29 09:09:33.355 ZW agenda: __Server Connections: __
2022-11-29 09:09:33.355 ZW agenda: --> 192.168.1.100:40572'.
2022-11-29 09:09:33.355 ZW agenda: Acquiring GIL for 'onDisconnectCallback'
2022-11-29 09:09:33.408 Status: dzVents: Debug: Processing device-adapter for ZW agenda - Ical status: Switch device adapter
2022-11-29 09:09:33.408 Status: dzVents: Debug: - Device: ZW agenda - Ical status
2022-11-29 09:09:37.012 ZW agenda: Pushing 'onHeartbeatCallback' on to queue
2022-11-29 09:09:37.062 ZW agenda: Processing 'onHeartbeatCallback' message
2022-11-29 09:09:37.062 ZW agenda: Acquiring GIL for 'onHeartbeatCallback'
2022-11-29 09:09:37.062 ZW agenda: Calling message handler 'onHeartbeat' on 'module' type object.
2022-11-29 09:09:37.063 (ZW agenda - 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 __'.
2022-11-29 09:09:37.090 ZW agenda: __we update 1:'__executing, sync every 60 minutes __' (ZW agenda - Ical status)__
2022-11-29 09:09:37.091 ZW agenda: Acquiring GIL for 'onHeartbeatCallback'
2022-11-29 09:09:37.232 Status: dzVents: Debug: Processing device-adapter for ZW agenda - Ical status: Switch device adapter
2022-11-29 09:09:37.233 Status: dzVents: Debug: - Device: ZW agenda - Ical status
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 »

Hummm.. do not see what could be wrong...

Still problems ?
riko
Posts: 90
Joined: Saturday 22 August 2020 13:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by riko »

zak45 wrote: Monday 05 December 2022 22:56 Hummm.. do not see what could be wrong...

Still problems ?
Unfortunately it is still not working. Strange enough I recently received 1 update of the calendar items in the device. Only full-day events are included in the timer and when I ran a test soon after (by adding extra calendar items) they are not updating anymore. Meaning that it is potentially working, but something is blocking the correct updates
cookem
Posts: 4
Joined: Wednesday 12 October 2016 18:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by cookem »

Is this plugin still maintained? I tried setting this up per the instructions and it seems like googletrans is causing an issue. I get no domoticz logs but I do see in the ical status device the following:

**loadTexttotranslate-> msg:__Error to translate : __

and my en_us.lng file that is created is 0 size.

I also see the following in the 27output.txt file in the plugin dir:

Error : <class 'ValueError'> invalid destination language <traceback object at 0x75a57b20>
__Error to translate :
__

I have tried updating googletrans to 3.1.0a0 and removing the file but it keeps creating a 0 size file. It appears the ics file is downloading but it does not process commands nor do I see any logging in domoticz.

Anyone have any ideas on what else to try?
d3smo
Posts: 19
Joined: Friday 29 May 2015 14:55
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by d3smo »

I've try using it several month ago and it is totally broken, intending that Google has change lately the ways for apps to log into Google services. I think we can admit this plugin is dead, and that so sad, i did not find any way to connect Domoticz and Google Calendar to do what i want to do with it
cookem
Posts: 4
Joined: Wednesday 12 October 2016 18:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by cookem »

I worked around the problem by using node-red-contrib-ical-events and just used that set the variable and turn on the switch that used to be used by BakSeeDaa´s Google Calendar for Domoticz which I already had scripting setup to use those event variables. You could really do anything you wanted if you happen to have node-red installed with domoticz.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest