Added MQTT support. - #8
Open
rplankenhorn wants to merge 4 commits into
Open
Conversation
- Move credentials and broker IP/port to gitignored kegboard_config.h to prevent committing secrets; add kegboard_config.h.example as template - Use System.deviceID() as MQTT client ID to avoid broker conflicts when multiple devices connect - Fix format string bug: use %s (not %i) for temps[i].probe in temp topic - Remove delay(1000) and test LED code from mqttCallback - Fix mqttPending cleared before isConnected() check, which caused silent data loss on disconnect; also move lastMqttPublishMillis update inside the connected block - Add reconnection logic in loop() so the device recovers from broker outages - Remove unused #define LOGGING from MQTT.cpp Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I believe this is the first step to getting ESP32 support for the Kegbot controller. ESP32 has built in MQTT support and this will just make things a lot easier to integrate. We'll be able to rely less on sockets and this allows for any apps that subscribe to the Kegbot topic to perform actions based on that data.
The next step to get the Android app to use MQTT and then we could drop the TCP socket entirely if we wanted.