Multiple Gateways for redundancy



  • Hello All,
    For redundancy, I've configured a cluster of 3 RPi with Docker services (Domoticz, Usefull scripts, Mysensors Gateway, ...) and a replicated NFS central storage.
    I'm wondering if it is possible to start multiple mysensors gateways (one on each RPi machine)
    As a gateway use the ID 0 I think it's not possible but how do you manage redundancy ?
    Do I need to configure a HA cluster to start/stop the mysensors gateway?

    Thanks for your lights,
    David.



  • Out of curiosity, why do you think you would need that much redundancy?


  • Mod

    In a fully automated home, the inhabitants would be unable to lock/unlock doors, turn on/off lights or use automated appliances. When that happens, spouse acceptance factor hits rock bottom. So in my view, that much redundancy is absolutely critical for widespread home automation.



  • @David I think it can work as long as you sure that only one Gateway is able to send and the others are mute. Kind of the same as with redundant hot standby server systems.



  • @dbemowsk
    If it is used as an alarm system, not only for intruders, but for smoke detection, water leak etc you must count on its reliability close to 100%.
    Also as mfalkvidd mention, you may not want to stay outside automated closed door...



  • @mfalkvidd , @Mihai fully agree with you, why to build a genius system that is able to do a lot of things without thinking of reliability?
    The problem I'm facing is, Swarm (the docker scheduler) is not able to create services with privileged access and/or device access.

    So I think I will use keepalived with a script that manage the start/stop of the gateway or Swarm with a Docker proxy.
    FYI some examples of what you can do with keepalived and scripts: https://tobrunet.ch/2013/07/keepalived-check-and-notify-scripts/
    or Docker proxy for Swarm: https://github.com/calh/docker_priv_proxy (Not yet tested)

    If the devs could think about redundancy capability of the gateway for the next versions, it would be great.
    Anyway, MySensors is really really a good project.
    Regards,
    David.


  • Hero Member

    A first start could be the possibility to sleep and a second command to wake the gateway via a command from the gateway. So the controller may decide which gateway is active and which gateway is not.
    The gateway is initialized but the routing of messages from serial/ethernet to NRF /RFM /RS485 is enabled / disabled.
    Maybe a simple internal message?!



  • Perhaps the gateways just need to share each other the table of distributed/allocated ID and routing paths to the sensors.
    I'm not a developer, so perhaps it's too complicated...


  • Mod

    It all depends if it is mission critical stuff, otherwise just keep a spare rpi and an arduino board pre-programmed that you can easily swap.


Log in to reply
 

Suggested Topics

  • 87
  • 6
  • 3
  • 5
  • 5
  • 1

54
Online

11.4k
Users

11.1k
Topics

112.7k
Posts