Fixed hex handling of intensity. Added handling for \n, \t, \r and so

forth in tcp,udp and mqtt.
This commit is contained in:
Admin
2017-03-07 16:36:25 -06:00
parent a578aa9fd8
commit f6cb41b880
5 changed files with 29 additions and 6 deletions

View File

@@ -1,5 +1,6 @@
package com.bwssystems.HABridge.plugins.mqtt;
import org.apache.commons.lang3.StringEscapeUtils;
import org.eclipse.paho.client.mqttv3.MqttClient;
import org.eclipse.paho.client.mqttv3.MqttConnectOptions;
import org.eclipse.paho.client.mqttv3.MqttException;
@@ -47,7 +48,7 @@ public class MQTTHandler {
}
public void publishMessage(String topic, String content) {
MqttMessage message = new MqttMessage(content.getBytes());
MqttMessage message = new MqttMessage(StringEscapeUtils.unescapeJava(content).getBytes());
message.setQos(qos);
try {
myClient.publish(topic, message);