1. News
  2. Everyday tech
  3. Smart home · DIY
Smart home · DIY3 min read

He turned his house into a retro video game to run his smart home

A writer used an AI coding tool to turn his home into a Zelda-style game, and pressing A on a game light switch now flips the real one.

By the Dashline deskSource: How-To Geek
He turned his house into a retro video game to run his smart home
Photo: How-To Geek

A tech writer built a retro video game version of his own house and now uses it to run his smart home. Walk a character to a light switch on a Game Boy-style handheld, press A, and the real light in the real room turns on. An AI coding tool built the game in a couple of days.

What he built

Adam Davidson, who writes for How-To Geek, bought an R36 Ultra. It is a cheap handheld that looks like an old Game Boy and can run retro game emulators. Unlike the original R36S, the Ultra has built-in Wi-Fi. That let it talk to Home Assistant, the software he already uses to automate his smart home devices.

The game looks a bit like a classic Zelda title. The character walks from room to room in a retro copy of his house. Objects in the game match real ones, including light switches, TVs, stereos and smart plugs.

How it works

The game is written in Python, a common programming language, and runs on the handheld. It sends commands to Home Assistant over Wi-Fi, so what happens in the game happens in the house. Davidson says he can use it to:

  • Turn lights on and off
  • Play music
  • Switch on the electric blanket on his bed
  • Power on the TV, pick a streaming app and change the volume
  • Turn up the heating

The coding came from Codex, an AI coding tool. It first tested whether the handheld could switch one light on and off. Once that worked, it wrote the game. Davidson says he could probably have built it himself in Python, but it would have taken a seriously long time.

The hard part was the artwork

Making the rooms look like his actual home was the toughest step. He uploaded several photos of each room, and Codex turned them into game art. The results often had big mistakes. Doors came out of walls and cupboards ended up on their sides. Codex struggled with what up and down mean in a top-down view.

Fixing this took a lot of follow-up prompts, which are the written instructions given to the AI. Davidson says the finished rooms were worth the effort.

Not a shortcut

Davidson is upfront that this is not an efficient way to run a home. To switch on his home office light from the living room, the character has to walk through the hallway, up the stairs, along the upstairs hallway and into the office. Only then can he press A.

He calls it a cool but highly inefficient dashboard. He is not sure what comes next. One idea is to add real game features, such as earning points for keeping the smart home running smoothly.

Why it matters

The project shows what AI coding tools can now do for people who are not expert programmers. A quirky, custom gadget that once took weeks can take days, even if the AI needs some patient correcting along the way. The article does not say what the project cost or whether Davidson will share the code.

The takeaway

AI coding tools can now help non-experts build odd, personal tech projects in days, though expect to correct the AI's mistakes along the way.

More articles

You should really read these.

Next step

Let’s talk