Get ZWave devices visible in Domoticz (Zwave JS UI / MQTT) Topic is solved

For Z-Wave related questions in Domoticz

Moderator: leecollings

donverweij
Posts: 8
Joined: Tuesday 06 February 2024 18:00
Target OS: NAS (Synology & others)
Domoticz version: 2024.4
Contact:

Re: Get ZWave devices visible in Domoticz (Zwave JS UI / MQTT)

Post by donverweij »

solarboy wrote: Monday 25 November 2024 18:53 Re: Get ZWave devices visible in Domoticz (Zwave JS UI / MQTT)Quote solarboy
by solarboy » Monday 25 November 2024 18:53
Thanks, I will try the different suggestions.
My guess is that from within Docker the different containers have a problem to connect to each other by their real ip-adress and port.
I will also change the prefix to zwave.
At the moment I'm focussing on Docker network settings.
Docker image 2024-4 on a Synology DS920+ using Synology Container Manager (DSM7-2).
Docker image 2024.7 on a Raspberry pi 4B
donverweij
Posts: 8
Joined: Tuesday 06 February 2024 18:00
Target OS: NAS (Synology & others)
Domoticz version: 2024.4
Contact:

Re: Get ZWave devices visible in Domoticz (Zwave JS UI / MQTT)

Post by donverweij »

solarboy wrote: Monday 25 November 2024 18:53 So I would check that you have the correct port, name and username for mosquitto in zwavejsUI and that you have made those ports available to both docker containers. I use "host.docker.internal" as the host url in zwavejsUI and the prefix "zwave" (not the discovery topic) so all my devices appear under the subheading "zwave" when I view mosquitto with MQTT Explorer. I don't use any authorisation so I have "auth" turned off. Perhaps you could try running your mosquitto without requiring authentication until you resolve the problem.
Thanks for the suggestions. I have tried several and have succeeded :D .

1) was a change in the domoticz docker-compose.yml for the USB-id (I thought I needed to add a port number by adding -port0 to the USB-id): usb-0658_0200-if00-port0 into usb-0658_0200-if00 (without the -port0)

Code: Select all

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/ttyUSB0"
      - "/dev/serial/by-id/usb-0658_0200-if00:/dev/ttyUSB0"
    ports:
      - "8080:8080"
      - "8443:443"
    #  - "443:443"
    volumes:
      - ./config:/opt/domoticz/userdata
      - ./config/www/templates:/opt/domoticz/www/templates
    environment:
      - TZ=Europe/Amsterdam
      - LOG_PATH=/opt/domoticz/userdata/domoticz.log
    #  - EXTRA_CMD_ARG= -loglevel normal,status,error,debug -debuglevel normal,hardware,received,webserver,eventsystem,python,thread_id
2) was a change in Z-Wave JS UI MQTT Gateway setting, because I had enabled security by setting allow_anonymous false in the mosquitto.conf.

Code: Select all

per_listener_settings true
listener 1883
persistence true
persistence_location /mosquitto/data/
log_dest file /mosquitto/log/mosquitto.log

## Authentication ##
# By default, Mosquitto >=2.0 allows only authenticated connections. Change to true to enable anonymous connections.
allow_anonymous false
password_file /mosquitto/config/password.txt
I had to enable Auth and fill in Username and Password I used for Mosquitto.
After saving these the devices started filling in Domoticz immediately. Also in MQTT Explorer I now saw the devices.

It was not necessary to use "host.docker.internal". I used the dedicated ip-address with the right ports and that worked fine.

Now onwards to the steps of migrating Domoticz from Synology to Raspberry!
Docker image 2024-4 on a Synology DS920+ using Synology Container Manager (DSM7-2).
Docker image 2024.7 on a Raspberry pi 4B
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests