wattpilot

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: Apache-2.0 Imports: 17 Imported by: 7

README

go-wattpilot

Documentation

Index

Constants

View Source
const (
	MAX_RECONNECT_RETRIES = 5  // re-tries
	PING_TIMEOUT          = 10 // seconds
	CONTEXT_TIMEOUT       = 60 // seconds
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EventFunc

type EventFunc func(map[string]interface{})

type PostFunction

type PostFunction func(interface{}) (string, error)

type Wattpilot

type Wattpilot struct {
	Reconnect bool

	Updated chan interface{}
	// contains filtered or unexported fields
}

func New added in v1.0.6

func New(host string, password string) *Wattpilot

func (*Wattpilot) Alias added in v1.1.2

func (w *Wattpilot) Alias() []string

func (*Wattpilot) Connect

func (w *Wattpilot) Connect() (bool, error)

func (*Wattpilot) Disconnect added in v1.2.0

func (w *Wattpilot) Disconnect()

func (*Wattpilot) GetCurrents

func (w *Wattpilot) GetCurrents() (float64, float64, float64, error)

func (*Wattpilot) GetHost

func (w *Wattpilot) GetHost() string

func (*Wattpilot) GetName

func (w *Wattpilot) GetName() string

func (*Wattpilot) GetPower

func (w *Wattpilot) GetPower() (float64, error)

func (*Wattpilot) GetProperty

func (w *Wattpilot) GetProperty(name string) (interface{}, error)

func (*Wattpilot) GetRFID

func (w *Wattpilot) GetRFID() (string, error)

func (*Wattpilot) GetSerial

func (w *Wattpilot) GetSerial() string

func (*Wattpilot) GetVoltages added in v1.1.1

func (w *Wattpilot) GetVoltages() (float64, float64, float64, error)

func (*Wattpilot) IsInitialized

func (w *Wattpilot) IsInitialized() bool

func (*Wattpilot) LookupAlias added in v1.1.2

func (w *Wattpilot) LookupAlias(name string) string

func (*Wattpilot) Properties added in v1.1.2

func (w *Wattpilot) Properties() []string

func (*Wattpilot) SetCurrent

func (w *Wattpilot) SetCurrent(current float64) error

func (*Wattpilot) SetProperty

func (w *Wattpilot) SetProperty(name string, value interface{}) error

func (*Wattpilot) Status

func (w *Wattpilot) Status() (map[string]interface{}, error)

func (*Wattpilot) StatusInfo

func (w *Wattpilot) StatusInfo()

Directories

Path Synopsis
prometheus module

Jump to

Keyboard shortcuts

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