Skip to content

seth-planet/wildfire-watch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”₯ Wildfire Watch

Open-source wildfire detection and suppression system for edge deployment

License: MIT Docker Balena

Overview

Wildfire Watch is an automated fire detection and suppression platform that runs entirely on your local network. It uses AI-powered camera monitoring to detect fires and automatically activates sprinkler systems when multiple cameras confirm a fire.

Key Features

  • 🎯 Multi-camera consensus - Prevents false alarms
  • πŸš€ Edge AI acceleration - Supports Coral, Hailo, NVIDIA GPUs
  • πŸ’§ Automated pump control - GPIO-based sprinkler activation
  • πŸ“Ή 24/7 recording - Frigate NVR with motion detection
  • πŸ”’ Secure by default - TLS encryption (requires certificate setup)
  • πŸ”„ Self-healing - Automatic camera discovery and failover

Quick Start

1. Clone and Setup

# Clone repository
git clone https://github.com/your-org/wildfire-watch.git
cd wildfire-watch

# Copy environment template
cp .env.example .env
# Edit .env to configure your settings

2. Security Setup (Choose One)

Option A: Development/Testing (Insecure)

# Use default certificates - INSECURE, for testing only!
# No action needed, default certs are included

Option B: Production (Secure)

# Generate secure certificates and enable TLS
./scripts/configure_security.sh enable
# This will guide you through certificate generation if needed

# Or manually:
./scripts/generate_certs.sh custom
echo "MQTT_TLS=true" >> .env

3. Deploy Services

# Deploy with Docker Compose
docker-compose up -d

# Verify all services are running
docker ps

# Check service logs
docker-compose logs -f

4. Access Services

  • Frigate NVR: http://your-device:5000
    • Default credentials are shown in logs: docker logs security_nvr | grep Password
  • MQTT Broker: Port 1883 (insecure) or 8883 (TLS)

⚠️ Security Warning: Default certificates are INSECURE. Always generate custom certificates for production use. See Security Guide.

5. Verify Security Configuration

# Check current security status
./scripts/configure_security.sh status

# Example output:
# βœ“ TLS is ENABLED
# βœ“ Using CUSTOM certificates
# βœ“ MQTT broker is using TLS port 8883

Documentation

Getting Started

Service Documentation

Advanced Topics

System Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  IP Cameras │────▢│   Camera    │────▢│  Frigate    β”‚
β”‚   (RTSP)    β”‚     β”‚  Detector   β”‚     β”‚    NVR      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            β”‚                    β”‚
                            β–Ό                    β–Ό
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚    MQTT     │◀────│    Fire     β”‚
                    β”‚   Broker    β”‚     β”‚  Consensus  β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            β”‚                    β”‚
                            β–Ό                    β–Ό
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚    GPIO     │────▢│    Pump     β”‚
                    β”‚  Trigger    β”‚     β”‚   System    β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Service Architecture (Refactored)

All services now use standardized base classes for improved reliability:

  • MQTTService: Automatic reconnection with exponential backoff
  • HealthReporter: Standardized health monitoring and metrics
  • ThreadSafeService: Safe thread management and shutdown
  • ConfigBase: Centralized configuration management

Configuration

Essential Settings (.env)

# Camera credentials (comma-separated username:password pairs)
CAMERA_CREDENTIALS=username:password,username2:password2

# Fire detection
CONSENSUS_THRESHOLD=2      # Cameras required for consensus
MIN_CONFIDENCE=0.7         # AI confidence threshold

# Pump control
MAX_ENGINE_RUNTIME=1800    # 30 min (adjust for your water tank size!)
REFILL_MULTIPLIER=40       # Refill duration multiplier

# Hardware
FRIGATE_DETECTOR=auto      # auto|coral|hailo|gpu|cpu

# Service health monitoring
HEALTH_REPORT_INTERVAL=60  # Health report frequency (seconds)

# MQTT reconnection (all services)
MQTT_RECONNECT_MIN_DELAY=1.0   # Min reconnection delay
MQTT_RECONNECT_MAX_DELAY=60.0  # Max reconnection delay

See Configuration Guide for all options.

Deployment Options

Docker Compose (Recommended)

docker-compose up -d

Balena Cloud

balena push wildfire-watch

Kubernetes

kubectl apply -k k8s/

Hardware Support

Accelerator Performance Power Recommended For
Coral TPU* 15-20ms 2W Low power, always-on
Hailo-8L 20-25ms 2.5W Raspberry Pi 5
Hailo-8 10-15ms 5W High accuracy
NVIDIA GPU 8-12ms 15W+ Multiple cameras
CPU Only 200-300ms 5W Testing only

*Note: Coral TPU requires Python 3.8 for tflite_runtime compatibility

Contributing

See CONTRIBUTING.md for development setup.

Support

License

MIT License - See LICENSE for details.

Disclaimer

This system is provided as-is for educational and experimental use. It does not guarantee fire prevention or property protection. Always follow local fire safety regulations and consult professionals for critical safety systems.

About

A personal automatic wildfire sprinkler system based on Frigate object detection.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages