sdamasoc / domoticz_panasonic_CZ-TACG1

A Python plugin for Domoticz to communicate with Panasonic Cloud Confort throught CZ-TACG1 WiFi adapter
MIT License
8 stars 1 forks source link

SyntaxError Domoticz 2021.1 #1

Closed MikeZMssl closed 2 years ago

MikeZMssl commented 2 years ago

Hi,

Tnx for the plugin ; Got an error though. Running on ubuntu and domoticz 2021.1

What can I do ? Many thanks !!

Please see Domoticz log below:

Version: 2021.1 Build Hash: 8547c5b7e Compile Date: 2021-04-17 17:29:11 dzVents Version: 3.1.7 Python Version: 3.8.5 (default, Jan 27 2021, 15:41:15) [GCC 9.3.0]

2021-08-03 14:48:27.800 Error: Airco: (CZ-TACG1) failed to load 'plugin.py', Python Path used was '/config/plugins/domoticz_panasonic_CZ-TACG1/:/usr/lib/python38.zip:/usr/lib/python3.8:/usr/lib/python3.8/lib-dynload:/usr/local/lib/python3.8/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.8/dist-packages'. 2021-08-03 14:48:27.801 Error: Airco: (Airco) Module Import failed, exception: 'SyntaxError' 2021-08-03 14:48:27.801 Error: Airco: (Airco) Import detail: File: /config/plugins/domoticz_panasonic_CZ-TACG1/plugin.py, Line: 129, offset: 1043 2021-08-03 14:48:27.801 Error: Airco: (Airco) Error Line ' """" 2021-08-03 14:48:27.801 "parameters":{ 2021-08-03 14:48:27.801 "ecoFunctionData":1, => TODO 2021-08-03 14:48:27.801 "airSwingLR":2, => TODO 2021-08-03 14:48:27.801 "nanoe":1, => TODO 2021-08-03 14:48:27.801 "ecoNavi":1, => TODO 2021-08-03 14:48:27.801 "ecoMode":2, => OK 2021-08-03 14:48:27.801 "operationMode":2, => OK 2021-08-03 14:48:27.801 "fanAutoMode":2, => TODO 2021-08-03 14:48:27.801 "temperatureSet":24.0, => OK 2021-08-03 14:48:27.801 "fanSpeed":1, => OK 2021-08-03 14:48:27.801 "iAuto":1, => TODO 2021-08-03 14:48:27.801 "airQuality":0, => TODO 2021-08-03 14:48:27.801 "insideTemperature":23, => OK 2021-08-03 14:48:27.801 "outTemperature":126, => OK 2021-08-03 14:48:27.801 "operate":0, => OK 2021-08-03 14:48:27.801 "airDirection":1, => TODO 2021-08-03 14:48:27.801 "actualNanoe":1, => TODO 2021-08-03 14:48:27.801 "airSwingUD":0 => OK 2021-08-03 14:48:27.801 } 2021-08-03 14:48:27.801 """" 2021-08-03 14:48:27.801 '

sdamasoc commented 2 years ago

Hello, thanks for the feedback. I’m on holiday, I will take a look on my return.

sdamasoc commented 2 years ago

The issue is fixed, the was a problem with the multiline comments.

Can you pull the changes and test again?

Thanks

MikeZMssl commented 2 years ago

Hi Sergio,

Thnx, will test after next week as I am on holiday now :)


