| | |
| | | } |
| | | else |
| | | { |
| | | var commandObj = function.GetSendJObject(CommandType_A.write); |
| | | var commandString = Newtonsoft.Json.JsonConvert.SerializeObject(commandObj); |
| | | var commandBytes = CommonPage.MyEncodingUTF8.GetBytes(commandString); |
| | | MqttCommon.MqttRemoteSend(commandBytes); |
| | | //var commandObj = function.GetSendJObject(CommandType_A.write); |
| | | //var commandString = Newtonsoft.Json.JsonConvert.SerializeObject(commandObj); |
| | | //var commandBytes = CommonPage.MyEncodingUTF8.GetBytes(commandString); |
| | | //MqttCommon.MqttRemoteSend(commandBytes); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | else |
| | | { |
| | | var commandObj = function.GetSendJObject(CommandType_A.read); |
| | | var commandString = Newtonsoft.Json.JsonConvert.SerializeObject(commandObj); |
| | | var commandBytes = CommonPage.MyEncodingUTF8.GetBytes(commandString); |
| | | MqttCommon.MqttRemoteSend(commandBytes); |
| | | //var commandObj = function.GetSendJObject(CommandType_A.read); |
| | | //var commandString = Newtonsoft.Json.JsonConvert.SerializeObject(commandObj); |
| | | //var commandBytes = CommonPage.MyEncodingUTF8.GetBytes(commandString); |
| | | //MqttCommon.MqttRemoteSend(commandBytes); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | case FunctionType.Relay: |
| | | case FunctionType.Dimmer: |
| | | ControlBytesSend(Command.ReadLightSingleLoopBrightness, subnetId, deviceId, new byte[] { function.bus_Data.LoopID }); |
| | | ControlBytesSend(Command.ReadLightAllLoopBrightness, subnetId, deviceId, new byte[] { }); |
| | | break; |
| | | case FunctionType.RGB: |
| | | ControlBytesSend(Command.ReadLogicLoopColor, subnetId, deviceId, new byte[] { function.bus_Data.LoopID }); |