mqttfertig
This commit is contained in:
parent
08fd25124c
commit
44aa9a8afd
0
JavaSample-tcp19216865151883/.lck
Normal file
0
JavaSample-tcp19216865151883/.lck
Normal file
@ -85,11 +85,11 @@ public class mqtt {
|
||||
String[] partstwo = date.split(" ");
|
||||
|
||||
|
||||
boolean abholtag;
|
||||
int abholtag;
|
||||
if (partstwo[0].contains(newDate)) {
|
||||
abholtag = true;
|
||||
abholtag = 1;
|
||||
} else {
|
||||
abholtag = false;
|
||||
abholtag = 0;
|
||||
}
|
||||
temp = tempabfallart + "," + abholtag;
|
||||
|
||||
|
@ -24,9 +24,9 @@ public class mqtttransmitter {
|
||||
String clientId = "JavaSample";
|
||||
MemoryPersistence persistence = new MemoryPersistence();
|
||||
|
||||
System.out.println("HI");
|
||||
|
||||
try {
|
||||
|
||||
MqttClient sampleClient = new MqttClient(broker, clientId, persistence);
|
||||
MqttConnectOptions connOpts = new MqttConnectOptions();
|
||||
connOpts.setCleanSession(true);
|
||||
@ -40,6 +40,7 @@ public class mqtttransmitter {
|
||||
Log.debug("Message published");
|
||||
sampleClient.disconnect();
|
||||
Log.debug("Disconnected");
|
||||
System.out.println("HI");
|
||||
|
||||
|
||||
} catch (MqttException me) {
|
||||
|
Loading…
Reference in New Issue
Block a user