mqtt autodiscovery in new domoricz release doesn't seem to work

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

Moderator: leecollings

Post Reply
akamming
Posts: 337
Joined: Friday 17 August 2018 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

mqtt autodiscovery in new domoricz release doesn't seem to work

Post by akamming »

i noticed the deprecated openzwave warning in the new stable, so i did some testing with z-zwave JS UI, following the steps at https://www.domoticz.com/wiki/Zwave-JS-UI. But unfortunately no devices are created.

the weird thing is there are no errors. z-wave JS UI initializes all devices. in the logfile in the container "/var/lib/docker/volumes/zwave-js-ui/_data/logs" no errors, i see zwave is initialized and sensor readings are received

in the domoticz log also no errors. Autodiscovery is switched on and the discovery prefix is ok. I also know mqtt is working, because i use mqtt for communicating with siri/homekit (homebridge) and that works fine (another prefix ofcourse)

how can i troubleshoot to find out what is going wrong?
akamming
Posts: 337
Joined: Friday 17 August 2018 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: mqtt autodiscovery in new domoricz release doesn't seem to work

Post by akamming »

nevermind: fixed it. apparently you cannot use localhost as hosturl for mqtt in z-wave js ui (which is weird, i use "localhost" for every other config on the machine). using the ip adress of the machine instead fixed it...
User avatar
C4rtm4N
Posts: 49
Joined: Saturday 07 February 2015 21:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: UK
Contact:

Re: mqtt autodiscovery in new domoricz release doesn't seem to work

Post by C4rtm4N »

I had the same problem & sat for a couple of hours last night trying to fix things. I was convinced that it was my old version of Mosquitto that had caused the issue until I saw your post!
User avatar
constapel
Posts: 15
Joined: Friday 30 December 2016 21:43
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: mqtt autodiscovery in new domoricz release doesn't seem to work

Post by constapel »

After update 2022.2 14716 domticz seems to give errors in using devices which have been added by mqtt auto in previous domoticz release . Every device is giving: "Error sending switch command, Check device/hardware (idx=6312)
Zwave-js is running correct. MQTT (mosquito) is running correct.
What an i missing here?
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: mqtt autodiscovery in new domoricz release doesn't seem to work

Post by waltervl »

constapel wrote: Friday 11 November 2022 13:18 After update 2022.2 14716 domticz seems to give errors in using devices which have been added by mqtt auto in previous domoticz release . Every device is giving: "Error sending switch command, Check device/hardware (idx=6312)
Zwave-js is running correct. MQTT (mosquito) is running correct.
What an i missing here?
First, don't update to Beta versions if you do not really need to, to prevent getting into unexpected issues.
What happens if you disable/enable MQTT Autodiscover hardware (idx=6312)?
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
constapel
Posts: 15
Joined: Friday 30 December 2016 21:43
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: mqtt autodiscovery in new domoricz release doesn't seem to work

Post by constapel »

Hi Walter. The updaterelease does not work on my rpi3 system ( for 5 year) so i am always running updatebeta.
Disabeling MQTT Auto does not help or improve the situation. My MQTT AUTO Zwave-Js is realy f 'up since latest release..
I accidentally used the check for update menu item. Now i am in trouble....
Something has change in the authentication system of domoticz. I also had a hard time to get the docmoticz system working correctly again ( after the check for update item)
Had to recreate a user/password. I am complete surpriced by this move...
I thing something is wrong in the authentications routines ( domotics <-> MQTT) since the new release.
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: mqtt autodiscovery in new domoricz release doesn't seem to work

Post by waltervl »

There is an automatic backup created during update beta. So you can revert back easily. See wiki https://www.domoticz.com/wiki/Raspberry ... eta_update

That ./updaterelease is not working and update beta does is very strang as it are basically the same scripts.

But don't revert to stable now from latest beta as there was already a datamodel update in the database which could give errors in stable.

So go back to the backup beta (and losing some measuring data) and after that it would be possible to update to latest stable 2022.2 (if you want)
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
riko
Posts: 90
Joined: Saturday 22 August 2020 13:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: mqtt autodiscovery in new domoricz release doesn't seem to work

Post by riko »

