Files
pyBTMCP/entrypoint.sh
Matt Hills 1c6b9db903 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>
2026-01-19 11:50:10 -05:00

24 lines
530 B
Bash

#!/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