Documentation ¶
Index ¶
- type Tasmota
- type TasmotaDevice
- func (d *TasmotaDevice) AddMsgReceivedFunc(topic string, f func(payload []byte))
- func (e *TasmotaDevice) IsOn() bool
- func (d *TasmotaDevice) SetBrightness(brightness float32) error
- func (e *TasmotaDevice) SetColorTemp(ct float32) error
- func (d *TasmotaDevice) SetHSB(hue float32, saturation float32, brightness float32) error
- func (d *TasmotaDevice) SetHue(hue float32) error
- func (d *TasmotaDevice) SetSaturation(saturation float32) error
- func (d *TasmotaDevice) SetWhite(white float32) error
- func (e *TasmotaDevice) Toggle() error
- func (e *TasmotaDevice) TurnOff() error
- func (e *TasmotaDevice) TurnOn() error
- type TasmotaResultMsg
- type TasmotaTeleMsg
- type TasmotaTeleSI721Msg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tasmota ¶
type Tasmota struct {
// contains filtered or unexported fields
}
func NewTasmota ¶
func (*Tasmota) SetDeviceDiscoveredHandler ¶
func (s *Tasmota) SetDeviceDiscoveredHandler(f func(*TasmotaDevice))
Set the function that get called when a new Deconz Device is discovered
func (*Tasmota) StartDiscovery ¶
func (s *Tasmota) StartDiscovery()
func (*Tasmota) StopDiscovery ¶
func (s *Tasmota) StopDiscovery()
type TasmotaDevice ¶
type TasmotaDevice struct { IPAddress string `json:"ip,omitempty"` DeviceName string `json:"dn,omitempty"` FriendlyName []string `json:"fn,omitempty"` Hostname string `json:"hn,omitempty"` MACAddress string `json:"mac,omitempty"` Module string `json:"md,omitempty"` TuyaMCUFlag int `json:"ty,omitempty"` IFAN int `json:"if,omitempty"` DOffline string `json:"ofln,omitempty"` DOnline string `json:"onln,omitempty"` State []string `json:"st,omitempty"` SoftwareVersion string `json:"sw,omitempty"` Topic string `json:"t,omitempty"` Fulltopic string `json:"ft,omitempty"` TopicPrefix []string `json:"tp,omitempty"` Relays []int `json:"rl,omitempty"` Switches []int `json:"swc,omitempty"` SWN []int `json:"swn,omitempty"` Buttons []int `json:"btn,omitempty"` SetOptions map[string]int `json:"so,omitempty"` LK int `json:"lk,omitempty"` // LightColor (LC) and RGB LinKed https://github.com/arendst/Tasmota/blob/development/tasmota/xdrv_04_light.ino#L689 LightSubtype int `json:"lt_st,omitempty"` // https://github.com/arendst/Tasmota/blob/development/tasmota/xdrv_04_light.ino ShutterOptions []int `json:"sho,omitempty"` Version int `json:"ver,omitempty"` LastResultMessage TasmotaResultMsg LastTeleMessame TasmotaTeleMsg PowerState bool // contains filtered or unexported fields }
func (*TasmotaDevice) AddMsgReceivedFunc ¶
func (d *TasmotaDevice) 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 (*TasmotaDevice) IsOn ¶
func (e *TasmotaDevice) IsOn() bool
func (*TasmotaDevice) SetBrightness ¶
func (d *TasmotaDevice) SetBrightness(brightness float32) error
func (*TasmotaDevice) SetColorTemp ¶
func (e *TasmotaDevice) SetColorTemp(ct float32) error
func (*TasmotaDevice) SetHSB ¶
func (d *TasmotaDevice) SetHSB(hue float32, saturation float32, brightness float32) error
func (*TasmotaDevice) SetHue ¶
func (d *TasmotaDevice) SetHue(hue float32) error
func (*TasmotaDevice) SetSaturation ¶
func (d *TasmotaDevice) SetSaturation(saturation float32) error
func (*TasmotaDevice) SetWhite ¶
func (d *TasmotaDevice) SetWhite(white float32) error
func (*TasmotaDevice) Toggle ¶
func (e *TasmotaDevice) Toggle() error
func (*TasmotaDevice) TurnOff ¶
func (e *TasmotaDevice) TurnOff() error
func (*TasmotaDevice) TurnOn ¶
func (e *TasmotaDevice) TurnOn() error
type TasmotaResultMsg ¶
type TasmotaResultMsg struct { Power1 string `json:"POWER1,omitempty"` Power string `json:"POWER,omitempty"` Dimmer int `json:"Dimmer,omitempty"` Color string `json:"Color,omitempty"` HSBCOlor string `json:"HSBColor,omitempty"` White int `json:"White,omitempty"` Channel []int `json:"Channel,omitempty"` }
type TasmotaTeleMsg ¶
type TasmotaTeleMsg struct { Time string `json:"time,omitempty"` TempUnit string `json:"TempUnit,omitempty"` SI7021 TasmotaTeleSI721Msg `json:"SI7021,omitempty"` }
type TasmotaTeleSI721Msg ¶
Click to show internal directories.
Click to hide internal directories.