Tracking the log:tail I don’t see anything and the temperature in my generic thing doesn’t change.
How do I figure out the topic name ? It seems that what I am using is wrong. I don’t know how to determine the correct topic parameter.
That seems to be the openhab channel id, not an mqtt topic. You’re confusing the two.
You need to find out what that openhab channel’s MQTT Topic first, (stateTopic). Then you publish your message using that topic using mosquitto_pub
Here’s a copy pasted example from my system:
Thing mqtt:topic:studyroom-thermometer "Study Room Thermometer" (mqtt:broker:mosquitto) [ availabilityTopic="zigbee/studyroom-thermometer/availability", payloadAvailable="online", payloadNotAvailable="offline" ] {
Channels:
Type number : temperature [ stateTopic="zigbee/studyroom-thermometer/temperature", unit="°C" ]
Type number : humidity [ stateTopic="zigbee/studyroom-thermometer/humidity", unit="%" ]
Type number : pressure [ stateTopic="zigbee/studyroom-thermometer/pressure", unit="mbar" ]
Type number : linkquality [ stateTopic="zigbee/studyroom-thermometer/linkquality" ]
Type contact : availability [ stateTopic="zigbee/studyroom-thermometer/availability", on="online", off="offline" ]
Type number : battery [ stateTopic="zigbee/studyroom-thermometer/battery", unit="%" ]
}
As you see, my openhab thing is called mqtt:topic:studyroom-thermometer and the temperature channel is mqtt:topic:studyroom-thermometer:temperature. Its MQTT stateTopic is zigbee/studyroom-thermometer/temperature
So to publish a value that openhab channel/item will pick up for the mqtt:topic:studyroom-thermometer:temperature channel, I would do