MQTT Auto do not discover all devices Topic is solved

For devices supporting the Auto Discovery feature. Like ZWaveJS2MQTT, Zigbee2MQTT.

Moderator: leecollings

User avatar
Varazir
Posts: 360
Joined: Friday 20 February 2015 22:23
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

MQTT Auto do not discover all devices

Post by Varazir »

Hello,

I have had the MQTT Auto Discovery Client Gateway with LAN running since it came out and it has been working okay.
But few weeks ago it stopped discover all devices. I can't understand why. It's not that it's all new devices.

If I check Zigbee2MQTT I can see all devices and control them just fine.

Anyone knows what I should look for ?

This is my hardware
Image
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
User avatar
waltervl
Posts: 5376
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: MQTT Auto do not discover all devices

Post by waltervl »

Do you use different discovery topics for zigbee2MQTT and Zwavejs (default homeassistant)? And are they configured correctly in your MQTT AD gateways?
Also they should not be the same as the device topic prefix.

So in mqtt explorer you should see by default something like

Code: Select all

zigbee2mqtt
- bridge
- device1
- device2
homeassistant
- switch
   -deviceA
   -device1
-sensor
   -deviceB
   -device2
Zwave
- bridge
- Node1
- Node2
But in your case it should be something like

Code: Select all

zigbee2mqtt
- bridge
- device1
- device2
homeassistantZ2M
- switch
   -device1
-sensor
   -device2
homeassistantZWJS
- switch
   -deviceA
-sensor
   -deviceB
Zwave
- bridge
- Node1
- Node2
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
Varazir
Posts: 360
Joined: Friday 20 February 2015 22:23
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: MQTT Auto do not discover all devices

Post by Varazir »

waltervl wrote: Friday 26 January 2024 14:52 Do you use different discovery topics for zigbee2MQTT and Zwavejs (default homeassistant)? And are they configured correctly in your MQTT AD gateways?
Also they should not be the same as the device topic prefix.
Yes

Image

Image
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
User avatar
Varazir
Posts: 360
Joined: Friday 20 February 2015 22:23
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: MQTT Auto do not discover all devices

Post by Varazir »

the zwave devices works great. Both has work at the same time as well.
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
User avatar
Varazir
Posts: 360
Joined: Friday 20 February 2015 22:23
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: MQTT Auto do not discover all devices

Post by Varazir »

correctly in your MQTT AD gateways,

how do I check that ?
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
User avatar
waltervl
Posts: 5376
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: MQTT Auto do not discover all devices

Post by waltervl »

What do you see in MQTT explorer?
What is the discovery prefix in Zwave-JS-UI? https://www.domoticz.com/wiki/Zwave-JS- ... r_Domoticz
It should not be zwave.
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
Varazir
Posts: 360
Joined: Friday 20 February 2015 22:23
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: MQTT Auto do not discover all devices

Post by Varazir »

hehe ya I changed to zwave when I set it up.

Image
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
User avatar
waltervl
Posts: 5376
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: MQTT Auto do not discover all devices

Post by waltervl »

Change it eg zwaveAD both in Zwave-JS-UI and Domoticz.
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
Varazir
Posts: 360
Joined: Friday 20 February 2015 22:23
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: MQTT Auto do not discover all devices

Post by Varazir »

Changed both but didn't create any new nodes when I Checked with MQTT Explorer so I switched back and now my zwave stopped working......
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
User avatar
Varazir
Posts: 360
Joined: Friday 20 February 2015 22:23
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: MQTT Auto do not discover all devices

Post by Varazir »

Hmm, I don't see any update from any of the services.
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
User avatar
Varazir
Posts: 360
Joined: Friday 20 February 2015 22:23
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: MQTT Auto do not discover all devices

Post by Varazir »

I see this in the /var/log/mosquitto/mosquitto.log file

Code: Select all

1706301852: Outgoing messages are being dropped for client Domoticz-MQTT-AutoDiscoverff038b5a-afb1-4232-9ac3-14593f4debef15.
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
rutgercjonaker
Posts: 3
Joined: Monday 29 January 2024 20:20
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.3
Contact:

Re: MQTT Auto do not discover all devices

Post by rutgercjonaker »

I have exactley the same problem.
I have both zwavejs2mqtt and zigbe2mqtt working since a long time Domoticz.
After upgrading all my IKEA led driver device stopped working with the same error message,
"Error sending switch command, check device/hardware (idx=xxxx) !".
All other zigbee devices, IKEA switches and in wall mounted dimmers of other brands, still work.
All devices are working fine in zigbee2mqtt gui.
User avatar
waltervl
Posts: 5376
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: MQTT Auto do not discover all devices

Post by waltervl »

So what have you investigated already from the tips in this topic?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
rutgercjonaker
Posts: 3
Joined: Monday 29 January 2024 20:20
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.3
Contact:

Re: MQTT Auto do not discover all devices

Post by rutgercjonaker »

I did check in MQTT Explorer that when using zigbee2mqtt I saw that there were messages transmitted, none when using Domoticz and it was reporting the error message.
I did try and exlude my devices and inlude them again and then they worked for a short time in Domoticz but then again failed.
But now I think my problem is solved, I updated Domoticz to 2024 . 4 and now the dimmable switches are working again.
User avatar
waltervl
Posts: 5376
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: MQTT Auto do not discover all devices

Post by waltervl »

It could be a communication issue between mqtt broker and Domoticz.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
rutgercjonaker
Posts: 3
Joined: Monday 29 January 2024 20:20
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.3
Contact:

Re: MQTT Auto do not discover all devices

Post by rutgercjonaker »

Restarting domoticz, zigbee2mqtt and mosquitto in different orders did not solve my issue. Tried many times, many orders.
Rebooting the Raspberry pi that is hosting my domoticz setup and after that restarting the different services did not solve my problem.
User avatar
Varazir
Posts: 360
Joined: Friday 20 February 2015 22:23
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: MQTT Auto do not discover all devices

Post by Varazir »

waltervl wrote: Wednesday 31 January 2024 19:29 It could be a communication issue between mqtt broker and Domoticz.
That is my conclusion.
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
User avatar
waltervl
Posts: 5376
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: MQTT Auto do not discover all devices

Post by waltervl »

Check the MQTT settings in mqtt broker and Domoticz. Be sure you use the real IP instead of localhost or 127.0.0.1 when you use docker containers. See also the wiki https://www.domoticz.com/wiki/MQTT
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
Varazir
Posts: 360
Joined: Friday 20 February 2015 22:23
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: MQTT Auto do not discover all devices

Post by Varazir »

Hmm, the HW is setup with the IP adress of my PI.

Code: Select all

2024-02-04 19:51:22.927 Status: MQTT zwavejsAD: discovered: 3D Printer (3D Printer_switch)/3D Printer (3D Printer_switch) (unique_id: zwavejs2mqtt_0xf0539677_8-37-0-currentValue)
2024-02-04 19:51:23.234 Status: MQTT zwavejsAD: discovered: 3DPrinter2 (3DPrinter2_switch)/3DPrinter2 (3DPrinter2_switch) (unique_id: zwavejs2mqtt_0xf0539677_4-37-0-currentValue)
2024-02-04 19:51:25.879 Status: MQTT zwavejsAD: discovered: 3DPrinter2 (3DPrinter2_scene_state_sceneid)/3DPrinter2 (3DPrinter2_scene_state_sceneid) (unique_id: zwavejs2mqtt_0xf0539677_4-43-0-sceneId)
2024-02-04 19:51:25.981 Status: MQTT zwavejsAD: discovered: 3DPrinter2 (3DPrinter2_scene_state_dimmingduration)/3DPrinter2 (3DPrinter2_scene_state_dimmingduration) (unique_id: zwavejs2mqtt_0xf0539677_4-43-0-dimmingDuration)
2024-02-04 19:51:26.082 Status: MQTT zwavejsAD: discovered: 3DPrinter2 (3DPrinter2_electric_kwh_value)/3DPrinter2 (3DPrinter2_electric_kwh_value) (unique_id: zwavejs2mqtt_0xf0539677_4-50-0-value-65537)
2024-02-04 19:51:26.183 Status: MQTT zwavejsAD: discovered: 3DPrinter2 (3DPrinter2_electric_w_value)/3DPrinter2 (3DPrinter2_electric_w_value) (unique_id: zwavejs2mqtt_0xf0539677_4-50-0-value-66049)
2024-02-04 19:51:26.285 Status: MQTT zwavejsAD: discovered: 3DPrinter2 (3DPrinter2_electric_v_value)/3DPrinter2 (3DPrinter2_electric_v_value) (unique_id: zwavejs2mqtt_0xf0539677_4-50-0-value-66561)
2024-02-04 19:51:26.386 Status: MQTT zwavejsAD: discovered: 3DPrinter2 (3DPrinter2_electric_a_value)/3DPrinter2 (3DPrinter2_electric_a_value) (unique_id: zwavejs2mqtt_0xf0539677_4-50-0-value-66817)
2024-02-04 19:51:26.488 Status: MQTT zwavejsAD: discovered: 3DPrinter2 (3DPrinter2_electric_v_value_0)/3DPrinter2 (3DPrinter2_electric_v_value_0) (unique_id: zwavejs2mqtt_0xf0539677_4-50-0-value-66560)
2024-02-04 19:51:26.589 Status: MQTT zwavejsAD: discovered: 3DPrinter2 (3DPrinter2_electric_a_value_0)/3DPrinter2 (3DPrinter2_electric_a_value_0) (unique_id: zwavejs2mqtt_0xf0539677_4-50-0-value-66816)
2024-02-04 19:51:26.691 Status: MQTT zwavejsAD: discovered: 3DPrinter2 (3DPrinter2_electric_w_value_0)/3DPrinter2 (3DPrinter2_electric_w_value_0) (unique_id: zwavejs2mqtt_0xf0539677_4-50-0-value-66048)
2024-02-04 20:06:00.916 Status: User:  (IP: xxxx) initiated a switch command (3/3D printer/Off)
Nothing happens

Image

If I open up the WEB GUI for zwavejsad I can control the device.

mosquitto -h | grep version
mosquitto version 1.5.7

OS Version: buster
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
User avatar
waltervl
Posts: 5376
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: MQTT Auto do not discover all devices

Post by waltervl »

This could be related to the templates used in the state topics (eg if then). Some Integrations make those unnecessary complex and Domoticz does not support those.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests