| | |
| | | Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/irCodeStudyDone/up", |
| | | QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce |
| | | }; |
| | | //App订阅群控状态主题 |
| | | var groupControlStatus = new MqttTopicFilter() |
| | | { |
| | | Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/device/group/control/property/send", |
| | | QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce |
| | | }; |
| | | |
| | | |
| | | #region 数据更新推送主题 |
| | |
| | | topicFilterPush2, topicAlinkStatus ,mqttkeyChange, |
| | | deviceOnlinePush, |
| | | securityStatusChange}); |
| | | //订阅群控状态 |
| | | if (DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl) |
| | | { |
| | | await RemoteMqttClient.SubscribeAsync(groupControlStatus); |
| | | } |
| | | if (result.Items[0].ResultCode == MQTTnet.Client.Subscribing.MqttClientSubscribeResultCode.GrantedQoS0) |
| | | { |
| | | isSubscribeSuccess = true; |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | //群控状态 |
| | | else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/device/group/control/property/send") |
| | | { |
| | | var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey); |
| | | var revString = Encoding.UTF8.GetString(bytes); |
| | | MainPage.Log($"mqtt 群控状态更新:{revString}"); |
| | | Control.Ins.UpdataGroupControlStatus(revString, null, true); |
| | | } |
| | | //A网关设备状态-包含涂鸦设备 |
| | | //Tag 网络状态解析 |
| | | else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/property/send") |
| | | { |
| | | |
| | | var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey); |
| | | var revString = Encoding.UTF8.GetString(bytes); |
| | | MainPage.Log($"mqtt 状态更新:{revString}"); |