Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PowerOn = Power{"On", "1"} PowerOff = Power{"Off", "0"} )
View Source
var ( FanAuto = Fan{"FAuto", "A"} FanF1 = Fan{"Fun1", "3"} FanF2 = Fan{"Fun2", "4"} FanF3 = Fan{"Fun3", "5"} FanF4 = Fan{"Fun4", "6"} FanF5 = Fan{"Fun5", "7"} FanNone = Fan{"FunNone", "B"} )
View Source
var ( FanDirectionOff = FanDirection{"Off", ""} FanDirectionNone = FanDirection{"None", "0"} FanDirectionVertical = FanDirection{"Ud", "1"} FanDirectionHorizontal = FanDirection{unsupported, "2"} FanDirectionVerticalAndHorizontal = FanDirection{unsupported, "3"} )
View Source
var ( // only these options are available for wireless daikins ModeAuto = Mode{"Auto", "0"} ModeDry = Mode{"Dry", "2"} ModeCool = Mode{"Cool", "3"} ModeHeat = Mode{"Heat", "4"} ModeFan = Mode{"Fan", "6"} // the non-wireless daikins also support the following: ModeOnlyFun = Mode{"OnlyFun", unsupported} ModeNight = Mode{"Night", unsupported} ModeNone = Mode{"None", ""} )
Functions ¶
func NewWirelessAC ¶
func NewWirelessAC(host string) *wirelessAC
Types ¶
type AC ¶
type AC interface { AutoRefresh(interval time.Duration) BasicInfo() *BasicInfo RefreshBasicInfo() (*BasicInfo, error) SendState() error RefreshState() (*ControlState, *SensorState, error) ControlState() *ControlState SensorState() *SensorState OnStateUpdate() chan ACState }
type ACState ¶
type ACState struct { ControlState SensorState }
type BasicInfo ¶
type BasicInfo struct { Ret string Type string Reg string Dst int Ver string Pow int Err int Location int Name string Icon int Method string Port int Id string Pw string LpwFlag int AdpKind int Pv int Cpv int Led int EnSetzone int Mac string AdpMode string UDPAddress net.UDPAddr HTTPAddress net.TCPAddr }
type ControlState ¶
type ControlState struct { Power Power TargetTemperature float64 TargetHumidity int Mode Mode Fan Fan FanDirection FanDirection Timer Timer }
func (*ControlState) GetWirelessValues ¶
func (s *ControlState) GetWirelessValues() url.Values
func (*ControlState) ParseWirelessValues ¶
func (s *ControlState) ParseWirelessValues(values url.Values) error
type FanDirection ¶
type FanDirection command
type SensorState ¶
type SensorState struct { // sensor info InsideTemperature float64 InsideHumidity int OutsideTemperature float64 }
func (*SensorState) GetWirelessValues ¶
func (s *SensorState) GetWirelessValues() url.Values
func (*SensorState) ParseWirelessValues ¶
func (s *SensorState) ParseWirelessValues(values url.Values)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.