sma

package
v0.0.0-...-bd59d96 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsFloat

func AsFloat(value any) float64

Types

type Device

type Device struct {
	*sunny.Device
	// contains filtered or unexported fields
}

Device holds information for a Device and provides interface to get values

func (*Device) Run

func (d *Device) Run()

Run starts the receive loop once per device

func (*Device) UpdateValues

func (d *Device) UpdateValues() error

func (*Device) Values

func (d *Device) Values() (map[sunny.ValueID]any, error)

type Discoverer

type Discoverer struct {
	// contains filtered or unexported fields
}

Discoverer discovers SMA devicesBySerial in background while providing already found devicesBySerial

func GetDiscoverer

func GetDiscoverer(iface string) (*Discoverer, error)

GetDiscoverer fo the given interface

func (*Discoverer) DeviceByIP

func (d *Discoverer) DeviceByIP(ip, password string) (*Device, error)

DeviceByIP with the given serial number

func (*Discoverer) DeviceBySerial

func (d *Discoverer) DeviceBySerial(serial uint32, password string) *Device

DeviceBySerial with the given serial number

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL