Alternatively, one can use the python script rtl_433_mqtt_hass.py
(see: rtl_433/examples/rtl_433_mqtt_hass.py at 6f7846e829cf9e9d6d27224ed8adb1f00f9f3a48 · merbanan/rtl_433 · GitHub ).
Unfortunately, the format for naming devices and entities along with other config data differs from the format used by OpenMQTTGateway so this is not a perfect solution.
I wrote and posted PR for OpenMQTT Gateway that exactly solves this problem by allowing you to change the Discovery Prefix either from the WebUI or via
mosquitto_pub.
See:
PR:
1technophile:development
← puterboy:puterboy-patch-1
opened 06:00AM - 16 Aug 24 UTC
## Description:
Changes made as discussed in https://github.com/1technophile/Op… enMQTTGateway/issues/1996
Specifically:
1. Declaration `discovery_Topic` deprecated (but still working) and changed to `discovery_Prefix` to avoid confusion with `discovery_topic`
2. New *variable* `discovery_prefix` introduced that defaults on new installs to discovery_Prefix (or discovery_Topic if present), is stored in NVS, and can be changed via WebUI (under `Configure MQTT`) or via mosquitto_pub, using something like:
```
mosquitto_pub -t "home/<GATEWAY_NAME>/commands/MQTTtoSYS/config" -m '{ "discovery_prefix": "<NEW_DISCOVERY_PREFIX" }'
```
I tested it using an esp32 with `esp32dev-ble` and the functionality works as described.
Let me know if you are ok with the PR.
## Checklist:
- [X ] The pull request is done against the latest development branch
- [X ] Only one feature/fix was added per PR and the code change compiles without warnings
- [ ] I accept the [DCO](https://github.com/1technophile/OpenMQTTGateway/blob/development/docs/participate/development.md#developer-certificate-of-origin).
and discussion under:
Add ability to change discovery prefix on the fly either via WebGUI or mosquitto_sub · Issue #1996 · 1technophile/OpenMQTTGateway · GitHub
For me at least, this truly solves the problem as I originally hoped!