Skip to content

Added MQTT support. - #8

Open
rplankenhorn wants to merge 4 commits into
Kegbot:masterfrom
rplankenhorn:feature/mqtt
Open

Added MQTT support.#8
rplankenhorn wants to merge 4 commits into
Kegbot:masterfrom
rplankenhorn:feature/mqtt

Conversation

@rplankenhorn

@rplankenhorn rplankenhorn commented Sep 23, 2025

Copy link
Copy Markdown

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.

rplankenhorn and others added 3 commits September 27, 2025 17:11
- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant