I don't know if any of you guys are still around and using this stuff -
I moved and am reviving a few of these 51/52 boards that I had built. Prior to moving I had decent luck with all these fixes though I don't quite remember where I was with any of this stuff seeing as it was 3 years ago.
I had a few motion sensors and some temp/humd based on these fixes and they were working great, no dips.
Not sure any of you will ever see this but hey it all worked.
Hm, maybe the problem is that your rPI has a short interruption in the WIFI connection, the MQTT TCP connection is interrupted and does not autostart again. Maybe there is something in the logs. Maybe you can find something about reconnects in one of these:
journalctl --unit=systemd-networkd
journalctl --unit=wpa_supplicant
You could try to run wpa_cli in daemon mode to react to disconnects and connects. Create a script like this:
#!/bin/bash
case "$2" in
CONNECTED)
<your command to start the gateway>;
;;
DISCONNECTED)
<your command to stop the gateway>;
;;
esac
then, start wpa_cli in deamon mode:
wpa_cli -a /path/to/your/script #use sudo if your gateway commands need sudo
If that helps, you could create a service from this command.
Regards, Edi
Don't ask me why, but now it works. I changed nothing! Went to my girl over the weekend, coming back, the node was registred. Maybe a jammer went away?