Skip to content

Firmware fixes: BLE power with proxy off, humidity offset correction, warm-up gate, Estimated Room names, OTA encryption note - #151

Closed
TrevorSchirmer wants to merge 6 commits into
betafrom
fix/ble-power-humidity-warmup
Closed

TrevorSchirmer wants to merge 6 commits into
betafrom
fix/ble-power-humidity-warmup

Conversation

@TrevorSchirmer

Copy link
Copy Markdown
Member

Version: 26.11.15.2

What does this implement/fix?

A batch of small firmware fixes:

  • Bluetooth Proxy switch powers BLE on/off (switchable bluetooth proxy excessive power/heat #130). esp32_ble now has enable_on_boot: false. Turning the switch on enables the stack and starts continuous scanning. Turning it off stops the scan and disables the stack, so a unit with the proxy off no longer carries the radio's power draw and self-heating. The boot-time re-apply (on_boot priority -300) uses the same scripts. AIR-1_BLE still defaults the proxy to ON (RESTORE_DEFAULT_ON). The Factory image keeps the stack powered (ble_always_on: "true") for Improv-over-BLE but still stops scanning while the proxy is off.
  • Humidity corrected for the temperature offset (Temperature offset leaves humidity uncorrected; self-heating depends on the SEN55 fan (measurements) #145). SEN55 humidity is re-referenced from the raw SEN55 temperature to the offset-corrected temperature at constant vapour pressure (Magnus, same coefficients as Predicted_Room.yaml). The flat humidity offset is then applied and the result is clamped to 0-100. NaN readings pass through. The 6.0 C temperature-offset default is unchanged; it needs more hardware data before changing. Side effect: Estimated Room Humidity (disabled by default) now gets a corrected SEN55 term, so with the default 6 C offset it reads several %RH higher than before (for example about +9 %RH at 35 % raw / 28 C).
  • Warm-up gate (first humidity/temperature readings are off and should be suppressed #147). For the first 3 minutes after boot, SEN55 temperature and humidity readings are dropped, but only while deep sleep is prevented (Prevent Sleep or OTA Mode), so sleeping units still report. This is the first filter on both sensors, ahead of the offset correction and reduced reporting.
  • Rename (Predicted Temperature is misnamed #141). "Predicted Room Temperature/Humidity" is renamed to "Estimated Room Temperature/Humidity". The entity ids are unchanged.
  • OTA encryption note (OTA Encryption not supported #137). A comment in Core.yaml shows the two-flash migration from the packaged OTA password to encryption by extending ota_esphome. No behaviour change.

The ESP Temperature difference with the proxy off still needs a check on hardware.

Fixes #130
Fixes #145
Fixes #147
Fixes #141
Fixes #137

Types of changes

  • Bugfix (fixed change that fixes an issue)
  • New feature (thanks!)
  • Breaking change (repair/feature that breaks existing functionality)
  • Dependency Update - Does not publish
  • Other - Does not publish
  • Website of github readme file update - Does not publish
  • Github workflows - Does not publish

Checklist / Checklijst:

  • The code change has been tested and works locally
  • The code change has not yet been tested

If user-visible functionality or configuration variables are added/modified:

  • Added/updated documentation for the web page

The switch only paused the BLE scanner, so the BLE stack stayed powered
and the unit kept most of the radio's power draw and self-heating with
the proxy off. Start esp32_ble with enable_on_boot: false and have the
switch (and the on_boot re-apply, which also runs on every deep-sleep
wake) enable the stack and scan when on, and stop scanning and disable
the stack when off.

AIR-1_BLE keeps RESTORE_DEFAULT_ON, so legacy BLE devices still come up
proxying. The Factory image keeps the stack powered (ble_always_on) so
Improv-over-BLE provisioning keeps working.

Fixes #130
The SEN55 Temperature Offset corrects for enclosure self-heating, but
humidity was left as measured at the warmer internal temperature, so it
read several points low. Re-reference RH to the offset-corrected
temperature at constant vapour pressure (Magnus formula, same
coefficients as Predicted_Room.yaml) using the unfiltered SEN55
temperature from the same read, then subtract the flat humidity offset
and clamp to 0-100. NaN inputs fall back to the uncorrected value.

Fixes #145
The first SEN55 temperature and humidity readings after power-up are off
while the sensor and enclosure settle. Add a warm-up gate as the first
filter on both sensors that drops values for the first 3 minutes after
boot, the same window the room estimate sensors use.

The gate only applies while deep sleep is prevented (Prevent Sleep or
OTA Mode). A sleeping unit is awake about 2 minutes per cycle and would
otherwise never report temperature or humidity.

Dropped values never reach the later filters, so the humidity
correction and offsets only see post-warm-up readings.

Fixes #147
The two sensors are a sensor-fusion estimate of current room conditions
with self-heating compensation, not a forecast. Rename them to
"Estimated Room Temperature" and "Estimated Room Humidity" and update
the comment wording to match. The C++ ids (predicted_room_temperature,
predicted_room_humidity) and the package file name are unchanged.

Both sensors are disabled by default and only on beta so far; users who
enabled them will get new Home Assistant entities and can delete the
old ones.

Fixes #141
The packaged OTA entry sets the default password. Add a comment next to
the ota_password substitution showing the two-flash migration from
device YAML, extending the packaged entry (ota_esphome) instead of
adding a second one:

1. Keep the password and add encryption with allow_plaintext_upload,
   so the running firmware's password prompt can still be answered on
   the plaintext upload (ESPHome allows password + encryption only in
   this migration form, and does not build the password in).
2. Remove the password and drop allow_plaintext_upload.

No behaviour change.

Fixes #137
@coderabbitai

coderabbitai Bot commented Nov 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 49 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3e19d6dc-64d5-493d-8cfc-9416d6ee3176
Commits

Reviewing files that changed from the base of the PR and between aef1927 and 3e4994d.

Files selected for processing: 3

  • Integrations/ESPHome/AIR-1_Factory.yaml
  • Integrations/ESPHome/Core.yaml
  • Integrations/ESPHome/Predicted_Room.yaml
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@TrevorSchirmer

Copy link
Copy Markdown
Member Author

Folded into #150, which now carries these changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Bug fix

Projects

None yet

3 participants