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:

Re: MQTT Auto do not discover all devices

Post by Varazir »

waltervl wrote: Monday 05 February 2024 9:11 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.
Something has changed in the past month

I'm planing to reinstall my domoticz, I have a spare RPI I can set it up on.
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
User avatar
waltervl
Posts: 5409
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 »

Devices are also only created in Domoticz after discovery when a value has been sent. So perhaps you have to trigger a value change or update from the integration eg your 3D printer and not from 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 »

waltervl wrote: Monday 05 February 2024 9:29 Devices are also only created in Domoticz after discovery when a value has been sent. So perhaps you have to trigger a value change or update from the integration eg your 3D printer and not from Domoticz.
Don't know. Not sure how to test.
But I'll try to reinstall it.
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 »

Varazir wrote: Monday 05 February 2024 21:29
waltervl wrote: Monday 05 February 2024 9:29 Devices are also only created in Domoticz after discovery when a value has been sent. So perhaps you have to trigger a value change or update from the integration eg your 3D printer and not from Domoticz.
Don't know. Not sure how to test.
But I'll try to reinstall it.
oh I read it again, it's just a normal zwave switch.
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 »

Note sure if I'm going to run everything within docker. I need docker for the zwave,
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
User avatar
waltervl
Posts: 5409
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 »

I mean as stated in https://www.domoticz.com/wiki/Zwave-JS-UI
After adding/updating the MQTT Client Gateway for Zwave-JS-UI the Zwave devices will be automatically added in the Domoticz device list if discovered by Zwave-JS-UI, check menu Setup - Devices. Domoticz devices will be created once data is received. So especially for battery operated devices it can take some time to have this data received. Sometimes it is possible to activate these sensors manually by pushing a button.
So for example Domoticz will only create the switch if it discovered the device (in MQTT default topic homeassistant) and ZwaveJSUI has sent the state (ON/OFF). To trigger the state change you perhaps have to switch it from the device itself.
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: Tuesday 06 February 2024 13:54 I mean as stated in https://www.domoticz.com/wiki/Zwave-JS-UI
After adding/updating the MQTT Client Gateway for Zwave-JS-UI the Zwave devices will be automatically added in the Domoticz device list if discovered by Zwave-JS-UI, check menu Setup - Devices. Domoticz devices will be created once data is received. So especially for battery operated devices it can take some time to have this data received. Sometimes it is possible to activate these sensors manually by pushing a button.
So for example Domoticz will only create the switch if it discovered the device (in MQTT default topic homeassistant) and ZwaveJSUI has sent the state (ON/OFF). To trigger the state change you perhaps have to switch it from the device itself.
But everything this has been working for months, that is the big thing. I have just updated domoticz. Ya I know I'm running beta and it can have smal things that don't work but that the whole MQTT client gateway just crashes randomly it's more alpha issue.
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
User avatar
waltervl
Posts: 5409
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 »

But you are the only one having this issue. So it seems something in your environment. You have perhaps dig in more in your Zwave/Zigbee/MQTT settings. Retaining messages etc. Also ZwaveJSUI and Zigbee2MQTT do updates. Did you update them recently?
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: Tuesday 06 February 2024 15:49 But you are the only one having this issue. So it seems something in your environment. You have perhaps dig in more in your Zwave/Zigbee/MQTT settings. Retaining messages etc. Also ZwaveJSUI and Zigbee2MQTT do updates. Did you update them recently?
I noticed that they may have dropped support for older nodejs, trying to update it.
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 can't find a way to upgrade
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 have installed nodejs using apt install but the system still using the local old version
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 »

waltervl wrote: Tuesday 06 February 2024 15:49 But you are the only one having this issue. So it seems something in your environment. You have perhaps dig in more in your Zwave/Zigbee/MQTT settings. Retaining messages etc. Also ZwaveJSUI and Zigbee2MQTT do updates. Did you update them recently?
I tried to install everything new but kept getting roadblocks with every thing so I installed the MQTT and Zigbee2MQTT as docker on my old installation and now everything is working as it should :)
Last edited by Varazir on Sunday 11 February 2024 14:19, edited 1 time in total.
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
User avatar
waltervl
Posts: 5409
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 »

Good to know!
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Fogelholk
Posts: 1
Joined: Friday 23 February 2024 7:53
Target OS: Linux
Domoticz version:
Contact:

Re: MQTT Auto do not discover all devices

Post by Fogelholk »

Hi! I wanted to add another "Me too!" and what has been a workaround for me lately.

Domoticz and Z-Wave JS have been working perfectly since I migrated from OpenZWave, until a few weeks back :(

I run Z-wave JS, Mosquitto and Domoticz on the same FreeBSD virtual machine. Since I upgraded from 2023.1 to 2024.4 I've seen a few switches and dimmers just not respond in Domoticz at all and when trying to flip switches and dimmers via Domoticz I just get the following (for the corresponding device, this is trying to turn off some lights using a timer on each device in Domoticz):

Code: Select all

2024-02-23 00:00:01.910 Error: Z-Wave JS UI: Switch not found!? (zwavejs2mqtt_0xd845223d_10-37-0-currentValue/Kitchen - Window light)
2024-02-23 00:00:01.910 Error: Error sending switch command, DevID: 6, Time: 2024-02-23 00:00:01
2024-02-23 00:00:01.910 Error: Z-Wave JS UI: Switch not found!? (zwavejs2mqtt_0xd845223d_8-37-0-currentValue/Livingroom - Window Lights)
2024-02-23 00:00:01.910 Error: Error sending switch command, DevID: 3, Time: 2024-02-23 00:00:01
2024-02-23 00:00:01.910 Error: Z-Wave JS UI: Switch not found!? (zwavejs2mqtt_0xd845223d_7-37-0-currentValue/Office - Screen backlight)
2024-02-23 00:00:01.910 Error: Error sending switch command, DevID: 2, Time: 2024-02-23 00:00:01
2024-02-23 00:00:01.910 Error: Z-Wave JS UI: Switch not found!? (zwavejs2mqtt_0xd845223d_59-51-0-currentColor/Balcony - Light)
2024-02-23 00:00:01.910 Error: Error sending switch command, DevID: 830, Time: 2024-02-23 00:00:01
What I have found worked for me (until next time I have to reboot the Domoticz VM, or restart just Z-Wave JS/Domoticz) is going into Z-wave JS UI Web, click/expand on the affected device > Home Assistant > Rediscover node > Yes. I see in the Domoticz-logs that the device is rediscovered. Then go to Node still in Z-wave JS UI and flip the switch a few times (maybe once is enough, not sure). Then finally after a few seconds Domoticz can turn on and off the device as intended again.

It's often a gamble how many devices are not initially synced or stops working. And sometimes they seem to "auto heal" and start working after a few hours by themselves if I don't have the energy to find out which devices I have to manually rediscover.

Currently running these versions of stuff:
FreeBSD 13.2
Aeotec Z-Stick 7
Domoticz 2024.4
Z-Wave JS UI 9.9.0
Z-Wave JS 12.4.4
Mosquitto 2.0.15

I currently have 52 devices in my Z-Wave network and I haven't found any setting to increase timeouts or whatever which was recommended with the old OpenZWave. I recall having read somewhere that it is recommended to increase some timeout if you have many devices with OpenZWave.

I'd be happy to help send logs or more info to get to the bottom of this, but I don't know if it's an issue with Z-Wave JS or Mosquitto or Domoticz, but gotta start somewhere! Then I found this forum topic and thought I'd give it a shot!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests