| | |
| | | //如果住宅为虚拟住宅
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | //修改设备名字的话,主页需要重新刷新
|
| | | Phone.UserView.UserPage.Instance.RefreshForm = true;
|
| | | return true;
|
| | | }
|
| | |
|
| | |
| | | //备份数据
|
| | | await HdlGatewayLogic.Current.UpLoadDeviceBackupDataToGateway(device, GatewayBackupEnum.A端点名称, newName);
|
| | | }
|
| | | //修改设备名字的话,主页需要重新刷新
|
| | | Phone.UserView.UserPage.Instance.RefreshForm = true;
|
| | | return true;
|
| | | }
|
| | |
|
| | |
| | | mainDevice.InClusterList.AddRange(device.DeviceInfo.InClusterList);
|
| | | mainDevice.OutClusterList.Clear();
|
| | | mainDevice.OutClusterList.AddRange(device.DeviceInfo.OutClusterList);
|
| | | mainDevice.AttributeStatus.Clear();
|
| | | mainDevice.AttributeStatus.AddRange(device.DeviceInfo.AttributeStatus);
|
| | |
|
| | | //如果是温度传感器
|
| | | if (mainDevice.Type == DeviceType.TemperatureSensor)
|
| | |
| | | public void SetNewDeviceMainKeys(CommonDevice device, Newtonsoft.Json.Linq.JObject jobject)
|
| | | {
|
| | | //设置设备主键类
|
| | | device.Time = jobject.Value<int>("Time");
|
| | | device.DeviceID = jobject.Value<int>("Device_ID");
|
| | | device.DeviceAddr = jobject.Value<string>("DeviceAddr");
|
| | | device.DeviceEpoint = jobject.Value<int>("Epoint");
|
| | | device.DataID = jobject.Value<int>("Data_ID");
|
| | | }
|
| | |
|
| | | #endregion
|