-
Notifications
You must be signed in to change notification settings - Fork 140
Description
Hi all
I wanted to share my recent learning on how to build the MQTT version of the project using Platform IO now in 2025.
I see with later Arduino versions there are some breaking changes to the code so you need to downgrade the framework to get the code to compile correctly.
In addition to this you also need to forward declare the functions used in code or the PIO compile will throw an error not being able to find the function.
So net net to compile the project change the platformio.ini to include the right version of the Framework this config worked for me:
[env:esp32doit-devkit-v1]
platform = espressif32 @ 6.4.0
board = esp32doit-devkit-v1
framework = arduino
lib_deps =
taligentx/dscKeybusInterface@^3.0
knolleary/PubSubClient@^2.8
Secondly put the following declarations before any of the functions in the main.cpp
// PIO forward defines
void mqttCallback(char* topic, byte* payload, unsigned int length);
bool mqttConnect();
void mqttHandle();
void publishMessage(const char* sourceTopic, byte partition);
void appendPartition(const char* sourceTopic, byte sourceNumber, char* publishTopic);
Hope this helps anyone trying to build this project on the later version of Platform IO.
Once I did this the MQTT version has been work flawlessly !