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"
when 
    Item CC_LivingRoom_used changed
then
    if (CC_LivingRoom_used.state == ON) {
        logInfo("ChromeCast Plug", "Turning ChromeCast in Living Room on")
        Plug_CC_LivingRoom_Toggle.sendCommand(ON)
    }
    if (CC_LivingRoom_used.state == OFF) {
        logInfo("ChromeCast Plug", "Turning ChromeCast in Living Room off")
        Plug_CC_LivingRoom_Toggle.sendCommand(OFF)
    }
end

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 ...

  • Twitter
  • Bookmark openHAB: Turn display on and off for a Video ChromeCast at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg openHAB: Turn display on and off for a Video ChromeCast
  • Bloglines openHAB: Turn display on and off for a Video ChromeCast
  • Technorati openHAB: Turn display on and off for a Video ChromeCast
  • Fark this: openHAB: Turn display on and off for a Video ChromeCast
  • Bookmark openHAB: Turn display on and off for a Video ChromeCast at YahooMyWeb
  • Bookmark openHAB: Turn display on and off for a Video ChromeCast at Furl.net
  • Bookmark openHAB: Turn display on and off for a Video ChromeCast at reddit.com
  • Bookmark openHAB: Turn display on and off for a Video ChromeCast at blinklist.com
  • Bookmark openHAB: Turn display on and off for a Video ChromeCast at Spurl.net
  • Bookmark openHAB: Turn display on and off for a Video ChromeCast at Simpy.com
  • Bookmark openHAB: Turn display on and off for a Video ChromeCast at blogmarks
  • Bookmark openHAB: Turn display on and off for a Video ChromeCast with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Trackbacks

No Trackbacks

Comments

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