Skip to content

Migrate all of the Meshtastic API attributes into the ini as a source of truth#9214

Merged
thebentern merged 12 commits into
developfrom
manifest-api
Jan 7, 2026
Merged

Migrate all of the Meshtastic API attributes into the ini as a source of truth#9214
thebentern merged 12 commits into
developfrom
manifest-api

Conversation

@thebentern

@thebentern thebentern commented Jan 7, 2026

Copy link
Copy Markdown
Contributor

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

{
  "version": "2.7.18.70f909d",
  "build_epoch": 1767765600,
  "board": "rak_wismeshtag",
  "mcu": "nrf52840",
  "repo": "meshtastic/firmware",
  "files": [
    {
      "name": "firmware-rak_wismeshtag-2.7.18.70f909d.elf",
      "md5": "bc94384fdcae559bc52ded672637999d",
      "bytes": 1308396
    },
    {
      "name": "firmware-rak_wismeshtag-2.7.18.70f909d.hex",
      "md5": "c71949f35e0e8ce03e68febbb1dc2fd9",
      "bytes": 1923452
    },
    {
      "name": "firmware-rak_wismeshtag-2.7.18.70f909d.uf2",
      "md5": "2beb1bb30153c68d91b64eed1267f77a",
      "bytes": 1368064
    },
    {
      "name": "firmware-rak_wismeshtag-2.7.18.70f909d-ota.zip",
      "md5": "fccb20041ac9edf662846a8c23dedeca",
      "bytes": 684795
    }
  ],
  "has_mui": false,
  "has_inkhud": false,
  "hwModel": 105,
  "hwModelSlug": "WISMESH_TAG",
  "architecture": "nrf52840",
  "activelySupported": true,
  "displayName": "RAK WisMesh Tag",
  "supportLevel": 1,
  "images": [
    "rak_wismesh_tag.svg"
  ],
  "tags": [
    "RAK"
  ],
  "requiresDfu": true,
  "key": "rak_wismeshtag",
  "platformioTarget": "rak_wismeshtag"
}

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +1 to +11
[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

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
custom_meshtastic_images = heltec-v3.svg, heltec-v3-case.svg
custom_meshtastic_tags = Heltec
custom_meshtastic_partition_scheme = 8MB

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 12 contains only whitespace. This should be removed or replaced with a completely empty line for consistency and to follow good coding practices.

Suggested change

Copilot uses AI. Check for mistakes.
Comment on lines 1 to +10
[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

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@@ -1,4 +1,16 @@
[env:tlora-t3s3-epaper]
custom_meshtastic_hw_model = 16

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
extends = nrf52840_base
board = heltec_mesh_pocket
debug_tool = jlink
custom_device_hw_model = 94

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
; Hydra - Meshtastic DIY v1 hardware with some specific changes
[env:hydra]
custom_meshtastic_hw_model = 39
custom_meshtastic_hw_model_slug = HYDRA

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
custom_meshtastic_hw_model_slug = HYDRA
custom_meshtastic_hw_model_slug = DIY_V1

Copilot uses AI. Check for mistakes.
@@ -1,4 +1,14 @@
[env:tracksenger]
custom_meshtastic_hw_model = 48

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines 35 to +63
[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

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines 1 to +12
; 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

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
custom_meshtastic_images = heltec-wsl-v3.svg
custom_meshtastic_tags = Heltec
custom_meshtastic_partition_scheme = 8MB

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 12 contains only whitespace. This should be removed or replaced with a completely empty line for consistency and to follow good coding practices.

Copilot uses AI. Check for mistakes.
Comment thread variants/esp32/diy/v1/platformio.ini Outdated
@thebentern thebentern added the enhancement New feature or request label Jan 7, 2026
@thebentern thebentern merged commit 1a6cbb5 into develop Jan 7, 2026
75 checks passed
@thebentern thebentern deleted the manifest-api branch January 7, 2026 21:25
vicliu624 pushed a commit to vicliu624/firmware that referenced this pull request Jan 13, 2026
… 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
jeek pushed a commit to jeek/Meshtastic-Exploiteers-Hacker-Pager that referenced this pull request Jun 30, 2026
… 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants