|
@@ -71,7 +71,7 @@ func (a *Access) processStatus(topicInfo *protocol.TopicInfo, vendorId string, m
|
|
if act != "" {
|
|
if act != "" {
|
|
switch act {
|
|
switch act {
|
|
case klink.DevSendAction:
|
|
case klink.DevSendAction:
|
|
- processReportStatus(topicInfo.DeviceCode, vendorId, message)
|
|
|
|
|
|
+ processReportStatus(topicInfo, vendorId, message)
|
|
case klink.DevLoginAction:
|
|
case klink.DevLoginAction:
|
|
_ = processDevLogin(topicInfo.DeviceCode, message.GetString("subDeviceId"))
|
|
_ = processDevLogin(topicInfo.DeviceCode, message.GetString("subDeviceId"))
|
|
case klink.DevLogoutAction:
|
|
case klink.DevLogoutAction:
|
|
@@ -140,13 +140,14 @@ func processDeviceReportUpgrade(deviceId, version string) error {
|
|
}
|
|
}
|
|
return nil
|
|
return nil
|
|
}
|
|
}
|
|
-func processReportStatus(deviceid, vendorId string, message *gjson.Json) {
|
|
|
|
|
|
+func processReportStatus(topicInfo *protocol.TopicInfo, vendorId string, message *gjson.Json) {
|
|
reply := rpcs.ReplyOnStatus{}
|
|
reply := rpcs.ReplyOnStatus{}
|
|
args := rpcs.ArgsOnStatus{
|
|
args := rpcs.ArgsOnStatus{
|
|
- DeviceId: deviceid,
|
|
|
|
|
|
+ DeviceId: topicInfo.DeviceCode,
|
|
Timestamp: message.GetUint64("timestamp"),
|
|
Timestamp: message.GetUint64("timestamp"),
|
|
SubData: message.GetJson("data").MustToJson(),
|
|
SubData: message.GetJson("data").MustToJson(),
|
|
VendorId: vendorId,
|
|
VendorId: vendorId,
|
|
|
|
+ ProductKey: topicInfo.ProductKey,
|
|
SubDeviceId: message.GetString("subDeviceId"),
|
|
SubDeviceId: message.GetString("subDeviceId"),
|
|
Action: klink.PacketAction(message.GetString("action")),
|
|
Action: klink.PacketAction(message.GetString("action")),
|
|
}
|
|
}
|