ads' corner

Show raw openHAB Image Type in HABpanel

In our Home Automation system, I read weather data from OpenWeatherMap. I blogged about the implementation before. The weather data provides an icon which can be used to show the current weather:


Kein Service am Dienstag

Seit einigen Jahren trifft sich regelmäßig der Englisch Stammtisch in Glienicke/N. Mittlerweile ist der Kreis der Teilnehmer weit über unseren (nicht so) kleinen Ort hinaus gewachsen. Traditionell besuchen wir abwechselnd verschiedene Restaurants.

Anfangs haben wir uns Montags getroffen, aber recht schnell festgestellt, dass viele Restaurants Montags einfach mal geschlossen haben. Danach haben wir die Treffen auf Dienstags verlegt - aber stehen dabei vor dem gleichen Problem.


_ansible_item_label changes in Ansible 2.8

The Ansible 2.8 upgrade brought a few failing Playbooks. I ran into the following error:


6. Rundendreher Rundenlauf am 21. März 2020

Am 21. März findet von 9 bis 12 Uhr der 6. Rundendeher Rundenlauf statt. Das ist eine gemütliche Veranstaltung bei der jeder teilnehmen kann und so viele Runden läuft oder geht wie er möchte. Es gibt keinen Zwang eine bestimmte Distanz zurückzulegen. Die Teilnahme ist kostenlos.


Raspberry Pi: take a screenshot from a display with no keyboard and mouse

The Raspberry Pi in the kitchen runs relatively stable, but recently the browser (which is showing the openHAB HABpanel) popped up a warning in the upper right corner. That’s annoying, because this area in HABpanel shows the outside temperature.

Before investigating what’s going on, I had to figure out a way to get a screenshot of the display - without running into the kitchen with my mobile phone. And without attaching a keyboard all the time (to press the Print button).


Hide the mouse cursor on a Raspberry Pi

The openHAB HABpanel we have in the kitchen runs on a Raspberry Pi and uses a touchscreen display. The browser starts in fullscreen mode, and shows a specific HABpanel screen for this display. That’s all nice, but by default the mouse cursor is in the way. Let’s get rid of it.

The Raspbian system which runs on the Pi comes with a package called unclutter. This hides the curser after a few seconds. All I have to do is install the package, and start the app. Right?


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.

Turns out it’s a well-known problem with the network chip on the Raspberry Pi. One of the GitHub issues is open since 2018, the other one since 2019. So no hope for a real quick fix :-(


Dim the Raspberry Pi screen

The new Raspberry display works nice, but the screen is too bright. At night in the kitchen it enlightens the entire room - unnecessarily. Since I’m using the original Raspberry Pi 7" touch display, the brightness can be controlled in /sys/class/backlight/rpi_backlight/brightness. This “file” can hold a value from 0 (display off) to 255 (full bright).

My first idea was to use a light sensor. But the display itself does not have such a sensor, and if I connect one to the Pi, I somehow need to connect the sensor in a way that it can “see” the light in the room. Which means the sensor is clearly visible next to the display.

The next idea is a cron job, which dims the display, depending on the time of the day. A bit brighter over the day, and almost dark in the night. Cron job works fine, but let’s make this an exercise in writing more code by using systemd timers. Because why not making it more complicated …


Ansible: TRANSFORM_INVALID_GROUP_CHARS deprecation warning

After upgrading Ansible to version 2.8.3, the following deprecation warning appeared many times:


Ansible: "apt" module and loops

After upgrading Ansible to version 2.8.3, the “apt” module started spitting out deprecation warnings: