Erweiterungen
This commit is contained in:
1 parent
e0d66ce3b1
commit
5c095fb969
10 files changed
+507
-415
No files matched your search
@@ -46,6 +46,9 @@ class MqttCore {
|
||||
String clientId = await Util.getAppUuid();
|
||||
Util.logInfo("client id: $clientId");
|
||||
|
||||
Util.logInfo("broker uri: $_brokerUri");
|
||||
Util.logInfo("broker port: $_brokerPort");
|
||||
|
||||
_mqttClient = MqttServerClient.withPort(_brokerUri, clientId, _brokerPort);
|
||||
_mqttClient.logging(on: false);
|
||||
_mqttClient.keepAlivePeriod = 20;
|
||||
@@ -55,8 +58,8 @@ class MqttCore {
|
||||
_mqttClient.connectionMessage = MqttConnectMessage()
|
||||
.withClientIdentifier('clientId')
|
||||
.withWillQos(MqttQos.atMostOnce)
|
||||
.withWillTopic('willTopic')
|
||||
.withWillMessage('willMessage')
|
||||
//.withWillTopic('willTopic')
|
||||
//.withWillMessage('willMessage')
|
||||
.authenticateAs("app", "apppwd");
|
||||
|
||||
await _mqttClient.connect();
|
||||
|
||||
Reference in new issue
Block a user