Failover System for a Raspberry Pi at a Remote Location

I faced the same challenge and wanted to solve it as much as possible with openhab itself.
In short, this is what i did:

  • i run 2 identical rp4 with identical openhabian, and all the oh conf
  • interesstingly all my bindungs can work with 2 instances at the same time
    • my homematic ccu3 works fine with both oh instances
    • my hue works fine with both oh
    • my wemo binding works with both oh
    • all other bindings as well
      Each oh instance has his own influxdb and each binding, where i control some real thing has a switch item, to tell the oh instance, if it is active or passive.

Both oh instances update each other with their status every other minute and so they can monitor each other. If the passiv oh instance runs into timeout (expire binding) from the status of the other oh instance, it will set itself active and activate all switch items for the controlling bindings.

So, both instances run in parallel and do excatly the same, exept the controlling of i.e rollershuters, actors, my thermostats, my hotwater, etc.

Its running very smoothly for more than a half jear now.
Its a great constellation for testing new things or updates as well. I do that on the passive oh instance and keep the active one away from changes. If all changes are well tested, i’ll activate the instance with the changes and repeat the changes on the other (now passive) oh instance.

Its great for rule development an testing, too. If the changed or new rule runs well, i’ll copy the rule to the passiv instance and both are identical again.

Yes, there are times, when the systems are not identical, but thats short and ok for me.
I someone wanted to be “purer” on this, he has to set up a third oh instance for testing, etc.

Its my kind of failover-system and i never had any outage since…

1 Like