Repository navigation
Architecture
Stephan Zehrer edited this page May 26, 2026
·
2 revisions
Internet / Nostr Relays
│
│ (Nostr protocol — mChatCore is the shared communication backbone)
│
┌───────▼────────────────────────────────────────────┐
│ Home Network (local) │
│ │
│ ┌─────────────────────────────────────────────┐ │
│ │ HomeNode Server │ │
│ │ │ │
│ │ ┌───────────────────┐ ┌────────────────┐ │ │
│ │ │ Home Automation │ │ HomeNode │ │ │
│ │ │ IoT / Matter / │◄─► Agent │ │ │
│ │ │ MQTT / Thread │ │ (Local LLM) │ │ │
│ │ └───────────────────┘ └───────┬────────┘ │ │
│ └──────────────────────────────── │ ───────────┘ │
│ │ │
└────────────────────────────────────│───────────────┘
│ Nostr (mChatCore)
┌───────────▼───────────────┐
│ mChat group chat │
│ │
│ 👤 User A │
│ 👤 User B │
│ 🤖 HomeNode Agent bot │
└──────────────┬────────────┘
│
┌──────────────▼────────────┐
│ mHomeNode (iOS) │
│ device control · dashboard│
└───────────────────────────┘
mChatCore is not just the engine for the chat app — it is the shared communication layer for the entire ecosystem. Every component that needs to exchange messages uses the Nostr protocol via mChatCore:
- Users communicate through mChat (iOS) over Nostr relays
- HomeNode Agent holds its own Nostr keypair and participates in group chats as a bot
- Notifications from home automation events (doorbell, appliance done, alerts) are published by the Agent as Nostr DMs or group messages
The HomeNode Server runs entirely on your local network. The LLM Agent processes all intelligence locally — no queries leave your home. Nostr relays are used only for message routing, and messages are end-to-end encrypted (NIP-04 / NIP-17).
Doorbell rings →
- HomeNode Server detects doorbell event (via MQTT / Matter)
- HomeNode Agent receives the event
- Agent publishes a message to the mChat group as the bot identity
- All group members receive the notification on their iPhones via mChat
User asks the bot →
- User sends a message in the mChat group: "Turn off the living room lights"
- HomeNode Agent receives the message via its Nostr subscription
- Agent interprets the command (LLM) and triggers the action on HomeNode Server
- Agent confirms back in the group: "Done — living room lights off"
The HomeNode ecosystem maps clearly onto the three Matter roles:
| Role | Who |
|---|---|
| Commissioner | mHomeNode (iOS) — onboards new devices via QR / NFC |
| Controller | HomeNode Server — always-on automations; co-exists with Apple Home / Google Home |
| Bridge | HomeNode Server — exposes non-Matter devices (MQTT, Zigbee, Shelly…) to the fabric |
mHomeNode (iOS)
│ Commissioner — adds devices to the fabric
▼
Matter Fabric
├── HomeNode Server (Controller + Bridge)
├── Apple Home hub (Controller, optional)
└── Google Home (Controller, optional)
│
└──► Matter Devices + Bridged non-Matter Devices
| Repository | Role |
|---|---|
| zehrer/HomeNode | HomeNode Server + sub-projects |
| zehrer/mHomeNode | iOS companion app |
| zehrer/mChat | mChat iOS app + mChatCore library |
| zehrer/HomeNodeAI | HomeNode Agent (local LLM integration) |
| zehrer/HomeNodeServer | HomeNode Server runtime |
(c) Stephan Zehrer 2025