fritzdect

package
v0.0.0-...-e05b1bb Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	*request.Helper
	*Settings
	SID string
	// contains filtered or unexported fields
}

FritzDECT connection

func NewConnection

func NewConnection(uri, ain, user, password string) (*Connection, error)

NewConnection creates FritzDECT connection

func (*Connection) CurrentPower

func (c *Connection) CurrentPower() (float64, error)

CurrentPower implements the api.Meter interface

func (*Connection) ExecCmd

func (c *Connection) ExecCmd(function string) (string, error)

ExecCmd execautes an FritzDECT AHA-HTTP-Interface command

func (*Connection) TotalEnergy

func (c *Connection) TotalEnergy() (float64, error)

CurrentPower implements the api.MeterEnergy interface

type Devicestats

type Devicestats struct {
	XMLName xml.Name `xml:"devicestats"`
	Energy  Energy   `xml:"energy"`
}

Devicestats structures getbasicdevicesstats command response (AHA-HTTP-Interface)

type Energy

type Energy struct {
	XMLName xml.Name `xml:"energy"`
	Values  []string `xml:"stats"`
}

Energy structures getbasicdevicesstats command energy response (AHA-HTTP-Interface)

type Settings

type Settings struct {
	URI, AIN, User, Password string
}

FritzDECT settings

Jump to

Keyboard shortcuts

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