|
@@ -50,6 +50,10 @@ type DeviceService interface {
|
|
SetOutdoorPower(params models.SendCommandParams) error
|
|
SetOutdoorPower(params models.SendCommandParams) error
|
|
// SetOutdoorTemp 设置水系统外机出水温度
|
|
// SetOutdoorTemp 设置水系统外机出水温度
|
|
SetOutdoorTemp(params models.SendCommandParams) error
|
|
SetOutdoorTemp(params models.SendCommandParams) error
|
|
|
|
+ // SetOutdoorLinkage 开启/关闭水系统联动
|
|
|
|
+ SetOutdoorLinkage(params models.SendCommandParams) error
|
|
|
|
+ // SetMixedWaterLinkage 开启/关闭调温中心联动
|
|
|
|
+ SetMixedWaterLinkage(params models.SendCommandParams) error
|
|
}
|
|
}
|
|
|
|
|
|
type deviceservice struct {
|
|
type deviceservice struct {
|
|
@@ -327,6 +331,28 @@ func (a deviceservice) SetOutdoorTemp(params models.SendCommandParams) error {
|
|
return a.sendCommand(args)
|
|
return a.sendCommand(args)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// SetOutdoorLinkage 开启/关闭水系统联动
|
|
|
|
+func (a deviceservice) SetOutdoorLinkage(params models.SendCommandParams) error {
|
|
|
|
+ var args rpcs.ArgsSendCommand
|
|
|
|
+ args.DeviceId = params.DeviceId
|
|
|
|
+ args.Cmd = string(models.SetOutdoorTemp)
|
|
|
|
+ args.Params = map[string]interface{}{
|
|
|
|
+ "enable": params.Enable,
|
|
|
|
+ }
|
|
|
|
+ return a.sendCommand(args)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// SetMixedWaterLinkage 开启/关闭调温中心联动
|
|
|
|
+func (a deviceservice) SetMixedWaterLinkage(params models.SendCommandParams) error {
|
|
|
|
+ var args rpcs.ArgsSendCommand
|
|
|
|
+ args.DeviceId = params.DeviceId
|
|
|
|
+ args.Cmd = string(models.SetOutdoorTemp)
|
|
|
|
+ args.Params = map[string]interface{}{
|
|
|
|
+ "enable": params.Enable,
|
|
|
|
+ }
|
|
|
|
+ return a.sendCommand(args)
|
|
|
|
+}
|
|
|
|
+
|
|
// SendCommand 下发指令
|
|
// SendCommand 下发指令
|
|
func (a deviceservice) sendCommand(args rpcs.ArgsSendCommand) error {
|
|
func (a deviceservice) sendCommand(args rpcs.ArgsSendCommand) error {
|
|
var reply rpcs.ReplySendCommand
|
|
var reply rpcs.ReplySendCommand
|