1technophile / OpenMQTTGateway

MQTT gateway for ESP8266 or ESP32 with bidirectional 433mhz/315mhz/868mhz, Infrared communications, BLE, Bluetooth, beacons detection, mi flora, mi jia, LYWSD02, LYWSD03MMC, Mi Scale, TPMS, BBQ thermometer compatibility & LoRa.
https://docs.openmqttgateway.com
GNU General Public License v3.0
3.57k stars 786 forks source link

Autodiscovery for Home Assistant only uses default topic for config messages #1919

Closed Bodrick01 closed 2 months ago

Bodrick01 commented 6 months ago

**Summary I don't use the default autodiscovery MQTT topic of "homeassistant" within my Home Assistant (HA) environment.

If I configure an OMG device (eg lilygo-ble) and set the base topic to be the same as my defined autodicovery topic in HA then the detected sensor values are indeed published with this base topic.

However, it appears that the "config" messages are only published under the default base topic of "homeassistant" and not under my required topic. Hence they are never then autodiscovered by HA.

Please can this be confirmed/resolved.

Describe the bug Config messages for Home Assistant are only published under the default topic of "homeassistant" and not under any custom topic specified on the OMG gateway.

To Reproduce Steps to reproduce the behaviour:

  1. install pre-compiled binary - I used lilygo-ble
  2. choose a base topic that isn't "homeassistant"
  3. watch the data received on the OMG gateway being published using MQTTExplorer
  4. note that the "config" messages continue to only be published under the "homeassistant" topic and not the specified base topic

Expected behaviour I would expect config messages to be published under the specified topic.

Environment (please complete the following information):

github-actions[bot] commented 3 months ago

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] commented 2 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.