6.2.1.13 Change to ArduinoMqtt

6.2.1.13 20181008
 * Change default Mqtt client library from PubSubClient to non-blocking ArduinoMqtt by Joel Gaehwiler
This commit is contained in:
Theo Arends 2018-10-08 10:30:24 +02:00
parent c78a35d984
commit 30154e2335
5 changed files with 23 additions and 16 deletions

View File

@ -1,4 +1,7 @@
/* 6.2.1.12 20181007
/* 6.2.1.13 20181008
* Change default Mqtt client library from PubSubClient to non-blocking ArduinoMqtt by Joel Gaehwiler
*
* 6.2.1.12 20181007
* Fix Shelly1 switchmode 3 and 4 when using pushbutton (#3989)
* Add support for CSL Aplic WDP 303075 Power Socket with Energy Monitoring (#3991, #3996)
*

View File

@ -144,8 +144,9 @@ typedef unsigned long power_t; // Power (Relay) type
#define NEO_GRBW 6 // Neopixel GRBW leds
#define MQTT_PUBSUBCLIENT 1 // Mqtt PubSubClient library
#define MQTT_TASMOTAMQTT 2 // Mqtt TasmotaMqtt library based on esp-mqtt-arduino
#define MQTT_ARDUINOMQTT 3 // Mqtt arduino-mqtt library by Joel Gaehwiler (https://github.com/256dpi/arduino-mqtt)
#define MQTT_TASMOTAMQTT 2 // Mqtt TasmotaMqtt library based on esp-mqtt-arduino - soon obsolete
#define MQTT_ESPMQTTARDUINO 3 // Mqtt esp-mqtt-arduino library by Ingo Randolf - obsolete
#define MQTT_ARDUINOMQTT 4 // Mqtt arduino-mqtt library by Joel Gaehwiler (https://github.com/256dpi/arduino-mqtt)
// Sunrise and Sunset DawnType
#define DAWN_NORMAL -0.8333

View File

@ -20,7 +20,7 @@
#ifndef _SONOFF_VERSION_H_
#define _SONOFF_VERSION_H_
#define VERSION 0x0602010C
#define VERSION 0x0602010D
#define D_PROGRAMNAME "Sonoff-Tasmota"
#define D_AUTHOR "Theo Arends"

View File

@ -220,11 +220,11 @@
* Select ONE of possible MQTT library types below
\*-------------------------------------------------------------------------------------------*/
// Default MQTT driver for both non-TLS and TLS connections. Blocks network if MQTT server is unavailable.
#define MQTT_LIBRARY_TYPE MQTT_PUBSUBCLIENT // Use PubSubClient library
//#define MQTT_LIBRARY_TYPE MQTT_PUBSUBCLIENT // Use PubSubClient library
// Alternative MQTT driver does not block network when MQTT server is unavailable. No TLS support
//#define MQTT_LIBRARY_TYPE MQTT_TASMOTAMQTT // Use TasmotaMqtt library (+4k4 (core 2.3.0), +14k4 (core 2.4.2 lwip2) code, +4k mem) - non-TLS only
// Alternative MQTT driver does not block network when MQTT server is unavailable. TLS should work but needs to be tested.
//#define MQTT_LIBRARY_TYPE MQTT_ARDUINOMQTT // Use arduino-mqtt (lwmqtt) library (+3k3 code, +2k mem)
#define MQTT_LIBRARY_TYPE MQTT_ARDUINOMQTT // Use arduino-mqtt (lwmqtt) library (+3k3 code, +2k mem)
// -- MQTT ----------------------------------------
#define MQTT_TELE_RETAIN 0 // Tele messages may send retain flag (0 = off, 1 = on)

View File

@ -27,23 +27,26 @@
// Alternative MQTT driver does not block network when MQTT server is unavailable. TLS should work but needs to be tested.
//#define MQTT_LIBRARY_TYPE MQTT_ARDUINOMQTT // Use arduino-mqtt (lwmqtt) library (+3k3 code, +2k mem)
#ifdef USE_MQTT_TLS
#if (MQTT_LIBRARY_TYPE == MQTT_ESPMQTTARDUINO) // Obsolete as of v6.2.1.11
#undef MQTT_LIBRARY_TYPE
#define MQTT_LIBRARY_TYPE MQTT_ARDUINOMQTT
#endif
/*
#ifdef MQTT_LIBRARY_TYPE
#undef MQTT_LIBRARY_TYPE
#endif
#define MQTT_LIBRARY_TYPE MQTT_PUBSUBCLIENT // Use PubSubClient library as it only supports TLS
*/
#if (MQTT_LIBRARY_TYPE == MQTT_TASMOTAMQTT)
#undef MQTT_LIBRARY_TYPE
#define MQTT_LIBRARY_TYPE MQTT_PUBSUBCLIENT // Use PubSubClient library as it only supports TLS
#define MQTT_LIBRARY_TYPE MQTT_ARDUINOMQTT // Obsolete in near future
#endif
*/
#ifdef USE_MQTT_TLS
#if (MQTT_LIBRARY_TYPE == MQTT_TASMOTAMQTT)
#undef MQTT_LIBRARY_TYPE
#endif
#else
#ifndef MQTT_LIBRARY_TYPE
#define MQTT_LIBRARY_TYPE MQTT_PUBSUBCLIENT // Use PubSubClient library as default
#define MQTT_LIBRARY_TYPE MQTT_PUBSUBCLIENT // Use PubSubClient library as it only supports TLS
#endif
#endif