| | |
| | | for (int j = 0; j < room.ListDevice.Count; j++) |
| | | { |
| | | string key = room.ListDevice[j].ToString(); |
| | | var device = LocalDevice.Current.GetDevice(key); |
| | | var device = HdlDeviceCommonLogic.Current.GetDevice(key); |
| | | if (device == null) |
| | | continue; |
| | | |
| | | SmartSound.Device smartDevice = new SmartSound.Device(); |
| | | smartDevice.DeviceAddress = device.DeviceAddr;//设备 MAC |
| | | smartDevice.Epoint = device.DeviceEpoint;//设备端口 |
| | | smartDevice.DeviceName = Common.LocalDevice.Current.GetDeviceEpointName(device);//设备名称 |
| | | smartDevice.DeviceName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);//设备名称 |
| | | smartDevice.NicksName = ""; |
| | | smartDevice.DeviceType = GetDeviceType(device);//设备类型 |
| | | if (smartDevice.DeviceType == 0) |
| | | continue; |
| | | |
| | | if(ZbGateway.GateWayBaseInfomations.ContainsKey(device.CurrentGateWayId) ==true) |
| | | if(ZbGateway.DicGatewayBaseInfo.ContainsKey(device.CurrentGateWayId) ==true) |
| | | { |
| | | smartDevice.GatewayID = ZbGateway.GateWayBaseInfomations[device.CurrentGateWayId].MacMark;//网关 Id |
| | | smartDevice.GatewayID = ZbGateway.DicGatewayBaseInfo[device.CurrentGateWayId].Id;//网关 Id |
| | | } |
| | | else |
| | | { |
| | |
| | | smartScene.SceneID = scene.Id; |
| | | smartScene.DelayTime = scene.DelayTime; |
| | | smartScene.NicksName = ""; |
| | | if (ZbGateway.GateWayBaseInfomations.ContainsKey(ZbGateway.MainGateWay.GwId) == true) |
| | | if (ZbGateway.DicGatewayBaseInfo.ContainsKey(ZbGateway.MainGateWay.GwId) == true) |
| | | { |
| | | smartScene.GatewayID = ZbGateway.GateWayBaseInfomations[ZbGateway.MainGateWay.GwId].MacMark;//网关 Id |
| | | smartScene.GatewayID = ZbGateway.DicGatewayBaseInfo[ZbGateway.MainGateWay.GwId].Id;//网关 Id |
| | | } |
| | | else |
| | | { |