Skip to content

Hardware Component hardware

The Hardware component is a custom ESPHome text sensor hub designed for boards I manufacture. During production, each board's PCB hardware revision and model are permanently written to the ESP32's EFuse memory. This enables the firmware to automatically detect the correct hardware version at runtime without manual configuration.

The component reads these EFuse values and exposes them as text sensors, providing visibility into the physical hardware characteristics of each device.

How does it work?

Each board has its PCB revision and variant permanently encoded in EFUSE_BLK3 and for old batches EFUSE_BLK4:

ByteMeaning
0Major version
1Minor version
2Patch version
3Model

During startup, this component:

  1. Reads data from EFUSE_BLK3 and EFUSE_BLK4
  2. Parses the hardware revision into major.minor.patch format and extracts the model
  3. Exposes the results as text sensors

Example log output:

log
[I][hardware.text_sensor:034]: Model: Doorman S3
[I][hardware.text_sensor:035]: Revision: 1.6.0

Example YAML Configuration

This is an example configuration for the component in ESPHome:

yaml
external_components:
  - source: github://azoninc/doorman@master
    components: [ hardware ]

text_sensor:
  - platform: hardware
    model:
      id: doorman_model
      name: Model
    revision:
      id: doorman_hardware_version
      name: Hardware Revision

Released under the GPL 3.0 License.