Documentation ¶
Index ¶
- func CamelToSnakeCase(str string) string
- func RunMqttForwarders(cfg Config, mc mqttClient.Client, ...)
- type CommandMessage
- type Config
- type EnumTelemetryValue
- type MqttDeviceSectionConfig
- type MqttSectionConfig
- type Nameable
- type NumericTelemetryValue
- type RealtimeMessage
- type StructRegister
- type StructureMessage
- type TelemetryMessage
- type TextTelemetryValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CamelToSnakeCase ¶
func RunMqttForwarders ¶
func RunMqttForwarders( cfg Config, mc mqttClient.Client, devicePool *pool.Pool[*restarter.Restarter[device.Device]], stateStorage *dataflow.ValueStorage, commandStorage *dataflow.ValueStorage, )
Types ¶
type CommandMessage ¶
type Config ¶
type Config interface { ClientId() string AvailabilityClient() MqttSectionConfig AvailabilityClientTopic() string AvailabilityDevice() MqttSectionConfig AvailabilityDeviceTopic(deviceName string) string Structure() MqttSectionConfig StructureTopic(deviceName string) string Telemetry() MqttSectionConfig TelemetryTopic(deviceName string) string Realtime() MqttSectionConfig RealtimeTopic(deviceName, registerName string) string HomeassistantDiscovery() MqttSectionConfig HomeassistantDiscoveryTopic(component, nodeId, objectId string) string Command() MqttSectionConfig CommandTopic(deviceName, registerName string) string LogDebug() bool }
type EnumTelemetryValue ¶
type MqttDeviceSectionConfig ¶
type MqttDeviceSectionConfig interface { Name() string Filter() dataflow.RegisterFilterConf }
type MqttSectionConfig ¶
type NumericTelemetryValue ¶
type RealtimeMessage ¶
type StructRegister ¶
type StructRegister struct { Category string `json:"Cat" example:"Monitor"` Name string `json:"Name" example:"PanelPower"` Description string `json:"Desc" example:"Panel power"` Type string `json:"Type" example:"number"` Enum map[int]string `json:"Enum,omitempty"` Unit string `json:"Unit,omitempty" example:"W"` Sort int `json:"Sort" example:"100"` Writable bool `json:"Cmnd" example:"false"` }
func NewStructRegister ¶
func NewStructRegister(reg dataflow.Register) StructRegister
type StructureMessage ¶
type StructureMessage struct { AvailabilityTopics []string `json:"Avail,omitempty"` TelemetryTopic string `json:"Tele,omitempty"` RealtimeTopic string `json:"Real,omitempty"` CommandTopic string `json:"Cmnd,omitempty"` Registers []StructRegister `json:"Regs"` }
type TelemetryMessage ¶
type TelemetryMessage struct { Time string `json:"Time"` NextTelemetry string `json:"NextTelemetry"` Model string `json:"Model"` NumericValues map[string]NumericTelemetryValue `json:"NumericValues,omitempty"` TextValues map[string]TextTelemetryValue `json:"TextValues,omitempty"` EnumValues map[string]EnumTelemetryValue `json:"EnumValues,omitempty"` }
type TextTelemetryValue ¶
Click to show internal directories.
Click to hide internal directories.