Whilst working on another project I’ve had to restart Home Assistant multiple times today I’m not sure if this is connected but at some time during all of this restarting, all three of my gateways went offline to Home Assistant.
I published {“disc”:true} to each of the gateways (eg homeassistant/433OOKtoMQTT/commands/MQTTtoSYS/config) and they all re-appeared back.
But, all of the sensors that I was using from each gateway are all showing as unavailable.
I can see that they are updating topics in mqtt explorer, but Home Assistant is just not seeing them.
I’m still not sure what’s going on at all, most frustrating
Interesting that you have a sensor transmitting every 30 minutes, you will need to have discovery activated while it transmits.
For this you can check when the sensor transmitted last time (with mqtt explorer for example), add 30 minutes, and activate auto discovery a few minutes before.
2 out of the 3 gateways are re-sending all of the sensors I am interested in, but the FSK build is still not. I have enabled discovery 5 or 6 times now and nothing appears. Each time this happens a re-flash seems to solve the problem. I can’t find the exact reproduction but I’m sure there’s something strange going on with the 1.7.0 Lilygo FSK build.
I will have another go to see if I can see anything on the serial port. Can I do this via usb or do I need to connect directly to the uart on the Tx Rx pins? I tried via usb last time and could not see any logging.
I know there are multiple FSK transmitters around (all of them oil watchman senders), but none of them are being picked up. What could it be - it feels like there’s a key property not being initialised or something.
Which MQTT broker are you using? Possibly a built in Home Assistant Add-on one, which also restarts when restarting Home Assistant.
If it also isn’t set to write its persistent messages to disk to be able to reload them after a restart, but only keeps them in RAM, that could well be the reason for them disappearing with every HA restart.
Mosquitto, in a separate container. But, good point, because the last time I actually did have to restart the whole server. But that’s the first time I’ve restarted Mosquitto in weeks.
Where is the 433OOKtoMQTT coming from, and any LWT messages should not actually be under the homeassistant topic, which is purely for discovery.
I have the feeling that some topics you might have reassigned are all muddled up. Did you change any of these and for any particular reason?
Did you create custom environments for building and uploading your gateways? Or did you possibly make some topics changes in the WebUI or my MQTT command?
433OOKtoMQTT is my name for the gateway. And yes it’s possible things are messed up. I had renamed the home/ topic to homeassistant/, but now I renamed it back to home/. I guess I could delete all the topics and start again, but, the only reason I changed things before was because things were not working as I expected…
I think that might be the best idea to start again, as even with renaming things back right now might still miss a small part here or there.
I would also suggest to give your gateway(s) a slightly different name, as any XXXtoMQTT sub topics are actually sub topics where the actual continuous device messages are under. Not that there is such an actual 433OOKtoMQTT message sub topic, but it can make things even more confusing.
When you start from scratch and refrain from touching and changing any topic related settings you should be fine with all discovery messages going under the pre-set default homeassistant topic and being retained, while all LWT messages will be under the home/gateway_name topic which also has the appropriate XXXtoMQTT sub topic containing all the device messages.
Things look like the are behaving now, thank you very much. It seems my choice of gateway names and base topic messed things up in many subtle ways. I’ll suggest adding some (more) notes to the docs once I’ve run it all for a while.