123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- package schema
- type SetPowerReq struct {
- Power int `json:"power" v:"required|in:1,2"` // 1:开机0:关机
- }
- type SetModeReq struct {
- Mode uint16 `json:"mode" v:"required|between:0,4"` // 模式(0:制冷1:制热 2:除湿 3:送风 4:加湿)
- }
- type SetNewFanReq struct {
- Mode uint16 `json:"mode" v:"required|between:1,2"` // 新风阀模式(1通风模式 2新风模式)
- }
- type SetSleepModeReq struct {
- Mode uint16 `json:"mode" v:"required|between:0,3"` // 睡眠模式(0:无睡眠 1:睡眠1 2:睡眠2 3:睡眠3)
- }
- type FanSpeedReq struct {
- Speed uint16 `json:"temp" v:"required|between:0,6"` // 风速设置((0:自动; 1:1档; 2:2 档; 3: 3 档; 4:4 档; 5: 5 档; 6:超强档;))
- }
- type FanValveReq struct {
- FanValve string `json:"fan_valve" v:"required"`
- Value uint16 `json:"value" v:"required|between:0,90"` // 风阀开度设置(0-90)
- }
- type SetTempReq struct {
- Temp uint16 `json:"temp" v:"required|between:16,30"` // 温度值(16-30)
- }
- type SetValvePowerReq struct {
- Valve1 uint16 `json:"valve1"`
- Valve2 uint16 `json:"valve2"`
- Valve3 uint16 `json:"valve3"`
- Valve4 uint16 `json:"valve4"`
- Valve5 uint16 `json:"valve5"`
- }
- type StatusResponse struct {
- Power int `json:"power"` // 开机关状态
- Mode uint16 `json:"mode"` // 设置模式
- NewFan uint16 `json:"new_fan"` // 新风开关
- FanSpeed uint16 `json:"fan_speed"` // 设定风速
- SetTemp uint16 `json:"set_temp"` // 设置温度
- Temperature uint16 `json:"temperature"` // 温度
- Humidity uint16 `json:"humidity"` // 湿度
- AirQuality uint16 `json:"air_quality"` // pm25
- CO2 uint16 `json:"co2"` // co2
- FanGateOne int `json:"fan_gate_one"` // 风阀1 状态
- FanGateTwo int `json:"fan_gate_two"` // 风阀2 状态
- FanGateThree int `json:"fan_gate_three"` // 风阀3 状态
- FanGateFour int `json:"fan_gate_four"` // 风阀4 状态
- FanGateFive int `json:"fan_gate_five"` // 风阀5 状态
- FanGateOneLevel uint16 `json:"fan_gate_one_level"` // 风阀1 开度
- FanGateTwoLevel uint16 `json:"fan_gate_two_level"` // 风阀2 开度
- FanGateThreeLevel uint16 `json:"fan_gate_three_level"` // 风阀3 开度
- FanGateFourLevel uint16 `json:"fan_gate_four_level"` // 风阀4 开度
- FanGateFiveLevel uint16 `json:"fan_gate_five_level"` // 风阀5 开度
- }
|