2022-08-02 05:26:41 +00:00
|
|
|
package configuration
|
|
|
|
|
|
|
|
type Configuration struct {
|
2022-08-03 13:51:40 +00:00
|
|
|
Brew struct {
|
2022-08-03 18:09:02 +00:00
|
|
|
UUID string `mapstructure:"uuid"`
|
2022-08-03 13:51:40 +00:00
|
|
|
} `mapstructure:"brew"`
|
|
|
|
|
2022-08-02 05:26:41 +00:00
|
|
|
NATS struct {
|
|
|
|
Servers []string `mapstructure:"servers"`
|
|
|
|
Username string `mapstructure:"username"`
|
|
|
|
Password string `mapstructure:"password"`
|
|
|
|
Stream string `mapstructure:"stream"`
|
|
|
|
Subject struct {
|
|
|
|
Event string `mapstructure:"event"`
|
|
|
|
State string `mapstructure:"state"`
|
|
|
|
Temp string `mapstructure:"temp"`
|
|
|
|
Tilt string `mapstructure:"tilt"`
|
|
|
|
} `mapstructure:"subject"`
|
|
|
|
} `mapstructure:"nats"`
|
|
|
|
|
|
|
|
HTTP struct {
|
|
|
|
Port int16 `mapstructure:"port"`
|
|
|
|
} `mapstructure:"http"`
|
|
|
|
|
|
|
|
Sensors struct {
|
|
|
|
Wort string `mapstructure:"wort"`
|
|
|
|
Chamber string `mapstructure:"chamber"`
|
|
|
|
Ambient string `mapstructure:"ambient"`
|
|
|
|
Weight float64 `mapstructure:"weight"`
|
|
|
|
} `mapstructure:"sensors"`
|
|
|
|
|
2024-06-15 14:26:28 +00:00
|
|
|
I2C struct {
|
|
|
|
Bus int `mapstructure:"bus"`
|
|
|
|
} `mapstructure:"i2c"`
|
|
|
|
|
2022-08-02 05:26:41 +00:00
|
|
|
FermentationTemperature float64 `mapstructure:"fermentation_temp"`
|
|
|
|
DeltaTemperatureCool float64 `mapstructure:"delta_temp_cool"`
|
|
|
|
DeltaTemperatureHeat float64 `mapstructure:"delta_temp_heat"`
|
|
|
|
HeaterEnabled bool `mapstructure:"heater_enabled"`
|
|
|
|
CoolerEnabled bool `mapstructure:"cooler_enabled"`
|
|
|
|
|
|
|
|
Limits struct {
|
|
|
|
MinChamberTemperature float64 `mapstructure:"min_chamber_temp"`
|
|
|
|
MaxChamberTemperature float64 `mapstructure:"max_chamber_temp"`
|
|
|
|
MinCoolerRuntimeSecs float64 `mapstructure:"min_cooler_runtime_secs"`
|
|
|
|
MaxCoolerRuntimeSecs float64 `mapstructure:"max_cooler_runtime_secs"`
|
|
|
|
MinCoolerCooldownSecs float64 `mapstructure:"min_cooler_cooldown_secs"`
|
|
|
|
HeaterGraceTimeSecs float64 `mapstructure:"heater_grace_time_secs"`
|
|
|
|
} `mapstructure:"limits"`
|
|
|
|
|
|
|
|
PID struct {
|
|
|
|
Kp float64 `mapstructure:"kp"` // 2.0
|
|
|
|
Ki float64 `mapstructure:"ki"` // 0.0001
|
|
|
|
Kd float64 `mapstructure:"kd"` // 2.0
|
|
|
|
} `mapstructure:"pid"`
|
|
|
|
}
|