OH Home Alarm

Hi All,
need some advice. Im sure some of you use OH with home automation as well as home security. Just wondering what do you guys do when you system is frozen when you are aware? Do you guys created a reboot on the apps to reboot the system? But again if the system is frozen (eg raspberry), obviously cant do reboot? Do you guys do daily timing to reboot?

Many of us don’t recommend using openHAB as an alarm system, because it’s not an alarm system. A proper alarm system doesn’t fail when your inexpensive Raspberry Pi freezes or there’s a power outage, and will be able to notify you of issues even if there’s no Internet connection. You can try to do that with openHAB, but if you’re actually concerned about home security then you’re far better off paying for a professional monitoring service. openHAB won’t give you any peace of mind.

If your Raspberry Pi stops working, the only thing that’s going to restart it is to cycle the power. If that’s happening regularly, there’s a problem with your system that you need to fix, whether it’s a corrupt SD card, a memory leak, or something else. Otherwise, your server should work without ever needing to be rebooted. Mine will go for months on end without any issues.

You could put your RPi on a WiFi smart outlet to cycle it via an app (separately from openHAB), but that’s not really solving the problem. It’s better to get a UPS to ensure that power outtages don’t corrupt your SD card, then do regular backups.

I have a hardwired DSC alarm system. I bought an additional Envisalink board to control it programmatically with OH. So even if OH fails, the alarm system still works (as in sounding loud alarm).

From the system perspective, the OH system is not supposed to fail on a daily basics :wink: It does fail from time to time dues to hardware reasons as Russ mentioned. Typically these would require manual intervention. So no, a daily reboot shouldn’t be needed. That said, in practice, you will notice pretty quickly that the PI running OH is dead via expected home automation rules not running. For many of us, the integration is quite deep so we will notice pretty soon :wink:

1 Like

A real alarm system, monitored by a real alarm monitoring central station, is the only proper way to have a real reliable alarm system. Connecting that real alarm system to OH for control, interaction, notification, and other actions works nicely together. DSC power series alarm systems with an envisalink board bring all alarm system features and functions into OH for you to do as you please with. A failure of one doesn’t take down everything.

1 Like

Now that we have established the fact that OH isn’t really suitable to be an alarm system. However, there are other situations where detecting and mitigating a “frozen” openHAB system may be desireable.

Unfortunately this is a “who watches the watchers” situation. You need something outside of the RPi where openHAB is running that can restart the machine. But then what watches the thing watching openHAB’s RPi? And what watches that?

So what’s a person to do?

  1. Fix the reason why the machine is freezing. People report getting 6 months or more uptime on an RPi running openHAB. I’ve personally had well more than a year for some of my RPis running sensors and other services (I reboot more frequently these days because I like to keep all my machines up to date which sometimes requires a reboot). This should be priority #1.

  2. Make the RPi itself more robust. Put it on an UPS so power outages do not cause problems. Make sure you have a good backup and restore procedure. Set up watchdogs on the RPi itself to take action. For example, if you can tell that the machine is frozen because it can’t ping a machine on your lan, set up a watchdog to restart the networking or even the whole machine when that happens. Systemd supports watchdogs and there are other services you can set up as well.

  3. Set up something external that lets you power cycle the RPi on command. However, be aware that every time you pull the power on a machine running off of flash memory, you run a very real risk of corrupting the file system. So this should only be used as a last resort and there is a real risk that you’ll make matters worse.

As mentioned, a daily reboot is unlikely to do much more than mask an underlying problem and reboots can sometimes be as or more disruptive than the periodic freeze problem. So it’s not usually the best idea.

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.