Page 1 of 1
The issue with plugins
Posted: Saturday 30 December 2023 7:58
by Jan01
Version: latest stabable version
Platform: Raspian Bullseye - 32bit lite
Plugin/Hardware: Rpi4
Description:
I installed a fresh installation of Domoticz and when I added the plugin for Tapo TP-Link I got error - failed to load 'xxxx'. I tried another plugin for Toyota and I got the same error.
I used these links for plugins
https://www.domoticz.com/wiki/Plugins
I checked the using python plugins according to the wiki
https://www.domoticz.com/wiki/Using_Python_plugins
Logs are in the attachment.
What is it wrong in installation?
Thank you for hlep.
Re: The issue with plugins
Posted: Saturday 30 December 2023 9:23
by waltervl
Try to install the python modules with sudo, see
https://www.domoticz.com/wiki/Using_Pyt ... ules_Fails
If you are on bookworm there are perhaps other issues
Re: The issue with plugins
Posted: Saturday 30 December 2023 12:59
by HvdW
waltervl wrote: ↑Saturday 30 December 2023 9:23
If you are on bookworm there are perhaps other issues
Right you are.
I'm on bookworm and not able to git clone anything plus that my httpresponses fail since about a week.
Example:
Code: Select all
Error opening url: http://weerlive.nl/api/json-data-10min.php?key=f1a3b47b8&locatie=52.262779,6.71234
2023-12-30 12:50:00.234 Error: dzVents: Error: (3.1.8) Weerlive DEBUG data: HTTP/1.1 response: 6 ==>> Couldn't resolve host name
I changed the key in this example.
In the browser it works flawless.
Re: The issue with plugins
Posted: Thursday 04 January 2024 6:42
by Jan01
Yes, I tried but without success.
Re: The issue with plugins
Posted: Thursday 04 January 2024 7:55
by waltervl
Are you on bookworm RPI OS?
Re: The issue with plugins
Posted: Monday 11 November 2024 15:49
by wizjos
waltervl wrote: ↑Saturday 30 December 2023 9:23
If you are on bookworm there are perhaps other issues
What issues might that be and what to do to resolve it?
Regards,
Wizjos
Re: The issue with plugins
Posted: Monday 11 November 2024 16:15
by waltervl
Python on Bookworm is using venv (virtual environments) which Domoticz does not support. This could lead into installation issues.
For solution see for example
viewtopic.php?f=65&t=42823
or add --break-system-packages at the end of the pip3 install module or requirements command line:
Code: Select all
sudo pip3 install -r requirements.txt --break-system-packages
Re: The issue with plugins
Posted: Monday 11 November 2024 18:22
by lost
waltervl wrote: ↑Monday 11 November 2024 16:15
Python on Bookworm is using venv (virtual environments) which Domoticz does not support.
Bookworm did not changed anything (on top of Debian enforced python lib paths priorities to minimize pip/apt mixup issues on system stuff built on python) IMO.
But would be nice indeed to be able to avoid mixing plugin dependencies with system ones without needing some hacks...
Re: The issue with plugins
Posted: Monday 11 November 2024 21:42
by waltervl
Indeed it is a Debian 12 issue (and bookworm is based on Debian 12). So no it is not really a bookworm issue but for a lot of RPi users it starts when updating their OS to Bookworm....
Re: The issue with plugins
Posted: Tuesday 12 November 2024 8:02
by lost
Hello
What issues seems linked to 12/Bookworm? Python ones?
IMO here there is a network connection issue (or git was not reinstalled) as the user was not able to git clone also. So installing requirements etc may also have failed.
Take care that installing plugins in a venv does not need sudo as required dependancies are not installed in system directories.
Only stuff that may remain problematic with my current linked hack is the in-plugin upgrade. IMO better use a CLI procedure from activated venv...
Re: The issue with plugins
Posted: Tuesday 12 November 2024 10:57
by waltervl
The issue in my opinion is that in Bookwork (Debian 12) Python is defaulting to use venv (do not ask my why and how). Which gives installation issues when plugins needs extra modules to be installed.
Re: The issue with plugins
Posted: Tuesday 12 November 2024 16:59
by lost
waltervl wrote: ↑Tuesday 12 November 2024 10:57
The issue in my opinion is that in Bookwork (Debian 12) Python is defaulting to use venv (do not ask my why and how).
Did not noticed such change, either on PC (with pure Debian 12 install) or RPI (with derived Raspberry OS). Only deviation in Debian based systems for Python remains usual paths segregation, mostly to avoid breaking any python-XXX apt installed stuff (including some system tools) with XXX that may also be installed using pip for instance (and lack distribution repos coherency ensured by maintainers):
https://wiki.debian.org/Python#Deviations_from_upstream
Third party Python software installed from Debian packages goes into dist-packages, not site-packages. This is to reduce conflict between the system Python, and any from-source Python build you might install manually.
(...)
distutils setup scripts install files in /usr/local/ not sys.prefix (which is normally /usr/). This is because /usr/ is reserved for files installed from Debian packages. Note that /usr/local/lib/pythonX.Y/dist-packages is in sys.path so that modules not installed from Debian packages can still be accessed by the system Python.
Re: The issue with plugins
Posted: Thursday 14 November 2024 19:30
by waltervl
Here an example of a user with a fresh install, new OS and python module install issues:
viewtopic.php?p=321312#p321312