Custom Chromecast Backdrop overlay [Help welcome]

I have a few pieces I’m hacking together into a way to customize the original Chromecast Backdrop in order to show any kind of overlay. (Darksky weather, hass notifications, recently added Plex media, travel times, currently playing music cover art, custom news feeds, etc.) My end goal is to have a custom overlay on top of the original Chromecast Backdrop. This should work with any Chromecast enabled devices. (Or anything with a web browser) The plan is to poll the Chromecast every few seconds to see if it is “idle” and if it is we launch the chromecast-dashboard reciever app which can show any web page. We can show a modified version of the original Chromecast Backdrop with custom overlays. I intend to merge the Google Backdrop with magic-mirror to immediately gain a rich plugin system. I also intend to modify magic-mirror in some way so that it can display different kinds of notifications from home-assistant, including full screen and if possible, audio notifications. It may also be possible to play audio/video independently of what is also shown on screen based on my tests. (Imagine using it as an alarm. Waking up the excellent google curated art feed behind a clean dashboard with weather, estimated travel time to work, RSS headlines, and a small news briefing playing in the corner of the display ready to be un-muted by voice command.) WebRTC should also be possible for low latency camera video streaming. (Doorbell, alarm burglar scare mode, baby monitor)

Work to be done:

  1. Done! Determine when the Chromecast is idle
  2. Done! Make the chromecast-dashboard sender in python (I could just use nodejs to run the existing client side code but I’d prefer to have a clear path to making this an actual hass component or something.)
  3. No longer needed. Make a script to download the Chromecast Backdrop code into the repo at build time so we aren’t re-distributing Google’s code.
  4. Done! Make a magic-mirror module to show the Chromecast Backdrop behind other modules.
  5. Determine how to control/update magic-mirror from hass. (Alerts/audio/videos/cameras/status bubbles like hass dashboard. MQTT? Websockets?)
  6. Determine how these features fit into hass components. (media_player for video/audio/tts? notify for alerts? Is it a platform?)

Ideally this work would also contribute to the magic-mirror project with general, re-useable modules and possibly create a general Chromecast Backdrop replacement project.

Anyone who is willing to help is welcome. Right now the help I need most is understanding the Chromecast API for #1 and #2, and better understanding how this should fit into the home-assistant project (#5 and #6) as I am quite new to it and don’t fully understand the role of component vs platform and don’t have practical knowledge of common use case implementations.

11 Likes

Sounds like a fun project! Did you find Greenscreen? I havn’t used it, but it seems like a nifty tool for Chromecast configurations…

Unfortunately greenscreen no longer works according to some Github issues I saw.

I have completed #2 by adding a component to pychromecast which is used by the home-assistant cast component. My pull request

With the example I provided in that PR you can cast web pages from python. Now I need to figure out how this can fit in the hass ecosystem. Until I figure that out I may just work on #1 and #4 with a hacked together python script independent of hass.

I have made the magic-mirror module to display the Chromecast backdrop and sumbitted a PR to magic-mirror so it can allow iframe embedding! This also makes #3 unnecessary, at least until we want to enable custom image types like the Google Home app which may require some hacking of the Google source.

4 Likes

I have completed #1 by creating a python script using pychromecast which waits for the Chromecast to be idle (active input and not casting anything) and launches the dashboard. Right now everything is working for me with this Docker image. It can cast almost any web page as a dashboard. I am still working on getting my changes to magic-mirror merged so if anyone wants to try that you will need to use my outdated version for now.

Hi bud

I like your idea on displaying HA dashboard on chromecast (I will ignore the magic mirror part as I don’t have one).

Is it possible for you to write a how to guide on achieving the above?

Many thanks.

4 Likes

I’m gonna second bachoo here, a walk through on how to implement this would be very helpful

1 Like

Nice work. Please provide a guide on how to install.

1 Like

I spent some time playing blowing the dust off the DashCast component this evening, because I’d love to get some sort of dynamic dashboard running on my Chromecast. I was successful getting a few different websites displaying, including loading a page from another machine on my local network, which was very encouraging.

But loading the default Magic Mirror page from a fresh install failed. I tried with the current release of pychromecast included in Home Assistant, as well as running the older pychromecast from @madmod’s docker image in the above post in Custom Chromecast Backdrop overlay [Help welcome] .

Looking at the access logs, the Chromecast fetches the index page, but just doesn’t try to get anything after that. I was wondering if maybe it was because MM is using websockets, but I don’t yet know near enough about Chromecast apps to dig much further in to this this evening. :frowning:

DashCast is probably still a useful option for some stuff. But I suspect I’ll be looking at multicast next for Magic Mirror usage.

@madmod have you had anymore progress on this. Is this still a working solution?

This is such a good idea, should be a built-in feature.

2 Likes