Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filters ¶
type Filters []struct { Match struct { Value string `yaml:"value"` } `yaml:"match"` Set struct { Key string `yaml:"key"` Value string `yaml:"value"` } `yaml:"set"` }
Filters are needed, as the luxtronik does a very bad job at serializing it's data. Numeric data gets messed up with units, extra-chars, etc. They even differ by language. This is addressed by dynamic filters. The first filter that matches is used.
Match.Value: Regular Expression (re2) matched against the original value Set.Key: text/template used as the new key, ignored if blank (MAY BE) Set.Value: text/template used as the new value, in json (MUST), not blank (MUST NOT)
type Location ¶
type Location struct {
Domain, Field string
}
Location is just a pair of Domain and Field and represents the location of data in our datastore
type Luxtronik ¶
type Luxtronik struct { // OnUpdate gets called as soon as new data got is received and stored. OnUpdate func(new []Location) // contains filtered or unexported fields }
Luxtronik represents a luxtronik2 heatpump (AlphaInnotec, Siemens, etc.) and contains the data returned by the appliance, but also the things required to interact with it (websocket, etc.).
func Connect ¶
Connect initiates the connection to the heatpump, retrieves the initial data-set, stores it and launches the update-routine. The heatpump object is returned.