Documentation
¶
Index ¶
- type Active
- type Battery
- type Brightness
- type Calibration
- type ChildInstanceService
- type ChildInstances
- type ColorTemp
- type CurrentState
- type Curtain
- type Detected
- type Direction
- type GatewayServices
- type HeaterCooler
- type HeaterCoolerState
- type Hue
- type Humidity
- type HumiditySensor
- type InUse
- type Info
- type IsChildInstance
- type LeakDetected
- type LightBulb
- type Limit
- type Lock
- type LockTargetState
- type Logs
- type MotionSensor
- type Outlet
- type Position
- type RGB
- type RotationSpeed
- type Saturation
- type SecuritySystem
- type State
- type StatelessSwitch
- type Style
- type SwingMode
- type Switch
- type SwitchEvent
- type TargetState
- type TempHumiditySensor
- type Temperature
- type WaterLeakSensor
- type WindowDoorClose
- type WindowDoorSensor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Brightness ¶
func NewBrightness ¶
func NewBrightness() *Brightness
type Calibration ¶ added in v1.9.1
func NewCalibration ¶ added in v1.9.1
func NewCalibration() *Calibration
type ChildInstanceService ¶ added in v1.9.1
ChildInstanceService 子设备服务
type ChildInstances ¶ added in v1.9.1
type ChildInstances struct {
Instances []interface{}
}
ChildInstances 子设备
func (ChildInstances) InstanceName ¶ added in v1.9.1
func (c ChildInstances) InstanceName() string
type ColorTemp ¶
func NewColorTemp ¶
func NewColorTemp() *ColorTemp
type CurrentState ¶ added in v1.5.0
CurrentState 当前状态
func NewCurrentState ¶ added in v1.5.0
func NewCurrentState() *CurrentState
type Curtain ¶
type Curtain struct { CurrentPosition *Position `tag:"required"` // 当前位置 0-100 TODO 不可写字段 TargetPosition *Position `tag:"required"` // 目标位置 0-100 State *State `tag:"required"` // 0关1开2暂停 Style *Style // 0左右1左开2右开3上下 // TODO 考虑窗帘和窗帘控制器分开定义 Direction *Direction // 0默认方向1反方向 UpperLimit *Limit // 0删除1设置 LowerLimit *Limit // 0删除1设置 Calibration *Calibration // 校准 true为进行校准/已经校准完 false为未校准 }
Curtain 窗帘
func (Curtain) InstanceName ¶
type GatewayServices ¶ added in v1.9.1
type GatewayServices struct {
Services []interface{}
}
func (GatewayServices) InstanceName ¶ added in v1.9.1
func (s GatewayServices) InstanceName() string
type HeaterCooler ¶ added in v1.9.1
type HeaterCooler struct { Active *Active CurrentTemperature *Temperature // 当前温度 CoolingThresholdTemperature *Temperature // 冷却阈值温度 HeatingThresholdTemperature *Temperature // 加热阈值温度 CurrentHeaterCoolerState *HeaterCoolerState // 当前加热器冷却器状态,1 空闲,2 加热,3 冷却 TargetHeaterCoolerState *HeaterCoolerState // 当前加热器冷却器状态,1 加热,2 冷却 RotationSpeed *RotationSpeed // 风扇旋转速度,0-100,step 25 SwingMode *SwingMode // 摆动模式,0 不摆动,1 摆动 }
HeaterCooler 加热冷却
type HeaterCoolerState ¶ added in v1.9.1
HeaterCoolerState 加热冷却器的当前状态 0“无效”“1”空闲”“2”加热“3”冷却
func NewHeaterCoolerState ¶ added in v1.9.1
func NewHeaterCoolerState() *HeaterCoolerState
type Humidity ¶ added in v1.5.0
Humidity 湿度
func NewHumidity ¶ added in v1.5.0
func NewHumidity() *Humidity
type HumiditySensor ¶ added in v1.9.1
type HumiditySensor struct {
CurrentRelativeHumidity *Humidity
}
HumiditySensor 湿度
type Info ¶
type Info struct { Name *attribute.Name Identity *attribute.Identity `tag:"required"` Model *attribute.Model `tag:"required"` Manufacturer *attribute.Manufacturer `tag:"required"` Version *attribute.Version }
func (Info) InstanceName ¶
type IsChildInstance ¶ added in v1.9.1
IsChildInstance 是否子设备
func NewIsChildInstance ¶ added in v1.9.1
func NewIsChildInstance() *IsChildInstance
type LeakDetected ¶ added in v1.5.0
LeakDetected 0:表示未检测到水浸 1:表示检测到水浸
func NewLeakDetected ¶ added in v1.5.0
func NewLeakDetected() *LeakDetected
type LightBulb ¶
type LightBulb struct { Power *attribute.Power `tag:"required"` ColorTemp *ColorTemp Brightness *Brightness Hue *Hue Saturation *Saturation RGB *RGB }
func (LightBulb) InstanceName ¶
type Lock ¶ added in v1.9.1
type Lock struct { LockTargetState *LockTargetState Logs *Logs Battery *Battery }
Lock 智能门锁
type LockTargetState ¶ added in v1.9.1
LockTargetState 锁的目标状态
func NewLockTargetState ¶ added in v1.9.1
func NewLockTargetState() *LockTargetState
type MotionSensor ¶ added in v1.5.0
type MotionSensor struct { IsChildInstance *IsChildInstance Name *attribute.Name Model *attribute.Model Manufacturer *attribute.Manufacturer Version *attribute.Version Detected *Detected Battery *Battery }
MotionSensor 人体传感器
func (MotionSensor) InstanceName ¶ added in v1.5.0
func (w MotionSensor) InstanceName() string
type Outlet ¶
func (Outlet) InstanceName ¶
type RotationSpeed ¶ added in v1.9.1
RotationSpeed 风扇旋转速度
func NewRotationSpeed ¶ added in v1.9.1
func NewRotationSpeed() *RotationSpeed
type Saturation ¶
func NewSaturation ¶
func NewSaturation() *Saturation
type SecuritySystem ¶ added in v1.5.0
type SecuritySystem struct { TargetState *TargetState CurrentState *CurrentState }
SecuritySystem 安全系统
func (SecuritySystem) InstanceName ¶ added in v1.5.0
func (w SecuritySystem) InstanceName() string
type StatelessSwitch ¶ added in v1.9.1
type StatelessSwitch struct { IsChildInstance *IsChildInstance Name *attribute.Name Model *attribute.Model Manufacturer *attribute.Manufacturer Version *attribute.Version SwitchEvent *SwitchEvent Battery *Battery }
StatelessSwitch 无状态开关
func (StatelessSwitch) InstanceName ¶ added in v1.9.1
func (s StatelessSwitch) InstanceName() string
type SwingMode ¶ added in v1.9.1
SwingMode 摆动模式,0 不摆动,1 摆动
func NewSwingMode ¶ added in v1.9.1
func NewSwingMode() *SwingMode
type Switch ¶
func (Switch) InstanceName ¶
type SwitchEvent ¶ added in v1.9.1
SwitchEvent 开关事件
func NewSwitchEvent ¶ added in v1.9.1
func NewSwitchEvent() *SwitchEvent
type TargetState ¶ added in v1.5.0
TargetState 目标状态
func NewTargetState ¶ added in v1.5.0
func NewTargetState() *TargetState
type TempHumiditySensor ¶ added in v1.5.0
type TempHumiditySensor struct { IsChildInstance *IsChildInstance Name *attribute.Name Model *attribute.Model Manufacturer *attribute.Manufacturer Version *attribute.Version Temperature *Temperature Humidity *Humidity Battery *Battery }
TempHumiditySensor 温湿度传感器
func (TempHumiditySensor) InstanceName ¶ added in v1.5.0
func (w TempHumiditySensor) InstanceName() string
type Temperature ¶ added in v1.5.0
Temperature 温度
func NewTemperature ¶ added in v1.5.0
func NewTemperature() *Temperature
type WaterLeakSensor ¶ added in v1.5.0
type WaterLeakSensor struct { IsChildInstance *IsChildInstance Name *attribute.Name Model *attribute.Model Manufacturer *attribute.Manufacturer Version *attribute.Version LeakDetected *LeakDetected Battery *Battery }
WaterLeakSensor 水浸传感器
func (WaterLeakSensor) InstanceName ¶ added in v1.5.0
func (w WaterLeakSensor) InstanceName() string
type WindowDoorClose ¶ added in v1.5.0
func NewWindowDoorClose ¶ added in v1.5.0
func NewWindowDoorClose() *WindowDoorClose
type WindowDoorSensor ¶ added in v1.5.0
type WindowDoorSensor struct { IsChildInstance *IsChildInstance Name *attribute.Name Model *attribute.Model Manufacturer *attribute.Manufacturer Version *attribute.Version WindowDoorClose *WindowDoorClose Battery *Battery }
WindowDoorSensor 门窗传感器
func (WindowDoorSensor) InstanceName ¶ added in v1.5.0
func (w WindowDoorSensor) InstanceName() string
Click to show internal directories.
Click to hide internal directories.