| | |
| | | this.InitDeviceData();
|
| | | //初始化场景
|
| | | this.InitSceneData();
|
| | | //刷新左边刷新房间视图列表
|
| | | HdlRoomLogic.Current.RefreshRoomListView();
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | 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);
|
| | |
|
| | | //预创建个人中心全部的文件夹
|
| | | UserCenterLogic.CreatAllUserCenterDirectory();
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | 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);
|
| | |
| | | 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);
|
| | |
|