Closed ricorico94 closed 1 year ago
This is a strange one. Is Domoticz running under a other user?
sudo ps aux | grep domoticz/domoticz
if user is other a root then install the pip3 install requests==2.23.0 charset-normalizer==3.0.1 tinytuya -U
without the sudo.
Thanks for your help. I have this: pi@raspberrypi:~ $ sudo ps aux | grep domoticz/domoticz root 768 4.2 7.4 449652 69976 ? Ssl 19:37 4:06 /home/pi/domoticz/domoticz -daemon -www 8080 -sslwww 443 pi 32050 0.0 0.0 7476 476 pts/0 S+ 21:14 0:00 grep --color=auto domoticz/domoticz
So 2 users ? Is it normal ?
Yes the output is normal. first line is Domoticz the second line is the search command. So Domoticz is running as root.
What gives: sudo pip3 -V
and that's the problem some things you did as root, some as user pi
you described your problem poorly, but it seems to me that root has taken over the permissions on the files you are trying to run as a non-root user
@Xenomes: I get this:
pi@raspberrypi:~ $ sudo pip3 -V
pip 18.1 from /usr/lib/python3/dist-packages/pip (python 3.7)
@7lano : Xenomes was mentioning that it looks normal, I feel confused.. Which details should I give to describe my problem ? I tried to explain, but I easily admit that I 'm not an expert here and I'm probbaly missing some things to check.
That looks correct to.
Can you install this without sudo, then it is installed under the user.
pip3 install requests==2.23.0 charset-normalizer==3.0.1 tinytuya -U
Then restart Domoticz.
Hope that the plugin then can find the tinytuya module.
Closed due to no response.
Hi,
I tried to migrate from former Domoticz-Tuya-Plugin (which was working) to Domoticz-TinyTuya-Plugin, but I face error messages that I don't understand. I use Buster and Domoticz 2023.1, Python 3.7.3. I face error: Error: SmartLife-Tuya: (tuya) failed to load 'plugin.py', Python Path used was ':/usr/lib/python37.zip:/usr/lib/python3.7:/usr/lib/python3.7/lib-dynload:/usr/local/lib/python3.7/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.7/dist-packages'.
For migrating , I did the following:
I tried to investigate using the Domoticz wiki : it seems my mibrary is ok: the command dpkg --get-selections | grep libpython shows libpython3.7 . I noticed that in the path shown in error message, I don't see the /domoticz/plugins folder nor /domoticz/plugins/Domoticz-Tinytuya-Plugin . Is it normal ? I tried: XX@raspberrypi:~/domoticz/plugins/Domoticz-TinyTUYA-Plugin $ sudo pip3 tinytuya ERROR: unknown command "tinytuya" I also made the plugin.py executable. Any idea ?
br, Ricorico94