2025-01-12 17:23:32 -05:00
|
|
|
package config
|
2025-01-08 16:49:31 -05:00
|
|
|
|
|
|
|
import (
|
|
|
|
"gitea.libretechconsulting.com/rmcguire/go-app/pkg/config"
|
|
|
|
)
|
|
|
|
|
|
|
|
// This configuration includes all config from go-app/config.AppConfig
|
|
|
|
type AmbientLocalExporterConfig struct {
|
|
|
|
MetricPrefix string `yaml:"metricPrefix" default:"weather" env:"AMBIENT_METRIC_PREFIX"`
|
|
|
|
WeatherStations []WeatherStation `yaml:"weatherStations"` // No env, too complex, not worth the time
|
|
|
|
*config.AppConfig // Extends app config
|
|
|
|
}
|
|
|
|
|
|
|
|
type WeatherStation struct {
|
|
|
|
Name string `yaml:"name"` // Human Friendly Name (e.g. Back Yard Weather)
|
|
|
|
Equipment string `yaml:"equipment"` // Equipment Type (e.g. WS-5000)
|
|
|
|
|
2025-01-12 17:23:32 -05:00
|
|
|
// Required if proxying to awn/wu is enabled
|
|
|
|
WundergroundID string `yaml:"wundergroundID"`
|
|
|
|
WundergroundPassword string `yaml:"wundergroundPassword"`
|
|
|
|
AWNPassKey string `yaml:"awnPassKey"`
|
2025-01-08 16:49:31 -05:00
|
|
|
|
|
|
|
// Proxy updates to AWN or Wunderground
|
|
|
|
ProxyToAWN bool `yaml:"proxyToAWN"`
|
|
|
|
ProxyToWunderground bool `yaml:"proxyToWunderground"`
|
|
|
|
|
|
|
|
// Unreliable / unwanted metrics by name of WeatherUpdate Field
|
2025-01-08 21:28:38 -05:00
|
|
|
// will be excluded if present in discardMetrics
|
|
|
|
//
|
|
|
|
// If anything is present in keepMetrics, it is solely applied,
|
2025-01-12 17:23:32 -05:00
|
|
|
// ignoring discardMetrics.
|
|
|
|
//
|
|
|
|
// Check weather.WeatherUpdateField for options
|
|
|
|
KeepMetrics []string `yaml:"keepMetrics"`
|
|
|
|
DropMetrics []string `yaml:"dropMetrics"`
|
2025-03-05 12:53:57 -05:00
|
|
|
|
|
|
|
// Relabels battery and sensor names
|
|
|
|
// Temp+Humidity Sensors:
|
|
|
|
// - TempHumiditySensor[1-8]
|
|
|
|
// Batteries:
|
|
|
|
// - IndoorSensor
|
|
|
|
// - OutdoorSensor
|
|
|
|
// - RainSensor
|
|
|
|
// - CO2Sensor
|
|
|
|
SensorMappings map[string]string `yaml:"sensorMappings"`
|
2025-01-12 15:30:37 -05:00
|
|
|
}
|