This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
What I Built
I built PhantomLog, an offline, haunted storyteller that turns your mundane smart home data into personalized, creepy ghost stories about what happened in your house while you were asleep.
I leaned heavily into the "things that go bump in the night" interpretation of the theme. Most of us have motion sensors, smart thermostats, and door contacts that silently log data 24/7. PhantomLog pulls the 12:00 AM to 6:00 AM sensor logs from a local Home Assistant instance, analyzes the sequence of events (e.g., a temperature drop followed by a hallway motion trigger), and uses a local LLM to weave a terrifying micro-fiction about the "ghost" wandering your halls
Demo
Here is a sample output generated on my dashboard when I woke up this morning:
The 3:14 AM Visitor
The house was dead quiet when the living room temperature inexplicably dropped by 3 degrees at 2:45 AM. Whatever it was, it didn't stay there. At 3:14 AM, the hallway motion sensor detected movement—slow, methodical, pacing toward the kitchen. It lingered by the fridge for exactly four minutes before the backdoor contact sensor registered a microscopic vibration. You were fast asleep, but your house knows it wasn't alone.
How I Built It
PhantomLog is built entirely on open-source, local AI infrastructure to ensure zero latency and complete privacy.
The Brain: I used Llama-3.1-8B-Instruct as the core narrative engine, heavily prompted to adopt a suspenseful, Gothic horror
The Engine: Inference is handled locally using Ollama, running bare-metal on my home lab server.
The Harness: I used LangChain in Python to build the agent workflow. The script queries the Home Assistant SQLite database, filters out baseline noise, formats the raw timestamps and sensor names into a readable context window, and feeds it to the local model.
Why Does Open Innovation Matter?
Open innovation is the only reason this project can exist safely. Smart home data is arguably the most intimate digital footprint we have—it maps our sleep schedules, our floor plans, and when we are vulnerable.
Sending a nightly dump of my family's movement patterns and door lock statuses to a closed, cloud-based API just to generate a fun Halloween story would be a massive privacy violation. By using an open-weight model like Llama 3 running through Ollama, PhantomLog works entirely offline. The "ghost" stays on my local network, the data never touches a server I don't control, and it costs exactly zero dollars in API credits to run every single morning.
The Spirit of It
The moment this project truly landed for me was during a test run two nights ago. I woke up, checked the PhantomLog dashboard, and read a genuinely chilling story about "something pacing frantically at the bottom of the basement stairs at 4:12 AM."
I actually got goosebumps and went to check the basement—only to realize my cat's litter box is down there, and she had the 4 AM zoomies. It turned a completely invisible piece of data into a memorable, spooky morning ritual that perfectly captures the Halloween spirit.
Top comments (0)