2024
DarkMode: Interactive Energy Exhibit
An interactive energy-awareness exhibit for the Hawaii Keiki Museum, built at HACC 2024: 3D-printed IoT light and switch devices, a live energy dashboard, a Unity "save the island" display, and an energy chatbot for kids.
Overview
DarkMode is an exhibit built for the Hawaii Keiki Museum challenge at the Hawaii Annual Code Challenge (HACC) 2024. Kids flip a real light switch, and a 3D-printed light, a live energy dashboard, and a Unity island scene all react to how much energy is being used. The goal is to save the island by reducing energy usage. A chatbot answers questions about energy, with a Keiki mode that explains things at a second-grade level.
Tech stack
| Category | Technology | Details |
|---|---|---|
| Unity | C#, ShaderLab | Island display |
| Frontend | Next.js, React, Tailwind CSS | Web app |
| Backend | tRPC, Drizzle, PostgreSQL | Typesafe API and database |
| Chatbot | LangChain, OpenAI | Energy Q&A |
| Hardware | ESP32 (PlatformIO), MQTT | IoT light and switch |
| CAD | OnShape, Orca Slicer, Ender 3 V3 SE | Enclosure design and printing |
| Server | Docker, Caddy, Cloudflare, Let’s Encrypt | Self-hosted deployment |
Architecture
The web client and both IoT devices talk to a self-hosted home server: HTTPS through Cloudflare and a Caddy reverse proxy to the web server and API, and TLS-secured MQTT for real-time device messages. The web server stores device and energy data in PostgreSQL.
Web
Each ESP32 registers itself with the server using a device token, then appears in the web app.

The dashboard shows live energy statistics for the connected devices.

CAD and hardware
Design the model in OnShape

Slice in Orca Slicer

Print the parts

Build the microcontroller

Sand, putty, sand, prime, paint

Final

Unity
The goal is to save the island by reducing energy usage. The scene changes with the live wattage.



Chatbot
Ask the chatbot questions about energy.

Keiki mode explains things for kids.

Hidden feature: ask the chatbot to tell you a joke…

…and from then on it speaks Hawaiian Pidgin.
