wattpilot

package module
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: Apache-2.0 Imports: 20 Imported by: 7

README

go-wattpilot

Wattpilot API for go used primarly on evcc API Implementation is inspired from https://github.com/joscha82/wattpilot

Shell

./shell contains a shell to interact with the wattpilot to test out values

Documentation

Index

Constants

View Source
const (
	CONTEXT_TIMEOUT   = 30 // seconds
	RECONNECT_TIMEOUT = 5  // seconds
)

Variables

This section is empty.

Functions

func Keys added in v1.6.1

func Keys[K comparable, V any](m map[K]V) []K

Types

type PostFunction

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

type Pubsub added in v1.3.0

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

func NewPubsub added in v1.3.0

func NewPubsub() *Pubsub

func (*Pubsub) Close added in v1.3.0

func (ps *Pubsub) Close()

func (*Pubsub) Publish added in v1.3.0

func (ps *Pubsub) Publish(topic string, msg interface{})

func (*Pubsub) Subscribe added in v1.3.0

func (ps *Pubsub) Subscribe(topic string) <-chan interface{}

type Wattpilot

type Wattpilot struct {
	// 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() error

func (*Wattpilot) Disconnect added in v1.2.0

func (w *Wattpilot) Disconnect()

func (*Wattpilot) GetCarIdentifier added in v1.6.0

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

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) GetNotifications added in v1.3.0

func (w *Wattpilot) GetNotifications(prop string) <-chan interface{}

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) ParseLogLevel added in v1.4.0

func (w *Wattpilot) ParseLogLevel(level string) error

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) SetLogLevel added in v1.4.0

func (w *Wattpilot) SetLogLevel(level log.Level)

func (*Wattpilot) SetProperty

func (w *Wattpilot) SetProperty(name string, value 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