Python Plugin : iCal Multi Purpose Python Plugin for Domoticz

Python and python framework

Moderator: leecollings

peter68
Posts: 7
Joined: Wednesday 20 September 2017 12:04
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Nederland
Contact:

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

Post by peter68 »

send by pm

thanks
infodnv
Posts: 3
Joined: Tuesday 27 October 2020 17:51
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by infodnv »

Since I created 14 devices I get failures that are shown in my logfile, any idea why? It used to work on a few devices.

2020-10-27 22:37:53.423 Error: (Secretariaat ICS) 'onHeartbeat' failed 'IndexError':'string index out of range'.
2020-10-27 22:37:53.423 Error: (Secretariaat ICS) ----> Line 235 in 'C:\Program Files (x86)\Domoticz\plugins\iCal\plugin.py'
2020-10-27 22:37:53.423 Error: (Secretariaat ICS) ----> Line 109 in 'C:\Program Files (x86)\Domoticz\plugins\iCal\plugin.py'
2020-10-27 22:37:53.487 Error: (Scene ICS) 'onHeartbeat' failed 'IndexError':'string index out of range'.
2020-10-27 22:37:53.487 Error: (Scene ICS) ----> Line 235 in 'C:\Program Files (x86)\Domoticz\plugins\iCal\plugin.py'
2020-10-27 22:37:53.487 Error: (Scene ICS) ----> Line 109 in 'C:\Program Files (x86)\Domoticz\plugins\iCal\plugin.py'
2020-10-27 22:37:53.487 Error: (Vestiaire ICS) 'onHeartbeat' failed 'IndexError':'string index out of range'.
2020-10-27 22:37:53.487 Error: (Vestiaire ICS) ----> Line 235 in 'C:\Program Files (x86)\Domoticz\plugins\iCal\plugin.py'
2020-10-27 22:37:53.488 Error: (Vestiaire ICS) ----> Line 109 in 'C:\Program Files (x86)\Domoticz\plugins\iCal\plugin.py'
2020-10-27 22:37:53.864 Error: (Café ICS) 'onHeartbeat' failed 'IndexError':'string index out of range'.
2020-10-27 22:37:53.864 Error: (Café ICS) ----> Line 235 in 'C:\Program Files (x86)\Domoticz\plugins\iCal\plugin.py'
2020-10-27 22:37:53.864 Error: (Café ICS) ----> Line 109 in 'C:\Program Files (x86)\Domoticz\plugins\iCal\plugin.py'
2020-10-27 22:37:53.864 Error: (Vergader ICS) 'onHeartbeat' failed 'IndexError':'string index out of range'.
2020-10-27 22:37:53.864 Error: (Vergader ICS) ----> Line 235 in 'C:\Program Files (x86)\Domoticz\plugins\iCal\plugin.py'
2020-10-27 22:37:53.865 Error: (Vergader ICS) ----> Line 109 in 'C:\Program Files (x86)\Domoticz\plugins\iCal\plugin.py'
2020-10-27 22:37:53.865 Error: (Loge ICS) 'onHeartbeat' failed 'IndexError':'string index out of range'.
2020-10-27 22:37:53.865 Error: (Loge ICS) ----> Line 235 in 'C:\Program Files (x86)\Domoticz\plugins\iCal\plugin.py'
2020-10-27 22:37:53.865 Error: (Loge ICS) ----> Line 109 in 'C:\Program Files (x86)\Domoticz\plugins\iCal\plugin.py'
2020-10-27 22:38:22.403 (Tango ICS) Pushing 'onHeartbeatCallback' on to queue
2020-10-27 22:38:22.433 (Tango ICS) Processing 'onHeartbeatCallback' message
2020-10-27 22:38:22.433 (Tango ICS) Calling message handler 'onHeartbeat'.
2020-10-27 22:38:22.433 Error: (Tango ICS) 'onHeartbeat' failed 'IndexError':'string index out of range'.
2020-10-27 22:38:22.433 Error: (Tango ICS) ----> Line 235 in 'C:\Program Files (x86)\Domoticz\plugins\iCal\plugin.py'
2020-10-27 22:38:22.433 Error: (Tango ICS) ----> Line 109 in 'C:\Program Files (x86)\Domoticz\plugins\iCal\plugin.py'
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 »

@infodnv,

