Fallback gateway node



  • I was wondering if it was possible to make a random node take over the gateway functionality?

    I've noticed that in my current setup when I sometimes have to switch PSUs of my gateway node it doesn't always survive without rebooting (and I don't want to damage the power mux with a larger capacitor+inrush current either). So having one node buffer (or process) some messages and then maybe send them to the gateway for processing when it comes online would be really nice. Has anyone tried to have redundant gateways?


  • Mod

    @avamander said in Fallback gateway node:

    when I sometimes have to switch PSUs of my gateway node it doesn't always survive without rebooting

    What do you mean?



  • It resets itself and starts to reinitialize (that causes sensor reading/packet loss I mentioned which I really don't like). The RPi itself is powered from another power supply and the grounds are just connected.



  • @avamander Why would you have to continually switch the power supplies? You don't have one dedicated to your gateway?


  • Mod

    @avamander why don't you make a rpi mysensors gw?



  • I have 2 raspberry pi's both configured as mqtt client gateways. I use keepalived to do failover between the 2.



  • @dbemowsk I've built a single bus that supplies my entire sensor network and actuators and as I don't want to waste energy running a 500W PSU a 10W one usually is enough and is way more efficient, it switches automatically between them when more power is needed.

    @gohan I could theoretically, but then I'd have to change the rPi gateway code to add a few features that I need and I'd rather not do that.



  • @avamander That doesn't necessarily explain why you would keep switching it. Regardless, you could possibly hook up a battery in parallel with the system to keep it running until you got the new one switched in. The battery would only need to power it for a short time during the changeover.


  • Mod

    it looks like you are having a power issue, did you try adding a good size capacitor on the arduino VCC?



  • @dbemowsk @gohan It already has capacitors smoothing the switch, it's an automated mux doing it after all, but badly timed switch (when say gas sensors get turned on exactly when an actuator needs to be triggered) can mess that up. Even if it doesn't reset it would be nice to have more redundancy in the system.


  • Mod

    then consider using a lead acid battery to keep power stable, it is easier than making a redundant system or adding a second attiny as a whatchdog that can reset the GW if not responding



  • @gohan Fair enough. That pretty much answers my question too, that noone has needed this functionality enough for it to be built-in to MySensors.


  • Mod

    Well... Usually gw should be stable on its own. Building a redundant system because of the "unstable" power source, to me is just a much more complicated patch than simply solving the root cause.


Log in to reply
 

Suggested Topics

  • 1
  • 3
  • 6
  • 1
  • 1
  • 3

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts