Skip to content

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.


Using the newly acquired status information, and a smart plug, I switch the screen on and off whenever needed. I hooked up a Xiaomi Smart Plug (Amazon link without tracking id) to my openHAB system, and I'm using the Raspbee Zigbee bridge to switch the Smart Plug on and off.


Most of the work is already done in the ChromeCast monitoring rule, all I have is to monitor the virtual switch and react on status changes:

rule "ChromeCast Living Room in use"
    Item CC_LivingRoom_used changed
    if (CC_LivingRoom_used.state == ON) {
        logInfo("ChromeCast Plug", "Turning ChromeCast in Living Room on")
    if (CC_LivingRoom_used.state == OFF) {
        logInfo("ChromeCast Plug", "Turning ChromeCast in Living Room off")

Moments after a stream on the device starts, the display comes on. Once the stream stops, the display is off again. No one cares about background pictures ...


No Trackbacks


Display comments as Linear | Threaded

No comments

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
To leave a comment you must approve it via e-mail, which will be sent to your address after submission.
Form options