Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Home Assistant Doom Dashboard: How to Run It

· 5 min read · Home Automation

In this article
  1. What Is a Home Assistant Dashboard?
  2. How Doom Runs in a Browser
  3. What You Need to Run Doom on Your Dashboard
  4. How to Embed Doom in Your Dashboard
  5. Choosing the Right Port: js-dos vs. WASM
  6. Common Problems and How to Fix Them
  7. Cost and Safety Considerations
  8. Alternatives to Doom
  9. Frequently Asked Questions

Yes, you can run Doom on your Home Assistant dashboard, and it’s easier than you might think. This guide explains what you need, how to set it up, and what to expect from this fun but technically demanding project.

What Is a Home Assistant Dashboard?

Home Assistant is an open-source home automation platform that runs on a central device (like a Raspberry Pi or a dedicated server). Its dashboard, called Lovelace, is the user interface you see in a web browser or mobile app. It shows cards for lights, switches, sensors, cameras, and more. Because Lovelace is built on web technologies (HTML, JavaScript, and CSS), you can embed almost any web-based content into it—including a JavaScript port of Doom.

How Doom Runs in a Browser

The classic 1993 Doom was written in C, but the source code was released in 1997, which led to many ports. One popular port is js-dos, a JavaScript-based DOS emulator that runs in the browser. It can execute the original Doom executable (doom.exe) directly. Another option is WebAssembly ports like Doom Asm.js or PrBoom compiled to WASM. These run the game logic natively in the browser at near-native speed, without needing a full DOS emulator.

What You Need to Run Doom on Your Dashboard

  • Home Assistant instance (version 2021.1 or later recommended for full Lovelace customization).
  • A device that can display the dashboard—a desktop browser, tablet, or phone. The game will run on the device that opens the dashboard, not on the Home Assistant server itself.
  • The Doom game files (shareware or full version). The shareware episode (Doom 1) is freely available; the full game requires owning the original or a legal copy.
  • Internet connection to fetch the emulator files, unless you host them locally.

How to Embed Doom in Your Dashboard

There are two main methods: using a custom card or using an iframe. Both require adding a resource to your Lovelace configuration.

  1. Add the js-dos card (custom card). In your Lovelace dashboard, go to the three-dot menu → “Edit dashboard” → “Resources” → add a JavaScript resource pointing to the js-dos card file (e.g., from a CDN). Then add a new card with type “custom:js-dos-card”. In the card configuration, specify the URL to the Doom game files (a .jsdos bundle or the .js and .wasm files).
  2. Use an iframe with a hosted version of Doom. For example, you can embed a page that runs js-dos or a WASM port. In Lovelace, add a “Webpage” card and paste the URL of the hosted Doom page. This is the simplest method but requires a stable internet connection and the host must allow embedding (some sites block iframes).

For the iframe method, you can also self-host the files on your Home Assistant server (e.g., in the www folder) to avoid external dependencies.

Choosing the Right Port: js-dos vs. WASM

js-dos emulates a full DOS environment, so it can run the original Doom executable with sound and mouse support. It works well on desktop browsers but may be slower on low-powered tablets. WASM ports (like the one at js-dos.com or dos.zone) are compiled to run natively in the browser, so they are faster and more responsive. However, they may not support all features (like save states) or may require specific file formats.

For most users, js-dos is the easiest to set up because it has a simple card integration and a large community. If you want the smoothest gameplay, try a WASM port, but be prepared to fiddle with configuration.

Common Problems and How to Fix Them

  • Game doesn’t load: Check that the resource URL is correct and that your Home Assistant instance has internet access. Also, ensure the game files are in a format the port expects (e.g., .jsdos for js-dos).
  • No sound: js-dos may require you to enable audio in the card settings. Some browsers block autoplay; click the game screen once to enable sound.
  • Controls not working: On touchscreens, you need to enable the on-screen keyboard or use a Bluetooth keyboard. In js-dos, you can configure virtual joystick or keyboard in the card options.
  • Performance is laggy: Close other dashboard cards or use a dedicated browser tab. On a Raspberry Pi, the server itself is not running the game, so the bottleneck is the client device.

Cost and Safety Considerations

Running Doom on your dashboard is free if you use the shareware version and a free CDN. If you own the full game, you can use your own files. There is no cost for the emulator or the card. Safety-wise, this is a fun project that doesn’t affect your home automation security. However, be aware that embedding external content can expose your dashboard to third-party scripts. Use trusted sources and consider self-hosting the game files to avoid external dependencies.

Alternatives to Doom

If Doom isn’t your game, you can embed other retro games using the same methods. js-dos supports many DOS games, and there are browser ports of Wolfenstein 3D, Quake, and even Prince of Persia. You can also embed a NES emulator (like JSNES) to play Super Mario Bros. The possibilities are endless—just remember that your dashboard will be a bit less productive.

Frequently Asked Questions

Will Doom run on my Raspberry Pi dashboard?

Yes, as long as the device displaying the dashboard (e.g., a tablet or browser) is powerful enough. The Raspberry Pi that runs Home Assistant is not executing the game; it just serves the web page. A modern smartphone or tablet will handle it fine.

Can I control Doom with my voice assistant?

Not directly. The game is designed for keyboard and mouse input. You could use a voice assistant to send keystrokes via automation, but it would be impractical for real-time gameplay.

Is it safe to embed third-party JavaScript in my dashboard?

It carries some risk. Only use resources from trusted sources. If you self-host the files, you reduce the risk of malicious code being injected. Also, avoid embedding iframes from unknown sites.

Do I need to own Doom to play it?

No. The shareware version of Doom (the first episode) is freely available and legally distributable. You can download the shareware .WAD file from many sources. The full version requires a purchase.

Can I save my game progress?

Yes, with js-dos you can save the state of the emulator as a file. The custom card may have a save/load feature. WASM ports may not support save states, so check the documentation.