| | |
| | | { |
| | | ControlBytesSend(Command.SetCurtainModelStutas, subnetId, deviceId, new byte[] { curtain.bus_Data.LoopID, 0 }); |
| | | } |
| | | ControlBytesSend(Command.SetCurtainModelStutas, subnetId, deviceId, new byte[] { 17, (byte)curtain.openLevel }); |
| | | else if (curtain.on_off == "on") |
| | | { |
| | | ControlBytesSend(Command.SetCurtainModelStutas, subnetId, deviceId, new byte[] { 17, 100 }); |
| | | } |
| | | else if (curtain.on_off == "off") |
| | | { |
| | | ControlBytesSend(Command.SetCurtainModelStutas, subnetId, deviceId, new byte[] { 17, 0 }); |
| | | } |
| | | break; |
| | | } |
| | | break; |
| | |
| | | break; |
| | | } |
| | | break; |
| | | case FunctionCategory.Sensor: |
| | | var sensor = function as Sensor; |
| | | ControlBytesSend(Command.ReadDeviceLoopInfo, subnetId, deviceId, new byte[] { (byte)5, |
| | | (byte)((int)sensor.functionType % 256), sensor.bus_Data.LoopID }); |
| | | break; |
| | | } |
| | | break; |
| | | } |