Skip to content

v1.13.13 - Enhanced Device Introspection & RTC Commands (2025-12-11)

What Changed?

This release adds new command utilities for device introspection and improves RTC command responses. The GET_BUILD_TYPE command enables runtime identification of firmware build variants, while individual BME280 sensor query commands (GET_BME280_TMP, GET_BME280_ATM, GET_BME280_HMD) allow clients to request specific sensor data. RTC time commands now return proper JSON payloads following Phase 6 architecture patterns. All changes maintain backward compatibility with existing features.


What's New

Feature 1: Build Type Identification (GET_BUILD_TYPE)

What it does: Returns the PlatformIO environment name used to compile the firmware, enabling runtime identification of which build variant is running on the device.

How to use it: Send the GET_BUILD_TYPE command to query the build type.

Code example:

// Request
GET_BUILD_TYPE

// Response (dev build)
{"type":"response","status":"ok","sent_at":12345,"build_type":"dev"}

// Response (release build)
{"type":"response","status":"ok","sent_at":12345,"build_type":"release"}

Build Type Values:

  • "release" - Production release (esp32dev-release)
  • "dev" - Development with full features (esp32dev-dev)
  • "dev-next" - Next development iteration (esp32dev-next)
  • "dev-wifi" - WiFi testing build (esp32dev-wifi)

Feature 2: Individual BME280 Sensor Queries

What it does: Three new commands allow querying individual environmental sensor values instead of requesting all three together. Useful for bandwidth-constrained or specific measurement scenarios.

How to use it: Send GET_BME280_TMP, GET_BME280_ATM, or GET_BME280_HMD to get temperature, pressure, or humidity respectively.

Code example:

// Get temperature only
GET_BME280_TMP
{"type":"response","status":"ok","sent_at":12345,"tmp_c":25.35}

// Get atmospheric pressure only
GET_BME280_ATM
{"type":"response","status":"ok","sent_at":12345,"atm_pa":1013.25}

// Get relative humidity only
GET_BME280_HMD
{"type":"response","status":"ok","sent_at":12345,"hmd_pct":45.67}

// Get all sensor data (existing command)
GET_BME280
{"type":"response","status":"ok","sent_at":12345,"tmp_c":25.35,"atm_pa":1013.25,"hmd_pct":45.67}

Field Naming:

  • Temperature: tmp_c (Celsius)
  • Pressure: atm_pa (Pascals)
  • Humidity: hmd_pct (Percentage)

Feature 3: RTC Command Response Improvements

What it does: SET_RTC_TIME and GET_RTC_TIME commands now return proper JSON payloads with the timestamp value, following Phase 6 architecture patterns.

How to use it: Commands work the same as before, but now provide confirmation/current time in response payload.

Code example:

// Set RTC time to unix timestamp 1732046789
SET_RTC_TIME 1732046789
{"type":"response","status":"ok","sent_at":12345,"rtc_time":1732046789}

// Get current RTC time
GET_RTC_TIME
{"type":"response","status":"ok","sent_at":12345,"rtc_time":1732046789}

Installation

Quick Start

# Get the release
git checkout v1.13.13

# Build
task build

# Upload
task upload

# Check it works
task monitor

What's Different from the Last Version?

✅ Added

  • GET_BUILD_TYPE command for runtime build variant identification
  • GET_BME280_TMP command for temperature-only sensor queries
  • GET_BME280_ATM command for pressure-only sensor queries
  • GET_BME280_HMD command for humidity-only sensor queries
  • JSON payload responses for SET_RTC_TIME and GET_RTC_TIME commands

🔧 Changed

  • GET_BME280 now returns JSON payload with all sensor data
  • RTC handlers refactored to Phase 6 Payload Pointer Pattern
  • Enhanced command documentation with clear JSDoc comments

🐛 Fixed

  • RTC commands now return confirmation/current time in response (previously empty)

Is It Safe to Upgrade?

Backward Compatible: Yes

  • All new commands are additions; existing commands remain functional
  • GET_BME280 behavior enhanced with proper JSON responses
  • RTC commands work the same way for clients; only response format improved
  • No breaking changes to serial protocol or command syntax

Tests Passed

  • ✅ Builds without errors (all PlatformIO environments)
  • ✅ Pre-commit hooks pass (formatting, trailing whitespace, YAML/JSON validation)
  • ✅ Command dispatcher table complete and consistent
  • ✅ Phase 6 Payload Pointer Pattern implementation verified

Release Details

  • Date: 2025-12-11
  • Version: v1.13.13
  • Files Changed: 5
  • src/command/build_type.cpp (new)
  • src/command/bme280.cpp (enhanced)
  • src/command/rtc.cpp (refactored)
  • src/command_manager.cpp (updated)
  • include/command.h (updated)
  • include/config.h (updated)
  • platformio.ini (updated)

Next Steps

  • Phase 1 of Unified Device Response Protocol consolidation continues
  • GNSS and WiFi command handlers pending Phase 6 pattern migration
  • CommandParser class planned for v1.14.0 to centralize argument parsing