liuxiulin 8 months ago
parent
commit
1953baf464
2 changed files with 6 additions and 0 deletions
  1. 2 0
      pkg/protocol/topic.go
  2. 4 0
      services/knowoapi/services/device.go

+ 2 - 0
pkg/protocol/topic.go

@@ -53,6 +53,8 @@ const (
 	Ext              = "ext"
 	TopicHeadEvent   = "$event"
 	EventTopic       = "event"
+	TopicHeadInfo    = "$info"
+	Info             = "info"
 )
 
 type Direction int

+ 4 - 0
services/knowoapi/services/device.go

@@ -278,6 +278,10 @@ func (a deviceservice) SetFjsqStatus(params models.SendCommandParams) error {
 	var args rpcs.ArgsSendCommand
 	args.DeviceId = params.DeviceId
 	args.Cmd = string(models.SetFjsqStatus)
+	args.Params = map[string]interface{}{
+		"num":   params.Num,
+		"power": params.NumPower,
+	}
 	return a.sendCommand(args)
 }