Gateway restarts a midnight
-
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?
-
Where would I find those? I must believe that they are in the MySensors code because it is not the RPi rebooting.
I say the RPi is not rebooting because I am monitoring the output of mysgw via an ssh connection and the connection is not being broken, which would indicate a system reboot. It is the stream from the pipe that stops.
-
Hmm, that is weird. I can only guess that HA and the pi are somehow responsible as they are the only ones that know the time.
I think you are saying that the nrf24l01+ is connected directly to your pi and that the gw runs on the pi?
I had issues with this setup and instead opted for a usb to serial module plugged into the pi usb port along with an arduino pro mini and nrf24l01+ as the gw. It has worked well for many years. Maybe an option for you to try if nothing else fixes the problem?
-
Yes, nRF24 is attached to the RPi3B+ on which the gateway runs.
I have long considered an Arduino Nano with nRF24 connected to the computer that runs Home Assistant. This probably would not work because the sensors are in the backyard and the HA computer is in the garage which is at the front of the house.
I have configured the Nano to be a gateway sans radio to which a sensor is connected. This is a very effective way to give the computer some I/O!
-
Yes, nRF24 is attached to the RPi3B+ on which the gateway runs.
I have long considered an Arduino Nano with nRF24 connected to the computer that runs Home Assistant. This probably would not work because the sensors are in the backyard and the HA computer is in the garage which is at the front of the house.
I have configured the Nano to be a gateway sans radio to which a sensor is connected. This is a very effective way to give the computer some I/O!
@OldSurferDude What is the distance between your Gateway and the backyard Node?
Also I'm experimenting with radio ranges. I wasn't really happy with the NRF range even when using a PA / LNA. The max I can get is a bit over 20 meters. That is without repeaters.
I've created an RFM69 gateway with a Nano and added it as a second gateway to Domoticz. On that gateway I soldered a DIY antenna - not a long range - and that one has a range of over 70 meters. Measured with the GW inside an my battery powered test node was outside.
For my test I just created a simple node that echo's the state of a binary sensor that I toggle each 5 seconds. I have two leds when for the sending and one for the receiving, so I could see where the border of my range is.
So for my outside nodes I'm in the progress of replacing all the NRFs with RFM radios.
Also when you change the caps to 100uf you should have a longer range and a more reliable network. But adding repeaters does help in extending the range.
-
The distance to my sensors would be 20-30M through a fire separation wall, four interior walls, a ceiling and an external wall.
I, too, have done some experiments with the RFM69 and had the same experience. But they are about 10x the price of an nRF24. ($6.80 vs $0.68) The cost of the RPi zero 2W is $15 (though I've had two where the WiFi chip failed).
-
Yes, nRF24 is attached to the RPi3B+ on which the gateway runs.
I have long considered an Arduino Nano with nRF24 connected to the computer that runs Home Assistant. This probably would not work because the sensors are in the backyard and the HA computer is in the garage which is at the front of the house.
I have configured the Nano to be a gateway sans radio to which a sensor is connected. This is a very effective way to give the computer some I/O!
@OldSurferDude If you have a pi2 or pi4 you could try with that instead of the pi3. Pi3 was known for being a bit 'different' with some applications. A quick and simple test if you can.
-
I discovered the source!
When I execute
crontab -eI am editing the user cron table.
sudo crontab -eedits the root cron table. That was where the restart at midnight was.
When I was accessing the gateway (via ssh) I was user. I am running headless, which is running as root and a user instance only runs when I ssh into it, which means that editing the user cron table does not do anything (unless a user instance is running).