From 23420922845c9e77019a55c3b3e3271eb1ec261e Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 13 七月 2020 11:42:18 +0800
Subject: [PATCH] 新版本
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs | 39 ++++++++++++++++++++++++++++++++-------
1 files changed, 32 insertions(+), 7 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs
index 6a0fd93..a73caea 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs
@@ -58,6 +58,8 @@
this.InitDeviceData();
//鍒濆鍖栧満鏅�
this.InitSceneData();
+ //鍒锋柊宸﹁竟鍒锋柊鎴块棿瑙嗗浘鍒楄〃
+ HdlRoomLogic.Current.RefreshRoomListView();
}
#endregion
@@ -104,7 +106,10 @@
house.IsVirtually = true;
house.Save(false);
Config.Instance.HomeId = house.Id;
- Config.Instance.Home = House.GetHouseByHouseId(house.Id);
+ Config.Instance.Home = HdlResidenceLogic.Current.GetHouseByHouseId(house.Id);
+
+ //棰勫垱寤轰釜浜轰腑蹇冨叏閮ㄧ殑鏂囦欢澶�
+ HdlFileLogic.Current.CreatAllUserCenterDirectory();
}
#endregion
@@ -163,8 +168,6 @@
var listFloorKey = this.GetAllFloorKeys();
var dicRoomName = this.GetRoomSampleList();
- //璁剧疆鍒濆妤煎眰
- Config.Instance.Home.CurrentFloorId = listFloorKey[0];
foreach (string floorKey in listFloorKey)
{
foreach (string roomId in dicRoomName.Keys)
@@ -561,6 +564,7 @@
//1涓紶鎰熷櫒
var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
device.IasDeviceType = 13;
+ device.DeviceID = 1026;
//璁剧疆璁惧鐨勫熀鏈俊鎭�
this.SetBaseDataToDevice(device, 1200, 1200, "MSPIR01-ZB.10", i_RoomId);
@@ -581,6 +585,7 @@
{
var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
device.IasDeviceType = 43;
+ device.DeviceID = 1026;
//璁剧疆璁惧鐨勫熀鏈俊鎭�
this.SetBaseDataToDevice(device, 1300, 1300, "MSG01/M-ZB.10", i_RoomId);
@@ -594,6 +599,7 @@
{
var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
device.IasDeviceType = 43;
+ device.DeviceID = 1026;
//璁剧疆璁惧鐨勫熀鏈俊鎭�
this.SetBaseDataToDevice(device, 1300, 1300, "MGCD01/ZB.10", i_RoomId);
@@ -607,6 +613,7 @@
{
var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
device.IasDeviceType = 21;
+ device.DeviceID = 1026;
//璁剧疆璁惧鐨勫熀鏈俊鎭�
this.SetBaseDataToDevice(device, 1301, 1301, "MSDC01/M-ZB.10", i_RoomId);
@@ -620,6 +627,7 @@
{
var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
device.IasDeviceType = 40;
+ device.DeviceID = 1026;
//璁剧疆璁惧鐨勫熀鏈俊鎭�
this.SetBaseDataToDevice(device, 1301, 1301, "MSS01/M-ZB.10", i_RoomId);
@@ -633,6 +641,7 @@
{
var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
device.IasDeviceType = 13;
+ device.DeviceID = 1026;
//璁剧疆璁惧鐨勫熀鏈俊鎭�
this.SetBaseDataToDevice(device, 1303, 1303, "MSPIR01/M-ZB.10", i_RoomId);
@@ -646,6 +655,7 @@
{
var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
device.IasDeviceType = 42;
+ device.DeviceID = 1026;
//璁剧疆璁惧鐨勫熀鏈俊鎭�
this.SetBaseDataToDevice(device, 1304, 1304, "MSW01/M-ZB.10", i_RoomId);
@@ -659,6 +669,7 @@
{
var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
device.IasDeviceType = 44;
+ device.DeviceID = 1026;
//璁剧疆璁惧鐨勫熀鏈俊鎭�
this.SetBaseDataToDevice(device, 1305, 1305, "MBU01/M-ZB.10", i_RoomId);
@@ -703,8 +714,8 @@
this.SetBaseDataToDevice(device, 2300, 2300, "MPD0101-ZB.10", i_RoomId);
}
- //1涓户鐢靛櫒
- var device2 = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 8 };
+ //1涓皟鍏夊櫒
+ var device2 = new DimmableLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 8 };
device2.DfunctionType = DeviceFunctionType.A鐏厜;
//璁剧疆璁惧鐨勫熀鏈俊鎭�
this.SetBaseDataToDevice(device2, 2300, 2300, "MPD0101-ZB.10", i_RoomId);
@@ -901,10 +912,24 @@
device.ModelIdentifier = ModelIdentifier;
device.CurrentGateWayId = string.Empty;
- //榛樿姣忎釜璁惧閮藉彲浠ュ畾浣�
+ //榛樿姣忎釜璁惧閮藉彲浠ュ畾浣�,鎷ユ湁寮�鍏冲姛鑳�
device.InClusterList.Add(new CommonDevice.InClusterObj { InCluster = 3 });
device.OutClusterList.Add(new CommonDevice.OutClusterObj { OutCluster = 3 });
-
+ if (device.Type == DeviceType.AirSwitch || device.Type == DeviceType.OnOffOutput
+ || device.Type == DeviceType.DimmableLight || device.Type == DeviceType.ColorDimmableLight)
+ {
+ device.InClusterList.Add(new CommonDevice.InClusterObj { InCluster = 6 });
+ device.OutClusterList.Add(new CommonDevice.OutClusterObj { OutCluster = 6 });
+ }
+ if (device.Type == DeviceType.OnOffOutput || device.Type == DeviceType.DimmableLight
+ || device.Type == DeviceType.ColorDimmableLight)
+ {
+ device.InClusterList.Add(new CommonDevice.InClusterObj { InCluster = 8 });
+ }
+ if (device.Type == DeviceType.WindowCoveringDevice)
+ {
+ device.InClusterList.Add(new CommonDevice.InClusterObj { InCluster = 258 });
+ }
//娣诲姞铏氭嫙璁惧
LocalDevice.Current.AddVirtualDeviceToMemory(device);
--
Gitblit v1.8.0