Migrate all of the Meshtastic API attributes into the ini as a source of truth#9214
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates Meshtastic API attributes from external sources into platformio.ini files, establishing the firmware as the single source of truth for device metadata. The changes add custom_meshtastic_* attributes to device configurations across all hardware variants and updates the build system to extract and include this metadata in generated manifests.
Key Changes
- Added comprehensive device metadata attributes (hw_model, display_name, architecture, support_level, etc.) to platformio.ini files across 80+ device variants
- Enhanced bin/platformio-custom.py to parse device metadata from platformio.ini and incorporate it into manifest JSON files
- Implemented architecture inference logic and metadata field extraction with multiple naming pattern support for backward compatibility
Reviewed changes
Copilot reviewed 77 out of 78 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| variants/rp2040/rpipicow/platformio.ini | Added device metadata for Raspberry Pi Pico W variant |
| variants/rp2040/rpipico/platformio.ini | Added device metadata for Raspberry Pi Pico variant |
| variants/rp2040/rp2040-lora/platformio.ini | Added device metadata for RP2040 LoRa variant |
| variants/rp2040/rak11310/platformio.ini | Added device metadata for RAK11310 variant |
| variants/nrf52840/wio-tracker-wm1110/platformio.ini | Added device metadata for Seeed Wio WM1110 Tracker |
| variants/nrf52840/tracker-t1000-e/platformio.ini | Added device metadata for Seeed SenseCAP T1000-E tracker |
| variants/nrf52840/t-echo/platformio.ini | Added device metadata for LILYGO T-Echo |
| variants/nrf52840/t-echo-lite/platformio.ini | Added device metadata for LILYGO T-Echo Lite |
| variants/nrf52840/seeed_xiao_nrf52840_kit/platformio.ini | Added device metadata for Seeed Xiao NRF52840 Kit |
| variants/nrf52840/seeed_wio_tracker_L1_eink/platformio.ini | Added device metadata for Seeed Wio Tracker L1 E-Ink |
| variants/nrf52840/seeed_wio_tracker_L1/platformio.ini | Added device metadata for Seeed Wio Tracker L1 |
| variants/nrf52840/seeed_solar_node/platformio.ini | Added device metadata for Seeed SenseCAP Solar Node |
| variants/nrf52840/rak_wismeshtap/platformio.ini | Added device metadata for RAK WisMesh Tap |
| variants/nrf52840/rak_wismeshtag/platformio.ini | Added device metadata for RAK WisMesh Tag |
| variants/nrf52840/rak4631_nomadstar_meteor_pro/platformio.ini | Added device metadata for NomadStar Meteor Pro |
| variants/nrf52840/rak4631/platformio.ini | Added device metadata for RAK WisBlock 4631 |
| variants/nrf52840/rak3401_1watt/platformio.ini | Added device metadata for RAK3401 1W |
| variants/nrf52840/rak2560/platformio.ini | Added device metadata for RAK WisMesh Repeater |
| variants/nrf52840/r1-neo/platformio.ini | Added device metadata for muzi R1 Neo |
| variants/nrf52840/nano-g2-ultra/platformio.ini | Added device metadata for Nano G2 Ultra |
| variants/nrf52840/muzi_base/platformio.ini | Added device metadata for muzi BASE |
| variants/nrf52840/heltec_mesh_solar/platformio.ini | Added device metadata for Heltec MeshSolar |
| variants/nrf52840/heltec_mesh_pocket/platformio.ini | Added device metadata for Heltec Mesh Pocket variants |
| variants/nrf52840/heltec_mesh_node_t114/platformio.ini | Added device metadata for Heltec Mesh Node T114 |
| variants/nrf52840/diy/nrf52_promicro_diy_tcxo/platformio.ini | Added device metadata for NRF52 Pro-micro DIY |
| variants/nrf52840/canaryone/platformio.ini | Added device metadata for Canary One |
| variants/nrf52840/ELECROW-ThinkNode-M6/platformio.ini | Added device metadata for ThinkNode M6 |
| variants/nrf52840/ELECROW-ThinkNode-M3/platformio.ini | Added device metadata for Elecrow ThinkNode M3 |
| variants/nrf52840/ELECROW-ThinkNode-M1/platformio.ini | Added device metadata for ThinkNode M1 |
| variants/esp32s3/unphone/platformio.ini | Added device metadata for unPhone |
| variants/esp32s3/tracksenger/platformio.ini | Added device metadata for TrackSenger variants |
| variants/esp32s3/tlora_t3s3_v1/platformio.ini | Added device metadata for LILYGO T-LoRa T3-S3 |
| variants/esp32s3/tlora_t3s3_epaper/platformio.ini | Added device metadata for LILYGO T-LoRa T3-S3 E-Ink |
| variants/esp32s3/tlora-pager/platformio.ini | Added device metadata for LILYGO T-LoRa Pager |
| variants/esp32s3/tbeam-s3-core/platformio.ini | Added device metadata for LILYGO T-Beam Supreme |
| variants/esp32s3/t-watch-s3/platformio.ini | Added device metadata for LILYGO T-Watch S3 |
| variants/esp32s3/t-deck/platformio.ini | Added device metadata for LILYGO T-Deck |
| variants/esp32s3/t-deck-pro/platformio.ini | Added device metadata for LILYGO T-Deck Pro |
| variants/esp32s3/station-g2/platformio.ini | Added device metadata for Station G2 |
| variants/esp32s3/seeed_xiao_s3/platformio.ini | Added device metadata for Seeed Xiao ESP32-S3 |
| variants/esp32s3/seeed-sensecap-indicator/platformio.ini | Added device metadata for Seeed SenseCAP Indicator |
| variants/esp32s3/rak3312/platformio.ini | Added device metadata for RAK3312 |
| variants/esp32s3/picomputer-s3/platformio.ini | Added device metadata for Pi Computer S3 |
| variants/esp32s3/heltec_wsl_v3/platformio.ini | Added device metadata for Heltec Wireless Stick Lite V3 |
| variants/esp32s3/heltec_wireless_tracker_V1_0/platformio.ini | Added device metadata for Heltec Wireless Tracker V1.0 |
| variants/esp32s3/heltec_wireless_tracker/platformio.ini | Added device metadata for Heltec Wireless Tracker V1.1 |
| variants/esp32s3/heltec_wireless_paper_v1/platformio.ini | Added device metadata for Heltec Wireless Paper V1.0 |
| variants/esp32s3/heltec_wireless_paper/platformio.ini | Added device metadata for Heltec Wireless Paper |
| variants/esp32s3/heltec_vision_master_t190/platformio.ini | Added device metadata for Heltec Vision Master T190 |
| variants/esp32s3/heltec_vision_master_e290/platformio.ini | Added device metadata for Heltec Vision Master E290 |
| variants/esp32s3/heltec_vision_master_e213/platformio.ini | Added device metadata for Heltec Vision Master E213 |
| variants/esp32s3/heltec_v4/platformio.ini | Added device metadata for Heltec V4 |
| variants/esp32s3/heltec_v3/platformio.ini | Added device metadata for Heltec V3 |
| variants/esp32s3/elecrow_panel/platformio.ini | Added device metadata for Crowpanel display variants |
| variants/esp32s3/ELECROW-ThinkNode-M5/platformio.ini | Added device metadata for ThinkNode M5 |
| variants/esp32s3/ELECROW-ThinkNode-M2/platformio.ini | Added device metadata for ThinkNode M2 |
| variants/esp32s3/CDEBYTE_EoRa-S3/platformio.ini | Added device metadata for EBYTE EoRa-S3 |
| variants/esp32c6/m5stack_unitc6l/platformio.ini | Added device metadata for M5Stack Unit C6L |
| variants/esp32c3/heltec_esp32c3/platformio.ini | Added device metadata for Heltec HT62 |
| variants/esp32/tlora_v2_1_18/platformio.ini | Added device metadata for LILYGO T-LoRa V2.1-1.8 |
| variants/esp32/tlora_v2_1_16/platformio.ini | Added device metadata for LILYGO T-LoRa V2.1-1.6 |
| variants/esp32/tlora_v2/platformio.ini | Added device metadata for LILYGO T-LoRa V2 |
| variants/esp32/tlora_v1/platformio.ini | Added device metadata for LILYGO T-LoRa V1 |
| variants/esp32/tbeam_v07/platformio.ini | Added device metadata for LILYGO T-Beam V0.7 |
| variants/esp32/tbeam/platformio.ini | Added device metadata for LILYGO T-Beam |
| variants/esp32/station-g1/platformio.ini | Added device metadata for Station G1 |
| variants/esp32/rak11200/platformio.ini | Added device metadata for RAK WisBlock 11200 |
| variants/esp32/radiomaster_900_bandit_nano/platformio.ini | Added device metadata for RadioMaster 900 Bandit Nano |
| variants/esp32/nano-g1/platformio.ini | Added device metadata for Nano G1 |
| variants/esp32/nano-g1-explorer/platformio.ini | Added device metadata for Nano G1 Explorer |
| variants/esp32/m5stack_core/platformio.ini | Added device metadata for M5 Stack |
| variants/esp32/heltec_v2/platformio.ini | Added device metadata for Heltec V2.0 |
| variants/esp32/heltec_v2.1/platformio.ini | Added device metadata for Heltec V2.1 |
| variants/esp32/heltec_v1/platformio.ini | Added device metadata for Heltec V1 |
| variants/esp32/diy/v1/platformio.ini | Added device metadata for DIY V1 |
| variants/esp32/diy/hydra/platformio.ini | Added device metadata for Hydra |
| variants/esp32/diy/dr-dev/platformio.ini | Added device metadata for DR-DEV |
| bin/platformio-custom.py | Enhanced manifest generation to extract and process device metadata from platformio.ini files; added architecture inference, metadata field parsing, and support for multiple naming patterns |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [env:heltec-wsl-v3] | ||
| custom_meshtastic_hw_model = 44 | ||
| custom_meshtastic_hw_model_slug = HELTEC_WSL_V3 | ||
| custom_meshtastic_platformio_target = heltec-wsl-v3 | ||
| custom_meshtastic_architecture = esp32-s3 | ||
| custom_meshtastic_actively_supported = true | ||
| custom_meshtastic_support_level = 1 | ||
| custom_meshtastic_display_name = Heltec Wireless Stick Lite V3 | ||
| custom_meshtastic_images = heltec-wsl-v3.svg | ||
| custom_meshtastic_tags = Heltec | ||
| custom_meshtastic_partition_scheme = 8MB |
There was a problem hiding this comment.
The heltec-wsl-v3 environment is missing 'custom_meshtastic_requires_dfu'. Since this is an ESP32-S3 device, and most ESP32-S3 devices in the codebase have 'custom_meshtastic_requires_dfu = true', this attribute should be added for consistency.
| custom_meshtastic_images = heltec-v3.svg, heltec-v3-case.svg | ||
| custom_meshtastic_tags = Heltec | ||
| custom_meshtastic_partition_scheme = 8MB | ||
|
|
There was a problem hiding this comment.
Line 12 contains only whitespace. This should be removed or replaced with a completely empty line for consistency and to follow good coding practices.
| [env:heltec-ht62-esp32c3-sx1262] | ||
| custom_meshtastic_hw_model = 53 | ||
| custom_meshtastic_hw_model_slug = HELTEC_HT62 | ||
| custom_meshtastic_platformio_target = heltec-ht62-esp32c3-sx1262 | ||
| custom_meshtastic_architecture = esp32-c3 | ||
| custom_meshtastic_actively_supported = true | ||
| custom_meshtastic_support_level = 1 | ||
| custom_meshtastic_display_name = Heltec HT62 | ||
| custom_meshtastic_images = heltec-ht62-esp32c3-sx1262.svg | ||
| custom_meshtastic_tags = Heltec |
There was a problem hiding this comment.
The heltec-ht62-esp32c3-sx1262 environment is missing 'custom_meshtastic_requires_dfu'. Since this is an ESP32-C3 device, and most ESP32 devices in the codebase have this attribute explicitly set, it should be added for consistency and completeness.
| @@ -1,4 +1,16 @@ | |||
| [env:tlora-t3s3-epaper] | |||
| custom_meshtastic_hw_model = 16 | |||
There was a problem hiding this comment.
Both 'tlora-t3s3-v1' and 'tlora-t3s3-epaper' environments share the same hardware model ID (16) and hw_model_slug (TLORA_T3_S3). While they may be variants of the same base hardware, the e-paper version has different capabilities (has_inkhud). Consider whether these should have unique hw_model IDs or if the variant should be distinguished through other metadata fields.
| extends = nrf52840_base | ||
| board = heltec_mesh_pocket | ||
| debug_tool = jlink | ||
| custom_device_hw_model = 94 |
There was a problem hiding this comment.
This line uses 'custom_device_hw_model' instead of 'custom_meshtastic_hw_model'. This is inconsistent with the naming convention used throughout the rest of the codebase and could cause issues if the manifest generation code doesn't recognize this variant. Additionally, this creates a duplicate definition since line 14 already defines custom_meshtastic_hw_model. This line should be removed.
| ; Hydra - Meshtastic DIY v1 hardware with some specific changes | ||
| [env:hydra] | ||
| custom_meshtastic_hw_model = 39 | ||
| custom_meshtastic_hw_model_slug = HYDRA |
There was a problem hiding this comment.
Both 'meshtastic-diy-v1' and 'hydra' environments share the same hardware model ID (39), but have different hw_model_slug values (DIY_V1 and HYDRA). Each unique device should have its own hardware model ID. If these are truly the same hardware, they should share the same slug; if they're different devices, they need unique hw_model values.
| custom_meshtastic_hw_model_slug = HYDRA | |
| custom_meshtastic_hw_model_slug = DIY_V1 |
| @@ -1,4 +1,14 @@ | |||
| [env:tracksenger] | |||
| custom_meshtastic_hw_model = 48 | |||
There was a problem hiding this comment.
Multiple distinct devices share hardware model ID 48: 'tracksenger', 'tracksenger-lcd', 'tracksenger-oled', and 'heltec-wireless-tracker'. While they all use HELTEC_WIRELESS_TRACKER as the slug and may be based on the same hardware, if they represent distinct build variants with different display configurations, they should either have unique hw_model IDs or use the variant field to distinguish them consistently.
| [env:tracksenger-oled] | ||
| custom_meshtastic_hw_model = 48 | ||
| custom_meshtastic_hw_model_slug = HELTEC_WIRELESS_TRACKER | ||
| custom_meshtastic_platformio_target = tracksenger-oled | ||
| custom_meshtastic_architecture = esp32-s3 | ||
| custom_meshtastic_actively_supported = true | ||
| custom_meshtastic_support_level = 3 | ||
| custom_meshtastic_display_name = TrackSenger (big OLED) | ||
| custom_meshtastic_partition_scheme = 8MB |
There was a problem hiding this comment.
The 'tracksenger-oled' environment is missing the 'custom_meshtastic_requires_dfu' attribute, while the other tracksenger variants ('tracksenger' and 'tracksenger-lcd') include it set to true. For consistency and completeness, this attribute should be added with the appropriate value.
| ; LilyGo T-Watch S3 | ||
| [env:t-watch-s3] | ||
| custom_meshtastic_hw_model = 51 | ||
| custom_meshtastic_hw_model_slug = T_WATCH_S3 | ||
| custom_meshtastic_platformio_target = t-watch-s3 | ||
| custom_meshtastic_architecture = esp32-s3 | ||
| custom_meshtastic_actively_supported = true | ||
| custom_meshtastic_support_level = 3 | ||
| custom_meshtastic_display_name = LILYGO T-Watch S3 | ||
| custom_meshtastic_images = t-watch-s3.svg | ||
| custom_meshtastic_tags = LilyGo | ||
| custom_meshtastic_partition_scheme = 8MB |
There was a problem hiding this comment.
The t-watch-s3 environment is missing 'custom_meshtastic_requires_dfu'. Since this is an ESP32-S3 device like most others in the esp32s3 variants directory, and most ESP32-S3 devices have 'custom_meshtastic_requires_dfu = true', this attribute should probably be added for consistency.
| custom_meshtastic_images = heltec-wsl-v3.svg | ||
| custom_meshtastic_tags = Heltec | ||
| custom_meshtastic_partition_scheme = 8MB | ||
|
|
There was a problem hiding this comment.
Line 12 contains only whitespace. This should be removed or replaced with a completely empty line for consistency and to follow good coding practices.
… of truth (meshtastic#9214) * Migrate all of the Meshtastic API attributes into the ini as a source of truth * Cleanup garbage coalescing * Another spot * We already account for inkhud and mui * Consolidate * Removed them * Boogers * Infer * Copying manifest should always succeed * Remove portduino guards * Rename * None
… of truth (meshtastic#9214) * Migrate all of the Meshtastic API attributes into the ini as a source of truth * Cleanup garbage coalescing * Another spot * We already account for inkhud and mui * Consolidate * Removed them * Boogers * Infer * Copying manifest should always succeed * Remove portduino guards * Rename * None
There needs to be some post cleanup to consolidate some of the stuff that's in here, but for now, it should satisfy the API requirements and consolidate the data into the firmware being the source of truth instead of the API resource TS.
Example mt.json manifest from
rak_wismeshtag