Integration + Custom Card cho Home Assistant, điều khiển toàn diện thiết bị Phicomm R1 (AI BOX).
Không cần bridge, không cần tunnel domain — HA kết nối trực tiếp đến R1 qua WebSocket native.
- HACS -> Custom repositories
- Add:
https://github.com/TriTue2011/R1-card— Category: Integration - Tìm và cài Phicomm R1
- Restart Home Assistant
Vào Settings -> Devices & Services -> Add Integration rồi tìm Phicomm R1.
Thiết lập khuyến nghị:
Tên:Phicomm R1Host: IP của loaCổng:8080Cổng WS media (YouTube/Zing):8082Chu kỳ cập nhật:15Dùng /media-dispatch để điều khiển phát: bậtChế độ giao thức:auto
Gợi ý chọn giao thức:
auto: nên dùng cho lần cài đầu tiênws_native: dùng khi muốn ưu tiên kết nối native (khuyến nghị)http_bridge: chỉ dùng nếu bạn biết chắc mình đang dùng bridge cũ
Download file phicomm-r1-card.js từ thư mục www/phicomm_r1/ và copy vào config/www/phicomm_r1/
Sau đó vào Settings -> Dashboards -> Resources -> Add resource:
- URL nhập:
/local/phicomm_r1/phicomm-r1-card.js - Resource type: JavaScript module -> Save
Nếu bạn muốn dùng card aibox-ha-card độc lập (bản gọn, multi-room cơ bản):
Nếu bạn muốn dùng bản full UI giống aibox-webui-card.js nhưng hỗ trợ domain/HTTPS qua custom endpoint:
www/phicomm_r1/aibox-ha-card.js->config/www/phicomm_r1/aibox-ha-card.js
Sau đó add resource:
Nếu bạn muốn giữ tên card kiểu AI BOX (dễ migrate từ card cũ), copy thêm file:
www/phicomm_r1/aibox-ha-card.js->config/www/phicomm_r1/aibox-ha-card.js
Sau đó add thêm resource (đặt sau phicomm-r1-card.js):
- URL:
/local/phicomm_r1/aibox-ha-card.js - Type: JavaScript module
Copy file:
www/phicomm_r1/phicomm-r1-lite-card.js->config/www/phicomm_r1/phicomm-r1-lite-card.js
Add resource:
- URL:
/local/phicomm_r1/phicomm-r1-lite-card.js - Type: JavaScript module
Sử dụng cấu hình sau:
type: custom:phicomm-r1-card
entity: media_player.phicomm_r1
title: Phicomm R1Nếu entity của bạn có tên khác thì thay media_player.phicomm_r1 bằng đúng entity đang dùng trong Home Assistant.
Bạn cũng có thể dùng thêm option max_height để giới hạn chiều cao của card:
type: custom:phicomm-r1-card
entity: media_player.phicomm_r1
title: Phicomm R1
max_height: 500pxHoặc dùng card mới:
type: custom:aibox-ha-card
entity: media_player.phicomm_r1
title: AI BOXaibox-ha-card hỗ trợ thêm:
custom_ws_url(HTTPS/domain main WS, ưu tiên trước tunnel)custom_speaker_ws_url(HTTPS/domain speaker WS)- room-level override:
rooms[].custom_ws_url,rooms[].custom_speaker_ws_url
Hoặc dùng lite card (1 card nhiều entity):
type: custom:phicomm-r1-lite-card
title: AI BOX Lite
rooms:
- entity: media_player.phicomm_r1_phong_khach
name: Phòng khách
- entity: media_player.phicomm_r1_phong_ngu
name: Phòng ngủ
show_sync_selector: true
show_volume: true- Phát nhạc YouTube / Zing MP3
- Seek bar, repeat, shuffle
- Tìm kiếm bài hát / playlist (YouTube, Zing MP3)
- Quản lý playlist: tạo, xóa, xem danh sách, thêm/xóa bài
- Wake Word — bật/tắt + chỉnh độ nhạy
- TTS tiếng Việt (Chống Điếc AI)
- DLNA / AirPlay / Bluetooth toggle
- LED RGB + đèn viền Edge
- Audio Engine: EQ 5 băng tần, presets, Bass Boost, Loudness
- Báo thức nâng cao
- Gửi text và nhận phản hồi AI
- Wake Up / Test Mic
- Lịch sử chat
- CPU / RAM realtime
- Reboot
- Thông tin thiết bị
| Phiên bản cũ | Phiên bản mới | |
|---|---|---|
| Kiến trúc | Card JS kết nối WebSocket trực tiếp | HA Integration + Card |
| Bridge | Cần tunnel/domain khi HTTPS | Không cần |
| Kết nối | Browser -> R1 | HA Server -> R1 |
| Multi-room | Quản lý trong card | Thêm nhiều integration entry |
| Cấu hình | YAML trong card | Config flow UI |
| Triệu chứng | Nguyên nhân | Cách xử lý |
|---|---|---|
| Không kết nối được | Sai IP hoặc loa offline | Kiểm tra IP, port 8080/8082 |
| Entity unavailable | Integration chưa kết nối | Kiểm tra giao thức, thử ws_native |
| Card không hiển thị | Chưa add resource | Thêm resource JS trong Dashboard settings |
MIT