- Created detailed getting started guide with installation and configuration instructions - Added main documentation README with structured table of contents - Developed troubleshooting guide with common issues, debugging tips, and FAQ - Included development guide with project structure, setup, and contribution guidelines - Added tools documentation with overview of available management tools
3.5 KiB
3.5 KiB
Troubleshooting Guide
This guide helps you diagnose and fix common issues with the Home Assistant MCP.
Common Issues
Connection Issues
Cannot Connect to Home Assistant
Symptoms:
- Connection timeout errors
- "Failed to connect to Home Assistant" messages
- 401 Unauthorized errors
Solutions:
- Verify Home Assistant is running
- Check HASS_HOST environment variable
- Validate HASS_TOKEN is correct
- Ensure network connectivity
- Check firewall settings
SSE Connection Drops
Symptoms:
- Frequent disconnections
- Missing events
- Connection reset errors
Solutions:
- Check network stability
- Increase connection timeout
- Implement reconnection logic
- Monitor server resources
Authentication Issues
Invalid Token
Symptoms:
- 401 Unauthorized responses
- "Invalid token" messages
- Authentication failures
Solutions:
- Generate new Long-Lived Access Token
- Check token expiration
- Verify token format
- Update environment variables
Rate Limiting
Symptoms:
- 429 Too Many Requests
- "Rate limit exceeded" messages
Solutions:
- Implement request throttling
- Adjust rate limit settings
- Cache responses
- Optimize request patterns
Tool Issues
Tool Not Found
Symptoms:
- "Tool not found" errors
- 404 Not Found responses
Solutions:
- Check tool name spelling
- Verify tool registration
- Update tool imports
- Check tool availability
Tool Execution Fails
Symptoms:
- Tool execution errors
- Unexpected responses
- Timeout issues
Solutions:
- Validate input parameters
- Check error logs
- Debug tool implementation
- Verify Home Assistant permissions
Debugging
Server Logs
-
Enable debug logging:
LOG_LEVEL=debug -
Check logs:
npm run logs -
Filter logs:
npm run logs | grep "error"
Network Debugging
-
Check API endpoints:
curl -v http://localhost:3000/api/health -
Monitor SSE connections:
curl -N http://localhost:3000/api/sse/stats -
Test WebSocket:
wscat -c ws://localhost:3000
Performance Issues
-
Monitor memory usage:
npm run stats -
Check response times:
curl -w "%{time_total}\n" -o /dev/null -s http://localhost:3000/api/health -
Profile code:
npm run profile
FAQ
Q: How do I reset my configuration?
A: Delete .env and copy .env.example to start fresh.
Q: Why are my events delayed?
A: Check network latency and server load. Consider adjusting buffer sizes.
Q: How do I update my token?
A: Generate a new token in Home Assistant and update HASS_TOKEN.
Q: Why do I get "Maximum clients reached"?
A: Adjust SSE_MAX_CLIENTS in configuration or clean up stale connections.
Error Codes
E001: Connection ErrorE002: Authentication ErrorE003: Rate Limit ErrorE004: Tool ErrorE005: Configuration Error
Support Resources
-
Documentation
-
Community
- GitHub Issues
- Discussion Forums
- Stack Overflow
-
Tools
- Diagnostic Scripts
- Testing Tools
- Monitoring Tools
Still Need Help?
-
Create a detailed issue:
- Error messages
- Steps to reproduce
- Environment details
- Logs
-
Contact support:
- GitHub Issues
- Email Support
- Community Forums