mirror of
https://github.com/mattintech/pyBTMCP.git
synced 2026-07-11 13:11:53 +00:00
Initial release v1.0.0 - BLE Device Simulator with MCP Integration
Features: - MCP server with tools for AI-controlled device simulation - FastAPI backend with REST API and WebSocket support - Real-time device updates via WebSocket - Web UI for manual device control - ESP32 firmware for BLE device simulation - Docker containerization with MQTT broker Supported device types: - Heart Rate Monitor (BLE Heart Rate Service) - Treadmill (BLE Fitness Machine Service) - Bike Trainer (BLE Cycling Power Service) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
23
entrypoint.sh
Normal file
23
entrypoint.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Start Mosquitto MQTT broker in background
|
||||
/usr/sbin/mosquitto -c /app/config/mosquitto.conf &
|
||||
MOSQUITTO_PID=$!
|
||||
|
||||
# Wait for Mosquitto to be ready
|
||||
sleep 1
|
||||
|
||||
# Start FastAPI/Web UI in background
|
||||
python -m uvicorn src.api.main:app --host 0.0.0.0 --port 8000 &
|
||||
UVICORN_PID=$!
|
||||
|
||||
# Trap to cleanup background processes on exit
|
||||
cleanup() {
|
||||
kill $UVICORN_PID 2>/dev/null || true
|
||||
kill $MOSQUITTO_PID 2>/dev/null || true
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
# Run MCP server as main process (stdio)
|
||||
exec python -m src.mcp.server
|
||||
Reference in New Issue
Block a user