From 0e0584b87851c56745bf73b1a961b80613dd0721 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 19 五月 2020 16:35:16 +0800
Subject: [PATCH] 2020-05-19-4

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs |   38 ++++++++++++++++++++++++++++++++------
 1 files changed, 32 insertions(+), 6 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs
old mode 100644
new mode 100755
index cf88b54..50c8582
--- 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
@@ -105,6 +107,9 @@
             house.Save(false);
             Config.Instance.HomeId = house.Id;
             Config.Instance.Home = House.GetHouseByHouseId(house.Id);
+
+            //棰勫垱寤轰釜浜轰腑蹇冨叏閮ㄧ殑鏂囦欢澶�
+            UserCenterLogic.CreatAllUserCenterDirectory();
         }
 
         #endregion
@@ -215,10 +220,10 @@
             foreach (var floorKey in listFloorKey)
             {
                 //瀹㈠巺
-                //list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A2鎸夐敭闈㈡澘, RoomId = floorKey + "_KeTing", DeviceCount = 1 });
-                //list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A3鎸夐敭闈㈡澘, RoomId = floorKey + "_KeTing", DeviceCount = 1 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A2鎸夐敭闈㈡澘, RoomId = floorKey + "_KeTing", DeviceCount = 1 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A3鎸夐敭闈㈡澘, RoomId = floorKey + "_KeTing", DeviceCount = 1 });
                 list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A4鎸夐敭闈㈡澘, RoomId = floorKey + "_KeTing", DeviceCount = 2 });
-                //list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A绌鸿皟缃戝叧, RoomId = floorKey + "_KeTing", DeviceCount = 1 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A绌鸿皟缃戝叧, RoomId = floorKey + "_KeTing", DeviceCount = 1 });
 
                 //闃冲彴
                 list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A220pir浼犳劅鍣�, RoomId = floorKey + "_YangTai", DeviceCount = 1 });
@@ -234,7 +239,6 @@
                 list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A绌烘皵寮�鍏�, RoomId = floorKey + "_XuanGuan", DeviceCount = 1 });
                 list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A1璺皟鍏夊櫒, RoomId = floorKey + "_XuanGuan", DeviceCount = 1 });
                 list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A闂ㄧ獥纾佷紶鎰熷櫒, RoomId = floorKey + "_XuanGuan", DeviceCount = 1 });
-                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A鏅鸿兘闂ㄩ攣, RoomId = floorKey + "_XuanGuan", DeviceCount = 1 });
 
                 //鍘ㄦ埧
                 list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A4鎸夐敭闈㈡澘, RoomId = floorKey + "_ChuFang", DeviceCount = 1 });
@@ -562,6 +566,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);
 
@@ -582,6 +587,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);
 
@@ -595,6 +601,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);
 
@@ -608,6 +615,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);
 
@@ -621,6 +629,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);
 
@@ -634,6 +643,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);
 
@@ -647,6 +657,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);
 
@@ -660,6 +671,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);
 
@@ -902,10 +914,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