Page 1 of 1

TinyTUYA no way to get working after brand new server installation

Posted: Thursday 16 October 2025 16:11
by dennis1975
Hi

i had to build a new domoticz with anew raspebrry, with all updated OS and domoticz 2025.2

i got all my plugin working as before, but when i try to instal the tinytuya as the procedure from gihub i got alway a warning as show below
__________________________________________________________________
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.

If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.

For more information visit http://rptl.io/venv

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
_________________________________________________________________________________

i try all the way
1) with --break-sytem-package, but no way
2) creating a /Domoticz_Python_Environment following many procedure but no way domoticz newer see the plugin as before

what i got is tinytuya installed in the /Domoticz_Python_Environment but from there Domotiz doesnt show the plugin and so doesnt see any the device

can somebody help me to find a solution? :(

p.s i m not linux expert, so i just follow procedure and command

thx in advance :)

Re: TinyTUYA no way to get working after brand new server installation

Posted: Thursday 16 October 2025 16:56
by gizmocuz
Did you install Domoticz with docker compose?

Re: TinyTUYA no way to get working after brand new server installation

Posted: Thursday 16 October 2025 17:05
by waltervl
The plugin owner of Zigbee4Domoticz wrote a nice instruction how to deal with the Python Environments and Domoticz on bookworm:
https://zigbeefordomoticz.github.io/wik ... alEnv.html

Re: TinyTUYA no way to get working after brand new server installation

Posted: Friday 24 October 2025 13:37
by DzJan
Did you adjusted the new PATH environment, I guess it is missing the venv path as first option:

Code: Select all

	/opt/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
After I changed this for my Docker container setup I did logged in to the console and:

Code: Select all

echo 'install tinytuya'
pip3 install tinytuya PyCryptodome==3.21.0 chardet==3.0.4 requests==2.23.0 charset-normalizer==3.0.1 tuya-connector-python --break-system-packages
then did:

Code: Select all

cd /opt/domoticz/userdata/plugins
rm -r Domoticz-TinyTUYA-Plugin
git clone https://github.com/Xenomes/Domoticz-TinyTUYA-Plugin.git
Then I restarted the container and everything ran as before!