Page 1 of 1

Noob started with MQTT

Posted: Sunday 20 November 2022 21:34
by dizzeenl
Hy all,

i recently started with MQTT for my zwave devices in Domoticz.
I needed quite some time to get all the needs installed and solving all te errors that passed.

At the end i installed snapd, core, zwave-js-ui and the osquitto mosquitto-clients.
plenty of guides to make it work, but all not so clear as i hoped (a lot harder then the Openzwave option within Domoticz :shock: )

Finally i got the zwave-js-ui working and connected with the MQTT discovery plugin (and connected).
i added some zwave products within the zwave js (was getting easy) but doesnt get them as an device in Domoticz (what should be i believe...?)

remote adress: localhost (ip doesnt work)
port: 1883
ZWAVE: connected to: localhost:1883

Should the devices appear automaticly in the device list?

Re: Noob started with MQTT

Posted: Friday 25 November 2022 15:22
by alkempter
Difficult to tell the cause.

Here just two hints:
First test the connection between MQTT and Domoticz e.g. by creatung an Dummy Temperature sensor, note the IDX it got (e.g. 112) and enter
mosquitto_pub -h localhost -m '{ "idx" : 112, "nvalue" : 0, "svalue" : "25.0" }' -t 'domoticz/in'
in the terminal session.
This should work if you defined in the MQTT hardware definitions the "Prefix Topic in" with domoticz/in (I also filled the "Prefix Topic out" with domoticz/out).
You should see that the temperature is updated to 25.0

Second (if the first test was OK):
Check the hardware definitions of you MWTT autodiscovery hardware in Domoticz for the value in the "Autodiscovery Prefix", it should in this case be domoticz
Then check the definitions in the Z-Wave JS UI.
In the section "Home Assistant" the button for "MQTT Discovery" should be turned on and the value of the field "Discovery Prefix" should be domoticz

Once it works domoticz will be flooded by new devices discovered (they all get new IDX values).

The text domoticz in the samples has to be the same in all definitions (it also works if you fill in homeassistant instead).

I hope this helps,
Cheers
Al

Re: Noob started with MQTT

Posted: Friday 25 November 2022 16:57
by dizzeenl
Thank you,

the first step i tested before and worked perfect.

I got a bit destracted by the whole home assistent section. I tought MQQT and gateway was enough for domticz and the home assistent area was for home assistent platforms only :D

Thank you for your help, it works fine now.