I'm trying to update to Zwave JS UI, from OpenZWave, but don't get the autodiscovery working. No new devices are appearing:
  • Mosquitto is working fine
  • Z-Wave JS UI is installed an works fine, I can access it throught the web interface. I've updated all settings in JS UI according to the migration manual, like Activating MQTT Discovery, using the prefix homeassistant
  • Enabled Accept new hardware in the Domoticz settings
  • Added the MQTT AD Client in Domoticz, using the IP instead of localhost and using the autodiscovery prefix homeassistant
When I press update it looks like it is working fine:

Code: Select all

2023-01-04 18:52:40.794 Status: Zwave JS UI: Worker stopped...
2023-01-04 18:52:41.797 Status: Zwave JS UI: Connecting to 192.168.1.100:1883
2023-01-04 18:52:41.998 Status: Zwave JS UI: connected to: 192.168.1.100:1883
  • Added the device names in JS UI and pressed 'save' in the setings several times to push status messages for all devices
  • Tried to change the prefix into something else (zwavejsAD) in both JS UI and Domoticz
But still.... nothing happens. Does anybody know what can be the reason it is not working. Or how I can do some debugging?
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: mqtt autodiscovery in new domoricz release doesn't seem to work

Post by waltervl »

To debug check the debug section of the mqtt wiki. https://www.domoticz.com/wiki/MQTT#Debugging_MQTT
Especially check if zwavejs sends data to mqtt
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
riko
Posts: 90
Joined: Saturday 22 August 2020 13:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: mqtt autodiscovery in new domoricz release doesn't seem to work

Post by riko »

Thanks for the tip, using MQTT explorer I indeed found that zwavejs was not sending data. And I found that the 'localhost' was also used in the MQTT configuration in zwavejs. Based on this topic I was under the impression that it was about the localhost in the Domoticz hardware configuration. Now I put the IP in both and it is working!
DomoNick
Posts: 2
Joined: Wednesday 09 October 2019 21:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Location: Lochem, Netherlands
Contact:

Re: mqtt autodiscovery in new domoricz release doesn't seem to work

Post by DomoNick »

Hi guys,

I'm glad I (finally) found this post on the forum. It took me way too many hours to figure out why my migration from Open Zwave to Zwave-JS-UI wasn't working! :( Installing the Zwave-JS-UI was successful, as the web front end on port 8091 showed all my Zwave devices flawlessly. Yet none of them showed up in Domoticz! Inspecting with MQTT Explorer revealed that the information didn't reach Mosquitto. I saw just the Zigbee2MQTT data, but none from Zwave. And I couldn't figure out why! Until I found this topic on the forum in which akamming found out that you cannot use localhost as hosturl for mqtt in Zwave-JS-UI, but one has to use the ip adress of the machine instead! This contradicts with the instructions and the default.

So my strong advice is to add this information to the Wiki https://www.domoticz.com/wiki/Zwave-JS- ... _OpenZwave at the 4th bullit under the Basic Steps, describing the settings of the MQTT section in Zwave-JS-UI. In order to prevent others from searching this needle in the hay stack, like I had to.

Thanks,
Nick
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: mqtt autodiscovery in new domoricz release doesn't seem to work

Post by gizmocuz »

Thanks for reporting, wiki is adjusted
Quality outlives Quantity!
DomoNick
Posts: 2
Joined: Wednesday 09 October 2019 21:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Location: Lochem, Netherlands
Contact:

Re: mqtt autodiscovery in new domoricz release doesn't seem to work

Post by DomoNick »

Thanks!

PS. I see at the same time you also modified the contents of the html to add the Zwave-JS-UI as a custom menu in Domoticz. That still doesn't work for me. I get the option in the custom menu, but after selecting it, I get just an empty window. Any suggestions?
fr3sh
Posts: 37
Joined: Saturday 16 April 2016 1:02
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: mqtt autodiscovery in new domoricz release doesn't seem to work

Post by fr3sh »

I had the same issue. You need to double check that your Zwave-JS-UI/Settings MQTT uses a real IP adresses not localhost! This will connect to the broker MQTT(MOSQITO).
You can check a log mosquitto.log it should have two connection one from homeassistnat one from domoticz. After that it will work in domoticz and show up the devices :)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests