Page 1 of 1

Domoticz & Ubuntu I need help

Posted: Thursday 23 February 2023 21:43
by Marque1968
THIS TOPIC IS SNOWED UNDER BY THE AMOUNT OF MY TRIES TO GET ANY DOMOTICZ WORKING. I AM THEREFOR STARTING A NEW TOPIC. PLEASE DELETE THIS TOPIC.


I have uses Domoticz on Pi, but as the SD memory card kept crashing over the years. I now got myself a Intel NUC, running on Ubuntu 22.04.2.
(do not read the line below: :) )
I have taken this opportunity to try Home Assistant, as I keep on ready how much more progress it has made over the years. However as even the simpelest script, did not physically switched all the lights as set, but did show the in the program the lights as being switched. I therefore came running back to Domoticz

However, it is not going as planned. I'm getting to the state I am contemplating of throwing the towel in the ring.

First I installed Domoticz via Docker. It took quite some time before I got the USB channels shared, but I got my Z-Wave working perfectly. But it went wrong when installing the dzConz zigbee stick.
The docker had the plugin directory in /opt/domoticz/config/plugins.
But the dzConz pluging looked at /opt/domoticz/userdata/plugins
I then tried to get a tuya plugin installed, and the same happened. Duplicating the files to a userdata dir did not work.

I gave up on docker. Deinstelled the domoticz container and installed the normal Domoticz version.
This was not working either. Domoticz failed to start. With my limited Linux knowledge I found that SystemCTL showed that DOmoticz stayed in "Activating" state. This was due to an error 127. I went to domoticz.sh and altered the file to have the correct settings (username). Running sh domoticz start gave an

Code: Select all

/home/marque1968/domoticz/domoticz: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
I disabled the wwwssl setting, I tried installing libssl, I even tried rebuilding domoticz with a suggested parameter.

Code: Select all

cmake -DCMAKE_BUILD_TYPE=Release CMakeLists.txt -DUSE_OPENSSL_STATIC="NO"
However, errors prevent it from building

Code: Select all

CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
  system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY
  OPENSSL_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.22/Modules/FindOpenSSL.cmake:574 (find_package_handle_standard_args)
  extern/mosquitto/CMakeLists.txt:36 (find_package)

I have nearly given up. I hope somebody has an way to get things going quickly. (I need to recover the WAF before being forced to dismantle...)

Re: Domoticz & Ubuntu I need help

Posted: Thursday 23 February 2023 21:56
by Marque1968
PS. As I read enough people not being able to run Domoticz on Ubuntu, and more people run Domoticz succesfully in Docker, I will already start to deinstall the normal Domoticz and reinstall the docker version. Hoping somebody can tell me a single file to alter to get things running. (and it gives me something to do in the meanwhile ;) )

Re: Domoticz & Ubuntu I need help

Posted: Thursday 23 February 2023 23:27
by Marque1968
As expected. Back in Docker, the issue is the same:

Code: Select all

cd /opt/domoticz
ls -al config/
totaal 1492
drwxr-xr-x 3 root root    4096 feb 23 23:06 .
drwxr-xr-x 4 root root    4096 feb 23 23:17 ..
-rw-r--r-- 1 root root     341 feb 23 23:05 domocookie.txt
-rw-r--r-- 1 root root  405504 feb 23 23:20 domoticz.db
-rw-r--r-- 1 root root   32768 feb 23 23:20 domoticz.db-shm
-rw-r--r-- 1 root root 1062992 feb 23 23:18 domoticz.db-wal
-rw-r--r-- 1 root root    2713 feb 23 23:06 domoticz.log
-rw-r--r-- 1 root root     577 feb 23 23:06 OZW_Log.txt
drwxr-xr-x 2 root root    4096 feb 23 22:17 plugins

ls -all userdata/
totaal 8
drwxr-xr-x 2 root root 4096 feb 23 22:16 .
drwxr-xr-x 4 root root 4096 feb 23 23:17 ..
In the config subdir there is a plugins dir, but nothing happened with the userdata directory I made before calling docker compose up -d

My docker-compose.yml file reads as:

Code: Select all

version: '3.3'

services:
  domoticz:
    image: domoticz/domoticz:stable
    container_name: domoticz
    restart: unless-stopped
    # Pass devices to container
    devices:
      - "/dev/serial/by-id/usb-0658_0200-if00:/dev/ttyACM0"
      - "/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2212442-if00:/dev/ttyACM1"
    ports:
      - "8080:8080"
    volumes:
      - ./config:/opt/domoticz/userdata
    environment:
      - TZ=Europe/Amsterdam
      - LOG_PATH=/opt/domoticz/userdata/domoticz.log

