yes999zc/home-mate
حول
Home Mate (XiaoRui / 小瑞): Pure-Rust edge voice brain, Vue 3 console, Full-Duplex S2S, DisplayImage screen-cast & Master Brain hub for Linux, ESP32-S3 & Android gateways
تطوير الويب والتطبيقاتما يمكنك فعله
- 256 MB batch (MemTotal >= 180,000 kB, Hardware-Verified Primary Target): Unpacks the <= 6.0 MiB Scheme A archive (/data/hm/hm-bundle.tar.xz) into 120.9 MiB /tmp RAM tmpfs on boot — hm-core --slim, Vue 3 Console (:8930), hm-gateway, and hm-kws (with hardware-calibrated 0.20 / 2.50 KWS sensitivity) run 100% on-speaker.
- With NAS (Experimental — --thin): Auto-enters Thin Gateway mode (hm-lx06-thin.tar.xz, ~607 KB compressed), dialing your NAS / server Full Docker hm-core over private LAN :8932 or SSH reverse tunnel. Lacks on-device KWS and has not yet been stress-tested on physical 128 MB hardware; high CPU load or wake contention with stock XiaoAi may occur.
- 0 bytes modified in stock SquashFS: Factory read-only mtd4 (system0) and mtd5 (system1) partitions remain 100% untouched (zero brick risk).
- 1-Line Factory Restore: Run rm -rf /data/hm /data/init.sh && reboot over SSH to return to 100% stock state.
النمو المقاس للنجوم
- خلال 24 ساعة
- +١
- خلال 7 أيام
- جارٍ جمع السجل
- خلال 15 يومًا
- جارٍ جمع السجل
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصل
English · 简体中文 · Official Website (mymate.homes)
What is Home Mate (XiaoRui / 小瑞)?
Home Mate (小瑞) is the next-generation evolution of rui (小瑞), rewritten from scratch in pure Rust with a three-layer sovereign household architecture:
- On-Speaker Sovereign Edge Brain (
hm-core) — Or NAS Docker Multi-Room Hub- Unlike first-generation
rui, Home Mate compresses the voice runtime (hm-core+ Vue 3 Web Console:8930+hm-gateway+hm-kwsZipformer & Silero VAD) to run 100% directly inside ARM64 smart speakers (Echo Dot 2 & 256 MB Xiaomi LX06) — with zero external streaming server required. - The exact same
hm-corealso runs in Full Docker mode on a NAS / home server (linux/amd64&linux/arm64), hosting 128 MB LX06 thin gateways, ESP32-S3 smart-display & voice terminals, and Android phones, tablets, smart displays, and 86 wall panels simultaneously.
- Unlike first-generation
- Master Brain / Family Agent Orchestration (
brain.delegate / status / steer / cancel)- The edge speaker handles low-latency wake, instant Q&A, music/stories/reminders, and closed-loop Home Assistant control with mandatory post-action readback.
- Complex long-horizon tasks, cross-tool research, briefings, and fleet diagnostics (
skills/home-mate-fleet) are delegated asynchronously to a Household Master Brain Agent (Hermes / OpenAI-compatible Agent gateway) — never blocking everyday voice turns, with spoken callbacks back to the initiating room.
- Edge Brain + Multi-Gateway Strict Isolation (
Northbound Protocol v2)- A single
hm-coreconcurrently manages multiple heterogeneous gateways (Echo Dot 2, LX06 256 MB / 128 MB, ESP32-S3 terminals, and multiple Android devices) with:- Per-device isolated sessions, retreat context archiving (
退下), and unified current + archived conversation clear (DELETE /api/v0/devices/{id}/conversation); - Per-hardware-family KWS sensitivity isolation (Dot2
0.32 / 2.50, LX060.20 / 2.50, Android0.22 / 3.00, native ESP32-S3 WakeNet9 keyword admission & ASR slicing, with explicit per-device overrides winning — zero cross-family clobbering); - Oneshot
wake_dur_mscommand slicing, wake-ack tail bridging, millisecond local-exit interruption, and Bearer Token + opt-in private-LAN exemption (lan_gateway_exempt) security boundaries. - Latest
v0.5.1Ecosystem Release — Multi-Room Arbitration Hardening, 4-Repo Security Audit & Official Android Xiao Rui Desktop Pet (v2.5.0):- Multi-Room Wake Sovereignty Hardening (
v0.5.1): Idle KWS-only peers (proactive_asr_wake = false) no longer emit passive presence claims or veto active room wakes into dual silence (including mixed-version fleets); passive & mic-level peak trackers no longer ratchet timestamps forward or drop sticky clipping flags; heterogeneous hardware profiles (Dot2+LX06) apply per-profile dominance pruning; loudness margins compare against the actual runner-up; andtools/calibrate_mic_offset.pyuses raw pre-offsetkeyword_sourcelevels with time-window & bleed-spread guards. - Capability-Gated
DisplayImage/DismissImage+ Console Push UI: Push validated PNG / Baseline JPEG (SOF0) frames (POST/DELETE /api/v0/devices/{id}/display/image& Web Console preview card) directly to ESP32-S3 displays (480×320 paper-and-ink 3.5" box & 240×240 CubeBox) with strict decompression-bomb, dimension, and multi-device isolation guards. - Music-Playback Wake & Retreat Hardening (Issue #13): Paired with Linux Gateway
v0.2.1(dual-output STFT-ERB RES active during half-duplex music playback, LX06 high-band consonant preservation, silent-ref watchdog, and media-only local exit) + refined media cue overlap inhm-core v0.5.1. - On-Demand Full-Duplex S2S Realtime Chat + Cerebellum Bridge: Everyday voice defaults to stable half-duplex (
hm-core+ local KWS + Master Brain). Say "开启聊天模式" / "开启全双工" (or toggle in the Web Console / Android app) to enter Full-Duplex Realtime Voice Chat (Volcengine Doubao Realtime Voice 3.01.2.6.1or OpenAI-Realtime-compatible local servers) with continuous STFT-ERB RES uplink (60–71 dB total ERLE,-74..-78.5 dBFSresidual echo, 240 ms bounded upstream FIFO) verified across Echo Dot 2, Xiaomi LX06 256 MB, ESP32-S3 CHD 3.5", and Android — plus single-tool cerebellum bridging (dispatch_home_command), live mode inspection (system.duplex_reading), and instant KWS retreat (退下吧).
- Multi-Room Wake Sovereignty Hardening (
- Per-device isolated sessions, retreat context archiving (
- A single
[!IMPORTANT] Hardware Research Disclaimer & Custom Speaker Roadmap
- For Research & Personal Experimentation Only: Adaptation of third-party commercial speakers (Xiaomi AI Speaker Pro
LX06and Amazon Echo Dot 2RS03QR) in this project is provided strictly for edge-AI architectural research, acoustic arbitration validation, and personal non-commercial experimentation. All trademarks belong to their respective owners. This project is not affiliated with Xiaomi or Amazon and does not sell modified third-party brand-name speakers.- First-Party Custom Speaker Under Active Development: We are actively engineering a dedicated custom Home Mate (小瑞) smart speaker hardware platform featuring an open far-field microphone array, tuned acoustic enclosure, and native sovereign Rust firmware out of the box—requiring zero third-party unlock steps.
Unified 4-Repository Ecosystem (Core + Linux + NEW ESP32-S3 + Android)
We now maintain and publish the complete 4-repository Home Mate ecosystem:
| Repository | Latest | Role & Highlights | License |
|---|---|---|---|
| yes999zc/home-mate (this repo) | v0.5.1 |
Core Edge Brain & Console: hm-core (Full Docker with Silero VAD & --slim speaker build), DisplayImage screen-cast API & Console card, ESP32 WakeNet9 keyword admission, Master Brain delegation, Multi-Gateway isolation, hm-release Ed25519 OTA, Vue 3 Console (web/), and Northbound v2 protocol contract. |
AGPL-3.0 (Apache-2.0 Protocol v2 Spec) |
| yes999zc/home-mate-gateway-linux (Unified Linux Gateway) | v0.2.1 |
Unified Linux Smart Speaker Gateway: Feature-gated Rust gateway for Echo Dot 2 (board-dot2) and Xiaomi LX06 (board-lx06, 256 MB on-speaker / 128 MB thin) with Issue #13 music-playback wake & exit hardening and STFT-ERB RES full-duplex S2S. |
AGPL-3.0 |
| yes999zc/home-mate-gateway-esp32 (NEW ESP32-S3 Gateway) | v0.1.1 |
Clean ESP-IDF 6.1 Multi-Board Gateway: Connects CHD 3.5" Paper-and-Ink Desktop Terminal (Full-Duplex S2S + hardware-ref ES7210 AEC + 0°/180° rotation + DisplayImage), Xingzhi Cube 1.54" (240×240 + DisplayImage), and Headless ESP32-S3 (zero LVGL) natively to hm-core v0.5.1+ over UDP :8933 & TCP :8932. |
AGPL-3.0 (Apache-2.0 Protocol Codec) |
| yes999zc/home-mate-gateway-android (Universal Android Gateway) | v2.5.0 |
One adaptive zero-dependency APK (Android 5–16) for smart displays, 4-inch 86 wall panels (1:1), tablets, phones & spare phones — with offline KWS, Full-Duplex S2S echo gate, GitHub Releases auto-update, and the new Xiao Rui (小瑞) Pixel Desktop Pet (voice orb ↔ pixel mascot, StandBy mode & floating edge-peek overlay). | AGPL-3.0 |
Official Xiao Rui (小瑞) 48×48 Pixel Desktop Pet released in Android Gateway v2.5.0 (Voice Stage, OLED StandBy & Floating Edge-Peek Overlay).
Migration Note: Legacy single-board repositories (
home-mate-gateway-dot2andhome-mate-gateway-lx06) have been unified into yes999zc/home-mate-gateway-linux. All new Linux speaker deployments and AI agent scripts should targethome-mate-gateway-linux.
Zero-to-Talking Device Decision Map (Start Here!)
Not sure which track, prerequisite, or AI prompt to use? Follow your device branch from top to bottom:
flowchart TD
Root["Step 0: Which Hardware Do You Have?"]
Root --> Dot2["1. Amazon Echo Dot 2 (RS03QR / AEOBC)<br/>100% On-Speaker · No NAS Needed"]
Root --> LX06["2. Xiaomi AI Speaker Pro (LX06)<br/>Zero-Flash Scheme A · Adaptive by RAM"]
Root --> ESP32["3. ESP32-S3 Terminal (CHD 3.5" / CubeBox 1.54" / Headless)<br/>NEW v0.1.1 · USB Flash · Native WakeNet9 & DisplayImage"]
Root --> Android["4. Android Series (Display / 86 Panel / Tablet / Phone / R1)<br/>Zero Hardware Flashing · 3-Min Setup · Xiao Rui Desktop Pet"]
Dot2 --> D0["Prereq 1: Unlock Bootrom via yes999zc/firebreak (backup stock p10)"]
D0 --> D1["Prereq 2: Flash upstream emOS from wilbowes/EchoMuse (emos/) + run em-wifi"]
D1 --> D2["Build: core v0.5.1 + dot2 gateway v0.2.1 + your Ed25519 key -> hm-release pack + build_bootstrap.py"]
D2 --> D3["Provision: ./tools/hm-provision.sh (--dry-run -> live) -> http://<IP>:8930<br/>👉 Use Track B & Dot 2 AI Prompt"]
LX06 --> L0["Prereq: Root SSH via open-xiaoai -> check MemTotal"]
L0 -->|"≥ 180,000 kB (256 MB · Verified)"| L256["On-Speaker Dual-Wake (No NAS)<br/>👉 Track A1 & LX06 AI Prompt"]
L0 -->|"< 180,000 kB (128 MB · Experimental)"| L128{"Experimental — Have a LAN NAS?"}
L128 -->|"Yes (Experimental --thin)"| LThin["Track C NAS Full Docker Core + v0.2.1 --thin (Experimental)<br/>👉 Track A2 & LX06 AI Prompt"]
L128 -->|"No (Not Recommended)"| LAsr["v0.2.1 --standalone-asr (Very Tight RAM · Experimental Only)<br/>👉 Track A3 (Consider ESP32-S3 / Android / 256 MB)"]
ESP32 --> E1["Prereq: Track C Full Docker Core v0.5.1 on NAS/Mac/PC (or existing speaker Core)"]
E1 --> E2["Flash v0.1.1 Firmware for CHD 3.5" / CubeBox 1.54" / Headless (USB)"]
E2 --> E3["SoftAP Wi-Fi Setup -> UDP :8933 Auto-Discover -> Voice + DisplayImage<br/>👉 Track C (Docker) + Track E (ESP32-S3)"]
Android --> A1["Prereq: Track C Full Docker Core v0.5.1 on NAS/Mac/PC (or existing speaker Core)"]
A1 --> A2["Install Signed APK (v2.5.0+: full-arm64 / universal / slim)"]
A2 --> A3["UDP :8933 Auto-Discover -> Pair Token -> Voice & Xiao Rui Pet<br/>👉 Track C (Docker) + Track D (Android)"]
Which Combination Should I Choose? (Quick Matrix)
| What Hardware You Have | Prerequisites | Recommended Topology | External NAS/Server Needed? | Jump To |
|---|---|---|---|---|
Amazon Echo Dot 2 (RS03QR / AEOBC) |
firebreak unlock (p10 backup) + upstream EchoMuse emOS + em-wifi |
On-speaker Full hm-core v0.5.1 + hm-gateway v0.2.1 + hm-kws (7-mic + 160ms AEC + 12-LED ring) |
No (100% on-speaker) | Track B (Dot 2) |
| Xiaomi LX06 (256 MB RAM · Verified) | open-xiaoai Root SSH, MemTotal ≥ 180,000 kB |
On-speaker hm-core v0.5.1 --slim + hm-gateway v0.2.1 + hm-kws (Scheme A dual-wake + music-wake fix) |
No (100% on-speaker) | Track A (LX06) |
| Xiaomi LX06 (128 MB · Experimental w/ NAS) | open-xiaoai Root SSH + LAN NAS Full Docker Core |
Experimental Thin Gateway (v0.2.1 --thin) → Full Docker hm-core (not yet hardware-verified by maintainer; lower expectations) |
Yes | Track A + Track C |
| Xiaomi LX06 (128 MB · No-NAS · Not Recommended) | open-xiaoai Root SSH, /data ≥ 5.5 MiB |
Experimental Standalone Pure-ASR (--standalone-asr): RAM is extremely tight (~51 MiB free after stock XiaoAi) — prone to high load & poor wake |
No (not recommended for daily use) | Track A (LX06) |
| ESP32-S3 (CHD 3.5" / CubeBox 1.54" / Headless) | USB-C cable + ESP-IDF 6.1 (or prebuilt v0.1.1 flash binaries) |
Full Docker hm-core v0.5.1 + ESP32-S3 Gateway v0.1.1 (Full-Duplex S2S on CHD 3.5" + DisplayImage) |
Yes (or existing speaker Core) | Track C + Track E |
| Android Display / 86 Panel / Tablet / Phone / R1 | Android 5–16 (Zero hardware flashing!) | Full Docker hm-core v0.5.1 on NAS/PC + Android Universal APK (v2.5.0 + Xiao Rui Desktop Pet) |
Yes (or Manage-Only on speaker Core) | Track C + Track D |
[!WARNING] Honest Expectation Notice for 128 MB Xiaomi LX06 (
MemTotal < 180,000 kB): The maintainer only owns and hardware-tests the 256 MB LX06 batch; all 128 MB modes are currently Experimental and unverified on physical 128 MB hardware. Stock XiaoAi already leaves only ~51 MiB of free RAM on 128 MB units, and community testers have reported severe lag, high CPU load, memory pressure, and degraded wake reliability (including stock "XiaoAi" wake) when running alongside native XiaoAi.
- Not recommended without a NAS (
--standalone-asr): Unpackinghm-core(~13.6 MiB) into RAM-backed/tmpplus runtime memory leaves almost zero page cache, easily causing flash thrashing and stutter.- With a NAS (
--thin): RAM footprint is much smaller, but the current gateway still shares the mic with stock XiaoAi while running continuous capture/AEC without on-device KWS, so responsiveness and stability are still noticeably below 256 MB.- Our honest recommendation: For a smooth LX06 dual-wake experience, use the 256 MB batch; if you only have a 128 MB unit and want hassle-free daily use, a repurposed Android phone/tablet/86 panel + NAS Docker Core delivers a far better experience (and you can always restore a 128 MB LX06 to 100% stock with
rm -rf /data/hm /data/init.sh && reboot).
Xiaomi AI Speaker Pro (LX06) Highlights (Adaptive 256 MB / 128 MB)
Deployed via yes999zc/home-mate-gateway-linux, Home Mate automatically inspects MemTotal in /proc/meminfo and adapts to both Xiaomi factory batches:
- Verified 256 MB On-Speaker vs. Experimental 128 MB Modes:
- 256 MB batch (
MemTotal >= 180,000 kB, Hardware-Verified Primary Target): Unpacks the<= 6.0 MiBScheme A archive (/data/hm/hm-bundle.tar.xz) into120.9 MiB/tmpRAM tmpfs on boot —hm-core --slim, Vue 3 Console (:8930),hm-gateway, andhm-kws(with hardware-calibrated0.20 / 2.50KWS sensitivity) run 100% on-speaker. - 128 MB batch (
MemTotal < 180,000 kB, ~59 MB/tmp— Experimental / Lower Expectations):- With NAS (Experimental —
--thin): Auto-enters Thin Gateway mode (hm-lx06-thin.tar.xz, ~607 KB compressed), dialing your NAS / server Full Dockerhm-coreover private LAN:8932or SSH reverse tunnel. Lacks on-device KWS and has not yet been stress-tested on physical 128 MB hardware; high CPU load or wake contention with stock XiaoAi may occur. - Without NAS (Experimental / Not Recommended —
--standalone-asr): Skips localhm-kwsand runshm-core --slim(HM_VOICE_EVENTS=0) +hm-gatewayon the speaker using energy VAD + cloud ASR wake. Because/tmpis RAM-backed and stock XiaoAi leaves only ~51 MiB available, real-world units frequently hit memory pressure, high load, and poor wake reliability — kept only for experimentation, not daily use.
- With NAS (Experimental —
- 256 MB batch (
- Zero Damage to Stock Firmware (Dual-System Coexistence):
- 0 bytes modified in stock SquashFS: Factory read-only
mtd4 (system0)andmtd5 (system1)partitions remain 100% untouched (zero brick risk). - 1-Line Factory Restore: Run
rm -rf /data/hm /data/init.sh && rebootover SSH to return to 100% stock state.
- 0 bytes modified in stock SquashFS: Factory read-only
- Instant System Switching by Wake Word (256 MB Dual-Wake):
- Say "XiaoAi TongXue" (小爱同学) → Answered natively by stock Xiaomi XiaoAi.
- Say your custom wake word (e.g. "NiHao GaoDa" / "NiHao XiaoZhi") → Answered by Home Mate.
- Say "QieHuan XiaoAi" (切换小爱) (or long-press Play/Pause 1.5 s) → Immediately yields or toggles pinned stock XiaoAi mode.
Live Interface Gallery: Android Universal App & Web Console
Android Universal Client & Voice Gateway (v2.3.10+ · 4:3 & 1:1 Adaptive Layouts)
One APK adapts cleanly across phones, repurposed spare phones, 4-inch 86 wall control panels (1:1), and smart displays / tablets (4:3) — featuring offline Sherpa-ONNX JNI KWS, mid-playback PBFDAF AEC barge-in, unified conversation history with one-tap clear, whole-house multi-room controls, battery exemption management, and GitHub Releases auto-updates:
1. Voice Companion & Unified History Clear (Phone · 4:3) |
2. Whole-House Control & Settings (Phone · 4:3) |
3. Smart Display / Tablet Adaptive Layout (Native 4:3) |
4. 4-Inch 86 Wall Control Panel Layout (Native 1:1) |
Built-In Web Console (:8930 · Light Theme Default)
Every Core (on-speaker or NAS Docker) serves the responsive Vue 3 Web Console directly at http://<CORE_IP>:8930:
1. Status Overview ( |
2. Wake Words & Follow-up ( |
3. Hardware & Audio Gate ( |
4. Speaker Voicing EQ ( |
5. LLM, ASR, TTS & Master Brain ( |
6. Home Assistant Closed-Loop Readback ( |
Quickstart & AI Coding Agent Deployment Prompts (5 Tracks)
Track A: Xiaomi AI Speaker Pro (LX06) — Adaptive 256 MB / 128 MB Deploy
Prerequisites
- Model & Memory Check: Black cylinder Xiaomi AI Speaker Pro (
LX06, A113Xaarch64). Always rungrep ^MemTotal /proc/meminfoover SSH first to identify 256 MB (>= 180,000 kB) vs. 128 MB (< 180,000 kB). - Root SSH Unlocked: Enable root SSH (port 22) via idootop/open-xiaoai.
- If 128 MB Batch: With a NAS/server, deploy Track C (Full Docker
hm-core) first and use--thin; without a NAS, use--standalone-asrdirectly (v0.2.1Releases include zero-compile prebuilt archives for both).
Manual Commands (v0.2.1 ships zero-compile prebuilt Release assets with Issue #13 music-wake fixes)
git clone https://github.com/yes999zc/home-mate-gateway-linux.git
cd home-mate-gateway-linux
# Option A1 — 256 MB LX06 (100% on-speaker dual-wake):
./tools/pack_lx06_bundle.sh
python3 -m http.server 18089 --directory build/lx06 &
./deploy/lx06/install-lx06.sh --device-ip 192.168.1.50 --kws-url http://192.168.1.10:18089/hm-kws-lx06.tar.xz
# Option A2 — 128 MB LX06 + NAS (Recommended; zero-compile prebuilt Thin Gateway -> NAS Full Docker Core):
mkdir -p build/lx06 && for f in hm-lx06-thin.tar.xz hm-lx06-thin.sha256 init.sh unxz SHA256SUMS.txt; do
curl -fL "https://github.com/yes999zc/home-mate-gateway-linux/releases/download/v0.2.1/$f" -o "build/lx06/$f"
done && chmod +x build/lx06/init.sh build/lx06/unxz
./deploy/lx06/install-lx06.sh --thin --device-ip 192.168.1.50 --core-addr 192.168.1.10:8932 --device-id lx06-living --core-token "<TOKEN>"
# Option A3 — 128 MB LX06 without NAS (Standalone Pure-ASR trial; zero-compile main bundle, no local KWS):
mkdir -p build/lx06 && for f in hm-bundle.tar.xz hm-bundle.sha256 init.sh unxz SHA256SUMS.txt; do
curl -fL "https://github.com/yes999zc/home-mate-gateway-linux/releases/download/v0.2.1/$f" -o "build/lx06/$f"
done && chmod +x build/lx06/init.sh build/lx06/unxz
./deploy/lx06/install-lx06.sh --standalone-asr --device-ip 192.168.1.50 --device-id lx06-standalone
Let an AI Coding Agent Deploy LX06 (Auto-Detects 256 MB vs Dual 128 MB Modes)
Copy and paste into Claude Code, Cursor, Codex, or Antigravity (replace the example IPs 192.168.1.50 and 192.168.1.10 with your real LAN IPs; note "no NAS" if you want 128 MB standalone pure-ASR):
Help me deploy Home Mate (XiaoRui) onto my Xiaomi AI Speaker Pro (LX06, root SSH enabled via open-xiaoai):
[Replace the example IPs below with your real LAN IPs]
- LX06 Speaker SSH: [email protected]
- LAN NAS / Host IP: 192.168.1.10 (if I don't have a NAS, use 128 MB Standalone Pure-ASR mode)
Follow these strict rules:
1. NEVER modify stock SquashFS partitions (mtd4 / mtd5). Use only non-invasive Storage Scheme A under /data/hm and /data/init.sh.
2. Clone https://github.com/yes999zc/home-mate-gateway-linux.git (and https://github.com/yes999zc/home-mate.git side-by-side if building 256 MB from source or deploying NAS Docker).
3. SSH into root@<SPEAKER_IP> and inspect `uname -m`, `grep ^MemTotal /proc/meminfo`, and `df -k /data /tmp`:
- If MemTotal >= 180000 kB (256 MB batch -> On-Speaker Dual-Wake):
a) Verify /data has >= 6000 KB free, pack with `./tools/pack_lx06_bundle.sh`, and serve `build/lx06/` on <HOST_IP>:18089 (confirm HTTP 200 on `hm-kws-lx06.tar.xz`).
b) Run `./deploy/lx06/install-lx06.sh --device-ip <SPEAKER_IP> --kws-url http://<HOST_IP>:18089/hm-kws-lx06.tar.xz`.
c) Verify `hm-core`, `hm-gateway`, and `hm-kws` are running, `http://<SPEAKER_IP>:8930` loads HTTP 200, and `/api/v0/mode` shows LX06 KWS `0.20 / 2.50`.
- If MemTotal < 180000 kB (128 MB batch — download prebuilt Release `v0.0.54+` assets into `build/lx06/` and verify `SHA256SUMS.txt` without Rust compilation):
* [Preferred w/ NAS -> Thin Gateway]:
a) Deploy standard **Full Docker `hm-core`** (NOT `--slim`, `HM_GATEWAY_ALLOW_LAN=1`) from `yes999zc/home-mate` on <HOST_IP> (`docker compose up -d`) and pair an admin token.
b) Download `hm-lx06-thin.tar.xz`, `hm-lx06-thin.sha256`, `init.sh`, and `unxz`, then run `./deploy/lx06/install-lx06.sh --thin --device-ip <SPEAKER_IP> --core-addr <HOST_IP>:8932 --core-token "<TOKEN>"`.
c) Verify ONLY `hm-gateway` runs on the speaker and it appears online at `http://<HOST_IP>:8930`.
* [No-NAS Trial -> Standalone Pure-ASR]:
a) Confirm `/data` has >= 5500 KB free; download `hm-bundle.tar.xz`, `hm-bundle.sha256`, `init.sh`, and `unxz`.
b) Run `./deploy/lx06/install-lx06.sh --standalone-asr --device-ip <SPEAKER_IP>`.
c) Verify ONLY `hm-core` (`HM_VOICE_EVENTS=0`) and `hm-gateway` (no `hm-kws`) run, `/tmp` stays < 45%, and `http://<SPEAKER_IP>:8930` returns HTTP 200.
* [Optional DIY (Say "XiaoAi TongXue" to Interrupt Playback in 128 MB Non-KWS Mode)]: Upstream keeps stock `pns` paused during Home Mate playback for 256 MB dual-wake stability. If I want to interrupt playback by waking stock XiaoAi in non-KWS mode, customize `crates/gateway/src/firmware/lx06_vendor.rs` (`wants_pns` under `!local_kws_enabled` + `instruction.log` native-wake playback stop) locally and rebuild via `./tools/build_firmware_lx06.sh`.
4. Never commit real IPs or tokens to Git. Pair a household admin token and save it to `~/.home-mate/` (chmod 600).
Track B: Amazon Echo Dot 2 (RS03QR / AEOBC) — From Stock to Talking
Step-by-Step Prerequisites (Where emOS Comes From)
Home Mate runs 100% on-device on top of emOS — a minimal Linux userspace originally created by the upstream wilbowes/EchoMuse project that keeps your Dot 2's stock MediaTek 3.18 kernel and 7-mic/3.5mm audio hardware while removing Amazon's FireOS/Android userspace completely.
- Step 0 — Unlock Bootrom via
firebreak(amonet):- Do NOT update a brand-new/stock Dot 2 via the Alexa App before unlocking.
- Connect your 2nd-Gen Echo Dot (
RS03QR/AEOBC) over Micro-USB and unlock it usingyes999zc/firebreak(uvx firebreak@latest). Save your stockp10partition backup safely.
- Step 1 — Flash Upstream
emOSfromwilbowes/EchoMuse:- Clone
wilbowes/EchoMuseand follow its rootSETUP.mdandemos/wizard (emos-v0.10+) to build and flashemOSaround your own speaker's kernel/DTB. (We intentionally delegateemOSflashing to upstream EchoMuse —emOSis not a one-way door;/init recoveryreturns to TWRP anytime.)
- Clone
- Step 2 — Connect Wi-Fi Over USB Serial:
- Plug the Dot 2 into your Mac/Linux host via Micro-USB, open the USB serial console (
/dev/cu.usbmodem*on macOS or/dev/ttyACM*on Linux), verifycat /etc/os-releasereportsID=emos, and runem-wifito join your home Wi-Fi and obtain a LAN IP.
- Plug the Dot 2 into your Mac/Linux host via Micro-USB, open the USB serial console (
Step 3 — Build, Self-Sign & Generate Bootstrap Seed (First-Time Setup)
Host Toolchain Prerequisites (macOS or Linux): Rust (
rustup target add aarch64-unknown-linux-musl armv7-unknown-linux-musleabihf+rustup component add llvm-tools/rust-lld),zig+cargo-zigbuild, Node.js 20+, Python 3 +pyserial, and the Sherpa-ONNX aarch64 KWS sidecar bundle at~/.home-mate/kws-build/bundle(assembled viahome-mate-gateway-linux/kws/build.sh+kws/assemble.sh).
Clone both repositories side by side (hm-provision.sh and build_bootstrap.py automatically find ../home-mate-gateway-linux):
git clone https://github.com/yes999zc/home-mate.git
git clone https://github.com/yes999zc/home-mate-gateway-linux.git
cd home-mate
# 1. Generate YOUR OWN Ed25519 signing keypair (outside Git) and embed your pubkey into hm-release:
cargo build -p hm-release
./target/debug/hm-release keygen --out ~/.home-mate/signing/release-signing-key.hex
./target/debug/hm-release pubkey --key ~/.home-mate/signing/release-signing-key.hex > deploy/release/release-pubkey.hex
./tools/build_release.sh # aarch64 static hm-release carrying YOUR pubkey
cargo build -p hm-release # refresh host verifier with YOUR pubkey
# 2. Build full hm-core (aarch64), Vue 3 console, and Dot 2 gateway (armv7 — NEVER raw cargo zigbuild!):
./tools/build_core.sh
(cd web && npm install && npm run build)
(cd ../home-mate-gateway-linux && ./tools/build_firmware.sh)
# 3. Assemble & sign home-mate-release.tar (see deploy/release/README.md for exact layout):
VER=$(date +%Y.%m.%d)-1
REL="build/release-$VER"
mkdir -p "$REL/components/model"
cp target/aarch64-unknown-linux-musl/release/hm-core "$REL/components/core-aarch64"
cp ../home-mate-gateway-linux/target/armv7-unknown-linux-musleabihf/release/home-mate-device-gateway "$REL/components/firmware-armv7"
cp -a web/dist "$REL/components/web"
# Download the audited Silero VAD v4 16 kHz ONNX (643,854 B, SHA-256 verified by hm-release pack):
curl -fL https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/silero_vad.onnx \
-o "$REL/components/model/silero_vad.onnx"
./target/debug/hm-release pack --dir "$REL" --out "build/release/home-mate-release-$VER" \
--serial 1 --version "$VER" --key ~/.home-mate/signing/release-signing-key.hex \
--model AEOBC --profile dot2d-emos --firmware-min 0.0.44 --firmware-max 0.9.99
# 4. Build the per-device bootstrap seed (requires Sherpa-ONNX KWS bundle at ~/.home-mate/kws-build/bundle;
# pass --allow-empty-wake-acks for your household's very first Dot 2 before TTS is configured):
python3 tools/build_bootstrap.py \
--device-id dot2-living \
--release "build/release/home-mate-release-$VER.tar" \
--allow-empty-wake-acks
Step 4 — Provision Over USB Serial (tools/hm-provision.sh)
# 1. Read-only dry-run preflight (touches zero bytes on the speaker):
./tools/hm-provision.sh --device-id dot2-living \
--seed "build/bootstrap/home-mate-bootstrap-dot2-living-$VER.tar.gz" \
--release "build/release/home-mate-release-$VER.tar" \
--serial /dev/cu.usbmodem8401 --ip 192.168.1.73 \
--wake-word "Hey Mate" --dry-run
# 2. Remove --dry-run to install, activate (health self-checks), pair token & optionally clone config:
./tools/hm-provision.sh --device-id dot2-living \
--seed "build/bootstrap/home-mate-bootstrap-dot2-living-$VER.tar.gz" \
--release "build/release/home-mate-release-$VER.tar" \
--serial /dev/cu.usbmodem8401 --ip 192.168.1.73 \
--wake-word "Hey Mate"
(Open http://<DOT2_IP>:8930 to configure your LLM / ASR / TTS & Home Assistant — hm-core will auto-synthesize wake acks once TTS is saved. Never copy per-unit acoustic calibration across different Dot 2 units.)
Let an AI Coding Agent Set Up Echo Dot 2 End-to-End (From Stock or emOS)
Copy and paste into Claude Code, Cursor, Codex, or Antigravity (replace the example values below with your real serial port, LAN IP, and preferred wake word):
Help me deploy Home Mate onto my Amazon Echo Dot 2nd Gen (RS03QR / AEOBC):
[Replace the example values below with your own]
- Current speaker state: <stock / already unlocked via firebreak / already running emOS on Wi-Fi>
- USB Serial Port: /dev/cu.usbmodem8401 (or auto-detect via `ls /dev/cu.usbmodem* /dev/ttyACM*`)
- Speaker LAN IP: 192.168.1.73 (after running `em-wifi` on emOS)
- Desired Node ID & Wake Word: dot2-living / "Hey Mate" (customize to English or Chinese)
- (Optional) Existing Reference Speaker IP: none
Follow this exact end-to-end checklist safely:
1. Prerequisites (guide me interactively; NEVER auto-flash p10 without my explicit confirmation):
- If still stock: guide me through unlocking Bootrom with `yes999zc/firebreak` (`uvx firebreak@latest`) and saving my stock `p10` backup.
- If not yet on emOS: guide me to clone upstream `https://github.com/wilbowes/EchoMuse` and flash `emOS` (`emos/` directory, `emos-v0.10+`) around my own kernel/DTB, then run `em-wifi` over USB serial until `cat /etc/os-release` shows `ID=emos` and `wlan0` has an IP.
2. Clone `https://github.com/yes999zc/home-mate.git` and `https://github.com/yes999zc/home-mate-gateway-linux.git` side by side (`hm-provision.sh` and `build_bootstrap.py` auto-detect `../home-mate-gateway-linux`).
3. Build & Self-Sign (check `deploy/release/README.md`):
- Generate my own Ed25519 key at `~/.home-mate/signing/release-signing-key.hex` (chmod 600, outside Git), write its pubkey into `deploy/release/release-pubkey.hex`, and rebuild `hm-release` (`./tools/build_release.sh` + `cargo build -p hm-release`).
- Build full `hm-core` (`./tools/build_core.sh`), `web/dist`, and Dot 2 gateway (`./tools/build_firmware.sh` in `home-mate-gateway-linux` — NEVER raw `cargo zigbuild`!).
- Pack & sign `home-mate-release.tar` via `hm-release pack`, then build the per-node seed via `python3 tools/build_bootstrap.py --device-id dot2-living --release <tar> --allow-empty-wake-acks` (after preparing the Sherpa-ONNX KWS bundle at `~/.home-mate/kws-build/bundle`).
4. Provision safely:
- Run `./tools/hm-provision.sh ... --dry-run` first and show me the preflight output (`ID=emos`, `/data/emos/sockets`, IP).
- After I confirm, run without `--dry-run`, verify health checks, save the token to `~/.home-mate/dot2-living.token` (chmod 600), and verify `http://<SPEAKER_IP>:8930` loads HTTP 200.
5. Never commit real IPs, tokens, or signing keys to Git, and never copy acoustic calibration parameters from another Dot 2 unit.
Track C: NAS / Docker Full Core (Multi-Gateway Hub for ESP32-S3, 128 MB LX06 & Android)
Deploy Full hm-core v0.5.1 (with pre-bundled Silero VAD v4 + Vue 3 Console + DisplayImage push UI) on Synology, fnOS, UGREEN, Unraid, Raspberry Pi, Linux, or macOS. With HM_GATEWAY_ALLOW_LAN=1, it hosts multiple ESP32-S3 terminals, Android terminals, and 128 MB LX06 thin gateways concurrently while keeping every device's sessions, audio streams, and KWS thresholds strictly isolated.
# On Linux NAS/servers, create ./data writable by container UID 1000:1001
# and use --network host so UDP :8933 discovery & real LAN IPs work natively:
mkdir -p ./data && sudo chown -R 1000:1001 ./data
docker run -d \
--name home-mate-core \
--restart unless-stopped \
--network host \
-e TZ=UTC \
-e HM_GATEWAY_ALLOW_LAN=1 \
-v "$(pwd)/data:/data" \
ghcr.io/yes999zc/home-mate:latest
(On macOS Docker Desktop, replace --network host with -p 8930:8930 -p 8932:8932 -p 8933:8933/udp. Or download docker-compose.yml and run docker compose up -d — it pulls ghcr.io/yes999zc/home-mate:latest directly with zero compiling! Always pair a household admin token immediately on first login at http://<NAS_IP>:8930.)
Let an AI Coding Agent Deploy NAS Docker Full Core + Master Brain
Help me deploy Home Mate Full Docker `hm-core` on my LAN NAS/server at 192.168.1.10 from https://github.com/yes999zc/home-mate:
1. Start the standard FULL `hm-core` image (NEVER `--slim`) with `HM_GATEWAY_ALLOW_LAN=1`, persistent volume `./data:/data`, and ports 8930/tcp (Web Console), 8932/tcp (Northbound v2 Gateways), and 8933/udp (LAN Auto-Discovery).
2. Verify `http://192.168.1.10:8930/` returns HTTP 200 and `/api/v0/status` reports healthy vault & DB.
3. Immediately pair a household admin Bearer token via `/api/v0/auth/provision` (save to `~/.home-mate/nas.token`, chmod 600) so the NAS is never left unauthenticated on LAN; guide me on configuring LLM/ASR/TTS, optional Master Family Agent (`master_brain`), and optional `lan_gateway_exempt` for trusted LAN devices.
Track D: Android Universal Terminal (Smart Displays, 86 Panels, Tablets & Old Phones)
Turn any Android 5–16 device (smart display, 4-inch 86 wall panel, tablet, primary phone, or spare old phone) into a Home Mate far-field voice terminal & whole-house controller in 3 minutes with zero hardware unlocking:
- Choose Your APK from yes999zc/home-mate-gateway-android:
full-arm64(~13 MB) — Recommended for modern 64-bit phones/tablets (offline KWS included, smallest full package).universal(~21 MB) — Includes botharm64-v8a+armeabi-v7aoffline KWS (best for 32-bit 86 wall panels, older tablets, or if unsure).slim(~225 KB) — Ultra-lightweight pure-Java client without offline KWS (for pure remote control / tap-to-talk / text chat).
- Connect: Tap Scan LAN (discovers Cores over UDP
:8933) or addhttp://<CORE_IP>:8930manually, enter your household token (or enablelan_gateway_exempton your Core), and start talking! - Auto-Updates: Checks GitHub Releases by default with ABI-aware APK selection (and also supports custom LAN
version.jsonmirrors).
Let an AI Coding Agent Set Up or Build the Android Gateway
Help me connect (or build from source) the Home Mate Android Universal Gateway (`https://github.com/yes999zc/home-mate-gateway-android`) against my Home Mate Core at 192.168.1.10:
1. Verify `http://192.168.1.10:8930/api/v0/auth` is reachable, `HM_GATEWAY_ALLOW_LAN=1` is enabled on `:8932`, and UDP `:8933` is open for auto-discovery.
2. Recommend the right APK variant (`full-arm64` for 64-bit phones, `universal` for 32-bit 86 wall panels / older devices, `slim` for lightweight control-only).
3. If building locally from source, run `./tools/test_jvm.sh` and `./tools/build_apk.sh` (using a dedicated release keystore for public distribution, never debug credentials).
Track E: ESP32-S3 Smart Display & Voice Terminal (CHD 3.5" / CubeBox / Headless)
Connect standalone ESP-IDF 6.1 ESP32-S3 hardware natively to hm-core v0.5.1+ over Northbound v2 via yes999zc/home-mate-gateway-esp32 (v0.1.1):
- Choose Your Board Profile (prebuilt firmware &
SHA256SUMS.txton Releases):chd-esp32s3-box-lcd35— 3.5" 480×320 Paper-and-Ink Desktop Terminal, hardware-referenced ES7210 AEC, Full-Duplex S2S, WakeNet9, 0°/180° auto-rotation, andDisplayImagescreen-cast.xingzhi-cube-1.54tft— 1.54" 240×240 CubeBox companion display withDisplayImageand half-duplex voice.esp32s3-headless— Zero-LVGL headless ESP32-S3 voice node with Kconfig I2S pins & status LED.
- Build or Flash:
git clone https://github.com/yes999zc/home-mate-gateway-esp32.git cd home-mate-gateway-esp32 # Build CHD 3.5" landscape full-duplex terminal (requires ESP-IDF 6.1): idf.py -B build-chd -DSDKCONFIG=build-chd/sdkconfig \ -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;boards/chd-esp32s3-box-lcd35.defaults" \ set-target esp32s3 build # Flash application (preserving NVS @ 0x9000 and assets @ 0x800000): esptool.py --chip esp32s3 -p /dev/cu.usbmodem* write_flash @build-chd/flash_args - Connect: Configure Wi-Fi via SoftAP on first boot; the terminal auto-discovers your
hm-core v0.5.1+via UDP:8933and connects to:8932. Push PNG/JPEG previews directly from the Web Console's DisplayImage card orPOST /api/v0/devices/{id}/display/image.
Let an AI Coding Agent Flash & Pair an ESP32-S3 Terminal
Help me flash and connect my ESP32-S3 board (CHD 3.5" LCD / Xingzhi Cube 1.54" / Headless) using https://github.com/yes999zc/home-mate-gateway-esp32 (`v0.1.1`) to my Home Mate Core `v0.5.1` at 192.168.1.10:
1. Verify `http://192.168.1.10:8930/api/v0/status` reports `hm-core v0.5.1+` with `HM_GATEWAY_ALLOW_LAN=1` (`:8932` & UDP `:8933`).
2. Download the matching board firmware bundle from `yes999zc/home-mate-gateway-esp32` Release `v0.1.1` (verify `SHA256SUMS.txt`) or build with ESP-IDF 6.1 using the board's `boards/*.defaults`.
3. Flash over USB without erasing `nvs` (`0x9000`) or `assets` (`0x800000`), verify serial boot & reconnection to `192.168.1.10:8932`, confirm volume cap <= 65 on CHD 3.5", and test `DisplayImage` push from the Web Console.
First-Time Console Setup: LLM, ASR, TTS & Wake Word
After your speaker or NAS Core is online at http://<CORE_IP>:8930, open Services (http://<CORE_IP>:8930/services) and configure all three services so voice wake-up and replies work (especially on 128 MB LX06 --thin / --standalone-asr, which rely on VAD → ASR → wake word matching because local hm-kws is skipped):
| Service Card | Accepted provider Values |
base_url Rule (Avoiding HTTP 404) |
Copy-Paste Example |
|---|---|---|---|
Speech Recognition (ASR) |
openai-asr (any OpenAI-compatible /v1/audio/transcriptions endpoint) or mock |
Must end with /v1 — /audio/transcriptions is appended automatically (do NOT omit /v1 or append /audio/transcriptions) |
provider: openai-asrbase_url: https://api.siliconflow.cn/v1 (or https://api.openai.com/v1 / https://api.groq.com/openai/v1 / local http://<IP>:<PORT>/v1)model: FunAudioLLM/SenseVoiceSmall (or whisper-1 / whisper-large-v3-turbo) |
Speech Synthesis (TTS) |
volc (Volcano Engine / Doubao seed-tts-2.0)omni (any OpenAI-compatible /v1/audio/speech returning WAV; alias openai_compat)or mock |
- volc: leave base_url & model blank for official defaults (seed-tts-2.0)- omni: must end with /v1 (/audio/speech is appended automatically) |
Volcano: provider: volc, voice: zh_female_xiaohe_uranus_bigtts, api_key: Volcano X-Api-KeyOpenAI-compat: provider: omni, base_url: https://api.openai.com/v1 (or https://api.siliconflow.cn/v1), model: tts-1 (or FunAudioLLM/CosyVoice2-0.5B), voice: alloy |
Conversation Model (LLM) |
Any OpenAI-compatible label (e.g. deepseek, openai, siliconflow, ollama) |
Root API URL (usually ending with /v1); do NOT append /chat/completions |
provider: deepseek, base_url: https://api.deepseek.com/v1, model: deepseek-chat |
Default Wake Word & Verification:
- Click Save → Test connection on each card until all three return green
✓.- Open Interaction (
http://<CORE_IP>:8930/interaction) to view or customize your wake word (default is你好小瑞; e.g. change toHey Mateor你好高达).- Confirm your speaker gateway shows Online on Status / Devices, then speak your wake word!
Acknowledgments
Home Mate stands on the shoulders of many open-source projects and hardware communities. Full license details live in THIRD_PARTY_NOTICES.md.
- On-Speaker & Gateway Pipeline: idootop/open-xiaoai & @coderzc/open-xiaoai (MIT), k2-fsa/sherpa-onnx (Apache-2.0), Microsoft ONNX Runtime (MIT), snakers4/silero-vad (MIT), xiph/speexdsp (BSD-3-Clause), pdeljanov/Symphonia (MPL-2.0), Tokio, Axum, Rusqlite, RustCrypto, Vue 3, and Lucide.
- Community Contributors: Special thanks to @jiantongzh for hardware-validating the 128 MB LX06 batch and inspiring Thin Gateway mode.
- Architectural Lineage: yes999zc/rui, wilbowes/EchoMuse, Rhasspy / Wyoming, Home Assistant, and Navidrome.
License & Contact
- Open-Source License: Licensed under GNU AGPL v3.0 (
AGPL-3.0-only). The Northbound v2 protocol specification (crates/hm-core/src/gateway/) is additionally licensed under Apache-2.0 (seeLICENSING.md). - Official Website: https://mymate.homes
- Contact (Custom Speaker R&D / Commercial OEM Licensing):
[email protected]/[email protected]
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…