Gateway restarts a midnight
-
I think all my gizmos are conspiring against me. This is just one of their ploys.
My gateway is running on an RPi 3B+. Integral to the gateway are three "sensors" for irrigation control. It receives 3 commands from Home Assistant: Zone, Runtime, and Start. The program translates these inputs into when and what relays to energize or de-energize.
There are six nRF24 nodes; four soil moisture sensors, a water flow meter and an energy meter.
All of this worked well but went to *@#!! while I was gone. The nodes worked fine (other than the usual problems with DIY stuff). It was the irrigation control that I couldn't figure out.
I disabled the service and ran mysgw from the command line instead of as a service so I could try to catch the problem. There was to much data and the problem and the problem seemed to go away. But back as a service, the irrigation control would stop (not the other devices), but when I restarted the service, all was fine (sudo systemctl restart mysgw) for a day.
I read the documentation about piping the output. This essentially makes the output available when running as a service. At some point the output would stop. I couldn't determine why it stopped and there was no timestamp with the output.
I installed the utility, ts, that would put a timestamp on the output stream. The stream would stop at midnight every midnight, but the service must have just restarted because mysgw was still running.
Now here's the weird part. The irrigation control is working.
Wait, Wait, Wait!
I just checked to see if mysgw was working. It wasn't! no output from mysgw, meaning all the devices were not working. systemctl status mysgw said it was running. I restarted the service and now it's running as expected.
Any ideas for me to try. Yes, I could run a cron job every day or every 8 hours, but I'd like to have it work without this crutch.
-
I have no experience with a raspberry pi as a gateway. I just add MySensors arduino gateways. Because it's easy to run a RFM69 and a NRF gateway.
I forgot the command. But you should check the sys log. See if it says anything strange
Also any special scripts running around 12 o'clock?