Description
Describe the bug
I'm using the SNAP install of TheengsGateway (v1.4) on an RPi Zero 2W under Debian 12. The MQTT broker is Mosquitto 2.0.18 running in a docker on another server. I am using MQTT Explorer to monitor the broker. The installation was smooth and I was able to connect to the broker easily. The system has been 100% stable for several days.
Before putting the gateway into production, I needed to change the mqtt pub-topic and lwt-topic to something other than the default home/TheengsGateway/xxx to avoid confusion with other TheengsGateways.
I have ha:discovery disabled
The commands I used after I SSH'd to the Pi Zero were:
sudo snap set theengs-gateway mqtt.pub-topic=pi_0/TheengsGateway/BTtoMQTT
sudo snap set theengs-gateway mqtt.lwt-topic=pi_0/TheengsGateway/LWT
The commands were accepted without error and the theengs-gateway service was automatically restarted after each command. I checked the config using:
sudo snap get -d theengs-gateway
pi@rpi-Zero:~ $ sudo snap get -d theengs-gateway
{
"bindkeys": "",
"ble": {
"adapter": "",
"enable": 1,
"scan-duration": 5,
"time-between": 5
},
"general-presence": 0,
"ha": {
"discovery": 0,
"discovery-device-name": "TheengsGateway",
"discovery-filter": "IBEACON GAEN MS-CDP",
"discovery-topic": "homeassistant/sensor",
"hass-discovery": 1
},
"identities": "",
"log-level": "WARNING",
"mqtt": {
"enable-tls": 0,
"enable-ws": 0,
"host": "192.168.0.34",
"lwt-topic": "pi_0/TheengsGateway/LWT",
"pass": "",
"port": 1883,
"pub-topic": "pi_0/TheengsGateway/BTtoMQTT",
"publish-advdata": 0,
"sub-topic": "home/+/BTtoMQTT/undecoded",
"user": ""
},
"presence": {
"enable": 0,
"topic": "home/TheengsGateway/presence"
},
"private": {
"bindkeys": "",
"ble": {
"adapter": "",
"enable": 1,
"scan-duration": 5,
"time-between": 5
},
"general-presence": 0,
"ha": {
"discovery": 0,
"discovery-device-name": "TheengsGateway",
"discovery-filter": "IBEACON GAEN MS-CDP",
"discovery-topic": "homeassistant/sensor",
"hass-discovery": 1
},
"identities": "",
"log-level": "WARNING",
"mqtt": {
"enable-tls": 0,
"enable-ws": 0,
"host": "192.168.0.34",
"lwt-topic": "pi_0/TheengsGateway/LWT",
"pass": "",
"port": 1883,
"pub-topic": "pi_0/TheengsGateway/BTtoMQTT",
"publish-advdata": 0,
"sub-topic": "home/+/BTtoMQTT/undecoded",
"user": ""
},
"presence": {
"enable": 0,
"topic": "home/TheengsGateway/presence"
},
"time-sync": {
"addresses": "",
"format": 0
},
"tracker-timeout": 120
},
"time-sync": {
"addresses": "",
"format": 0
}
}
The results were as expected with the configuration parameters correctly reflecting the changes.
The results in MQTT Explorer were different, however. The mqtt.lwt-topic was now publishing to pi_0/TheengsGateway/LWT as expected but the mqtt-pub-topic was still sending to the default home/TheengsGateway/BTtoMQTT
I restarted the MQTT broker several times and rebooted the Pi Zero several times with no difference in the behavior
Any thoughts?