| | |
| | | break; |
| | | case SPK.SensorSmoke: |
| | | case SPK.SensorWater: |
| | | case SPK.SensorGas: |
| | | case SPK.SensorDoorWindow: |
| | | case SPK.SensorPir: |
| | | var ser = Newtonsoft.Json.JsonConvert.DeserializeObject<Sensor>(functionDataString); |
| | | List.sensorsArm.Add(ser); |
| | | deviceFunctionList.Add(ser); |
| | |
| | | { |
| | | Read3tyFunctionStatus(); |
| | | |
| | | if (DriverLayer.Control.Ins.IsRemote) |
| | | if(DriverLayer.Control.Ins.GatewayOnline_Local) |
| | | { |
| | | foreach (var function in GetDeviceFunctionList(SPK.BrandType.Hdl)) |
| | | { |
| | | switch (function.Spk_Prefix) |
| | | { |
| | | case FunctionCategory.Light: |
| | | case FunctionCategory.Electric: |
| | | case FunctionCategory.Curtain: |
| | | case FunctionCategory.AC: |
| | | case FunctionCategory.FloorHeat: |
| | | DriverLayer.Control.Ins.SendReadCommand(function); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | var page = new List<string>(); |
| | | int count = 0; |
| | |
| | | } |
| | | } |
| | | DriverLayer.Control.Ins.SendApiReadCommand(page); |
| | | } |
| | | else |
| | | { |
| | | foreach (var function in GetDeviceFunctionList(SPK.BrandType.Hdl)) |
| | | { |
| | | switch (function.Spk_Prefix) |
| | | { |
| | | case FunctionCategory.Light: |
| | | case FunctionCategory.Electric: |
| | | case FunctionCategory.Curtain: |
| | | case FunctionCategory.AC: |
| | | case FunctionCategory.FloorHeat: |
| | | DriverLayer.Control.Ins.SendReadCommand(function); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | catch (Exception ex) |