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:
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 …