From: Sergio @.> Sent: Friday, August 13, 2021 11:27:40 AM To: sdamasoc/domoticz_panasonic_CZ-TACG1 @.> Cc: MikeZMssl @.>; Author @.> Subject: Re: [sdamasoc/domoticz_panasonic_CZ-TACG1] SyntaxError Domoticz 2021.1 (#1)

The issue is fixed, the was a problem with the multiline comments.

Can you pull the changes and test again?

Thanks

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/sdamasoc/domoticz_panasonic_CZ-TACG1/issues/1#issuecomment-898321355, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQMPJTHDUYWADDVK4VV5RXDT4TQQZANCNFSM5BOZEKNQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.

MikeZMssl commented 2 years ago

Hi Sergio,

Got this new error now:

2021-08-23 20:06:32.379 Airco hardware started. 2021-08-23 20:06:32.379 Status: Airco: (Airco) Entering work loop. 2021-08-23 20:06:32.379 Status: Airco: (Airco) Started. 2021-08-23 20:06:32.491 Error: Airco: (CZ-TACG1) failed to load 'plugin.py', Python Path used was '/config/plugins/domoticz_panasonic_CZ-TACG1/:/usr/lib/python38.zip:/usr/lib/python3.8:/usr/lib/python3.8/lib-dynload:/usr/local/lib/python3.8/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.8/dist-packages'. 2021-08-23 20:06:32.491 Error: Airco: (Airco) Module Import failed, exception: 'ModuleNotFoundError' 2021-08-23 20:06:32.491 Error: Airco: (Airco) Module Import failed: ' Name: requests' 2021-08-23 20:06:32.491 Error: Airco: (Airco) Error Line details not available.

Forgot to mention I am running Domoticz in docker container based on image linuxserver/domoticz:2021.1-ls54, I am not surre if this detail is important to you?

Regards Michael

Van: Sergio @.> Verzonden: vrijdag 13 augustus 2021 11:28 Aan: sdamasoc/domoticz_panasonic_CZ-TACG1 @.> CC: MikeZMssl @.>; Author @.> Onderwerp: Re: [sdamasoc/domoticz_panasonic_CZ-TACG1] SyntaxError Domoticz 2021.1 (#1)

The issue is fixed, the was a problem with the multiline comments.

Can you pull the changes and test again?

Thanks

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/sdamasoc/domoticz_panasonic_CZ-TACG1/issues/1#issuecomment-898321355, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQMPJTHDUYWADDVK4VV5RXDT4TQQZANCNFSM5BOZEKNQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.

sdamasoc commented 2 years ago

This plugin uses the python requests and simplejson modules to send and receive json content to panasonic cloud. It seems that you don't have these modules on your system, maybe it's not part of your domoticz docker image... You have to execute pip3 install requests and pip3 install simplejson as root on your container to get the modules.

I found this instructions to install a module on a domoticz docker image:

docker exec -it <your_domoticz_container_name> sh
apt-get -y install python3-pip
cd plugins/<plugin_name>
pip3 install <your_python_module_name> -t .

On this case:

docker exec -it <your_domoticz_container_name> sh
apt-get -y install python3-pip
cd plugins/domoticz_panasonic_CZ-TACG1
pip3 install requests -t .
pip3 install simplejson -t .

Hope this helps.

MikeZMssl commented 2 years ago

That fixes it! Thnx! Looks gratis and looks like it's working! Will play with it some more but thnx for now!!


From: Sergio @.> Sent: Monday, August 23, 2021 10:03:45 PM To: sdamasoc/domoticz_panasonic_CZ-TACG1 @.> Cc: MikeZMssl @.>; Author @.> Subject: Re: [sdamasoc/domoticz_panasonic_CZ-TACG1] SyntaxError Domoticz 2021.1 (#1)

This plugin uses the python requests module to send and receive json content to panasonic cloud. It seems that you don't have this module on your system maybe it's not part of your domoticz docker image... You can execute pip3 install requests as root on your container to get the module but if you want this to be persistent on your system you need to rebuild a docker image with this module inside.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/sdamasoc/domoticz_panasonic_CZ-TACG1/issues/1#issuecomment-904080759, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQMPJTBUKQC7AVIWNHJLC6LT6KSSDANCNFSM5BOZEKNQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.

sdamasoc commented 2 years ago

Good, don't forget to put a star if you like it! I will close the issue, feel free to contact me or open an issue if you found something else