cedbossneo / openmower-gui

28 stars 18 forks source link

OM_MQTT_TOPIC_PREFIX #38

Closed pinussen closed 5 months ago

pinussen commented 5 months ago

Please add the mqtt prefix config (it's removed when saving settings in the GUI):

export OM_MQTT_TOPIC_PREFIX="openmower"

This is to set a prefix on all MQTT messages so e.g. Home assistant becomes a little cleaner when you have many mqtt sources. It has been in the openmower edge branch since August but maybe not in the other branches yet.

Great GUI btw, thanks for building it!

Bonus question: Can you add a button to upgrade openmower? podman auto-update + maybe show the version/branch/commit?

AndreKR commented 3 months ago

I'm pretty sure (because I'm also looking for this parameter) what @pinussen meant was the variable OM_MQTT_TOPIC_PREFIX in mower_config.sh.

Currently the GUI can only set OM_MQTT_HOSTNAME, OM_MQTT_ENABLE, OM_MQTT_PORT, OM_MQTT_USER and OM_MQTT_PASSWORD, but not OM_MQTT_TOPIC_PREFIX.

38 implemented a prefix for the GUI MQTT, but does not allow to set OM_MQTT_TOPIC_PREFIX for the OpenMower MQTT.

AndreKR commented 3 months ago

I just realized, as a workaround I can set OM_MQTT_TOPIC_PREFIX in docker-compose.yaml. mower_config.sh just sets environment variables after all.