Documentation
¶
Index ¶
- Constants
- Variables
- func Cached[T any](g func() (T, error), cache time.Duration) func() (T, error)
- func ReadBody(resp *http.Response) ([]byte, error)
- func ResetCached()
- func ResettableCached[T any](g func() (T, error), cache time.Duration) *cached[T]
- func ResponseError(resp *http.Response) error
- type AllSystemDevices
- type AllSystemMpcData
- type AllSystems
- type Cacheable
- type ConfigurationCircuit
- type ConfigurationDhw
- type ConfigurationDomesticHotWater
- type ConfigurationZone
- type ConnOption
- type Connection
- func (c *Connection) GetDeviceCurrentPower(systemId, deviceUuid string) (DevicePowerMap, error)
- func (c *Connection) GetDeviceData(systemId string, whichDevices int) ([]DeviceAndInfo, error)
- func (c *Connection) GetEnergyData(systemId, deviceUuid, operationMode, energyType, resolution string, ...) (EnergyData, error)
- func (c *Connection) GetHomes() ([]Home, error)
- func (c *Connection) GetMpcData(systemId string) ([]MpcDevice, error)
- func (c *Connection) GetSystem(systemId string) (SystemStatus, error)
- func (c *Connection) GetSystemCurrentPower(systemId string) (float64, error)
- func (c *Connection) GetSystemDevices(systemId string) (SystemDevices, error)
- func (c *Connection) StartHotWaterBoost(systemId string, hotwaterIndex int) error
- func (c *Connection) StartZoneQuickVeto(systemId string, zone int, setpoint float32, duration float32) error
- func (c *Connection) StopHotWaterBoost(systemId string, hotwaterIndex int) error
- func (c *Connection) StopZoneQuickVeto(systemId string, zone int) error
- type Controller
- func (c *Controller) GetCurrentQuickMode() string
- func (c *Controller) GetDeviceCurrentPower(systemId, deviceUuid string) (DevicePowerMap, error)
- func (c *Controller) GetDeviceData(systemId string, whichDevices int) ([]DeviceAndInfo, error)
- func (c *Controller) GetEnergyData(systemId, deviceUuid, operationMode, energyType, resolution string, ...) (EnergyData, error)
- func (c *Controller) GetHomes() ([]Home, error)
- func (c *Controller) GetMpcData(systemId string) ([]MpcDevice, error)
- func (c *Controller) GetQuickModeExpiresAt() string
- func (c *Controller) GetSystem(systemId string) (SystemStatus, error)
- func (c *Controller) GetSystemCurrentPower(systemId string) (float64, error)
- func (c *Controller) GetSystemDevices(systemId string) (SystemDevices, error)
- func (c *Controller) StartHotWaterBoost(systemId string, hotwaterIndex int) error
- func (c *Controller) StartStrategybased(systemId string, strategy int, heatingPar *HeatingParStruct, ...) (string, error)
- func (c *Controller) StartZoneQuickVeto(systemId string, zone int, setpoint float32, duration float32) error
- func (c *Controller) StopHotWaterBoost(systemId string, hotwaterIndex int) error
- func (c *Controller) StopStrategybased(systemId string, heatingPar *HeatingParStruct, hotwaterPar *HotwaterParStruct) (string, error)
- func (c *Controller) StopZoneQuickVeto(systemId string, zone int) error
- func (c *Controller) WhichQuickMode(dhwData *DhwData, domesticHotWaterData *DomesticHotWaterData, ...) int
- type CredentialsStruct
- type CtrlOption
- type Device
- type DeviceAndInfo
- type DevicePower
- type DevicePowerMap
- type DhwData
- type DomesticHotWaterData
- type EnergyData
- type HeatingParStruct
- type Helper
- type Home
- type Homes
- type HotwaterParStruct
- type Logger
- type MetaInfo
- type MpcData
- type MpcDevice
- type Oauth2Config
- type PropertiesCircuit
- type PropertiesDhw
- type PropertiesDomesticHotWater
- type PropertiesZone
- type Setpoint
- type StateCircuit
- type StateDhw
- type StateDomesticHotWater
- type StateZone
- type StatusError
- type SystemAndStatus
- type SystemDevices
- type SystemDevicesAndSystemId
- type SystemMpcData
- type SystemStatus
- type TimeProgram
- type TimeSlot
- type Value
- type ZoneData
Constants ¶
const ( CLIENT_ID = "myvaillant" REDIRECT_URL = "enduservaillant.page.link://login" AUTH_BASE_URL = "https://identity.vaillant-group.com/auth/realms" LOGIN_URL = AUTH_BASE_URL + "/%s/login-actions/authenticate" TOKEN_URL = AUTH_BASE_URL + "/%s/protocol/openid-connect/token" AUTH_URL = AUTH_BASE_URL + "/%s/protocol/openid-connect/auth" API_URL_BASE = "https://api.vaillant-group.com/service-connected-control/end-user-app-api/v1" HOTWATERBOOST_URL = "/systems/%s/tli/domestic-hot-water/%01d/boost" ZONEQUICKVETO_URL = "/systems/%s/tli/zones/%01d/quick-veto" SYSTEMS_URL = "/systems/%s/tli" DEVICES_URL = "/emf/v2/%s/currentSystem" ENERGY_URL = "/emf/v2/%s/devices/%s/buckets?" MPC_URL = "/hem/%s/mpc" )
const ( HOTWATERINDEX_DEFAULT = 255 ZONEINDEX_DEFAULT = 0 ZONEVETOSETPOINT_DEFAULT = 20.0 ZONEVETODURATION_DEFAULT = 3.0 // 3 hours as default OPERATIONMODE_TIME_CONTROLLED string = "TIME_CONTROLLED" QUICKMODE_HOTWATER string = "Hotwater Boost" QUICKMODE_HEATING string = "Heating Quick Veto" QUICKMODE_NOTHING string = "Charger running idle" QUICKMODE_ERROR_ALREADYON string = "Error. A quickmode is already running" SPECIAL_FUNCTION_QUICK_VETO = "QUICK_VETO" SPECIAL_FUNCTION_HOTWATER_BOOST = "CYLINDER_BOOST" )
const ( STRATEGY_NONE = 0 STRATEGY_HOTWATER = 1 STRATEGY_HEATING = 2 STRATEGY_HOTWATER_THEN_HEATING = 3 )
const ( DEVICES_ALL = 0 DEVICES_PRIMARY_HEATER = 1 DEVICES_SECONDARY_HEATER = 2 DEVICES_BACKUP_HEATER = 3 )
const ( RESOLUTION_HOUR = "HOUR" RESOLUTION_DAY = "DAY" RESOLUTION_MONTH = "MONTH" )
const CACHE_DURATION_DEVICES = 1800
const CACHE_DURATION_HOMES = 1800
const CACHE_DURATION_MPCDATA = 90
const CACHE_DURATION_SYSTEMS = 90
const REALM_GERMANY = "vaillant-germany-b2c"
Variables ¶
var ( JSONContent = "application/json" // JSONEncoding specifies application/json JSONEncoding = map[string]string{ "Content-Type": JSONContent, "Accept": JSONContent, } // AcceptJSON accepting application/json AcceptJSON = map[string]string{ "Accept": JSONContent, } )
var ErrMustRetry = errors.New("must retry")
ErrMustRetry indicates that a rate-limited operation should be retried
var ErrTimeout = errors.New("timeout")
ErrTimeout is the error returned when a timeout happened. Modeled after context.DeadlineError
Functions ¶
func ReadBody ¶
ReadBody reads HTTP response and returns error on response codes other than HTTP 2xx. It closes the request body after reading.
func ResetCached ¶
func ResetCached()
func ResettableCached ¶
ResettableCached wraps a getter with a cache. It returns a `Cacheable`. Instead of the cached getter, the `Get()` and `Reset()` methods are exposed.
func ResponseError ¶
ResponseError turns an HTTP status code into an error
Types ¶
type AllSystemDevices ¶ added in v0.0.3
type AllSystemDevices struct {
SystemDevicesAndSystemId []SystemDevicesAndSystemId
}
type AllSystemMpcData ¶ added in v0.0.3
type AllSystemMpcData struct {
SystemMpcData []SystemMpcData
}
type AllSystems ¶ added in v0.0.3
type AllSystems struct {
SystemsAndStatus []SystemAndStatus
}
type ConfigurationCircuit ¶
type ConfigurationCircuit struct {
Index int `json:"index"`
HeatingCurve float64 `json:"heatingCurve"`
HeatingFlowTemperatureMinimumSetpoint float64 `json:"heatingFlowTemperatureMinimumSetpoint"`
HeatingFlowTemperatureMaximumSetpoint float64 `json:"heatingFlowTemperatureMaximumSetpoint"`
HeatDemandLimitedByOutsideTemperature float64 `json:"heatDemandLimitedByOutsideTemperature"`
HeatingCircuitFlowSetpointExcessOffset float64 `json:"heatingCircuitFlowSetpointExcessOffset"`
SetBackModeEnabled bool `json:"setBackModeEnabled"`
RoomTemperatureControlMode string `json:"roomTemperatureControlMode"`
}
type ConfigurationDhw ¶
type ConfigurationDhw struct {
Index int `json:"index"`
OperationModeDhw string `json:"operationModeDhw"`
TappingSetpoint float64 `json:"tappingSetpoint"`
HolidayStartDateTime time.Time `json:"holidayStartDateTime"`
HolidayEndDateTime time.Time `json:"holidayEndDateTime"`
TimeProgramDhw TimeProgram `json:"timeProgramDhw"`
TimeProgramCirculationPump TimeProgram `json:"timeProgramCirculationPump"`
}
type ConfigurationDomesticHotWater ¶
type ConfigurationDomesticHotWater struct {
Index int `json:"index"`
OperationModeDomesticHotWater string `json:"operationModeDomesticHotWater"`
TappingSetpoint float64 `json:"tappingSetpoint"`
HolidayStartDateTime time.Time `json:"holidayStartDateTime"`
HolidayEndDateTime time.Time `json:"holidayEndDateTime"`
TimeProgramDomesticHotWater TimeProgram `json:"timeProgramDomesticHotWater"`
TimeProgramCirculationPump TimeProgram `json:"timeProgramCirculationPump"`
}
type ConfigurationZone ¶
type ConfigurationZone struct {
Index int `json:"index"`
General struct {
Name string `json:"name"`
HolidayStartDateTime time.Time `json:"holidayStartDateTime"`
HolidayEndDateTime time.Time `json:"holidayEndDateTime"`
HolidaySetpoint float64 `json:"holidaySetpoint"`
} `json:"general"`
Heating struct {
OperationModeHeating string `json:"operationModeHeating"`
SetBackTemperature float64 `json:"setBackTemperature"`
ManualModeSetpointHeating float64 `json:"manualModeSetpointHeating"`
TimeProgramHeating TimeProgram `json:"timeProgramHeating"`
} `json:"heating"`
}
type ConnOption ¶ added in v0.0.3
type ConnOption func(*Connection)
func WithHttpClient ¶ added in v0.0.2
func WithHttpClient(client *http.Client) ConnOption
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
Connection is the Sensonet connection
func NewConnection ¶
func NewConnection(ts oauth2.TokenSource, opts ...ConnOption) (*Connection, error)
NewConnection creates a new Sensonet device connection.
func (*Connection) GetDeviceCurrentPower ¶ added in v0.0.3
func (c *Connection) GetDeviceCurrentPower(systemId, deviceUuid string) (DevicePowerMap, error)
Returns the current power consumption and product name for deviceUuid. If "All" is given as deviceUuid, then the function return the power consumption and product name for all devices of systemId
func (*Connection) GetDeviceData ¶
func (c *Connection) GetDeviceData(systemId string, whichDevices int) ([]DeviceAndInfo, error)
Returns the device data for given criteria
func (*Connection) GetEnergyData ¶
func (c *Connection) GetEnergyData(systemId, deviceUuid, operationMode, energyType, resolution string, startDate, endDate time.Time) (EnergyData, error)
Returns the energy data for systemId, deviceUuid and other given criteria
func (*Connection) GetHomes ¶
func (c *Connection) GetHomes() ([]Home, error)
Returns all "homes" that belong to the current user under the myVaillant portal
func (*Connection) GetMpcData ¶ added in v0.0.3
func (c *Connection) GetMpcData(systemId string) ([]MpcDevice, error)
Returns the mpc data for systemId
func (*Connection) GetSystem ¶
func (c *Connection) GetSystem(systemId string) (SystemStatus, error)
Returns the system report (state, properties and configuration) for a specific systemId
func (*Connection) GetSystemCurrentPower ¶ added in v0.0.3
func (c *Connection) GetSystemCurrentPower(systemId string) (float64, error)
Returns the current power consumption for systemId
func (*Connection) GetSystemDevices ¶ added in v0.0.3
func (c *Connection) GetSystemDevices(systemId string) (SystemDevices, error)
Returns the system devices for a specific systemId
func (*Connection) StartHotWaterBoost ¶
func (c *Connection) StartHotWaterBoost(systemId string, hotwaterIndex int) error
func (*Connection) StartZoneQuickVeto ¶
func (*Connection) StopHotWaterBoost ¶
func (c *Connection) StopHotWaterBoost(systemId string, hotwaterIndex int) error
func (*Connection) StopZoneQuickVeto ¶
func (c *Connection) StopZoneQuickVeto(systemId string, zone int) error
type Controller ¶ added in v0.0.3
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶ added in v0.0.3
func NewController(conn *Connection, opts ...CtrlOption) (*Controller, error)
NewController creates a new Sensonet controller.
func (*Controller) GetCurrentQuickMode ¶ added in v0.0.3
func (c *Controller) GetCurrentQuickMode() string
func (*Controller) GetDeviceCurrentPower ¶ added in v0.0.3
func (c *Controller) GetDeviceCurrentPower(systemId, deviceUuid string) (DevicePowerMap, error)
Returns the current power consumption and product name for deviceUuid. If "All" is given as deviceUuid, then the function return the power consumption and product name for all devices of systemId
func (*Controller) GetDeviceData ¶ added in v0.0.3
func (c *Controller) GetDeviceData(systemId string, whichDevices int) ([]DeviceAndInfo, error)
Returns the device data for given criteria
func (*Controller) GetEnergyData ¶ added in v0.0.3
func (c *Controller) GetEnergyData(systemId, deviceUuid, operationMode, energyType, resolution string, startDate, endDate time.Time) (EnergyData, error)
Returns the energy data for systemId, deviceUuid and other given criteria
func (*Controller) GetHomes ¶ added in v0.0.3
func (c *Controller) GetHomes() ([]Home, error)
Returns all "homes" that belong to the current user under the myVaillant portal
func (*Controller) GetMpcData ¶ added in v0.0.3
func (c *Controller) GetMpcData(systemId string) ([]MpcDevice, error)
Returns the mpc data for systemId
func (*Controller) GetQuickModeExpiresAt ¶ added in v0.0.4
func (c *Controller) GetQuickModeExpiresAt() string
func (*Controller) GetSystem ¶ added in v0.0.3
func (c *Controller) GetSystem(systemId string) (SystemStatus, error)
Returns the system report (state, properties and configuration) for a specific systemId
func (*Controller) GetSystemCurrentPower ¶ added in v0.0.3
func (c *Controller) GetSystemCurrentPower(systemId string) (float64, error)
Returns the current power consumption for systemId
func (*Controller) GetSystemDevices ¶ added in v0.0.3
func (c *Controller) GetSystemDevices(systemId string) (SystemDevices, error)
Returns the system devices for a specific systemId
func (*Controller) StartHotWaterBoost ¶ added in v0.0.3
func (c *Controller) StartHotWaterBoost(systemId string, hotwaterIndex int) error
func (*Controller) StartStrategybased ¶ added in v0.0.3
func (c *Controller) StartStrategybased(systemId string, strategy int, heatingPar *HeatingParStruct, hotwaterPar *HotwaterParStruct) (string, error)
func (*Controller) StartZoneQuickVeto ¶ added in v0.0.3
func (*Controller) StopHotWaterBoost ¶ added in v0.0.3
func (c *Controller) StopHotWaterBoost(systemId string, hotwaterIndex int) error
func (*Controller) StopStrategybased ¶ added in v0.0.3
func (c *Controller) StopStrategybased(systemId string, heatingPar *HeatingParStruct, hotwaterPar *HotwaterParStruct) (string, error)
func (*Controller) StopZoneQuickVeto ¶ added in v0.0.3
func (c *Controller) StopZoneQuickVeto(systemId string, zone int) error
func (*Controller) WhichQuickMode ¶ added in v0.0.3
func (c *Controller) WhichQuickMode(dhwData *DhwData, domesticHotWaterData *DomesticHotWaterData, zoneData *ZoneData, strategy int, heatingPar *HeatingParStruct, hotwater *HotwaterParStruct) int
This function checks the operation mode of heating and hotwater and the hotwater live temperature and returns, which quick mode should be started, when evcc sends an "Enable"
type CredentialsStruct ¶
type CtrlOption ¶ added in v0.0.3
type CtrlOption func(*Controller)
func WithLogger ¶ added in v0.0.2
func WithLogger(logger Logger) CtrlOption
type Device ¶
type Device struct {
DeviceUUID string `json:"device_uuid"`
EbusID string `json:"ebus_id"`
Spn int `json:"spn"`
BusCouplerAddress int `json:"bus_coupler_address"`
ArticleNumber string `json:"article_number"`
EmfValid bool `json:"emfValid"`
DeviceSerialNumber string `json:"device_serial_number"`
DeviceType string `json:"device_type"`
FirstData time.Time `json:"first_data"`
LastData time.Time `json:"last_data"`
Data []struct {
OperationMode string `json:"operation_mode"`
ValueType string `json:"value_type"`
Calculated bool `json:"calculated"`
From time.Time `json:"from"`
To time.Time `json:"to"`
} `json:"data"`
ProductName string `json:"product_name"`
}
type DeviceAndInfo ¶
type DevicePower ¶ added in v0.0.3
type DevicePowerMap ¶ added in v0.0.3
type DevicePowerMap map[string]DevicePower
type DhwData ¶
type DhwData struct {
State StateDhw
Properties PropertiesDhw
Configuration ConfigurationDhw
}
func GetDhwData ¶
func GetDhwData(state SystemStatus, index int) *DhwData
type DomesticHotWaterData ¶
type DomesticHotWaterData struct {
State StateDomesticHotWater
Properties PropertiesDomesticHotWater
Configuration ConfigurationDomesticHotWater
}
func GetDomesticHotWaterData ¶
func GetDomesticHotWaterData(state SystemStatus, index int) *DomesticHotWaterData
type EnergyData ¶
type EnergyData struct {
ExtraFields struct {
Timezone string `json:"timezone"`
} `json:"extra_fields"`
OperationMode string `json:"operationMode"`
// SkipDataUpdate bool `json:"skip_data_update"`
// DataFrom any `json:"data_from"`
// DataTo any `json:"data_to"`
StartDate time.Time `json:"startDate"`
EndDate time.Time `json:"endDate"`
Resolution string `json:"resolution"`
EnergyType string `json:"energyType"`
// ValueType any `json:"valueType"`
// Calculated any `json:"calculated"`
TotalConsumption float64 `json:"totalConsumption"`
Data []struct {
ExtraFields struct {
Timezone string `json:"timezone"`
} `json:"extra_fields"`
StartDate time.Time `json:"startDate"`
EndDate time.Time `json:"endDate"`
Value float64 `json:"value"`
} `json:"data"`
}
type HeatingParStruct ¶
type Home ¶ added in v0.0.6
type Home struct {
HomeName string `json:"homeName"`
Address struct {
Street string `json:"street"`
Extension any `json:"extension"`
City string `json:"city"`
PostalCode string `json:"postalCode"`
CountryCode string `json:"countryCode"`
} `json:"address"`
SerialNumber string `json:"serialNumber"`
SystemID string `json:"systemId"`
ProductMetadata struct {
ProductType string `json:"productType"`
ProductionYear string `json:"productionYear"`
ProductionWeek string `json:"productionWeek"`
ArticleNumber string `json:"articleNumber"`
} `json:"productMetadata"`
State string `json:"state"`
MigrationState string `json:"migrationState"`
MigrationFinishedAt time.Time `json:"migrationFinishedAt"`
OnlineState string `json:"onlineState"`
Firmware struct {
Version string `json:"version"`
UpdateEnabled bool `json:"updateEnabled"`
UpdateRequired bool `json:"updateRequired"`
} `json:"firmware"`
Nomenclature string `json:"nomenclature"`
Cag bool `json:"cag"`
CountryCode string `json:"countryCode"`
ProductInformation string `json:"productInformation"`
FirmwareVersion string `json:"firmwareVersion"`
}
type HotwaterParStruct ¶
type HotwaterParStruct struct {
Index int
}
type Oauth2Config ¶
func Oauth2ConfigForRealm ¶
func Oauth2ConfigForRealm(realm string) *Oauth2Config
func (*Oauth2Config) PasswordCredentialsToken ¶ added in v0.0.2
type PropertiesCircuit ¶
type PropertiesDhw ¶
type PropertiesZone ¶
type StateCircuit ¶
type StateCircuit struct {
Index int `json:"index"`
CircuitState string `json:"circuitState"`
CurrentCircuitFlowTemperature float64 `json:"currentCircuitFlowTemperature,omitempty"`
HeatingCircuitFlowSetpoint float64 `json:"heatingCircuitFlowSetpoint"`
CalculatedEnergyManagerState string `json:"calculatedEnergyManagerState"`
}
type StateDomesticHotWater ¶
type StateZone ¶
type StateZone struct {
Index int `json:"index"`
DesiredRoomTemperatureSetpointHeating float64 `json:"desiredRoomTemperatureSetpointHeating"`
DesiredRoomTemperatureSetpoint float64 `json:"desiredRoomTemperatureSetpoint"`
CurrentRoomTemperature float64 `json:"currentRoomTemperature,omitempty"`
CurrentRoomHumidity float64 `json:"currentRoomHumidity,omitempty"`
CurrentSpecialFunction string `json:"currentSpecialFunction"`
HeatingState string `json:"heatingState"`
}
type StatusError ¶
type StatusError struct {
// contains filtered or unexported fields
}
StatusError indicates unsuccessful http response
func (StatusError) Error ¶
func (e StatusError) Error() string
func (StatusError) Response ¶
func (e StatusError) Response() *http.Response
Response returns the response with the unexpected error
func (StatusError) StatusCode ¶
func (e StatusError) StatusCode() int
StatusCode returns the response's status code
type SystemAndStatus ¶ added in v0.0.3
type SystemAndStatus struct {
SystemId string
SystemStatus SystemStatus
}
type SystemDevices ¶
type SystemDevices struct {
SystemType string `json:"system_type"`
HasEmfCapableDevices bool `json:"has_emf_capable_devices"`
PrimaryHeatGenerator Device `json:"primary_heat_generator"`
SecondaryHeatGenerators []Device `json:"secondary_heat_generators"`
ElectricBackupHeater Device `json:"electric_backup_heater"`
SolarStation any `json:"solar_station"`
Ventilation any `json:"ventilation"`
Gateway any `json:"gateway"`
}
type SystemDevicesAndSystemId ¶ added in v0.0.3
type SystemDevicesAndSystemId struct {
SystemId string
SystemDevices SystemDevices
}
type SystemMpcData ¶ added in v0.0.3
type SystemStatus ¶
type SystemStatus struct {
State struct {
System struct {
OutdoorTemperature float64 `json:"outdoorTemperature"`
OutdoorTemperatureAverage24H float64 `json:"outdoorTemperatureAverage24h"`
SystemFlowTemperature float64 `json:"systemFlowTemperature"`
SystemWaterPressure float64 `json:"systemWaterPressure"`
EnergyManagerState string `json:"energyManagerState"`
SystemOff bool `json:"systemOff"`
} `json:"system"`
Zones []StateZone `json:"zones"`
Circuits []StateCircuit `json:"circuits"`
Dhw []StateDhw `json:"dhw"`
DomesticHotWater []StateDomesticHotWater `json:"domesticHotWater"`
} `json:"state"`
Properties struct {
System struct {
ControllerType string `json:"controllerType"`
SystemScheme int `json:"systemScheme"`
BackupHeaterType string `json:"backupHeaterType"`
BackupHeaterAllowedFor string `json:"backupHeaterAllowedFor"`
ModuleConfigurationVR71 int `json:"moduleConfigurationVR71"`
EnergyProvidePowerCutBehavior string `json:"energyProvidePowerCutBehavior"`
SmartPhotovoltaicBufferOffset float64 `json:"smartPhotovoltaicBufferOffset"`
ExternalEnergyManagementActivation bool `json:"externalEnergyManagementActivation"`
} `json:"system"`
Zones []PropertiesZone `json:"zones"`
Circuits []PropertiesCircuit `json:"circuits"`
Dhw []PropertiesDhw `json:"dhw"`
DomesticHotWater []PropertiesDomesticHotWater `json:"domesticHotWater"`
} `json:"properties"`
Configuration struct {
System struct {
ContinuousHeatingStartSetpoint float64 `json:"continuousHeatingStartSetpoint"`
AlternativePoint float64 `json:"alternativePoint"`
HeatingCircuitBivalencePoint float64 `json:"heatingCircuitBivalencePoint"`
DhwBivalencePoint float64 `json:"dhwBivalencePoint"`
AdaptiveHeatingCurve bool `json:"adaptiveHeatingCurve"`
DhwMaximumLoadingTime int `json:"dhwMaximumLoadingTime"`
DhwHysteresis float64 `json:"dhwHysteresis"`
DhwFlowSetpointOffset float64 `json:"dhwFlowSetpointOffset"`
ContinuousHeatingRoomSetpoint float64 `json:"continuousHeatingRoomSetpoint"`
HybridControlStrategy string `json:"hybridControlStrategy"`
MaxFlowSetpointHpError float64 `json:"maxFlowSetpointHpError"`
DhwMaximumTemperature float64 `json:"dhwMaximumTemperature"`
MaximumPreheatingTime int `json:"maximumPreheatingTime"`
ParalellTankLoadingAllowed bool `json:"paralellTankLoadingAllowed"`
} `json:"system"`
Zones []ConfigurationZone `json:"zones"`
Circuits []ConfigurationCircuit `json:"circuits"`
Dhw []ConfigurationDhw `json:"dhw"`
DomesticHotWater []ConfigurationDomesticHotWater `json:"domesticHotWater"`
} `json:"configuration"`
}
type TimeProgram ¶
type TimeProgram struct {
MetaInfo MetaInfo `json:"metaInfo"`
Monday []Setpoint `json:"monday"`
Tuesday []Setpoint `json:"tuesday"`
Wednesday []Setpoint `json:"wednesday"`
Thursday []Setpoint `json:"thursday"`
Friday []Setpoint `json:"friday"`
Saturday []Setpoint `json:"saturday"`
Sunday []Setpoint `json:"sunday"`
}
type Value ¶
type Value[T any] struct { // contains filtered or unexported fields }
Value is a cacheable value that can expire
type ZoneData ¶
type ZoneData struct {
State StateZone
Properties PropertiesZone
Configuration ConfigurationZone
}
func GetZoneData ¶
func GetZoneData(state SystemStatus, index int) *ZoneData