Re: Domoticz & Ubuntu I need help

Posted: Friday 24 February 2023 7:51
by Marque1968
This morning I tried to install Tuya once more. It gives the error notification that shows the issue.

The plugin directory Domoticz is looking at in it's plugin list (and where I had to install the plugin) is /opt/domoticz/config/plugins. But the plugin itself looks for /opt/domoticz/userdata/plugins, just as configured in the Domoticz Docker file.

Code: Select all

 2023-02-24 07:46:48.488 Error: Tuya: (tuya) failed to load 'plugin.py', Python Path used was '/opt/domoticz/userdata/plugins/Domoticz-TUYA-Plugin/:/usr/lib/python39.zip:/usr/lib/python3.9:/usr/lib/python3.9/lib-dynload:/usr/local/lib/python3.9/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.9/dist-packages'.
2023-02-24 07:46:48.495 Error: Tuya: Traceback (most recent call last):
2023-02-24 07:46:48.495 Error: Tuya: File "/opt/domoticz/userdata/plugins/Domoticz-TUYA-Plugin/plugin.py", line 65, in <module>
2023-02-24 07:46:48.495 Error: Tuya: import tuyaha
2023-02-24 07:46:48.495 Error: Tuya: ModuleNotFoundError: No module named 'tuyaha'

Re: Domoticz & Ubuntu I need help

Posted: Friday 24 February 2023 8:06
by gizmocuz
If I am correct that Tuya is Zigbee, I would recommend switching to Zigbee2MQTT (also via docker-compose)

Re: Domoticz & Ubuntu I need help

Posted: Friday 24 February 2023 9:21
by Marque1968
My appologies for being unclear on that @gizmocuz.

My infrastructure is set to consist out of:
- The Z-Wave protocol
Consisting out of an Aeontec ZWave 500 stick and loads of
Fibaro switches and Coolcam sensors and powerplugs
- The Zigbee protocol
Consisting out of a Dresden Technology Conbee stick with dzConz software
and loads of zigbee enabled spotlights
- The Wifi lights using the Tuya protocol
With a lot of spotlights and led strips
- Google assistant integration
With 1 or 2 nest mini's and/or nest hubs per room and
google Chromecast conected to each television screen and some monitors
- potential other (wifi) smart devices
Currently my dish washer and freezer have such connections available
- Domoticz (preferably, otherwise HA) on an Intel Nuc running Ubuntu


Tuya is therefore an other connection type than Zigbee. Zigbee ought to connect via the dzConz on port :80.

Re: Domoticz & Ubuntu I need help

Posted: Saturday 25 February 2023 21:25
by Marque1968
I removed the docker version again, and am back to the normal version.

This gets stuck with:
# sudo service domoticz.sh status

domoticz.service - domoticz_service
Loaded: loaded (/etc/systemd/system/domoticz.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Sat 2023-02-25 21:18:24 CET; 14s ago
Process: 4711 ExecStart=/home/marque1968/domoticz/domoticz -www 8080 -sslwww 443 (code=exited, status=127)
Main PID: 4711 (code=exited, status=127)
CPU: 3ms

Just a thing is that I never configured to have SSL, but I assume that this is not the issue...

Re: Domoticz & Ubuntu I need help

Posted: Sunday 26 February 2023 20:34
by Xenomes
Marque1968 wrote: Friday 24 February 2023 7:51 2023-02-24 07:46:48.495 Error: Tuya: ModuleNotFoundError: No module named 'tuyaha'
The module tuyaha is missing from your installation.

Re: Domoticz & Ubuntu I need help

Posted: Sunday 26 February 2023 21:48
by Marque1968
Xenomes wrote: Sunday 26 February 2023 20:34
Marque1968 wrote: Friday 24 February 2023 7:51 2023-02-24 07:46:48.495 Error: Tuya: ModuleNotFoundError: No module named 'tuyaha'
The module tuyaha is missing from your installation.
Thank you for trying to help me. However, as stated
- the plugin was installed in ./setup/plugins and domoticz finds these plugins but running the various plugins, they look towards ./userdata/plugins
- I gave up on docker, and am trying to fight the SSL problem in the normal installation now. (or give up on domoticz and move to HA)