need one of your ics file to be able to test.
infodnv
Posts: 3
Joined: Tuesday 27 October 2020 17:51
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by infodnv »

Zak45, in attachment i enclosed a zip with several ics files
Attachments
iCal.zip
(29.78 KiB) Downloaded 69 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 »

@infodnv

I do not have been able to reproduce the error :(
The error occur during the update of the status device for the corresponding calendar.
check if your status device is there , maybe try to reinstall the plugin for the one that made error.
you can also try to put domoticz in 'en' language to see if problem with the lng file.
infodnv
Posts: 3
Joined: Tuesday 27 October 2020 17:51
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by infodnv »

zak45, i took a new raspberry PI and made a new installation. I restored my database and everything is working perfectly.
Thanks for your help, it is really amazing!!
carolief
Posts: 1
Joined: Friday 05 March 2021 0:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by carolief »

Hi! Im new here and also still a beginner :) I've got a raspberry pi with the iCal plugin running. Using the work switch to turn on the heating in my home office when I'm working from home. So far so good.
Now I'd like another "work switch" that would turn down the heating in the living room when I'm away from home. Is there any way I can create a second switch with a different #wrk# command like #out#?
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 »

carolief wrote: Friday 05 March 2021 7:52 Hi! Im new here and also still a beginner :) I've got a raspberry pi with the iCal plugin running. Using the work switch to turn on the heating in my home office when I'm working from home. So far so good.
Now I'd like another "work switch" that would turn down the heating in the living room when I'm away from home. Is there any way I can create a second switch with a different #wrk# command like #out#?
There is only one "at work" switch managed by the plugin.
But you can create a Calendar entry with #cmd# on it and activate any Domoticz device.
sgae1990
Posts: 2
Joined: Tuesday 16 March 2021 20:56
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by sgae1990 »

Hi all,

I'm trying to install the ical plugin but the dropbox link seems to be offline. Is there anyone who has another link to find the needed files? Google gave me no luck ;)

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 »

sgae1990 wrote: Tuesday 16 March 2021 21:00 Hi all,

I'm trying to install the ical plugin but the dropbox link seems to be offline. Is there anyone who has another link to find the needed files? Google gave me no luck ;)

Thanks in advance!
Here it is :
https://synnas.publicvm.com/s/kDTY8PbGdwLRAsR
sgae1990
Posts: 2
Joined: Tuesday 16 March 2021 20:56
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by sgae1990 »

zak45 wrote: Wednesday 17 March 2021 19:18
Here it is :
https://synnas.publicvm.com/s/kDTY8PbGdwLRAsR
Thanks a lot!!
Himmy
Posts: 4
Joined: Wednesday 24 January 2018 22:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Contact:

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

Post by Himmy »

hi there,

Is Google Translate still a problem when you're installing
Seems after installation a language file for my language (Belgium) is made in the iCal-folder but the file is empty...


I allready tried the "pip install git+https://github.com/BoseCorp/py-googletrans.git --upgrade"
Doesn't help... How do i solve this?

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

You can try that :

$ pip3 uninstall googletrans
$ pip3 install googletrans==3.1.0a0
Himmy
Posts: 4
Joined: Wednesday 24 January 2018 22:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Contact:

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

Post by Himmy »

zak45 wrote: Friday 14 May 2021 17:54 You can try that :

$ pip3 uninstall googletrans
$ pip3 install googletrans==3.1.0a0
Tried that, first line "uninstall" didn't work
executing your second line made me realise googletrans was uptodate (3.1.0a0)
Deleted the 4 "switches" an made new hardware.
Again an 0-length language file. Could it be the chosen language when i make the hardware: i tried "België" and "Belgium"
The holidays were right an in my language.

