| | |
| | | //安防状态变化 |
| | | else if (topic == $"/user/{MqttInfoConfig.Current.HomeGatewayInfo.gatewayId}/custom/security/status/up") |
| | | { |
| | | MainPage.Log($"安防状态变化"); |
| | | if (!string.IsNullOrEmpty(DB_ResidenceData.Instance.HomeGateway.aesKey)) |
| | | { |
| | | var securityBytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, DB_ResidenceData.Instance.HomeGateway.aesKey); |
| | | var securityString = Encoding.UTF8.GetString(securityBytes); |
| | | var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<SecurityStatusObj>(securityString); |
| | | MainPage.Log($"安防状态变化:{securityString}"); |
| | | |
| | | if (temp != null) |
| | | { |
| | |
| | | if (updataLocalSecurity != null) |
| | | { |
| | | updataLocalSecurity.status = updataSecurity.status; |
| | | updataLocalSecurity.alarm = updataSecurity.alarm; |
| | | } |
| | | } |
| | | HomePage.LoadEvent_RefreshSecurityStatus(); |