| | |
| | | /// <para>持续数据上报(MomentStatus=0 TriggerZoneStatus>=1<报警> TriggerZoneStatus=0<取消报警>)</para> |
| | | /// <para>21: Door/Window 门窗传感器(有21和22,这里没有写错)</para> |
| | | /// <para>22:Door/Window 门窗传感器(有21和22,这里没有写错</para> |
| | | /// <para>541 球型移动传感器</para> |
| | | /// </summary> |
| | | public int IasDeviceType; |
| | | /// <summary> |
| | |
| | | { |
| | | return null; |
| | | } |
| | | var gateWay = ZbGateway.GateWayList.Find(obj => (obj != null) && (obj.getGatewayBaseInfo != null) && (obj.getGatewayBaseInfo.gwID == CurrentGateWayId)); |
| | | var gateWay = ZbGateway.GateWayList.Find(obj => (obj != null) && (obj.GwId == CurrentGateWayId)); |
| | | if (gateWay == null) |
| | | { |
| | | gateWay = new ZbGateway { IsVirtual = true, }; |
| | | gateWay.getGatewayBaseInfo.gwID = CurrentGateWayId; |
| | | gateWay.getGatewayBaseInfo.HomeId = Shared.Common.Config.Instance.HomeId; |
| | | gateWay.GwId = CurrentGateWayId; |
| | | gateWay.HomeId = Shared.Common.Config.Instance.HomeId; |
| | | ZbGateway.GateWayList.Add(gateWay); |
| | | } |
| | | |
| | |
| | | { |
| | | device = Newtonsoft.Json.JsonConvert.DeserializeObject<ToggleLight>(strDeviceByte); |
| | | } |
| | | else if (strDeviceType == ZigBee.Device.DeviceType.ColorDimmerSwitch.ToString()) |
| | | { |
| | | device = Newtonsoft.Json.JsonConvert.DeserializeObject<ColorDimmerSwitch>(strDeviceByte); |
| | | } |
| | | else if (strDeviceType == ZigBee.Device.DeviceType.LevelControlSwitch.ToString()) |
| | | { |
| | | device = Newtonsoft.Json.JsonConvert.DeserializeObject<LevelControlSwitch>(strDeviceByte); |
| | | } |
| | | else if (strDeviceType == ZigBee.Device.DeviceType.WindowCoveringDevice.ToString()) |
| | | { |
| | | device = Newtonsoft.Json.JsonConvert.DeserializeObject<Rollershade>(strDeviceByte); |
| | | } |
| | | else if (strDeviceType == ZigBee.Device.DeviceType.WindowCoveringController.ToString()) |
| | | { |
| | | device = Newtonsoft.Json.JsonConvert.DeserializeObject<WindowCoveringController>(strDeviceByte); |
| | | } |
| | | else if (strDeviceType == ZigBee.Device.DeviceType.OnOffSwitch.ToString()) |
| | | { |
| | |
| | | else if (strDeviceType == ZigBee.Device.DeviceType.PMSensor.ToString()) |
| | | { |
| | | return Newtonsoft.Json.JsonConvert.DeserializeObject<PMSensor>(strDeviceByte); |
| | | } |
| | | else if (strDeviceType == ZigBee.Device.DeviceType.ColorTemperatureLight.ToString()) |
| | | { |
| | | return Newtonsoft.Json.JsonConvert.DeserializeObject<ColorTemperatureLight>(strDeviceByte); |
| | | }
|
| | | else if (strDeviceType == ZigBee.Device.DeviceType.Buzzer.ToString()) |
| | | { |
| | | return Newtonsoft.Json.JsonConvert.DeserializeObject<Buzzer>(strDeviceByte); |
| | | } |
| | | else { return null; } |
| | | //能少存一个变量就少存一个 |
| | |
| | | { |
| | | //调光器 |
| | | IconPath = "Device/Light.png"; |
| | | if (Shared.Common.LocalDevice.Current.IsMiniLight(this) == true)
|
| | | {
|
| | | //mini夜灯
|
| | | IconPath = "Device/MiniNightLight.png";
|
| | | } |
| | | }
|
| | | else if (this.Type == DeviceType.ColorTemperatureLight)
|
| | | {
|
| | | //色温灯
|
| | | IconPath = "Device/ColorLightTemperature.png";
|
| | | } |
| | | else if (this.Type == DeviceType.OnOffOutput) |
| | | { |
| | |
| | | /// 好像是序列号
|
| | | /// </summary> |
| | | public string ProductCode = string.Empty; |
| | | /// <summary>
|
| | | /// 设备功能类型(空气开关和继电器专用)
|
| | | /// </summary> |
| | | public int FunctionType = -1; |
| | | /// <summary> |
| | | /// 输入簇列表 |
| | | /// </summary> |