Log file said this (many times):
2021-05-15 20:18:02.308 Error: Google Kalender 4 iCal: (Google Kalender 4 iCal) Error to process data
2021-05-15 20:18:02.713 Error: Google Kalender 4 iCal: (Google Kalender 4 iCal) Error on json from Received Data: {"status":{"step":"loadTexttotranslate","msg":"__Error to translate :
2021-05-15 20:18:02.713 __"}}
Number8
Posts: 374
Joined: Friday 23 May 2014 7:55
Target OS: Linux
Domoticz version: 2022.1
Location: Saint Pierre de Jards
Contact:

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

Post by Number8 »

Hello
I'm running Domoticz latest beta (13314). I installed plugin as instructed. Domoticz is set to English. Allow for new devices is activated. Running python 3.7.3
This error message is reported and no device is created:

Code: Select all

2021-06-13 17:51:22.829 Error: Calendrier: (Calendrier) Error on json from Received Data: {"status":{"step":"loadTexttotranslate","msg":"__Error to translate :
2021-06-13 17:51:22.829 __"}}
2021-06-13 17:51:22.829 Error: Calendrier: (Calendrier) Error to process data
Morever, when I return to Harware/Plugin setup all specific options to the plugin are gone

en_en_lng, iCal.sh, plugin.py, iCal.py have been copied to the iCal folder. However, in the repositery I noticed there is iCalv1.py file. Is it needed as well?

Thank you
iCalendar.jpg
iCalendar.jpg (193.77 KiB) Viewed 1863 times
Debian buster on NUC and three RPi with buster.
Number8
Posts: 374
Joined: Friday 23 May 2014 7:55
Target OS: Linux
Domoticz version: 2022.1
Location: Saint Pierre de Jards
Contact:

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

Post by Number8 »

I made some progress. Devices are now created. Great. However there are still one error message related to Meteo France. I checked that the name of the location is known to Meteo France and postal code uservariable is right

Code: Select all

2021-06-13 21:01:21.760 Error: Calendrier: (Calendrier) __Error to execute query__
2021-06-13 21:01:21.760 Error: Calendrier: (Calendrier) __Not able to query data from Meteo France__
Could I suggest to add an option to use idx instead of name?
This extension to Domoticz is brilliant. Thank you for the great work
Debian buster on NUC and three RPi with buster.
Number8
Posts: 374
Joined: Friday 23 May 2014 7:55
Target OS: Linux
Domoticz version: 2022.1
Location: Saint Pierre de Jards
Contact:

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

Post by Number8 »

Plugin has been installed on the production machine (Intel NUC on Debian). Same issue I had when I first tried the plugin on a test machine related to translation. I'm pretty much convinced that this error prevents the plugin to run
Any help would be much appreciated

Code: Select all

2021-06-14 08:54:35.443 Error: (Calendrier) Error on json from Received Data: {"status":{"step":"loadTexttotranslate","msg":"__Error to translate :
2021-06-14 08:54:35.443 __"}}
2021-06-14 08:54:35.443 Error: (Calendrier) Error to process data
Domoticz interface is set to English.
Moreover I noticed the following difference between the test and the production machine (it is indeed defined in the plugin parameter)
Hardware tab iCal Port parameter is displayed as expected whereas the port info is missing on the production machine
Capture d’écran TEST.jpg
Capture d’écran TEST.jpg (59.33 KiB) Viewed 1850 times
Capture d’écran Prod.jpg
Capture d’écran Prod.jpg (44.19 KiB) Viewed 1850 times
Debian buster on NUC and three RPi with buster.
Number8
Posts: 374
Joined: Friday 23 May 2014 7:55
Target OS: Linux
Domoticz version: 2022.1
Location: Saint Pierre de Jards
Contact:

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

Post by Number8 »

Well pretty strange, without doing anything, after some time googletrans recovered by itself. Devices are now created. Switched back to French. French file is automatically created but is empty (as in the Dev machine). Seems to me that googletrans API is causing more trouble than solutions.
Debian buster on NUC and three RPi with buster.
Number8
Posts: 374
Joined: Friday 23 May 2014 7:55
Target OS: Linux
Domoticz version: 2022.1
Location: Saint Pierre de Jards
Contact:

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

Post by Number8 »

Domoticz hardware tab has changed since new stable version which likely explains why there is some regression when it comes to display various parameters. See the attached screenshot of the production machine that has not yet been upgraded to latest stable.
iCal.jpg
iCal.jpg (193.64 KiB) Viewed 1849 times
Debian buster on NUC and three RPi with buster.
Number8
Posts: 374
Joined: Friday 23 May 2014 7:55
Target OS: Linux
Domoticz version: 2022.1
Location: Saint Pierre de Jards
Contact:

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

Post by Number8 »

@zak45: would you consider adding selector switch as a possible command?
Thank you
Debian buster on NUC and three RPi with buster.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest