Persistently maintain multiple Chromecast screens on you local network without using your browser. Ideal for digital signage applications. Originally developed to display statistics dashboards.
There are several tools and libraries out there (see below), but this project is intended to be very minimalist. There is a simple UI to trigger refreshes. There is no backing database or database dependencies, rather there is a simple JSON config file which is watched for changes. The JSON configuration is conveyed to the receiver application, which by default accepts url to display in an iframe. The receiver application can be customized easily to suit your needs.
- Java 8 or later. The gradle wrapper is used to build this application.
- The application must run on the same network as your Chromecasts.
- Multicast DNS must work on your network and on the machine you run the application on.
- IMPORTANT: URLs must be HTTPS and must not deny framing
The result of this is a fat-JAR (a JAR with all dependencies):
A sample cast configuration is provided in
Copy over to
cast_config.json and edit accordingly.
The location of your configuration can be customized using a command line argument.
The file is automatically watched for changes.
Some example use cases involve using cron and putting your config under version control and pulling from origin periodically, or downloading from S3/web, or updating using rsync/scp.
java -jar build/libs/googolplex-theater-all.jar --help
will show all usage options.
java -jar build/libs/googolplex-theater-all.jar
will run the application with default settings.
To provide resiliency, it is recommended to run the application as a daemon. See service descriptor files for upstart, systemd, launchd. They should work with minor modifications. Please refer to their respective installation guides to enable on your system.
Case Study: Grafana Dashboards
The maintainer has used this to show statistics dashboards in an software engineering context.
- Configure and name your Chromecasts.
- Create one Grafana playlist per device.
- Figure out how to use proper Grafana auth (proxy, token, etc).
- Make your cast config file with each playlist url per device.
- Place the cast config file under version control (git) or store it someplace accessible (http/s3/scp).
- Compile application locally.
- Copy application over to Raspberry Pi.
- Use a Raspberry Pi and install Java runtime.
- Add a cron job to pull the cast config file from wherever you stored it (alternatively configure something to push the file to the Raspberry Pi).
- Run the application as a daemon using systemd or upstart or whatever you want.
- Config is updated periodically by the platform health tean as our dashboard needs change.
- In the event that a screen needs to be refreshed by any staff member by accessing the UI and hitting a few buttons.s
Using a Custom Receiver
If you wish to customize the behavior of the receiver from just displaying a single URL in an IFRAME, see the example custom receiver in
Currently the device name and settings are printed to the screen. Customize the listener handler to do as you wish.
Host your modified file via HTTP on your hosting provider of choice. Then point your new custom receiver application towards that page's URL.
Pass your APP_ID in as a command line argument when you run, and your receiver will be loaded up.
This is intended to be minimalist and easy to set up, so advanced features are not the goal here. Some other projects listed below may be more suited for your use case.
This is a side project, so the maintainer provides no guarantee to the speed at which submissions can be accepted given the need to test this with hardware.
Run spotless to ensure everything is properly formatted:
This application overlaps in functionality with some of these fine projects:
- node-castv2 - nodejs library
- nodecastor - nodejs library
- chromecast-java-api-v2 - java library
- pychromecast - python library
Foundational work has been done to research how the Chromecast protocol works and these protocol libraries have been developed in a variety of languages. These are simple multipurpose bindings rather than logical implementations. A lot of the headless senders are built off of these.
These applications cast directly from your browser. You may need to have your browser running. There are usually no persistence or reconnect capability.
- greenscreen - original digital signage implementation
- multicast - a fork/refactor of greenscreen
- Chromecast-Kiosk - similar to greenscreen or multicast
These applications cast without a Chrome browser running, rather they utilized the Chromecast protocol to establish a communication session with the devices. They provide a level of persistence in the event of failures. They utilize a variety of storage backends and have varying degrees of setup and configuration. They may utilize multicast DNS service discovery.
This application is most similar to the headless sender projects. It does not use a protocol implementation library.
It is designed for multiple Chromecasts, rather than a googol or googolplex. It is from The Simpsons. The developer made it singular and decided to use the American spelling. Googol sure does sound like the manufacturer of the Chromecast.