Noob started with MQTT

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

Moderator: leecollings

Post Reply
dizzeenl
Posts: 31
Joined: Wednesday 14 November 2018 23:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Dordrecht
Contact:

Noob started with MQTT

Post 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?
alkempter
Posts: 26
Joined: Sunday 17 February 2019 10:34
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Contact:

Re: Noob started with MQTT

Post 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
dizzeenl
Posts: 31
Joined: Wednesday 14 November 2018 23:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Dordrecht
Contact:

Re: Noob started with MQTT

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest