DIDA: self-hosted home automation where one misbehaving integration can't take the house down

Hi all. I’ve been building a home automation system for my own house, it’s now public, and since it talks to SmartThings this seemed the right place to share it.

What it is. DIDA is self-hosted home automation. Every protocol and every integration runs in its own process behind a message bus (NATS), and every state is validated at the boundary. A misbehaving device can only crash its own adapter: its entities go unavailable, the rest of the house carries on, and the adapter is started again. The core knows capabilities (on/off, brightness, temperature and the like), never a protocol.

SmartThings. In my house SmartThings is the way in for the Samsung appliances that only talk to the cloud; today that’s the washing machine, which reports when it’s done. DIDA uses the SmartThings cloud API through an OAuth app of your own, because new personal access tokens expire after 24 hours; the refresh token rolls, so the connection stays up without signing in again. It polls every 30 seconds (configurable), so it isn’t instant. It trusts device health rather than the last status: when my living-room TV lost its link to SmartThings, the API kept reporting it as on for weeks. That TV now goes through DIDA’s local Samsung TV adapter instead. The mapping also covers air conditioners, dryers, dishwashers, ovens, colour lights and media players, but I only run the washer myself. Creating the OAuth app is a one-time step, described under adapters/smartthings in the repository. My Zigbee devices go straight through Zigbee2MQTT.

The rest. The house is controlled from its own floor plan, with who is at home. Everyday automations are typed rules; for the serious logic there’s Starlark, run in its own process under a time limit, so a script can’t hang the core. Voice comes in through a Matter bridge, the family through an Android app with location, and a wall panel shows the plan. There are 37 adapters, from Shelly, ESPHome, Tuya and HomeKit to Denon/HEOS, Cast and a robot lawn mower.

Try it without installing: https://demo-dida.boskovic.biz is the real interface with a made-up household inside.
Code: GitHub - Bacinac/dida: Home automation on industrial foundations: every protocol in its own process, a validated capability model at the core. · GitHub

Fine print: it’s source-available under PolyForm Noncommercial 1.0.0, free for personal and household use but not OSI open source. It runs in Docker on a plain CPU. I’m a mechanical engineer; the code was written by AI coding agents (Claude Code) under my direction, and it runs my own house every day.

Questions welcome, especially from anyone who has fought the 24-hour token change.