Skip to content

v1.12.5 - Builder Architecture Consolidation (2025-12-09)

What Changed?

This release consolidates the device response builder architecture by merging DeviceEventBuilder into DeviceResponseBuilder. The unified builder provides a single, cohesive interface for creating both command responses and detection events through the device response protocol. This refactoring improves code maintainability while maintaining zero impact on firmware functionality and size.


What's New

Refactoring: Unified DeviceResponseBuilder

What it does: The separate DeviceEventBuilder class has been merged into DeviceResponseBuilder. Event building is now a method on the unified builder, reducing code duplication and providing a single factory for all device response generation.

How to use it: For events, use the same DeviceResponseBuilder class with the from_event() method:

Code example:

// Before (v1.12.4)
JsonDocument doc = DeviceEventBuilder::from_event(&data);

// After (v1.12.5)
JsonDocument doc = DeviceResponseBuilder::from_event(&data);

Installation

Quick Start

# Get the release
git checkout v1.12.5

# Build
task build

# Upload
task upload

# Check it works
task monitor

What's Different from the Last Version?

✅ Added

  • DeviceResponseBuilder::from_event() method for unified event building

🔧 Changed

  • DeviceEventBuilder consolidated into DeviceResponseBuilder (single builder class)
  • Removed device_event_builder.h and device_event_builder.cpp files
  • Internal builder architecture now single-purpose, reducing maintenance surface

🐛 Fixed

  • None (this is a pure refactoring with no behavioral changes)

Is It Safe to Upgrade?

Backward Compatible: Yes

  • Internal refactoring only; no changes to firmware behavior, output format, or API
  • All existing detection events and command responses work identically
  • Code size and RAM usage unchanged

Tests Passed

  • ✅ Builds without errors (esp32dev-dev environment)
  • ✅ RAM usage: 8.8% (28828 bytes)
  • ✅ Flash usage: 26.6% (349237 bytes)

Release Details

  • Date: 2025-12-09
  • Version: v1.12.5
  • Files Changed: 4 files modified, 2 files deleted
  • Modified: device_response_builder.h, device_response_builder.cpp, main.cpp, detection_buffer.cpp
  • Deleted: device_event_builder.h, device_event_builder.cpp
  • Commits: 2 commits
  • ce3c866: Merge DeviceEventBuilder into DeviceResponseBuilder
  • 0bda599: Remove DeviceEventBuilder files

Next Steps

Phase 2 of the Unified Device Response Protocol will focus on integrating the builder with command handlers and complete event serialization. Future phases will continue expanding protocol coverage and client-side support.