esphome / esphome/feature-requests

Safe Mode-only OTA

Open
#1,764 5 comments 2 reactions 0 assignees View on GitHub
component: ota
Dominant language
No language data
Stars
450
Forks
29
PR merge metrics
No merged PRs in 30d

Description

**Describe the problem you have/What new integration you would like**
Add an optional configuration parameter to only allow OTA when in `safe_mode` state.
Benefits, with such an option set to `true`:
- memory freed up. The whole OTA server stuff would not load at all during normal boot
- additional security layer. Device has to be rebooted in `safe_mode` state first, to be able to OTA to it - and putting it in such a state requires first access through the API, which can be secured on its own.

**Please describe your use case for this integration and alternatives you've tried:**
It's known that OTA doesn't work when using with BLE. Thus loading OTA server service is completely useless, moreover, its contra-productive as it occupies memory in a circumstance when memory is low anyway.

**Additional context**
- Config validation should only allow this parameter to be `true` if a `button` or a `switch` from the `safe_mode` platform is present
- Dashboard should know this, and only allow "wireless" update when it finds the node in safe mode.

Contributor guide

No contributing guide indexed for this repository

Research direction

No files or tests are named. Start by tracing configuration validation, safe_mode button or switch handling, OTA server startup, and the dashboard's wireless-update flow. Done means the option is validated as requested, OTA is available only in safe mode, and the dashboard reflects that restriction.

Written by the indexing model from the issue text.

Assessment

Domain
embedded-iot
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.