66 lines
2.3 KiB
Python
66 lines
2.3 KiB
Python
"""
|
|
Configuration for Windy Station Venus OS service.
|
|
|
|
All tunable parameters in one place for easy adjustment.
|
|
"""
|
|
|
|
# =============================================================================
|
|
# D-BUS SERVICE CONFIGURATION
|
|
# =============================================================================
|
|
|
|
SERVICE_NAME = 'com.victronenergy.windystation'
|
|
|
|
# =============================================================================
|
|
# WINDY API CONFIGURATION (v2 - effective January 2026)
|
|
# =============================================================================
|
|
|
|
API_BASE = 'https://stations.windy.com/api/v2'
|
|
|
|
# =============================================================================
|
|
# TIMING CONFIGURATION
|
|
# =============================================================================
|
|
|
|
# Minimum interval between observation uploads (seconds)
|
|
# Windy recommends 5-minute intervals
|
|
OBSERVATION_MIN_INTERVAL = 300
|
|
|
|
# Interval between station metadata/location updates (seconds)
|
|
STATION_UPDATE_INTERVAL = 3600 # 60 minutes
|
|
|
|
# GPS movement threshold before triggering a station update
|
|
GPS_MOVEMENT_THRESHOLD_FEET = 200.0
|
|
GPS_MOVEMENT_THRESHOLD_METERS = GPS_MOVEMENT_THRESHOLD_FEET * 0.3048
|
|
|
|
# =============================================================================
|
|
# WIND CALCULATION CONFIGURATION
|
|
# =============================================================================
|
|
|
|
# Window for computing running average wind speed (seconds)
|
|
WIND_AVG_WINDOW = 300 # 5 minutes
|
|
|
|
# Window for gust tracking (seconds)
|
|
GUST_WINDOW = 600 # 10 minutes
|
|
|
|
# Window for wind direction history buffer (seconds)
|
|
WIND_DIR_HISTORY_WINDOW = 1800 # 30 minutes
|
|
|
|
# Window for sector-based wind trend tracker (seconds)
|
|
WIND_TREND_WINDOW = 3600 # 60 minutes
|
|
|
|
# =============================================================================
|
|
# PATH CONFIGURATION
|
|
# =============================================================================
|
|
|
|
DATA_DIR = '/data/dbus-windy-station'
|
|
CONFIG_FILE = DATA_DIR + '/station_config.json'
|
|
|
|
# =============================================================================
|
|
# LOGGING CONFIGURATION
|
|
# =============================================================================
|
|
|
|
LOGGING_CONFIG = {
|
|
'level': 'INFO',
|
|
'console': True,
|
|
'include_timestamp': False,
|
|
}
|