ads' corner

openHAB: stop a ChromeCast

There are a number of ChromeCasts in our setup. I’m adding (physical) switches to turn displays on and off, and primarily control the volume. When I turn the display off, I also want the ChromeCast to stop doing whatever it is doing right now (stop streaming), and go back to the default application (for video CC).

openHAB: reset DateTime in rules

In one of my openHAB rules I’m using a timestamp to track when an Item went offline. This is used in my monitoring to let the user (me) know how long the Item is already offline.

Background: we have a couple ChromeCasts in our network. When they are connected to a 5GHz Wi-Fi they are quite unstable and often loose the network connection. Usually the openHAB binding reconnects the device quickly, but it happens that the device stays offline. It might have something to do with the router, but nevertheless I want to know when things go offline.

Audio reminders in openHAB

A while ago someone mentioned “reminders” used in their home audio system, and I took that idea and implemented something similar in openHAB.

The basic idea is that I can send scheduled notifications to any audio sink openHAB is using, possibly more than one audio sink for one message. Also I want to differentiate between a simple audio sound, and text output.

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.

openHAB: Turn display on and off for a Video ChromeCast

After figuring out if a ChromeCast is currently used, it was time to fix a long-standing problem. At home we don’t have TVs, just “dumb” displays, and stream content using ChromeCasts. However a video ChromeCast never really turns off, but keeps the display running, using a Backdrop app. This app keeps showing pictures on the display when the ChromeCast is not used otherwise, effectively preventing any powersafe mode.

That’s both annoying (who wants to have pictures shown in the living room or working room all night), and consumes energy. It’s also intentional by Google. So far we had to turn the display on and off manually, which is inconvenient.

openHAB: detect if a ChromeCast is currently used or idle

We have a couple of Audio and Video ChromeCasts in use. For an upcoming project I need to figure out if any of them is currently used. That is different for the Audio and the Video devices: the Audio just goes idle=ON, the Video devices however load the Backdrop app and show pictures when idling. Google for whatever reason does not want the attached monitor to go in powersafe mode. So much for saving energy …

Monitor ChromeCast status in openHAB

I really like to monitor things, to catch issues early on. In our home we have a couple ChromeCasts, both Audio and Video. They are all connected to the openHAB system, Once in a while they stop working, and need to be restarted (unplugged and plugged in again). Unfortunately you usually only find that out when you want to stream something, and wonder why either the ChromeCast does not show up in the device list, or does show up but does not accept the media.

Auto-approve and link certain inbox items in openHAB using Ansible

After starting to look into openHAB, and automate the installation with Ansible, I discovered that there is an API, but the main focus of the documentation and examples clearly is on using the UI and don’t automate the installation. It takes some time to figure out the details. In my last blog post I automated the installation of extensions/bindings, and ended with running a rediscover scan.

Now it’s time to see if there are new items in the inbox, and possibly auto-approve and link them in Ansible.

Install openHAB2 bindings using Ansible

Recently I started looking into Home Automation, using a Raspberry Pi and the openHAB as platform. The website provides ready-to-go images based on Debian, named openHABian. Me being me, I decided to install the image, let it boot up for the first time, and then take it from there using Ansible as automation tool. That’s a bit more effort in the beginning, but ensures that I can always just wipe the SDcard, and start over from the beginning. Especially useful if I screw up at some point during testing.