Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. Gateway restarts a midnight

Gateway restarts a midnight

Scheduled Pinned Locked Moved Troubleshooting
11 Posts 3 Posters 203 Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • TheoLT Offline
    TheoLT Offline
    TheoL
    Contest Winner
    wrote last edited by
    #2

    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?

    1 Reply Last reply
    0
    • skywatchS Offline
      skywatchS Offline
      skywatch
      wrote last edited by
      #3

      Just a guess, but check for any power saving or watchdog settings.

      OldSurferDudeO 1 Reply Last reply
      1
      • skywatchS skywatch

        Just a guess, but check for any power saving or watchdog settings.

        OldSurferDudeO Offline
        OldSurferDudeO Offline
        OldSurferDude
        wrote last edited by
        #4

        @skywatch

        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.

        1 Reply Last reply
        0
        • skywatchS Offline
          skywatchS Offline
          skywatch
          wrote last edited by
          #5

          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?

          1 Reply Last reply
          1
          • OldSurferDudeO Offline
            OldSurferDudeO Offline
            OldSurferDude
            wrote last edited by
            #6

            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!

            TheoLT skywatchS 2 Replies Last reply
            0
            • OldSurferDudeO OldSurferDude

              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!

              TheoLT Offline
              TheoLT Offline
              TheoL
              Contest Winner
              wrote last edited by TheoL
              #7

              @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.

              1 Reply Last reply
              0
              • OldSurferDudeO Offline
                OldSurferDudeO Offline
                OldSurferDude
                wrote last edited by
                #8

                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).

                1 Reply Last reply
                0
                • OldSurferDudeO OldSurferDude

                  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!

                  skywatchS Offline
                  skywatchS Offline
                  skywatch
                  wrote last edited by
                  #9

                  @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.

                  1 Reply Last reply
                  0
                  • OldSurferDudeO Offline
                    OldSurferDudeO Offline
                    OldSurferDude
                    wrote last edited by
                    #10

                    I discovered the source!

                    When I execute

                    crontab -e
                    

                    I am editing the user cron table.

                    sudo crontab -e
                    

                    edits 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).

                    1 Reply Last reply
                    5
                    • skywatchS Offline
                      skywatchS Offline
                      skywatch
                      wrote last edited by
                      #11

                      Hah! Been there, done that. Well done on finding the source of your issue and sharing the solution so others might benefit! Kudos.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      23

                      Online

                      11.7k

                      Users

                      11.2k

                      Topics

                      113.1k

                      Posts


                      Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • MySensors
                      • OpenHardware.io
                      • Categories
                      • Recent
                      • Tags
                      • Popular