mihome

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: May 27, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMiHomeClient

func NewMiHomeClient(conn gopi.RPCClientConn) gopi.RPCClient

Types

type Client

type Client struct {
	pb.MiHomeClient

	event.Publisher
	// contains filtered or unexported fields
}

func (*Client) Conn

func (this *Client) Conn() gopi.RPCClientConn

func (*Client) NewContext

func (this *Client) NewContext() context.Context

func (*Client) Off added in v1.0.4

func (this *Client) Off(product sensors.MiHomeProduct, sensor uint32) error

func (*Client) On added in v1.0.4

func (this *Client) On(product sensors.MiHomeProduct, sensor uint32) error

func (*Client) Ping added in v1.0.4

func (this *Client) Ping() error

func (*Client) RequestBatteryLevel added in v1.0.5

func (this *Client) RequestBatteryLevel(product sensors.MiHomeProduct, sensor uint32) error

func (*Client) RequestDiagnostics added in v1.0.5

func (this *Client) RequestDiagnostics(product sensors.MiHomeProduct, sensor uint32) error

func (*Client) RequestExercise added in v1.0.5

func (this *Client) RequestExercise(product sensors.MiHomeProduct, sensor uint32) error

func (*Client) RequestIdentify added in v1.0.5

func (this *Client) RequestIdentify(product sensors.MiHomeProduct, sensor uint32) error

func (*Client) Reset added in v1.0.5

func (this *Client) Reset() error

func (*Client) SendJoin added in v1.0.4

func (this *Client) SendJoin(product sensors.MiHomeProduct, sensor uint32) error

func (*Client) SendPowerMode added in v1.0.5

func (this *Client) SendPowerMode(product sensors.MiHomeProduct, sensor uint32, mode sensors.MiHomePowerMode) error

func (*Client) SendReportInterval added in v1.0.5

func (this *Client) SendReportInterval(product sensors.MiHomeProduct, sensor uint32, interval time.Duration) error

func (*Client) SendTargetTemperature added in v1.0.5

func (this *Client) SendTargetTemperature(product sensors.MiHomeProduct, sensor uint32, temperature float64) error

func (*Client) SendValveState added in v1.0.5

func (this *Client) SendValveState(product sensors.MiHomeProduct, sensor uint32, state sensors.MiHomeValveState) error

func (*Client) StreamMessages added in v1.0.5

func (this *Client) StreamMessages(ctx context.Context) error

func (*Client) String

func (this *Client) String() string

type Service

type Service struct {
	Server gopi.RPCServer
	MiHome sensors.MiHome
}

func (Service) Open

func (config Service) Open(log gopi.Logger) (gopi.Driver, error)

Open the server

Jump to

Keyboard shortcuts

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