[RELEASE] Advanced Game Room High Score Announcer ๐Ÿ•น๏ธ๐Ÿ†

Hey everyone,

Iโ€™m excited to share a new project Iโ€™ve been working on: the Advanced Game Room High Score Announcer.

Most of our smart home apps are designed to run invisibly in the background. For this one, I wanted to build the exact opposite. I wanted an app that actively engages guests, hypes up the room, and brings some fierce, friendly competition to family game nights.

Instead of just automating the power to your arcade cabinets or pinball machines, this app turns your Hubitat hub into a live sports-caster. When a player turns on a machine, the room announces the game, the #1 Overall Champion, and the #1 Weekly Champion, giving everyone in the room a target to beat.

Here is a breakdown of what the app does and how I built it.

:star2: How It Works

  1. The Power-Up Hype: When a machineโ€™s smart plug/switch turns ON, the app instantly queues a TTS announcement: "The last game played on Arcade Cabinet was Pac-Man. The overall high score is 1,500,000, held by John. This week's current leader is Sarah with a score of 450,000."
  2. The Player Portal: Guests use a mobile-friendly Web Portal (hosted directly by the app via OAuth) on their phones or a mounted tablet to log their scores.
  3. The Interruption: If a player logs a score that breaks the #1 Overall or Weekly record while the machine is on, the app instantly interrupts the room: "Alert! Shane just logged a massive new score of 1,600,000 on Pac-Man. New #1 Overall High Score!"

:hammer_and_wrench: Key Features

  • External Web Logging (OAuth Portal): Players don't need access to your Hubitat dashboards. The app generates a secure, dark-mode HTML webpage. You can share the link via QR code or embed it in an iframe on an existing dashboard tablet.
  • Single vs. Multi-Game Dynamic Logic: You can set a machine as a "Single Game" (like Pop-A-Shot or Skeeball) or "Multi-Game" (like a Virtual Pinball or MAME cabinet). If it's a Multi-Game, the web portal uses JavaScript to dynamically drop down a text box asking the player which specific game or table they just played, seamlessly expanding your database.
  • The "Weekly Chase Game": Link the app to your Game Room's "Occupied" motion switch. When the room becomes active, the app randomly selects one game from your database that has a logged score and announces it as the Weekly Chase Game before any other arcades finish booting, giving the room an immediate focal point.
  • Live HTML Leaderboard Tiles (Child Devices): The app can generate a dedicated Child Device for each machine. Whenever a score is logged, it compiles the Top 3 Overall and Weekly scores into a sleek, formatted HTML string and pushes it to the child device, ready to be dropped into your dashboards.
  • Bulletproof TTS Queuing (atomicState): We all know the pain of turning on a power strip and having 5 devices trigger simultaneously, causing the hub's TTS to talk over itself or drop messages. This app uses staggered micro-delays and atomicState queuing. If you boot up 5 arcades at once, it puts them in an orderly line and announces them one by one.
  • Large Number Parsing: Pinball scores get huge. The database strictly parses scores as Long integers (up to 9 quintillion) and auto-injects commas so your TTS engine reads "1,500,000" naturally instead of reading individual digits.
  • Guest Mode & Quiet Hours: Having a party and don't want the room constantly yelling every time someone flips an arcade switch? Turn on the Guest Mode virtual switch. It suppresses all the standard boot-up announcements, but will still interrupt the room if someone actually logs a record-breaking score.

:gear: Installation Notes

Because this app generates a Web Portal for your players to use, you must enable OAuth in the Hubitat App Code editor before opening the app for the first time. Once enabled, the app will hand you the local and cloud URLs inside the configuration page.

:memo: Open Source

I built this to make my game room a lot more fun, but the code solves a few tricky Hubitat hurdles (like the asynchronous TTS race condition and dynamic HTML tile generation).

This code is completely open-source and free to use. Feel free to install it, dissect it, rip out the TTS queue engine, or steal the HTML payload logic for your own personal projects.

Enjoy, and let the games begin! :space_invader:

APP:
raw.githubusercontent.com/ShaneAllen334/Hubitat_Apps/refs/heads/main/Advanced_Game Room_High_Score_Announcer/Advanced_Game Room_High_Score_Announcer.groovy


Might be something for your in progress basement project @rlithgow1

2 Likes

@ShaneAllen

I use Big box for a couple of my machines. What about having it announce last hi score of the game loaded using either .hi file or highscore.dat from mame?

I use BigBox on my large PC based emulator, but I've not looked into pulling information from Mame. Interesting idea.

1 Like

Should be easy to do for retrobat and batocera too

Oh Apologies for now sending you down the rabbit hole of emulator hell.

1 Like

Just setting up what I essentially have in our game room, was a project undertaking that took forever to understand. Now If i do go after this type of integration weeks or months may be lost.. :face_with_spiral_eyes:

1 Like

https://greatstoneex.github.io/hi2txt-doc/

1 Like