A lightweight RTSP/HTTP stream heartbeat monitoring and MQTT publishing system designed for local or production deployments. Includes a web dashboard, persistent configuration, and stable multi-service execution using Docker and Supervisor.
Version 2.2 introduces major architectural improvements, better stability, and a new MQTT publishing service. The system now runs three coordinated services inside Docker:
- monitor.py – performs regular RTSP/HTTP health checks
- webgui.py – provides the configuration and monitoring dashboard
- mqtt_service.py – publishes status JSON to an MQTT broker
All services run under Supervisor with restart policies and clean logging.
A dedicated microservice that publishes /api/status output to an MQTT broker.
Features:
- Full MQTT TCP/WebSocket/TLS support
- Configurable broker parameters
- Configurable topic name
- Adjustable publish interval (minimum 5 seconds)
- Username/password support
- Automatic reconnection
- Hot-reload of config.yaml
StreamPulse now runs as three independent but coordinated services:
| Service | Function |
|---|---|
| monitor.py | Performs heartbeat, logs status to SQLite |
| webgui.py | Configuration UI, preview, stream management |
| mqtt_service.py | Publishes current status JSON to MQTT |
All services are managed by Supervisor for controlled startup and restarts.
The Dockerfile was rewritten for:
- Smaller image size
- Deterministic builds
- Clean dependency installation
- Automatic configuration and DB initialization
- Stable execution on Linux, macOS, and Windows
All user-modifiable files are stored outside the container:
/host/config.yaml
/host/streams.db
StreamPulse links them into the application directory:
/app/config.yaml -> /host/config.yaml
/app/streams.db -> /host/streams.db
This ensures that configuration and history survive upgrades and container rebuilds.
When running under Docker Compose, the following directory is created:
StreamPulse-v2.2/
├── config.yaml
└── streams.db
services:
streampulse:
build: .
container_name: streampulse-v2.2
restart: unless-stopped
ports:
- "6868:7000" # Monitor API
- "6969:8000" # Web GUI
volumes:
- ./StreamPulse-v2.2:/hostStart the service:
docker compose up -d
Access Web GUI:
http://localhost:6969
API Status:
http://localhost:6868/api/status
MQTT Output (default):
topic: streampulse/status
- Performs periodic stream health checks
- Writes status, latency, and message to SQLite tables
- Creates missing tables automatically
- Reads config.yaml at runtime
- Provides a full dashboard for monitoring
- Live updates every 5 seconds
- Preview function for MJPEG/RTSP
- Stream editor and deletion
- MQTT configuration editor
- Writes config.yaml safely
- Reads status from local API endpoint
- Publishes as JSON to MQTT broker
- Supports TCP, WebSocket, TLS modes
- Optional username/password
- Minimum interval: 5 seconds
- Automatic reconnect logic
- Reloads config.yaml without restart
Handles startup and health of the three services:
- Auto-restart on crash
- Independent service control
- Clean logging without rotation issues
- Ensures /host folder contains config.yaml and streams.db
- Copies defaults from image if missing
- Creates symlinks into /app
- Launches Supervisor
pip install -r requirements.txt
python monitor.py
python webgui.py
python mqtt_service.py
/
├── monitor.py
├── webgui.py
├── mqtt_service.py
├── config.yaml
├── streams.db
├── supervisord.conf
├── entrypoint.sh
├── Dockerfile
└── docker-compose.yml