ads' corner

Text-to-Speech in openHAB

In my ongoing endeavor to improve our home, a while ago I added a notification when the washing machine and the dryer are finished. The notification is send to a Telegram channel. Over the summer vacation I added a number new ChromeCast Audio devices (Google no longer offers the Audio CC, if you need one get one now). One is placed in the kitchen. Not only can I listen to music while eating breakfast, I can also output notifications, by using the CC as an audio sink in openHAB.

To make that useful, I decided to use a Text-to-Speech system. openHAB offers a couple different TTS systems, however most of them need a cloud integration, and therefore a working Internet connection. The “Pico TTS” works standalone, and was my favorite choice for this implementation.


Install Telegraf using Ansible

I have an InfluxDB up and running in my network, and decided to monitor all (well, all possible - the QNAP seems to be a problem) devices. That’s quite easy to do by installing Telegraf as a server agent, and add some configuration. Everything is deployed using Ansible, so I can re-use the same Playbook for many devices.

Let’s assume I have a laptop which I want to monitor. The hostname is sunlight (it’s not, I’m just using this as an example).


Install a Raspbee II on a Raspberry Pi

A while ago I got a recommendation to look into a Raspbee (from dresden elektronik) as Zigbee gateway. That looked like fun, therefore I ordered one of the devices. The first step is the installation of the Pi itself and then the software for the Raspbee.


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.


Restic upgrade on Debian Buster

A while ago I switched backups from Duplicity to Restic. About time: I was using Duplicity for many years (I think I started using it around 2010, long before Restic became available) and it served me well. But recently I ran into more and more issues, especially with archives getting larger and larger. There is an 11 years old open bug in the Duplicity bugtracker, which describes a showstopper for backing up larger archives. And it doesn’t look like this will be solved anytime soon. Therefore it was time for something new.

Since I’m rolling out my backups with Ansible, it was relatively easy to create a set of scripts for Restic which use almost the same infrastructure as the old Duplicity backups. That works as expected on all our laptops. But the Raspberry Pi, which does the fileserver backups, seem to had a problem. Backups took way longer than before, jumped from 30-60 minutes (depending on the amount of changes) to constantly around 10 hours.


Disable screensaver for Raspberry Pi

The 7" Raspberry display in the kitchen is nice, but unfortunately by default the installation comes with a screensaver enabled. After a while, the display goes dark. No one wants to stare at a blank display, and touch the screen in order to see crucial information.


Remove Trashcan Icon from Raspberry Pi Desktop

Our home automation got a nice 7" Raspberry display in the kitchen, showing the most relevant information (like temperature, weather, washing machine, dryer ect) on a dedicated screen. Quite handy, especially the temperature, and the one-click stop to the weather forecast.

While installing the Pi and setting everything up, I stumbled over the Icons which LXDE by default shows on the desktop. Not necessary, I want them removed. All I want on the desktop is the browser icon which directly goes to the HABpanel.

The reason is simple: if the Pi starts up, but the browser for unknown reasons doesn’t come up, I don’t want anyone to be confused by additional icons on the desktop. After all, usually the LXDE desktop is not seen by default.


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?


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 …