Question about MQTT -problem

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
BartSr
Posts: 491
Joined: Sunday 03 July 2016 16:16
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.7
Location: Netherlands
Contact:

Question about MQTT -problem

Post by BartSr »

Hi,
My logfile shows:

2023-01-19 19:04:13.175 Error: MQTT: disconnected, restarting (rc=19/Unknown error.)
2023-01-19 19:04:28.253 Error: MQTT: Failed to start, return code: 14/Network is unreachable (Check IP/Port)
2023-01-19 19:05:01.377 Error: MQTT: Failed to start, return code: 14/No route to host (Check IP/Port)
2023-01-19 19:05:34.567 Error: MQTT: Failed to start, return code: 14/No route to host (Check IP/Port)
2023-01-19 19:22:36.973 Error: Otgw: Can not connect to: 192.168.2.108:6638

I don't know exact the meaning nor the meaning of the returncodes.
192.168.2.108:6638 is the IP#/port of the OTGW.
Is there anything I can do to prevent from these errors?
Before I met kind of same errors but could solve by disabling auto back-up of database.

Bart
Raspberry pi 3b
Arduino
KAKU
RfxCom
Zwave2MQTT
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 / 32 espeasy
Zigbee2MQTT
User avatar
waltervl
Posts: 6689
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: Question about MQTT -problem

Post by waltervl »

If you use mqtt to communicate you should use the IP of the system running the mqtt broker (mostly mosquito) in Domoticz.

So otgw talks to broker, Domoticz talks to same broker. Domoticz is not talking directly with otgw.

So check your settings.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
waltervl
Posts: 6689
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: Question about MQTT -problem

Post by waltervl »

Looking again it seems both MQTT and OTGW (not using MQTT) cannot connect to the systems in your network so it also can be a network issue.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
BartSr
Posts: 491
Joined: Sunday 03 July 2016 16:16
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.7
Location: Netherlands
Contact:

Re: Question about MQTT -problem

Post by BartSr »

Thanks for your suggestion Waltervl.
But the strange thing is :
There are over 40 devices using MQTT.
Wifi is a mesh network with satellites (6 off) well spread over the house. So why only the OTGW cannot connect to the network.
But I realise this should be discussed in other forum.
-Bart
Raspberry pi 3b
Arduino
KAKU
RfxCom
Zwave2MQTT
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 / 32 espeasy
Zigbee2MQTT
BartSr
Posts: 491
Joined: Sunday 03 July 2016 16:16
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.7
Location: Netherlands
Contact:

Re: Question about MQTT -problem

Post by BartSr »

I somewhere read in the forum to change the ip# of mosquitto into localhost. So let's see if this makes sense to this case. Meanwhile I changed update of CO2 sensor to 60 sec. Iso 5 sec.
Raspberry pi 3b
Arduino
KAKU
RfxCom
Zwave2MQTT
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 / 32 espeasy
Zigbee2MQTT
FlyingDomotic
Posts: 463
Joined: Saturday 27 February 2016 0:30
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Contact:

Re: Question about MQTT -problem

Post by FlyingDomotic »

As messages "Network is unreachable" and "No route tohost", this can be (roughly):
1) local host not connected to Wifi. Check with ifconfig if interfaces are connected (have IP @). Try to ping some remote nodes. If you have access to Wifi router, try to see if node is connected.
2) destination server is not on the same network and router is not available, or route not properly propagated to local host. Depending on your os, try "route print" or "ip route" to see if you can find some route to destination. Try to ping router to see if it respond.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest