MQTT help

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

Moderator: leecollings

Post Reply
dino
Posts: 8
Joined: Wednesday 14 April 2021 23:24
Target OS: Linux
Domoticz version:
Contact:

MQTT help

Post by dino »

Hello everyone!
I am new to MQTT protocol, have some questions, is it correct to set:
"Publish Topic:" to "Name"
"Topic In Prefix:" to "casa/+"
and
"Topic Out Prefix:" to "casa" ?

I have configured in that way to have, for example, the switch named "salotto" controllable writing

Code: Select all

mosquitto_pub -h $IP -m '{ "idx" : 1, "nvalue" : 1 }' -t 'casa/salotto'
and when I switch the switch in domoticz I have:

Code: Select all

casa/salotto {
        "Battery" : 255,
        "LastUpdate" : "2024-12-22 23:24:36",
        "RSSI" : 12,
        "description" : "",
        "dtype" : "Light/Switch",
        "hwid" : "3",
        "id" : "00014051",
        "idx" : 1,
        "name" : "salotto",
        "nvalue" : 0,
        "org_hwid" : "3",
        "stype" : "Switch",
        "svalue1" : "0",
        "switchType" : "On/Off",
        "unit" : 1
}
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests