feat(platformio): add new MQTT observer configurations for Heltec V4 expansion kit

Introduced two new environments in platformio.ini for the Heltec V4 expansion kit: `heltec_v4_expansionkit_repeater_observer_mqtt` and `heltec_v4_expansionkit_room_server_observer_mqtt`. Each environment includes specific build flags, dependencies, and source filters tailored for MQTT functionality, enhancing the project's capabilities for IoT applications.
This commit is contained in:
agessaman
2026-04-24 21:49:29 -07:00
parent 7b21be3e39
commit 0a4f002fef
+94
View File
@@ -197,6 +197,59 @@ lib_deps =
paulstoffregen/Time@1.6.1
0neblock/SNMP_Agent
[env:heltec_v4_expansionkit_repeater_observer_mqtt]
extends = heltec_v4_oled
extra_scripts =
${esp32_base.extra_scripts}
pre:scripts/generate_cert_bundle.py
board_ssl_cert_source = adafruit-full
board_build.embed_files = src/certs/x509_crt_bundle.bin
build_flags =
${heltec_v4_oled.build_flags}
-D DISPLAY_CLASS=SSD1306Display
-D ADVERT_NAME='"MQTT Observer"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D MAX_NEIGHBOURS=50
-D WITH_MQTT_BRIDGE=1
-D MAX_MQTT_BROKERS=3
-D MQTT_MAX_PACKET_SIZE=1024
-D MQTT_DEBUG=1
; -D MQTT_MEMORY_DEBUG=1
; Keep default observer profile less verbose to reduce runtime contention.
; Use heltec_v4_repeater_observer_mqtt_debug for deep troubleshooting.
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
-D CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y
-D ESP32_CPU_FREQ=160
-D MQTT_WIFI_TX_POWER=WIFI_POWER_11dBm
-D WITH_SNMP=1
-D ENV_PIN_SDA=4
-D ENV_PIN_SCL=3
# -D WIFI_SSID='"ssid"'
# -D WIFI_PWD='"password"'
# -D MQTT_SERVER='"your-mqtt-broker.com"'
# -D MQTT_PORT=1883
# -D MQTT_USERNAME='"your-username"'
# -D MQTT_PASSWORD='"your-password"'
build_src_filter = ${heltec_v4_oled.build_src_filter}
+<helpers/bridges/MQTTBridge.cpp>
+<helpers/MQTTMessageBuilder.cpp>
+<helpers/JWTHelper.cpp>
+<helpers/SNMPAgent.cpp>
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_repeater>
lib_deps =
${heltec_v4_oled.lib_deps}
${esp32_ota.lib_deps}
elims/PsychicMqttClient@^0.2.4
bblanchon/ArduinoJson
arduino-libraries/NTPClient
JChristensen/Timezone
paulstoffregen/Time@1.6.1
0neblock/SNMP_Agent
#[env:heltec_v4_repeater_observer_mqtt_debug]
#extends = heltec_v4_oled
#extra_scripts =
@@ -285,6 +338,47 @@ lib_deps =
JChristensen/Timezone
paulstoffregen/Time@1.6.1
[env:heltec_v4_expansionkit_room_server_observer_mqtt]
extends = heltec_v4_oled
extra_scripts =
${esp32_base.extra_scripts}
pre:scripts/generate_cert_bundle.py
board_ssl_cert_source = adafruit-full
board_build.embed_files = src/certs/x509_crt_bundle.bin
build_flags =
${heltec_v4_oled.build_flags}
-D DISPLAY_CLASS=SSD1306Display
-D ADVERT_NAME='"Heltec Room Observer"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D ROOM_PASSWORD='"hello"'
-D WITH_MQTT_BRIDGE=1
-D MAX_MQTT_BROKERS=3
-D MQTT_MAX_PACKET_SIZE=1024
-D MQTT_DEBUG=1
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
-D CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y
-D ESP32_CPU_FREQ=160
-D MQTT_WIFI_TX_POWER=WIFI_POWER_11dBm
-D ENV_PIN_SDA=4
-D ENV_PIN_SCL=3
build_src_filter = ${heltec_v4_oled.build_src_filter}
+<helpers/bridges/MQTTBridge.cpp>
+<helpers/MQTTMessageBuilder.cpp>
+<helpers/JWTHelper.cpp>
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_room_server>
lib_deps =
${heltec_v4_oled.lib_deps}
${esp32_ota.lib_deps}
elims/PsychicMqttClient@^0.2.4
bblanchon/ArduinoJson
arduino-libraries/NTPClient
JChristensen/Timezone
paulstoffregen/Time@1.6.1
[env:heltec_v4_room_server]
extends = heltec_v4_oled
build_flags =