Documentation ¶
Overview ¶
Package daikin provides functionality to interact with Daikin split system air conditioners equipped with a Wifi module. It is tested to work with the BRP072A42 Wifi interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddressOption ¶
func AddressOption(addr string) func(*DaikinNetwork)
AddressOption specifies a specific address to query.
func InterfaceOption ¶
func InterfaceOption(i string) func(*DaikinNetwork)
InterfaceOption configures a specific interface to scan on.
Types ¶
type ControlInfo ¶
type ControlInfo struct { // Power is the current power status of the unit. Power Power // Mode is the operating mode of the unit. Mode Mode // Fan is the fan speed of the unit. Fan Fan // FanDir is the fan louvre setting of the unit. FanDir FanDir // Temperature is the current set temperature of the unit. Temperature Temperature // Humidity is the set humidity of the unit. Humidity Humidity }
ControlInfo represents the control status of the unit.
func (*ControlInfo) String ¶
func (c *ControlInfo) String() string
type Daikin ¶
type Daikin struct { // Address is the IP address of the unit. Address string // Name is the human-readable name of the unit. Name Name // ControlInfo contains the environment control info. ControlInfo *ControlInfo // SensorInfo contains the environment sensor info. SensorInfo *SensorInfo }
Daikin represents the settings of the Daikin unit.
func (*Daikin) GetControlInfo ¶
GetControlInfo gets the current control settings for the unit.
func (*Daikin) GetSensorInfo ¶
GetSensorInfo gets the current sensor values for the unit.
func (*Daikin) SetControlInfo ¶
Set configures the current setting to the unit.
type DaikinNetwork ¶
type DaikinNetwork struct { // Interface is the name of the local network interface. Interface string // PollInterval is the interval to poll for Daikin devices. PollInterval time.Duration // PollCount is the number of times to poll for Daikin devices. PollCount int // Devices are the Daikin devices found on the DaikinNetwork. Devices map[string]*Daikin // contains filtered or unexported fields }
A DaikinNetwork represents a local network with Daikin device(s).
func NewNetwork ¶
func NewNetwork(o ...Option) (*DaikinNetwork, error)
NewNetwork returns a new DaikinNetwork, attached to the given interface.
func (*DaikinNetwork) Discover ¶
func (d *DaikinNetwork) Discover() error
Discover runs a UDP polling cycle for Daikin devices. Sends UDP packet to broadcast address, dst port 30050 with payload: DAIKIN_UDP/common/basic_info
type Fan ¶
type Fan string
Fan is the fan speed of the Daikin unit.
type FanDir ¶
type FanDir int
FanDir is the louvre swing setting of the Daikin unit.
type Mode ¶
type Mode int
Mode is the operating mode of the Daikin unit.
type SensorInfo ¶
type SensorInfo struct { // HomeTemperature is the home (interior) temperature. HomeTemperature Temperature // OutsideTemperature is the external temperature. OutsideTemperature Temperature // Humidity is the current interior humidity. Humidity Humidity }
SensorInfo represents current sensor values.
func (*SensorInfo) String ¶
func (s *SensorInfo) String() string
type Temperature ¶
type Temperature float64
Temperature is the set temperature of the Daikin unit, in Celcius.
func (*Temperature) String ¶
func (t *Temperature) String() string