sma

package
v0.0.0-...-0c7050d Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 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 interface{}) 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) StartUpdateLoop

func (d *Device) StartUpdateLoop()

StartUpdateLoop if not already started

func (*Device) UpdateValues

func (d *Device) UpdateValues() error

func (*Device) Values

func (d *Device) Values() (map[sunny.ValueID]interface{}, 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