Page 1 of 1

Setup and applying plugins problem on Windows

Posted: Monday 19 February 2024 14:31
by aero4345
Hi,
I've just started using Domoticz for my smart home and I find a problem, for which solution I couldn't find online.
I want to instal plugins on my windows based Domoticz. I don't have raspberry pi and anything like this (in the future I would like to add esp8266 devices) but for now I have multiple switches and bulbs connected to Tuya Smart app. After creating directory "Domoticz/plugins" and copying there any GitHub solution eg.: https://github.com/guino/tuyaha changing permissions etc it still doesn't work.
The problem indicated by Domoticz is as follows:

Code: Select all

2024-02-19 14:30:33.103 Error: T2: (tuya) failed to load 'plugin.py', Python Path used was 'C:\Program Files (x86)\Domoticz\plugins\Domoticz-TUYA-Plugin-master\;C:\Program Files (x86)\Python311-32\python311.zip;C:\Program Files (x86)\Python311-32\DLLs;C:\Program Files (x86)\Python311-32\Lib;C:\Program Files (x86)\Domoticz;C:\Program Files (x86)\Python311-32;C:\Program Files (x86)\Python311-32\Lib\site-packages'.
2024-02-19 14:30:33.103 Error: T1: (tuya) failed to load 'plugin.py', Python Path used was 'C:\Program Files (x86)\Domoticz\plugins\Domoticz-TUYA-Plugin-master\;C:\Program Files (x86)\Python311-32\python311.zip;C:\Program Files (x86)\Python311-32\DLLs;C:\Program Files (x86)\Python311-32\Lib;C:\Program Files (x86)\Domoticz;C:\Program Files (x86)\Python311-32;C:\Program Files (x86)\Python311-32\Lib\site-packages'.
2024-02-19 14:30:33.108 Error: Test: (tuya) failed to load 'plugin.py', Python Path used was 'C:\Program Files (x86)\Domoticz\plugins\Domoticz-TUYA-Plugin-master\;C:\Program Files (x86)\Python311-32\python311.zip;C:\Program Files (x86)\Python311-32\DLLs;C:\Program Files (x86)\Python311-32\Lib;C:\Program Files (x86)\Domoticz;C:\Program Files (x86)\Python311-32;C:\Program Files (x86)\Python311-32\Lib\site-packages'.
2024-02-19 14:30:33.113 Error: T: (tuya) failed to load 'plugin.py', Python Path used was 'C:\Program Files (x86)\Domoticz\plugins\Domoticz-TUYA-Plugin-master\;C:\Program Files (x86)\Python311-32\python311.zip;C:\Program Files (x86)\Python311-32\DLLs;C:\Program Files (x86)\Python311-32\Lib;C:\Program Files (x86)\Domoticz;C:\Program Files (x86)\Python311-32;C:\Program Files (x86)\Python311-32\Lib\site-packages'.
2024-02-19 14:30:33.113 Error: Tuya new: (tuya) failed to load 'plugin.py', Python Path used was 'C:\Program Files (x86)\Domoticz\plugins\Domoticz-TUYA-Plugin-master\;C:\Program Files (x86)\Python311-32\python311.zip;C:\Program Files (x86)\Python311-32\DLLs;C:\Program Files (x86)\Python311-32\Lib;C:\Program Files (x86)\Domoticz;C:\Program Files (x86)\Python311-32;C:\Program Files (x86)\Python311-32\Lib\site-packages'.
2024-02-19 14:30:33.113 Error: Tuya: (tuya) failed to load 'plugin.py', Python Path used was 'C:\Program Files (x86)\Domoticz\plugins\Domoticz-TUYA-Plugin-master\;C:\Program Files (x86)\Python311-32\python311.zip;C:\Program Files (x86)\Python311-32\DLLs;C:\Program Files (x86)\Python311-32\Lib;C:\Program Files (x86)\Domoticz;C:\Program Files (x86)\Python311-32;C:\Program Files (x86)\Python311-32\Lib\site-packages'.
2024-02-19 14:30:33.186 Error: Test: Traceback (most recent call last):
2024-02-19 14:30:33.186 Error: Test: File "C:\Program Files (x86)\Domoticz\plugins\Domoticz-TUYA-Plugin-master\plugin.py", line 65, in <module>
2024-02-19 14:30:33.186 Error: Test: import tuyaha
2024-02-19 14:30:33.186 Error: Test: ModuleNotFoundError: No module named 'tuyaha'
2024-02-19 14:30:33.196 Error: T2: Traceback (most recent call last):
2024-02-19 14:30:33.196 Error: T2: File "C:\Program Files (x86)\Domoticz\plugins\Domoticz-TUYA-Plugin-master\plugin.py", line 65, in <module>
2024-02-19 14:30:33.196 Error: T2: import tuyaha
2024-02-19 14:30:33.196 Error: T2: ModuleNotFoundError: No module named 'tuyaha'
2024-02-19 14:30:33.198 Error: Tuya: Traceback (most recent call last):
2024-02-19 14:30:33.198 Error: Tuya: File "C:\Program Files (x86)\Domoticz\plugins\Domoticz-TUYA-Plugin-master\plugin.py", line 65, in <module>
2024-02-19 14:30:33.198 Error: Tuya: import tuyaha
2024-02-19 14:30:33.198 Error: Tuya: ModuleNotFoundError: No module named 'tuyaha'
2024-02-19 14:30:33.198 Error: Tuya new: Traceback (most recent call last):
2024-02-19 14:30:33.198 Error: Tuya new: File "C:\Program Files (x86)\Domoticz\plugins\Domoticz-TUYA-Plugin-master\plugin.py", line 65, in <module>
2024-02-19 14:30:33.198 Error: Tuya new: import tuyaha
2024-02-19 14:30:33.198 Error: Tuya new: ModuleNotFoundError: No module named 'tuyaha'
2024-02-19 14:30:33.198 Error: T: Traceback (most recent call last):
2024-02-19 14:30:33.198 Error: T: File "C:\Program Files (x86)\Domoticz\plugins\Domoticz-TUYA-Plugin-master\plugin.py", line 65, in <module>
2024-02-19 14:30:33.198 Error: T: import tuyaha
2024-02-19 14:30:33.198 Error: T: ModuleNotFoundError: No module named 'tuyaha'
2024-02-19 14:30:33.198 Error: T1: Traceback (most recent call last):
2024-02-19 14:30:33.198 Error: T1: File "C:\Program Files (x86)\Domoticz\plugins\Domoticz-TUYA-Plugin-master\plugin.py", line 65, in <module>
2024-02-19 14:30:33.198 Error: T1: import tuyaha
2024-02-19 14:30:33.198 Error: T1: ModuleNotFoundError: No module named 'tuyaha'
Does anyone can help my to troubleshoot what's the reason of problem?

Re: Setup and applying plugins problem

Posted: Monday 19 February 2024 14:45
by waltervl
Did you try if the devices can be controlled by the python plugin/modules:
https://github.com/guino/tuyaha?tab=rea ... our-device

Re: Setup and applying plugins problem

Posted: Monday 19 February 2024 19:53
by aero4345
waltervl wrote: Monday 19 February 2024 14:45 Did you try if the devices can be controlled by the python plugin/modules:
https://github.com/guino/tuyaha?tab=rea ... our-device
Yes, and every single device is listed.

Re: Setup and applying plugins problem

Posted: Monday 19 February 2024 20:01
by aero4345
waltervl wrote: Monday 19 February 2024 14:45 Did you try if the devices can be controlled by the python plugin/modules:
https://github.com/guino/tuyaha?tab=rea ... our-device
/I'm just begining with Domoticz and similar topics. But as I noticed all my devices are visible, and the plugin itself also (I just copied directory to directory and change permission settings to "all for all"), but in devices section I simply don't see any of my Tuya devices.

Re: Setup and applying plugins problem

Posted: Monday 19 February 2024 20:29
by waltervl
As you run on windows it is a little bit difficult for me to understand what is going on. It seems it can not find the tuhaya python module. It probably has to be in the path of
C:\Program Files (x86)\Domoticz\plugins\Domoticz-TUYA-Plugin-master

