arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
22.23k stars 4.81k forks source link

MQTT add warning if trying to connect without TLS on a port that normally uses TLS #22175

Closed s-hadinger closed 2 months ago

s-hadinger commented 2 months ago

Description:

There was numerous issues raised by users trying to connect on MQTT TLS endpoints using a non-TLS firmware, or forgetting to enable TLS. This PR adds a warning when trying to connect without TLS to a port that is by convention using TLS: 8883, 443, 8443

Exemple:

00:00:00.193 MQT: Warning non-TLS connection on TLS port 8883

This warning is not displayed in tasmota-minimal to save flash size.

Checklist:

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass