Skip to content

Raspberry Pi watchdog for openHAB

The openHAB display in the kitchen is still the problem child. Occasionally it just stops, other times it does not refresh the HABpanel, even though it has a connection to the openHAB server. Then there is the problem with the network card in the Pi. And - ok, that's a server-side problem - occasionally the weather stops updating. All in all that's a lot of trouble for a display which is just supposed to run standalone.

In the latest iteration I looked into activating the integrated hardware watchdog in the Raspberry Pi. Checking the temperature it never goes above ~55°C celcius, even though the display is in an almost closed frame and can't exchange much heat with the environment. But nevertheless occasionally the Pi just halts, and stops operating.


Continue reading "Raspberry Pi watchdog for openHAB"

Reboot the Raspberry Pi on network failures (brcmfmac: brcmf_cfg80211_scan: scan error -110)

In one of my earlier blog posts I reported that occasionally the HABpanel will disconnect from the server. Turns out it's not HABpanel, but it's the Pi itself which is causing the trouble. Part of the problem why it took me so long to investigate is that the display is in the kitchen, and someone had to have a look and spot the small red error message. To work around that problem, I hooked the device up in the network monitoring, and had an alarm triggered when the device is not reachable. Sure enough, that happens occasionally.

Because I moved /var/log to a small RAM disk to avoid wearing out the SDcard, all logs are lost once the device is rebooted. Had to bring keyboard and mouse to the kitchen in order to save the logfiles once the device was no longer reachable over the network.


Continue reading "Reboot the Raspberry Pi on network failures (brcmfmac: brcmf_cfg80211_scan: scan error -110)"

Execute a required reboot, with Ansible (CentOS/Red Hat)

A while ago I blogged about executing a reboot using Ansible on Debian-based operating systems. That is necessary after certain updates, as example after installing a new kernel. Turns out that things are very easy on Debian, compared to Red Hat based systems (Red Hat and CentOS in my case).

First of all, there is no clear indicator if a reboot is required. People work around this problem by creating overly complicated scripts. The "needs-restarting" tool in newer versions provides the -r option to indicate if a reboot is required. But the CentOS 7 I've just installed does not come with this version.


Continue reading "Execute a required reboot, with Ansible (CentOS/Red Hat)"

Execute a required reboot, with Ansible (Debian/Ubuntu)

After updating Linux packages, it sometimes is required to reboot the host. Debian and Ubuntu provide this information by the presence of a special file: /var/run/reboot-required. Ansible makes it easy to reboot a host, but there are a few aspects which need attention.


Continue reading "Execute a required reboot, with Ansible (Debian/Ubuntu)"