Re: Setup and applying plugins problem

Posted: Tuesday 20 February 2024 8:38
by waltervl
There is also another tuya plugin that uses the same tuhaya library, perhaps there is a mixup.... https://github.com/Xenomes/Domoticz-TUYA-Plugin

See also the issue about windows install https://github.com/Xenomes/Domoticz-TUY ... /issues/41

Re: Setup and applying plugins problem

Posted: Tuesday 20 February 2024 14:58
by aero4345
waltervl wrote: Tuesday 20 February 2024 8:38 There is also another tuya plugin that uses the same tuhaya library, perhaps there is a mixup.... https://github.com/Xenomes/Domoticz-TUYA-Plugin

See also the issue about windows install https://github.com/Xenomes/Domoticz-TUY ... /issues/41
Well I applied all of these instructions, and still it doesn't work. I tried to delete everthing and set it again. And still com is:

Code: Select all

2024-02-20 14:57:23.157 Status: test7: Started.
2024-02-20 14:57:23.157 Status: test7: Entering work loop.
2024-02-20 14:57:23.443 Error: test7: (tuya) failed to load 'plugin.py', Python Path used was 'C:\Program Files (x86)\Domoticz\plugins\TUYA\;C:\Program Files (x86)\Python311-32\python311.zip;C:\Program Files (x86)\Python311-32\DLLs;C:\Program Files (x86)\Python311-32\Lib;C:\Program Files (x86)\Domoticz;C:\Program Files (x86)\Python311-32;C:\Program Files (x86)\Python311-32\Lib\site-packages'.
2024-02-20 14:57:23.459 Error: test7: Traceback (most recent call last):
2024-02-20 14:57:23.459 Error: test7: File "C:\Program Files (x86)\Domoticz\plugins\TUYA\plugin.py", line 57, in <module>
2024-02-20 14:57:23.459 Error: test7: import tuyaha
2024-02-20 14:57:23.459 Error: test7: File "C:\Program Files (x86)\Domoticz\plugins\TUYA\tuyaha\__init__.py", line 2, in <module>
2024-02-20 14:57:23.459 Error: test7: from .tuyaapi import TuyaApi
2024-02-20 14:57:23.459 Error: test7: File "C:\Program Files (x86)\Domoticz\plugins\TUYA\tuyaha\tuyaapi.py", line 5, in <module>
2024-02-20 14:57:23.459 Error: test7: import requests
2024-02-20 14:57:23.459 Error: test7: ModuleNotFoundError: No module named 'requests'

Re: Setup and applying plugins problem

Posted: Tuesday 20 February 2024 19:07
by aero4345
waltervl wrote: Tuesday 20 February 2024 8:38 There is also another tuya plugin that uses the same tuhaya library, perhaps there is a mixup.... https://github.com/Xenomes/Domoticz-TUYA-Plugin

See also the issue about windows install https://github.com/Xenomes/Domoticz-TUY ... /issues/41
What's interesting also https://github.com/mrin/domoticz-mirobo ... me-ov-file this plugin doesn't work for my Domoticz. Does anyone know what might be the problem? Maybe it's something with setup of Domoticz?

Re: Setup and applying plugins problem on Windows

Posted: Tuesday 20 February 2024 21:20
by waltervl
Normally extra python modules need to be installed to het plugins working. It seems that the windows user running Domoticz has no access to the installed python modules and then you get errors like:
ModuleNotFoundError: No module named 'tuyaha'

So check your windows path settings.

You could also try to install Ubuntu on your PC, also as a second OS, then a lot of instructions are the same as for a Raspberry Pi.

Re: Setup and applying plugins problem on Windows

Posted: Sunday 20 October 2024 18:51
by nebojisa

Code: Select all

python -m pip install requests
Should solve part of the problem, if not all.

Re: Setup and applying plugins problem on Windows

Posted: Tuesday 22 October 2024 0:11
by FlyingDomotic
or

Code: Select all

pip3 install requests