How do I add new MQTT channels to an existing esphome Thing?

  • Platform information:
    • openHAB version: 3.1.1
  • Issue of the topic:

I had an existing Thing, an esp32 board being used to bridge to 1 Bluetooth Low Energy temp/humidity sensor. In openHab it had the code below:

UID: mqtt:homeassistant_349454250230:2d1cd8ee67:349454250230
label: esp32mijiablebridge1
thingTypeUID: mqtt:homeassistant_349454250230
configuration:
  topics:
    - sensor/esp32mijiablebridge/pvvx_temperature
    - sensor/esp32mijiablebridge/pvvx_battery-level
    - sensor/esp32mijiablebridge/pvvx_humidity
    - sensor/esp32mijiablebridge/pvvx_battery-voltage
  basetopic: homeassistant
bridgeUID: mqtt:broker:2d1cd8ee67

Then I updated my esphome config so it would also bridge to a 2nd BLE temp/humidity sensor, of the same hardware type. Updated the esphome config, compiled, pushed the firmware to esp32, and it seemed to work because I see the new data in MQTT Explorer, and in OpenHab the code auto-updated to this:

UID: mqtt:homeassistant_349454250230:2d1cd8ee67:349454250230
label: esp32mijiablebridge1
thingTypeUID: mqtt:homeassistant_349454250230
configuration:
  topics:
    - sensor/esp32mijiablebridge/pvvx-2_humidity
    - sensor/esp32mijiablebridge/pvvx_temperature
    - sensor/esp32mijiablebridge/pvvx-2_battery-level
    - sensor/esp32mijiablebridge/pvvx_battery-level
    - sensor/esp32mijiablebridge/pvvx_humidity
    - sensor/esp32mijiablebridge/pvvx-2_temperature
    - sensor/esp32mijiablebridge/pvvx_battery-voltage
    - sensor/esp32mijiablebridge/pvvx-2_battery-voltage
  basetopic: homeassistant
bridgeUID: mqtt:broker:2d1cd8ee67

But… in the Channels tab of the Thing I can’t see the new sensors (the ones starting with pvvx-2). They’re not in All, they’re not in Unlinked.

So, how do I add them in, please?

Was this Thing automatically discovered or is it a Generic MQTT Thing?

If the former,

  1. Take note of the UID of the Thing
  2. Delete the Thing (keep the links and Items)
  3. Rescan for the MQTT Thing using which ever standard ESPHome follows (Home Assistant or Homie).
  4. Accept the Thing from the inbox and the Channels should be there.

If it’s a Generic MQTT Thing, there’s a + icon at the bottom. Click that to define the new Channels.

1 Like