| | |
| | | /// <param name="device">设备对象</param>
|
| | | /// <returns></returns>
|
| | | public string GetDeviceEpointName(CommonDevice device)
|
| | | {
|
| | | { |
| | | string dName = this.GetSimpleEpointName(device);
|
| | | if (string.IsNullOrEmpty(dName) == false)
|
| | | {
|
| | |
| | | {
|
| | | //默认值
|
| | | info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId4100;
|
| | | info.BeloneType = DeviceBeloneType.A智能空开;
|
| | | info.BeloneType = DeviceBeloneType.A开关;
|
| | | info.ConcreteType = DeviceConcreteType.AirSwitch;
|
| | | info.ObjectTypeNameId = 60001;//开关模块
|
| | |
|
| | |
| | | info.ConcreteType = DeviceConcreteType.Sensor_Humidity;
|
| | | }
|
| | | info.ObjectTypeNameId = 60000;//传感器
|
| | | } |
| | | |
| | | //14新风 |
| | | //else if (dicType.ContainsKey(DeviceType.FreshAir) == true)
|
| | | //{
|
| | | // info. = R.MyInternationalizationString.uDeviceBelongId18;
|
| | | // info.BeloneType = DeviceBeloneType.;//新风面板中的第一回路是新风设备
|
| | | // info.ConcreteType = DeviceConcreteType.ButtonPanel_FangyueFreshAir;
|
| | | // info.ObjectTypeNameId = 60011;//新风
|
| | | //}
|
| | | //int value = (int)info.BeloneType;
|
| | | //if (dicDeviceAllNameID.ContainsKey("uDeviceBelongId" + value) == true)
|
| | | //{
|
| | | // //设备所属类型的翻译名字
|
| | | // info.BeloneTextId = dicDeviceAllNameID["uDeviceBelongId" + value];
|
| | | //} |
| | | }
|
| | |
|
| | | int value = (int)info.BeloneType;
|
| | | if (dicDeviceAllNameID.ContainsKey("uDeviceBelongId" + value) == true)
|
| | | {
|
| | | //设备所属类型的翻译名字
|
| | | info.BeloneTextId = dicDeviceAllNameID["uDeviceBelongId" + value];
|
| | | }
|
| | |
|
| | | return info;
|
| | | }
|
| | |
|
| | |
| | | return Language.StringByID(R.MyInternationalizationString.uDeviceNotAssignedRoom);
|
| | | }
|
| | | var room = HdlRoomLogic.Current.GetRoomById(this.dicDeviceRoomId[device.DeviceAddr]);
|
| | | if (room != null)
|
| | | {
|
| | | return room.Name;
|
| | | }
|
| | | //未分配区域
|
| | | return Language.StringByID(R.MyInternationalizationString.uDeviceNotAssignedRoom);
|
| | | return HdlRoomLogic.Current.GetFloorRoomName(room);
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | //这个设备不见了
|
| | | return false;
|
| | | }
|
| | | if (i_device.Type == DeviceType.OnOffOutput && i_device.DfunctionType == DeviceFunctionType.A未定义)
|
| | | if (i_device.Type == DeviceType.OnOffOutput || i_device.Type == DeviceType.AirSwitch)
|
| | | {
|
| | | //2020.03.23追加式样:未指定类型的继电器,不显示
|
| | | return false;
|
| | | } |
| | | //如果是新风面板的新风设备,则不显示 |
| | | if (i_device.DfunctionType == DeviceFunctionType.A未定义)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | }
|
| | | //如果是新风面板的新风设备,则不显示
|
| | | else if (i_device.Type == DeviceType.FreshAir)
|
| | | {
|
| | | var myInfoType = LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { i_device });
|
| | |
| | | var listCheck = new HashSet<string>();
|
| | | Action<string, string> getDeviceAction = (topic, message) =>
|
| | | {
|
| | | if (topic == gatewayID + "/" + "DeviceInfoRespon")
|
| | | if (topic == gatewayID + "/DeviceInfoRespon")
|
| | | {
|
| | | try
|
| | | {
|
| | |
| | | //设备全部接收完成
|
| | | canBreak = true;
|
| | | }
|
| | | }
|
| | | else if (topic == gatewayID + "/DeviceInfoResponEnd")
|
| | | {
|
| | | }
|
| | | };
|
| | |
|
| | |
| | | else if (deviceType == DeviceType.WindowCoveringDevice) { device = new Rollershade(); }
|
| | | else if (deviceType == DeviceType.IASZone) { device = new IASZone(); }
|
| | | else if (deviceType == DeviceType.Repeater) { device = new Repeater(); }
|
| | | else if (deviceType == DeviceType.Thermostat) { device = new AC(); } |
| | | else if (deviceType == DeviceType.Thermostat) { device = new AC(); }
|
| | | else if (deviceType == DeviceType.FreshAir) { device = new FreshAir(); }
|
| | | else if (deviceType == DeviceType.DoorLock) { device = new DoorLock(); }
|
| | | else if (deviceType == DeviceType.TemperatureSensor) { device = new TemperatureSensor(); } |
| | | else if (deviceType == DeviceType.TemperatureSensor) { device = new TemperatureSensor(); }
|
| | | else if (deviceType == DeviceType.FreshAirHumiditySensor) { device = new HumiditySensor(); }
|
| | | else if (deviceType == DeviceType.OtaDevice || deviceType == DeviceType.OtaPanelDevice) { device = new OTADevice(); }
|
| | | else { return null; }
|
| | |
| | | this.dicDeviceModelIdEnum["MSPIR01-ZB.10"] = "1200-1200-60000";//pir传感器220
|
| | |
|
| | | //=========★★安防类传感器类(1300-2299)★★=========
|
| | | //这里是麦乐克的
|
| | | this.dicDeviceModelIdEnum["MULTI-GASE--EA07"] = "1300-1300-60000";//燃气传感器
|
| | | this.dicDeviceModelIdEnum["MULTI-MECI--EA01"] = "1301-1300-60000";//门窗磁传感器
|
| | | this.dicDeviceModelIdEnum["MULTI-FIRE--EA05"] = "1302-1300-60000";//烟雾传感器
|
| | | this.dicDeviceModelIdEnum["MULTI-MOTI--EA04"] = "1303-1300-60000";//红外传感器
|
| | | this.dicDeviceModelIdEnum["MULTI-WATE--EA02"] = "1304-1300-60000";//水浸传感器
|
| | | this.dicDeviceModelIdEnum["MULTI-BURO--EA06"] = "1305-1300-60000";//紧急按键
|
| | | //这里是河东的
|
| | | this.dicDeviceModelIdEnum["MSG01/M-ZB.10"] = "1300-1300-60000";//燃气传感器
|
| | | this.dicDeviceModelIdEnum["MSDC01/M-ZB.10"] = "1301-1300-60000";//门窗磁传感器
|
| | | this.dicDeviceModelIdEnum["MSS01/M-ZB.10"] = "1302-1300-60000";//烟雾传感器
|
| | | this.dicDeviceModelIdEnum["MSPIR01/M-ZB.10"] = "1303-1300-60000";//红外传感器
|
| | | this.dicDeviceModelIdEnum["MSW01/M-ZB.10"] = "1304-1300-60000";//水浸传感器
|
| | | this.dicDeviceModelIdEnum["MBU01/M-ZB.10"] = "1305-1300-60000";//紧急按键
|
| | |
|
| | | //=========★★继电器类(2300-2499)★★=========
|
| | | this.dicDeviceModelIdEnum["MPR0310-ZB.10"] = "2300-2300-60001";//3路继电器小模块
|
| | | this.dicDeviceModelIdEnum["MFA01-ZB1.0"] = "2310-2300-60001";//方悦新风小模块
|
| | | this.dicDeviceModelIdEnum["MFA01-ZB.10"] = "2310-2300-60011";//方悦新风小模块
|
| | |
|
| | | //=========★★调光器类(2500-2799)★★=========
|
| | | this.dicDeviceModelIdEnum["MPD0101-ZB.10"] = "2500-2500-60007";//1路调光器小模块
|