Setting up a Raspberry Pi to show DataDog stats on TV

Some fire for the Christmas

Even though the title of this post is about Datadog stats but the solution mentioned here works for any web page. In fact we put a full screen YouTube of a chimney creating that Christmassy vibe around this time.

  • The TV should always show the page
  • The URL for the page is put in plain text in a file called url.txt in the /boot folder of the Raspberry Pi microSD card (this partition is visible even on windows so it is easy to update). The reason for putting it on the boot partition is because this is the part of the microSD card that is editable when inserted to a Mac or Windows computer.
  • Raspberry Pi should boot directly to Chrome
  • Chrome should open in full screen
  • Chrome should not require any user input, choices or user profiles

Buy the parts

Download Raspbian

Write the disk

  • /media/boot/ for the boot partition where the url.txt and are supposed to be created
  • /media/rootfs/ for the wifi settings and autostart applications

Setup the Wifi

Run chrome on startup and prevent sleep

@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xscreensaver -no-splash
@xset s noblank
@xset s off
@xset -dpms
@sh /boot/

Set the autostart script

chromium-browser --incognito   --start-fullscreen --start-maximized --disable-sync-preferences --disk-cache-dir=/tmp/cache --no-first-run `cat /boot/url.txt`
chromium-browser --incognito   --start-fullscreen --start-maximized --disable-sync-preferences --disk-cache-dir=/tmp/cache --no-first-run --app=`head -n 1 /boot/url.txt`
  • Start chrome in incognito mode (so it will not nag about creating a user profile and goes directly to the site)
  • Starts the browser in full screen mode to maximize the usable area for showing the page
  • Uses a RAM disk for caching which improves the performance
  • Read the url from a plain text file called url.txt in the boot partition

Put the URL

Tip for YouTube videos

Auto update

sudo apt-get install unattended-upgrades
// Split the upgrade into the smallest possible chunks so that
// they can be interrupted with SIGTERM. This makes the upgrade
// a bit slower but it has the benefit that shutdown while a upgrade
// is running is possible (with a small delay)
Unattended-Upgrade::MinimalSteps "true";
// Do automatic removal of new unused dependencies after the upgrade
// (equivalent to apt-get autoremove)
Unattended-Upgrade::Remove-Unused-Dependencies "true";
// Automatically reboot *WITHOUT CONFIRMATION*
// if the file /var/run/reboot-required is found after the upgrade
Unattended-Upgrade::Automatic-Reboot "true";
// If automatic reboot is enabled and needed, reboot at the specific
// time instead of immediately
// Default: "now"
Unattended-Upgrade::Automatic-Reboot-Time "04:00";
// Enables auto clean packages for X days. This configuration displays 7 days
APT::Periodic::AutocleanInterval "7";
// Enables upgrading the Raspbian distro every 30 days
APT::Periodic::Unattended-Upgrade "30";

The environment

Many TVs and monitors have an economy mode which they adjust the backlight to the light in the environment. When people leave the office and all lights are off, they consume less energy. Also a good number of them have a setting for scheduling them to automatically turn off in the evening and turn on in the morning.


sudo dd if=/dev/mmcblk0 of=~/Downloads/pi-image.img bs=1M status=progress





Sr. Staff Engineer, Knowledge Worker, MSc Systems Engineering, Tech Lead, Web Developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Get 3 Months of Computing Power Raffle for running a node on Harmony Staking Net for free.

HEIC and HEIF with Python

How to manage built-in VPN in macOS?


I Accidentally Killed A Man When I Was 28

Passion is Key

Implementing ChainMaps in Python

Kubernetes Patterns in a nutshell

Stratos Bi-Weekly Progress Report: November 24, 2021 — December 8, 2021

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alex Ewerlöf

Alex Ewerlöf

Sr. Staff Engineer, Knowledge Worker, MSc Systems Engineering, Tech Lead, Web Developer

More from Medium

Why Digital Twinning is the Future of IoT

The Evolution Of Internet Protocols : The Rise of TLS 1.3

Lessons learned from my 10 year open source project

The RefPerSys open source artificial intelligence software