Versions in this module Expand all Collapse all v0 v0.1.1 Jul 4, 2023 v0.1.0 Jun 6, 2022 Changes in this version + const ErrDeviceIsNil + const ErrFermenting + const ErrInvalidStep + const ErrMetricsIsNil + const ErrNoCurrentBatch + const ErrNotFermenting + const ErrNotFound + type Chamber struct + ChillingDifferential float64 + CurrentBatch *batch.Detail + CurrentFermentationStep string + DeviceConfig DeviceConfig + HeatingDifferential float64 + ID string + ModTime time.Time + Name string + Readings *Readings + func (c *Chamber) Configure(configurator Configurator, service brewfather.Service, logger *logrus.Logger, ...) error + func (c *Chamber) IsFermenting() bool + func (c *Chamber) RefreshReadings() + func (c *Chamber) StartFermentation(ctx context.Context, stepID string) error + func (c *Chamber) StopFermentation() error + type Configurator interface + CreateDs18b20 func(thermometerID string) (device.Thermometer, error) + CreateGPIOActuator func(pin string) (device.Actuator, error) + CreateTilt func(color tilt.Color) (device.ThermometerAndHydrometer, error) + type Controller interface + StartFermentation func(chamberID string, step string) error + StopFermentation func(chamberID string) error + type DefaultConfigurator struct + TiltMonitor *tilt.Monitor + func (c *DefaultConfigurator) CreateDs18b20(id string) (device.Thermometer, error) + func (c *DefaultConfigurator) CreateGPIOActuator(pin string) (device.Actuator, error) + func (c *DefaultConfigurator) CreateTilt(color tilt.Color) (device.ThermometerAndHydrometer, error) + type DeviceConfig struct + AuxiliaryThermometerID string + AuxiliaryThermometerType string + BeerThermometerID string + BeerThermometerType string + ChillerGPIO string + ExternalThermometerID string + ExternalThermometerType string + HeaterGPIO string + HydrometerID string + HydrometerType string + type Error string + func (e Error) Error() string + type InvalidConfigurationError struct + func (e InvalidConfigurationError) Error() string + func (e InvalidConfigurationError) Problems() []error + type Manager struct + func NewManager(ctx context.Context, repo Repo, configurator Configurator, ...) (*Manager, error) + func (m *Manager) Delete(id string) error + func (m *Manager) Get(id string) (*Chamber, error) + func (m *Manager) GetAll() ([]*Chamber, error) + func (m *Manager) Save(chamber *Chamber) error + func (m *Manager) StartFermentation(chamberID string, step string) error + func (m *Manager) StopFermentation(chamberID string) error + type Readings struct + AuxiliaryTemperature *float64 + BeerTemperature *float64 + ExternalTemperature *float64 + HydrometerGravity *float64 + type Repo interface + Delete func(id string) error + Get func(id string) (*Chamber, error) + GetAll func() ([]*Chamber, error) + Save func(c *Chamber) error