| | |
| | | } |
| | | return backupList; |
| | | } |
| | | |
| | | /* 2020-09-01 弃用 恢复旧数据功能在bus软件上实现 |
| | | /// <summary> |
| | | /// 获取备份文件列表 |
| | | /// </summary> |
| | |
| | | // backgroundImage = "Classification/Room/Roombg.png", |
| | | // //backgroundImage = ss.GetValue("BackGroundImage").ToString() == "Room/r1.png" ? "Classification/Room/Roombg.png" : filePath, |
| | | //}; |
| | | //DB_ResidenceData.residenceData.rooms.Add(room1); |
| | | //DB_ResidenceData.rooms.Add(room1); |
| | | //roomList.Add(ss, room1); |
| | | |
| | | } |
| | |
| | | { |
| | | case "LightSwitch": |
| | | case "LightMixSwitch": |
| | | var light1 = DB_ResidenceData.residenceData.functionList.lights.Find((obj) => obj.bus_Data.SubnetID == (byte)ss.GetValue("SubnetID") && |
| | | var light1 = DB_ResidenceData.functionList.lights.Find((obj) => obj.bus_Data.SubnetID == (byte)ss.GetValue("SubnetID") && |
| | | obj.bus_Data.DeviceID == (byte)ss.GetValue("DeviceID") && obj.bus_Data.LoopID == (byte)ss.GetValue("LoopID")); |
| | | if (light1 != null) |
| | | { |
| | | //light1.roomIdList.Add(roomSid); |
| | | break; |
| | | } |
| | | DB_ResidenceData.residenceData.functionList.lights.Add(new Light() |
| | | DB_ResidenceData.functionList.lights.Add(new Light() |
| | | { |
| | | sid = "030101" + guid + "0102010001AABB", |
| | | name = ss.GetValue("Name").ToString(), |
| | | function = new List<Trait>() { |
| | | new Trait { attri="on_off", max=100,min = 0, value= new List<string> { "on","off"} }, |
| | | new Trait { name="on_off", max=100,min = 0, value_key= new List<string> { "on","off"} }, |
| | | }, |
| | | roomIdList = roomIds, |
| | | bus_Data = new BusData |
| | |
| | | case "LightDimming": |
| | | case "LightDALI": |
| | | case "LightMixDimming": |
| | | var light2 = DB_ResidenceData.residenceData.functionList.lights.Find((obj) => obj.bus_Data.SubnetID == (byte)ss.GetValue("SubnetID") && |
| | | var light2 = DB_ResidenceData.functionList.lights.Find((obj) => obj.bus_Data.SubnetID == (byte)ss.GetValue("SubnetID") && |
| | | obj.bus_Data.DeviceID == (byte)ss.GetValue("DeviceID") && obj.bus_Data.LoopID == (byte)ss.GetValue("LoopID")); |
| | | if (light2 != null) |
| | | { |
| | | //light2.roomIdList.Add(roomSid); |
| | | break; |
| | | } |
| | | DB_ResidenceData.residenceData.functionList.lights.Add(new Light() |
| | | DB_ResidenceData.functionList.lights.Add(new Light() |
| | | { |
| | | sid = "030101" + guid + "0202020001AABB", |
| | | name = ss.GetValue("Name").ToString(), |
| | | function = new List<Trait>() { |
| | | new Trait { attri="brightness", max=100,min = 0, value= new List<string> { "up","down"} }, |
| | | new Trait { name="brightness", max=100,min = 0, value_key= new List<string> { "up","down"} }, |
| | | }, |
| | | roomIdList = roomIds, |
| | | //roomIdList = new List<string>() { "0001" }, |
| | |
| | | break; |
| | | case "LightLogic": |
| | | case "LightRGB": |
| | | var light3 = DB_ResidenceData.residenceData.functionList.lights.Find((obj) => obj.bus_Data.SubnetID == (byte)ss.GetValue("SubnetID") && |
| | | var light3 = DB_ResidenceData.functionList.lights.Find((obj) => obj.bus_Data.SubnetID == (byte)ss.GetValue("SubnetID") && |
| | | obj.bus_Data.DeviceID == (byte)ss.GetValue("DeviceID") && obj.bus_Data.LoopID == (byte)ss.GetValue("LoopID")); |
| | | if (light3 != null) |
| | | { |
| | | //light3.roomIdList.Add(roomSid); |
| | | break; |
| | | } |
| | | DB_ResidenceData.residenceData.functionList.lights.Add(new Light() |
| | | DB_ResidenceData.functionList.lights.Add(new Light() |
| | | { |
| | | sid = "030101" + guid + "0202040001AABB", |
| | | name = ss.GetValue("Name").ToString(), |
| | | function = new List<Trait>() { |
| | | new Trait { attri="brightness", max=100,min = 0, value= new List<string> { "on","off"} }, |
| | | new Trait { attri="color", max=100,min = 0, value= new List<string> { "255", "255", "255" } }, |
| | | new Trait { name="brightness", max=100,min = 0, value_key= new List<string> { "on","off"} }, |
| | | new Trait { name="color", max=100,min = 0, value_key= new List<string> { "255", "255", "255" } }, |
| | | }, |
| | | roomIdList = roomIds, |
| | | //roomIdList = new List<string>() { roomSid }, |
| | |
| | | case "HVAC": |
| | | case "ACPanel": |
| | | case "ACInfrared": |
| | | var ac = DB_ResidenceData.residenceData.functionList.aCs.Find((obj) => obj.bus_Data.SubnetID == (byte)ss.GetValue("SubnetID") && |
| | | var ac = DB_ResidenceData.functionList.aCs.Find((obj) => obj.bus_Data.SubnetID == (byte)ss.GetValue("SubnetID") && |
| | | obj.bus_Data.DeviceID == (byte)ss.GetValue("DeviceID") && obj.bus_Data.LoopID == (byte)ss.GetValue("LoopID")); |
| | | if (ac != null) |
| | | { |
| | | //ac.roomIdList.Add(roomSid); |
| | | break; |
| | | } |
| | | DB_ResidenceData.residenceData.functionList.aCs.Add(new AC() |
| | | DB_ResidenceData.functionList.aCs.Add(new AC() |
| | | { |
| | | sid = "030101" + guid + "0204010001AABB", |
| | | name = ss.GetValue("Name").ToString(), |
| | | function = new List<Trait>() { |
| | | new Trait { attri="on_off", max=1,min = 0, value= new List<string> { "on","off"} }, |
| | | new Trait { attri="mode", max = 2,min =0,value = new List<string>{ "auto", "heat", "cool","dry" } }, |
| | | new Trait { attri = "fan",max = 3,min =0,value = new List<string>{ "low", "mid", "high" ,"auto"} }, |
| | | new Trait { attri = "temperature", max = 32,min=16,value = new List<string>{"up","down" } }, |
| | | new Trait { name="on_off", max=1,min = 0, value_key= new List<string> { "on","off"} }, |
| | | new Trait { name="mode", max = 2,min =0,value_key = new List<string>{ "auto", "heat", "cool","dry" } }, |
| | | new Trait { name = "fan",max = 3,min =0,value_key = new List<string>{ "low", "mid", "high" ,"auto"} }, |
| | | new Trait { name = "temperature", max = 32,min=16,value_key = new List<string>{"up","down" } }, |
| | | }, |
| | | roomIdList = roomIds, |
| | | //roomIdList = new List<string>() { roomSid}, |
| | |
| | | break; |
| | | //Entity. |
| | | case "CurtainModel": |
| | | var curtain1 = DB_ResidenceData.residenceData.functionList.curtains.Find((obj) => obj.bus_Data.SubnetID == (byte)ss.GetValue("SubnetID") && |
| | | var curtain1 = DB_ResidenceData.functionList.curtains.Find((obj) => obj.bus_Data.SubnetID == (byte)ss.GetValue("SubnetID") && |
| | | obj.bus_Data.DeviceID == (byte)ss.GetValue("DeviceID") && obj.bus_Data.LoopID == (byte)ss.GetValue("LoopID")); |
| | | if (curtain1 != null) |
| | | { |
| | | //curtain1.roomIdList.Add(roomSid); |
| | | break; |
| | | } |
| | | DB_ResidenceData.residenceData.functionList.curtains.Add(new Curtain() |
| | | DB_ResidenceData.functionList.curtains.Add(new Curtain() |
| | | { |
| | | sid = "030101" + guid + "0203010001AABB", |
| | | name = ss.GetValue("Name").ToString(), |
| | | roomIdList = roomIds, |
| | | //roomIdList = new List<string>() { roomSid }, |
| | | function = new List<Trait>() { |
| | | new Trait { attri="on_off", max=2,min = 0, value= new List<string> { "on","off","stop"} }, |
| | | new Trait { name="on_off", max=2,min = 0, value_key= new List<string> { "on","off","stop"} }, |
| | | },// "curtain", |
| | | lastState = "开", |
| | | bus_Data = new BusData |
| | |
| | | }); |
| | | break; |
| | | case "CurtainRoller": |
| | | var curtain2 = DB_ResidenceData.residenceData.functionList.curtains.Find((obj) => obj.bus_Data.SubnetID == (byte)ss.GetValue("SubnetID") && |
| | | var curtain2 = DB_ResidenceData.functionList.curtains.Find((obj) => obj.bus_Data.SubnetID == (byte)ss.GetValue("SubnetID") && |
| | | obj.bus_Data.DeviceID == (byte)ss.GetValue("DeviceID") && obj.bus_Data.LoopID == (byte)ss.GetValue("LoopID")); |
| | | if (curtain2 != null) |
| | | { |
| | | //curtain2.roomIdList.Add(roomSid); |
| | | break; |
| | | } |
| | | DB_ResidenceData.residenceData.functionList.curtains.Add(new Curtain() |
| | | DB_ResidenceData.functionList.curtains.Add(new Curtain() |
| | | { |
| | | sid = "030101" + guid + "0203040001AABB", |
| | | name = ss.GetValue("Name").ToString(), |
| | | roomIdList = roomIds, |
| | | //roomIdList = new List<string>() { roomSid }, |
| | | function = new List<Trait>() { |
| | | new Trait { attri="on_off", max=100,min = 0, value= new List<string> { "on","off","stop"} }, |
| | | new Trait { name="on_off", max=100,min = 0, value_key= new List<string> { "on","off","stop"} }, |
| | | },// "rollingshutter", |
| | | lastState = "20%", |
| | | bus_Data = new BusData |
| | |
| | | }); |
| | | break; |
| | | case "CurtainTrietex": |
| | | var curtain3 = DB_ResidenceData.residenceData.functionList.curtains.Find((obj) => obj.bus_Data.SubnetID == (byte)ss.GetValue("SubnetID") && |
| | | var curtain3 = DB_ResidenceData.functionList.curtains.Find((obj) => obj.bus_Data.SubnetID == (byte)ss.GetValue("SubnetID") && |
| | | obj.bus_Data.DeviceID == (byte)ss.GetValue("DeviceID") && obj.bus_Data.LoopID == (byte)ss.GetValue("LoopID")); |
| | | if (curtain3 != null) |
| | | { |
| | | //curtain3.roomIdList.Add(roomSid); |
| | | break; |
| | | } |
| | | DB_ResidenceData.residenceData.functionList.curtains.Add(new Curtain() |
| | | DB_ResidenceData.functionList.curtains.Add(new Curtain() |
| | | { |
| | | sid = "030101" + guid + "0203030001AABB", |
| | | name = ss.GetValue("Name").ToString(), |
| | | roomIdList = roomIds, |
| | | //roomIdList = new List<string>() { roomSid }, |
| | | function = new List<Trait>() { |
| | | new Trait { attri="on_off", max=100,min = 0, value= new List<string> { "on","off","stop"} }, |
| | | new Trait { name="on_off", max=100,min = 0, value_key= new List<string> { "on","off","stop"} }, |
| | | }, |
| | | lastState = "20%", |
| | | bus_Data = new BusData |
| | |
| | | }, |
| | | }); |
| | | break; |
| | | //Entity.DB_ResidenceData.residenceData.functionList.floorHeatings.Add(new FloorHeating() |
| | | //Entity.DB_ResidenceData.functionList.floorHeatings.Add(new FloorHeating() |
| | | //{ |
| | | // sid = "12341212345678901234560704010004ABCD", |
| | | // name = "地热", |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | */ |
| | | |
| | | #endregion |
| | | } |