Correct naming of MQTT items

Hello community,

my problem is that I am unable to figure out how to correctly name the channel for MQTT items.

what I have:

  • openHAB 3 on Raspi 4
  • mosquitto as MQTT broker (username + password protected)
  • zigbee2mqtt for my ZigBee USB stick
  • Xiamo Aqara Motion & Brightness Sensor
  • Wemos D1 mini (Tasmota firmware)

When I connect to my MQTT-Broker (with MQTT.fx) it shows me these topics (only important ones listed here):

  • tele/SensorPlant/SENSOR - Output is{"Time":"2021-02-21T14:36:40","ANALOG":{"A0":649}}
  • zigbee2mqtt/Motion_01/occupancy - Output is true
  • zigbee2mqtt/Motion_01/illuminance - Output is 17

Under openHAB I have created a thing “MQTT Broker” (mqtt:broker:mosquitto).

So my question is:
How do I have to name my channels in my item-file (I create all items via file, not via web interface) to correctly create my items?

Thanks for your advice

You first need to create a Thing, within which you create Channels. After that you can create your Items and link it to your Thing Channel.

See if this link helps for your Tasmota device. It’s all file configuration based.

Thanks for your reply.

That did solve my problem, I wasn’t aware that I had to create THINGS for every MQTT device as well. I thought that I only needed my “MQTT Broker” THING and then only ITEMS (and not THINGS) for every MQTT device.