|
@@ -57,7 +57,6 @@ func (a *Access) GetStatus(args rpcs.ArgsGetStatus, reply *rpcs.ReplyGetStatus)
|
|
|
}
|
|
|
|
|
|
func (a *Access) SendCommand(args rpcs.ArgsSendCommand, reply *rpcs.ReplySendCommand) error {
|
|
|
- server.Log.Infof("Access Send Command: %v, %v", args.DeviceId, args.Cmd)
|
|
|
cmd := &klink.CloudSend{
|
|
|
Action: "cloudSend",
|
|
|
MsgId: 0,
|
|
@@ -73,6 +72,8 @@ func (a *Access) SendCommand(args rpcs.ArgsSendCommand, reply *rpcs.ReplySendCom
|
|
|
if err != nil {
|
|
|
return err
|
|
|
}
|
|
|
+ print("Access Send Command: %v, %v,%s\r\n", args.DeviceId, args.Cmd, string(msg))
|
|
|
+
|
|
|
return a.MqttBroker.SendMessageToDevice(args.DeviceId, "c", msg, time.Duration(args.WaitTime)*time.Second)
|
|
|
}
|
|
|
|