Documentation ¶
Index ¶
- type Command
- type CommandResult
- type Device
- func (d Device) Brightness(brightness int) error
- func (d Device) Color(color string) error
- func (d Device) GetStatus() error
- func (d *Device) Listen() (<-chan *Notification, chan<- struct{}, error)
- func (d Device) New() *Device
- func (d Device) Power() error
- func (d Device) PowerOff() error
- func (d Device) PowerOn() error
- func (d *Device) Prop(values ...interface{}) ([]interface{}, error)
- func (d Device) StopTimer() error
- func (d Device) Timer(minutes int) error
- type Error
- type Notification
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct { ID int `json:"id"` Method string `json:"method"` Params []interface{} `json:"params"` }
Command represents COMMAND request to Yeelight device
type CommandResult ¶
type CommandResult struct { ID int `json:"id"` Result []interface{} `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
CommandResult represents response from Yeelight device
type Device ¶
func DiscoverMany ¶
DiscoverMany tries to discover many devices at once
func (Device) Brightness ¶
func (*Device) Listen ¶
func (d *Device) Listen() (<-chan *Notification, chan<- struct{}, error)
Listen connects to device and listens for NOTIFICATION events
type Notification ¶
Notification represents notification response
Click to show internal directories.
Click to hide internal directories.