meshtastic / firmware

Meshtastic device firmware
https://meshtastic.org
GNU General Public License v3.0
3k stars 715 forks source link

[Feature Request]: Implement sane MQTT defaults (PR already pending) #3813

Open tropho23 opened 2 months ago

tropho23 commented 2 months ago

Platform

NRF52, ESP32

Description

Request making the default for MQTT to 'ignore MQTT' and maybe even set hop count for inbound MQTT packets to zero, if that is possible. The core issue here is people turning on MQTT, then either forgetting it's enabled or not caring about the impact it has to not only their local mesh but anyone connected to it via MQTT.

We need MQTT to be a tool for testing, a fun feature, and a nice capability to help join disparate meshes; right now without the proper attention and deliberate actions MQTT becomes a liability and burden for many users. Some boards still get overloaded and freeze/reset due to out of control traffic caused by mesh flooding by MQTT packets.

I think this might already be addressed by @GUVWAF's PR that is still pending review: https://github.com/meshtastic/firmware/pull/3591

caveman99 commented 1 month ago

Whyile i agree with the reasoning behind this change, let's keep in mind the "MQTT Enabled" switch on a new firmware defaults to OFF. Anyone enabling this should know the side effects. We've had reports from Germany by people being confused about MQTT not working after they enabled it, because on duty cycle limited regions config.lora.ignore_mqtt defaults to OFF already.

thebentern commented 1 month ago

Yes, this one is tricky because even in the US without the duty cycle default of off, we get a ton of support requests where users are confused by MQTT not working once enabled, not realizing the Channel up/downlink settings must be enabled first. Heck, it gets me sometimes

GUVWAF commented 1 month ago

We've had reports from Germany by people being confused about MQTT not working after they enabled it, because on duty cycle limited regions config.lora.ignore_mqtt defaults to OFF already.

With my PR this actually is solved. Ignore MQTT will be on be default, but MQTT packets will be received if downlink enabled. Only when you disable "ignore MQTT" it will also rebroadcast it over LoRa.