For the past few months I’ve had some sensors in my garden feeding sensor information to HA using MQTT. It’s been working fine and then about a week ago I found this in the UI
I haven’t been able to get it working again. The logs show that HA is receiving the information
2019-07-12 19:14:21 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/fence/state: b'{"moisture": 30, "light": 4280, "battery": 76, "temperature": 18.5, "conductivity": 193}'
2019-07-12 19:15:38 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/trug1/state: b'{"moisture": 39, "light": 1142, "battery": 61, "temperature": 18.3, "conductivity": 246}'
2019-07-12 19:15:58 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/fence/state: b'{"moisture": 31, "light": 3993, "battery": 76, "temperature": 18.2, "conductivity": 194}'
2019-07-12 19:17:03 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/trug1/state: b'{"moisture": 39, "light": 1001, "battery": 61, "temperature": 18.3, "conductivity": 241}'
2019-07-12 19:17:59 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/sensor/fence/state: b'{"moisture": 30, "light": 3700, "battery": 76, "temperature": 17.6, "conductivity": 196}'
But for want of a better description HA has suddenly decided it’s going to ignore it and I can’t figure out why. MQTT config is straightforward (and unchanged)
Can anyone suggest what else I can check? There were no configuration changes around the time this happened. The only errors in the log are rate limit errors for things I should get round to throttling and the occasional 404 from NetAtmo requests. Other than that everything is working as expected except this.
Some of them are bluetooth devices so they don’t have IP addresses - they use this: miflora-mqtt-daemon
The other devices are a mixture of Arduino and NodeMC devices which do have IP addresses but they’re able to publish to the MQTT server which is a VM. It’s definitely not a communication problem.
There are other publishers (e.g. Owntracks) publishing to MQTT but not using discovery. These are working fine in HA.
There’s nothing there. As I said, HA sees the message in the homeassistant/+/+ queue, reads it and then does nothing with it. If the line wasn’t appearing in the logs then the problem would be elsewhere but HA is reading the message from the queue and failing to process it. It’s not complaining, for example, about the format of the payload - it just seems to discard the message.
Debugging doesn’t give me any other information. If I subscribe to the topic I can see the message - a correctly formed and valid topic with payload - arrive without a problem
The problem appears to be that HA no longer “converts” sensor/trug1/state {“light”:200} to sensor.trug1_light - in fact it doesn’t convert it to anything. But there’s no error saying it’s a malformed payload or there’s an error with sensor.trug1_light - it just doesn’t do anything.