Closed Mattzobricks closed 5 months ago
Just change the occurrence of:
boolean connect(const char* id, const char* willTopic, uint8_t willQos, boolean willRetain, const char* willMessage);
To:
boolean connect(const char* id, const char* user, const char* pass, const char* willTopic, uint8_t willQos, boolean willRetain, const char* willMessage);
MTC4BT: change MCNetwork/MattzoMQTTSubscriber.cpp:
log4MC::info("MQTT: Subscriber attempting to connect...")
if (mqttSubscriberClient.connect(_subscriberName, _config->Topic, 0, false, lastWillMessage_char)) {
log4MC::info("MQTT: Subscriber connected");
Add username and password to the configuration and handle it.
Thought about this feature request again... I believe the number of users who would like to have this feature is small. Very small. It might be easy to implement, but it complicates the setup for beginners even more and potentially leads to errors.
Closing issue.
Some users have demanded optional credentials for MQTT. Example: https://mattzobricks.com/forums/topic/mqtt-credentials-in-network_config#post-6559