Documentation ¶
Index ¶
- type Shelly
- type ShellyDevice
- func (d *ShellyDevice) AddMsgReceivedFunc(topic string, f func(payload []byte))
- func (e *ShellyDevice) IsOn() bool
- func (e *ShellyDevice) Subscribe()
- func (e *ShellyDevice) Toggle() error
- func (e *ShellyDevice) TurnOff() error
- func (e *ShellyDevice) TurnOn() error
- func (e *ShellyDevice) Unsubscribe()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Shelly ¶
type Shelly struct {
// contains filtered or unexported fields
}
func (*Shelly) SetDeviceDiscoveredHandler ¶
func (s *Shelly) SetDeviceDiscoveredHandler(f func(*ShellyDevice))
Set the function that get called when a new Deconz Device is discovered
func (*Shelly) StartDiscovery ¶
func (s *Shelly) StartDiscovery()
func (*Shelly) StopDiscovery ¶
func (s *Shelly) StopDiscovery()
type ShellyDevice ¶
type ShellyDevice struct { Id string `json:"id,omitempty"` Model string `json:"model,omitempty"` MACAddress string `json:"mac,omitempty"` IPAddress string `json:"ip,omitempty"` NewFirewareAvailable bool `json:"new_fw,omitempty"` FirmewareVersion string `json:"fw_ver,omitempty"` State string // contains filtered or unexported fields }
func (*ShellyDevice) AddMsgReceivedFunc ¶
func (d *ShellyDevice) AddMsgReceivedFunc(topic string, f func(payload []byte))
Add a function that is called when a message is eceiverd from a Shelly device on a selected topic
func (*ShellyDevice) IsOn ¶
func (e *ShellyDevice) IsOn() bool
func (*ShellyDevice) Subscribe ¶ added in v0.1.7
func (e *ShellyDevice) Subscribe()
func (*ShellyDevice) Toggle ¶
func (e *ShellyDevice) Toggle() error
func (*ShellyDevice) TurnOff ¶
func (e *ShellyDevice) TurnOff() error
func (*ShellyDevice) TurnOn ¶
func (e *ShellyDevice) TurnOn() error
func (*ShellyDevice) Unsubscribe ¶ added in v0.1.7
func (e *ShellyDevice) Unsubscribe()
Click to show internal directories.
Click to hide internal directories.