Lack of service continutity after power failure



  • Hi,

    I am running at home several sensor (relays, gas sensor, parking sensor) and all works pretty reliable until power failure at home. None of the sensors is able to reconnect to GW automatically.
    GW runs on RPi4. Always I need to force the RPI service to stop and start and after that all sensors come back.
    What I miss in the code ?
    Or is there some special conf on RPI GW to delay startup of the "mysgw.service"?
    Or the reason is completelly somewhere else.
    Please advise how to overcome this annoying problem.


  • Contest Winner

    @halo6 I think what happens, is that the nodes reboot faster when the power comes back on. Then they try to connect and that fails because your Pi is still booting. Then they will have a time out before they reconnect. But it doesn't explain why you need to reboot the mysgw.service. It might be worth to check the log file to see if it gives any errors?



  • Yes, This is also my suspicious, I will enable the log of and try to perform a test again.
    Hopefully there will be some clear information there. Thanks Theo for feedback. Let You know about the findings.



  • @halo6 I have similar problems. Whenever the pi is restarted I have to unplug the serial gateway and wait for pi to boot and then reconnect serial gareway. After this is works well, but any reboot wiht serial gateway connected and it fails, the nodes never reconnect.


  • Mod

    @halo6 are you using fixed node ids, or using the controller to hand them out?



  • @skywatch Perhaps of interest, this possibility (lots of power cuts here in the early days) led me not only interface serial but power for the Gateway from the Pi header rather than separately, the current draw is tiny.
    The power cuts I later solved with a UPS but even before that it rebooted and went to work without issues, since the two reboot in sequence under the control of the Pi.
    As @Yveaux however has highlighted all my Nodes are fixed IDs.


Log in to reply
 

Suggested Topics

  • 3
  • 2
  • 24
  • 10
  • 2
  • 3

2
Online

11.2k
Users

11.1k
Topics

112.5k
Posts