Followed all the step for auto discover in Openhab 4.3

I have followed all the steps to set up the OpenMQTTGateway.

Running OpenHAB on my network xxx.xxx.xxx.186
Running MQTT on Synology xxx.xxx.xxx.230

OpenHab shows MQTT online.
Jinja Transformation and JSONPath Transformation are both installed.
Already did a restart of OpenHAB

The settings in my openMQTTgateway are:

Gateway Name: Gateway_433
MQTT Base Topic: home/
MQTT Discovery Prefix: openMQTT

After entering the command.

mosquitto_pub -t "home/Gateway_433/commands/MQTTtoSYS/config" -m '{"ohdisc":true}'

And restarting the OpenMQTTGateway I can see in the console that it has been accepted because it shows ohdisc:true in the console of the OpenMQTTGateway.

N: SYS json: {"uptime":54492,"version":"v1.8.0","mqtt":true,"serial":false,"disc":false,"ohdisc":true,"env":"lilygo-rtl_433","freemem":107412,"mqttp":"1883","mqtts":false,"mqttv":false,"msgprc":1914,"msgblck":0,"msgrcv":1914,"maxq":20,"cnt_index":0,"minmem":41608,"tempc":51.11,"freestck":2972,"powermode":-1,"eth":false,"rssi":-60,"SSID":"GeenWifiBeschikbaar","BSSID":"76:AC:B9:9D:9F:60","ip":"192.168.99.190","mac":"14:2B:2F:B8:65:4C","modules":"'LilyGo_SSD1306', 'WebUI', 'rtl_433'","origin":"/SYStoMQTT"}

Also in MQTT explorer is see several devices being send by the MQTT server.

However the GT-WT03 and the TFA-TwinPlus never show up in my inbox.
If i check the contents of the config for GT-WT03 i see this

{
  "stat_t": "+/+/RTL_433toMQTT/GT-WT03/1/166",
  "dev_cla": "temperature",
  "unit_of_meas": "°C",
  "name": "Temperature",
  "uniq_id": "GT-WT03-1-166-temperature_C",
  "val_tpl": "{{ value_json.temperature_C }}",
  "stat_cla": "measurement",
  "device": {
    "ids": [
      "GT-WT03-1-166"
    ],
    "cns": [
      [
        "mac",
        "GT-WT03-1-166"
      ]
    ],
    "mdl": "GT-WT03",
    "name": "GT-WT03-1-166",
    "via_device": "Gateway_433"
  }
}

Is someone able to see why these items are not showing up in my inbox.

Many thanks in advance.

Welcome @Charley

While you might know that the HA convention discovery in openHAB was always very flakey in the past years, this has greatly improved with the release of openHAB 4.3, even if there are still a few minor issues outstanding.

We will need to update some necessary workaround from the past and the documentation to reflect this in OpenMQTTGateway, but for now

can you set this to "ohdisc":false again, but make sure that "disc":true, which was always required, even with the ohdisc workaround setting.

Then issue a restart command to the gateway and you should hopefully see your sensors in your inbox.

Let us know how you get on.

Hello @DigiH ,

I have just made the changes, {"ohdisc": false, "disc" true}.
and did the restart below the output from the console.

home/Gateway_433/SYStoMQTT msg: {"uptime":12,"version":"v1.8.0","mqtt":true,"serial":false,"disc":true,"ohdisc":false,"env":"lilygo-rtl_433",....}

In MQTT explorer I can see data but not come to OpenHAB also my OH logs show nothing.

Are you using openhabian by any chance, with its installation of the Mosquito broker?

With the user name and password correctly entered into the gateway? I would assume so if you can see the discovery entries under the home assistant topic in MQTT Explorer

I just verified here with my rtl_433 devices and gateway, and everything is showing up fine in the opeNHAB inbox, creating correct things to make models from, with the values updating fine.

So you can see the discovery entries under the home assistant topic fine?

And you do have the MQTT Binding installed, as shown in my screenshot above?

@DigiH

I have the required bindings.
openMQTT3

I am running Openhabian on Raspberry 4. But I have no MQTT broker installed with openhabian.

In MQTT explorer I can see all entries in the home topic I have.

binary_sensor (7 topics, 34 messages)

:arrow_forward:sensor (23 topics, 132 messages)

:arrow_forward:switch (4 topics, 60 messages)

:arrow_forward:number (1 topic, 15 messages)

:arrow_forward:button (2 topics, 30 messages)

In my MQTT bridge.thing I have added a Thing to see if it works.

Thing topic External "Received" {
		Channels:
			Type number : moisture [stateTopic="home/Gateway_433/RTL_433toMQTT/Springfield-Soil/1/230", transformationPattern="JSONPATH:$.moisture"]
}

And the item in my text configuration is updated

Number ExternMoisture "Moisture [%.d %%]" { channel = "mqtt:topic:Portainer:External:moisture" }

This way it works but not with the inbox.

Do you see your MQTT Broker Thing at all? Here together with my discovered LaCrosse thermometer

Do you use any other MQTT discoveries, or is the OpenMQTTGateway one the first one you are trying to get integrated?

@DigiH

I have about 7 MQTT Things that have implemented by .things textfile.
There are over 40 different items from these things also all in .items textfles
They all work perfect already for years

But the discovery shows me nothing at all.

That is what I meant, if you have any other MQTT discoveries already working, or if all are defined manually, as you just confirmed.

As the broker also seems to be manually defined I’m not sure if this would make any difference in the openHAB MQTT auto-discovery.

Might be best suited for an openHAB forum query, as everything is working as expected in my test setup here with only auto-discovery, and you are also seeing all the discovery messages fine in your broker. I’m really not sure if there might be a conflict between manually defined and discovered things, especially with the MQTT Broker. I;m sure there must be an openHAB specific solution for this.

Thank you for your help so far, I let it rest a few days and will try to get it to work in after Christmas.

Merry Christmas

Thank you :wink: a Merry Christmas to you as well.

Goodmorning @DigiH ,

This morning I have installed MQTT through Openhabian
Did reload the openMQTTgateway to my lligo

Now all things are in the inbox. It is working.

N: [ OMG->MQTT ] topic: home/openMQTT/SYStoMQTT msg: {"uptime":130,"version":"v1.8.0","mqtt":true,"serial":false,"disc":true,"ohdisc":false,"env":"lilygo-rtl_433","freemem":108460,"mqttp":"1883","mqtts":false,"mqttv":false,"msgprc":19,"msgblck":0,"msgrcv":19,"maxq":19,"cnt_index":0,"minmem":41676,"tempc":51.11,"freestck":3980,"powermode":-1,"eth":false,"rssi":-51,"SSID":"GeenWifiBeschikbaar","BSSID":"76:AC:B9:9D:9F:60","ip":"192.168.99.190","mac":"14:2B:2F:B8:65:4C","modules":["LilyGo_SSD1306","WebUI","rtl_433"]} 

Out of the box no commands needed.