Browse Source

Merge pull request #2154 from mcspr/mqtt/bump

mqtt: bump arduino-mqtt version, tweak keepalive
mcspr-patch-1
Max Prokhorov 4 years ago
committed by GitHub
parent
commit
3747d2ef46
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions
  1. +1
    -1
      code/espurna/config/general.h
  2. +1
    -0
      code/espurna/mqtt.ino
  3. +1
    -1
      code/platformio.ini

+ 1
- 1
code/espurna/config/general.h View File

@ -1029,7 +1029,7 @@
#endif
#ifndef MQTT_KEEPALIVE
#define MQTT_KEEPALIVE 300 // MQTT keepalive value
#define MQTT_KEEPALIVE 120 // MQTT keepalive value
#endif


+ 1
- 0
code/espurna/mqtt.ino View File

@ -187,6 +187,7 @@ bool _mqttConnectSyncClient(bool secure = false) {
#if MQTT_LIBRARY == MQTT_LIBRARY_ARDUINOMQTT
_mqtt.begin(_mqtt_server.c_str(), _mqtt_port, _mqttGetClient(secure));
_mqtt.setWill(_mqtt_will.c_str(), _mqtt_payload_offline.c_str(), _mqtt_retain, _mqtt_qos);
_mqtt.setKeepAlive(_mqtt_keepalive);
result = _mqtt.connect(_mqtt_clientid.c_str(), _mqtt_user.c_str(), _mqtt_pass.c_str());
#elif MQTT_LIBRARY == MQTT_LIBRARY_PUBSUBCLIENT
_mqtt.setClient(_mqttGetClient(secure));


+ 1
- 1
code/platformio.ini View File

@ -118,7 +118,7 @@ lib_deps =
https://github.com/xoseperez/justwifi.git#2.0.2
https://github.com/madpilot/mDNSResolver#4cfcda1
https://github.com/xoseperez/my92xx#3.0.1
MQTT
https://github.com/256dpi/arduino-mqtt#196556b6
https://bitbucket.org/xoseperez/nofuss.git#0.3.0
https://github.com/xoseperez/NtpClient.git#0942ebc
OneWire


Loading…
Cancel
Save