Skip to content

Commit c9ea400

Browse files
committed
docs: update README and services.yaml with additional details and error handling improvements
1 parent 70ba146 commit c9ea400

4 files changed

Lines changed: 384 additions & 44 deletions

File tree

README.md

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ A Home Assistant Custom Integration (HACS) that connects Xiaozhi ESP32 AI chatbo
2323

2424
Xiaozhi is an open-source ESP32-based AI chatbot that uses voice interaction and MCP protocol to control various smart home devices and services. It supports multiple ESP32 platforms and can integrate with various AI models like Qwen and DeepSeek.
2525

26+
<img src="https://ph-files.imgix.net/80909cc8-6bcb-42b9-96eb-4572b4e8b3cf.png?auto=compress&codec=mozjpeg&cs=strip&auto=format&w=969&h=640&fit=max&frame=1&dpr=1" alt="Xiaozhi ESP32 AI Chatbot" width="600">
27+
28+
- **All-in-one hardware:** ESP32-S3 (16 MB flash / 8 MB PSRAM), digital mic, speaker with class-D amp and 1.28–1.85″ colour LCD.
29+
- **Local wake word + cloud intelligence:** an offline wake-word engine runs on the device; after activation audio is sent to Xiaozhi’s servers where ASR, LLM reasoning (Qwen, DeepSeek, Doubao …), and TTS are performed.
30+
- **Voice-only Home-Assistant control:** this HACS integration connects the device to Home Assistant MCP, letting you toggle lights, scenes and more entirely by voice.
31+
- **Many shapes, same guts:** boards are sold as square dev-kits, cubes, pucks and the cute **“Astronaut Ball”** shown above – all share the same firmware stack.
32+
- **Ultra-low cost:** the Astronaut Ball costs **≈ USD 19** – cheaper than most bare ESP32 kits. [AliExpress product page](https://www.aliexpress.com/item/1005008600891141.html)
33+
2634
## Requirements
2735

2836
- Home Assistant 2024.1.0 or later
@@ -139,35 +147,6 @@ Once configured, your Xiaozhi device can:
139147

140148
## Troubleshooting
141149

142-
### Common Issues
143-
144-
1. **MCP Server Not Found**
145-
146-
- **Most Common Issue**: The official Home Assistant MCP Server integration is not installed
147-
- Install it from `Settings` > `Devices & Services` > `Add Integration` > Search for "MCP Server"
148-
- Restart Home Assistant after installation
149-
- Check that the MCP Server integration is running and configured
150-
- Verify the SSE endpoint is accessible at `http://localhost:8123/mcp_server/sse`
151-
152-
2. **Connection Failed**
153-
154-
- Check your internet connection
155-
- Verify the Xiaozhi MCP endpoint URL
156-
- Ensure the access token is valid
157-
- Check that both this integration and the MCP Server integration are running
158-
159-
3. **Authentication Error**
160-
161-
- Regenerate the long-lived access token
162-
- Ensure token has proper permissions
163-
- Check that the MCP Server integration is properly configured
164-
165-
166-
4. **Device Not Responding**
167-
- Check Xiaozhi device is powered on
168-
- Verify network connectivity
169-
- Check xiaozhi.me service status
170-
- Ensure your Xiaozhi device is properly configured with the correct MCP endpoint
171150

172151
### Important Notes
173152

@@ -193,7 +172,6 @@ logger:
193172
194173
- **Issues**: [GitHub Issues](https://github.com/mac8005/xiaozhi-mcp-hacs/issues)
195174
- **Discussions**: [GitHub Discussions](https://github.com/mac8005/xiaozhi-mcp-hacs/discussions)
196-
- **Xiaozhi Community**: [QQ Group: 575180511](https://qm.qq.com/cgi-bin/qm/qr?k=xyz)
197175
198176
### ☕ Support Development
199177

custom_components/xiaozhi_mcp/coordinator.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,6 @@ async def _pipe_websocket_to_mcp(self) -> None:
297297
except ConnectionClosed as err:
298298
if err.code == 4004:
299299
_LOGGER.error("Xiaozhi WebSocket closed with internal server error (4004).")
300-
_LOGGER.error("This might be caused by:")
301-
_LOGGER.error("1. Incorrect message format sent to Xiaozhi service")
302-
_LOGGER.error("2. Invalid MCP endpoint path forwarding")
303-
_LOGGER.error("3. Authentication issues with Xiaozhi service")
304-
_LOGGER.error("4. Xiaozhi service internal error")
305-
_LOGGER.info("Check: 1) Xiaozhi endpoint URL is correct, 2) Xiaozhi service is online, 3) Your account is valid")
306300
else:
307301
_LOGGER.warning("Xiaozhi WebSocket connection closed: %s", err)
308302
self._error_count += 1

custom_components/xiaozhi_mcp/services.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1+
# services.yaml – Xiaozhi MCP integration
2+
# (names/descriptions go in the translations file, so they’re omitted here)
3+
14
reconnect:
2-
name: Reconnect
3-
description: Reconnect to Xiaozhi MCP server
45
target:
5-
integration: xiaozhi_mcp
6+
entity:
7+
integration: xiaozhi_mcp # filter for entities created by this integration
68

79
send_message:
8-
name: Send Message
9-
description: Send a message to Xiaozhi MCP
1010
target:
11-
integration: xiaozhi_mcp
11+
entity:
12+
integration: xiaozhi_mcp
1213
fields:
1314
message:
14-
name: Message
15-
description: Message to send to Xiaozhi MCP
1615
required: true
1716
selector:
1817
text:

0 commit comments

Comments
 (0)