# Loxone MCP Server Configuration
# Copy this file to .env and customize the values for your setup
# ============================================================================
# REQUIRED SETTINGS
# ============================================================================
# Loxone Miniserver connection details
LOXONE_HOST=192.168.1.100
LOXONE_USERNAME=admin
LOXONE_PASSWORD=your-password-here
# ============================================================================
# OPTIONAL SETTINGS
# ============================================================================
# Miniserver port (default: 80 for HTTP, 443 for HTTPS)
LOXONE_PORT=80
# Token persistence path (where authentication tokens are stored)
LOXONE_TOKEN_PATH=./loxone_token.json
# ============================================================================
# LOGGING CONFIGURATION
# ============================================================================
# Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL
LOG_LEVEL=INFO
# Log format: text, json (json for structured logging in production)
LOG_FORMAT=text
# Log file path (optional, logs to stdout if not specified)
# LOG_FILE=/var/log/loxone-mcp/server.log
# ============================================================================
# CONNECTION SETTINGS
# ============================================================================
# HTTP request timeout in seconds
HTTP_TIMEOUT=30
# WebSocket connection timeout in seconds
WS_TIMEOUT=10
# Maximum number of reconnection attempts (0 for unlimited)
MAX_RECONNECT_ATTEMPTS=5
# Delay between reconnection attempts in seconds
RECONNECT_DELAY=5
# Connection keep-alive interval in seconds
KEEPALIVE_INTERVAL=30
# ============================================================================
# SSL/TLS SETTINGS
# ============================================================================
# SSL certificate verification (true/false)
# Set to false for self-signed certificates
VERIFY_SSL=true
# Use HTTPS instead of HTTP (true/false)
# Automatically enabled if LOXONE_PORT is 443
USE_HTTPS=false
# ============================================================================
# PERFORMANCE SETTINGS
# ============================================================================
# Maximum number of concurrent device operations
MAX_CONCURRENT_OPERATIONS=10
# Device state cache timeout in seconds (0 to disable caching)
STATE_CACHE_TIMEOUT=300
# Maximum number of devices to cache states for (0 for unlimited)
MAX_CACHED_DEVICES=1000
# ============================================================================
# MCP SERVER SETTINGS
# ============================================================================
# MCP server name (displayed to clients)
MCP_SERVER_NAME=loxone-mcp-server
# MCP server version (auto-detected if not specified)
# MCP_SERVER_VERSION=1.0.0
# Enable MCP server capabilities
ENABLE_TOOLS=true
ENABLE_RESOURCES=false
ENABLE_PROMPTS=false
# ============================================================================
# SECURITY SETTINGS
# ============================================================================
# Enable secured command support (requires PIN codes)
ENABLE_SECURED_COMMANDS=true
# Default PIN code timeout in seconds
PIN_TIMEOUT=30
# Maximum number of failed PIN attempts before lockout
MAX_PIN_ATTEMPTS=3
# PIN lockout duration in seconds
PIN_LOCKOUT_DURATION=300
# ============================================================================
# MONITORING AND OBSERVABILITY
# ============================================================================
# Enable health check endpoint
ENABLE_HEALTH_CHECK=true
# Health check port (0 to disable HTTP health checks)
HEALTH_CHECK_PORT=0
# Enable Prometheus metrics
ENABLE_METRICS=false
# Metrics port (only used if ENABLE_METRICS=true)
METRICS_PORT=9090
# Enable request tracing
ENABLE_TRACING=false
# ============================================================================
# DEVELOPMENT SETTINGS
# ============================================================================
# Enable debug mode (more verbose logging and error details)
DEBUG_MODE=false
# Enable development features (hot reload, etc.)
DEV_MODE=false
# Mock Miniserver for testing (true/false)
MOCK_MINISERVER=false
# Test mode - don't actually send commands to devices
TEST_MODE=false
# ============================================================================
# ADVANCED SETTINGS
# ============================================================================
# Custom user agent for HTTP requests
# USER_AGENT=loxone-mcp-server/1.0.0
# Custom WebSocket subprotocols
# WS_SUBPROTOCOLS=
# Enable compression for WebSocket messages
WS_COMPRESSION=true
# Maximum message size for WebSocket (in bytes)
MAX_MESSAGE_SIZE=1048576
# Connection pool size for HTTP requests
HTTP_POOL_SIZE=10
# DNS resolution timeout in seconds
DNS_TIMEOUT=5
# ============================================================================
# ENVIRONMENT-SPECIFIC OVERRIDES
# ============================================================================
# These can be used to override settings for specific environments
# Development environment overrides
# DEV_LOXONE_HOST=192.168.1.100
# DEV_LOG_LEVEL=DEBUG
# DEV_DEBUG_MODE=true
# Production environment overrides
# PROD_LOG_LEVEL=WARNING
# PROD_VERIFY_SSL=true
# PROD_ENABLE_METRICS=true
# Testing environment overrides
# TEST_MOCK_MINISERVER=true
# TEST_LOG_LEVEL=DEBUG
# TEST_MODE=true
# ============================================================================
# DOCKER-SPECIFIC SETTINGS
# ============================================================================
# Container timezone
TZ=UTC
# Container user ID (for file permissions)
# PUID=1000
# PGID=1000
# Container restart policy
# RESTART_POLICY=unless-stopped
# ============================================================================
# CLOUD/REMOTE ACCESS SETTINGS
# ============================================================================
# For Loxone Cloud connections (if using cloud.loxone.com)
# LOXONE_CLOUD_USER=your-cloud-username
# LOXONE_CLOUD_PASSWORD=your-cloud-password
# LOXONE_SERIAL=your-miniserver-serial
# Cloud connection timeout
# CLOUD_TIMEOUT=60
# ============================================================================
# BACKUP AND RECOVERY
# ============================================================================
# Automatic token backup
AUTO_BACKUP_TOKENS=true
# Token backup directory
TOKEN_BACKUP_DIR=./backups
# Maximum number of token backups to keep
MAX_TOKEN_BACKUPS=5
# ============================================================================
# INTEGRATION SETTINGS
# ============================================================================
# Home Assistant integration (if running alongside HA)
# HA_INTEGRATION=false
# HA_WEBHOOK_URL=http://homeassistant:8123/api/webhook/loxone-mcp
# MQTT integration (for publishing device states)
# MQTT_ENABLED=false
# MQTT_BROKER=localhost
# MQTT_PORT=1883
# MQTT_USERNAME=
# MQTT_PASSWORD=
# MQTT_TOPIC_PREFIX=loxone
# ============================================================================
# FEATURE FLAGS
# ============================================================================
# Enable experimental features
ENABLE_EXPERIMENTAL=false
# Enable beta features
ENABLE_BETA=false
# Feature-specific flags
ENABLE_DEVICE_GROUPS=true
ENABLE_SCENE_MANAGEMENT=true
ENABLE_STATISTICS=false
ENABLE_WEBHOOKS=false
ENABLE_API_RATE_LIMITING=true
# ============================================================================
# NOTES
# ============================================================================
# 1. Boolean values should be: true, false, 1, 0, yes, no, on, off
# 2. Numeric values should be integers or floats without quotes
# 3. String values with spaces should be quoted
# 4. Comments start with # and are ignored
# 5. Empty values are treated as unset (will use defaults)
# 6. Environment variables take precedence over .env file values
# 7. Some settings may require server restart to take effect
# For more information, see the README.md file or visit:
# https://github.com/your-repo/loxone-mcp-server