Documentation
¶
Index ¶
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 Notification ¶
Notification represents notification response
type Yeelight ¶
type Yeelight struct {
// contains filtered or unexported fields
}
Yeelight represents device
func (*Yeelight) Listen ¶
func (y *Yeelight) Listen() (<-chan *Notification, chan<- struct{}, error)
Listen connects to device and listens for NOTIFICATION events
func (*Yeelight) SetPower ¶
SetPower is used to switch on or off the smart LED (software managed on/off).
func (*Yeelight) ThrowAlarm ¶
Click to show internal directories.
Click to hide internal directories.