esphome / esphome/issues

Preferences lost on flashing over Serial

Open
#4,370 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
313
Forks
40
PR merge metrics
No merged PRs in 30d

Description

### The problem

I could not find a similar issue or open feature request to address this. This could just as well be a feature request, but here it goes:

When flashing new ESPHome firmware to an ESP32 board it seems a full factory reset is performed, as all my preferences / Non-volatile storage parameters have been reset. It took me a long time to figure out that the resetting of these parameter was caused by the Serial flashing...

It makes sense that for some usecases, especially when changing e.g. the partitions of the flash, a full factory default binary is flashed. However, this may not always be desirable. As in my usecase where Serial debug logging was required (to figure out what was happening _before_ WiFi got connected) it's just really convenient to flash over Serial instead of over WiFi (as that tends to time-out every now and then).

Either;
- This is a bug that needs fixing.
- Or its a new feature: `The option to select between complete flash overwrite, or only FW update when flashing over Serial`

### Which version of ESPHome has the issue?

2023.4.0-dev

### What type of installation are you using?

Docker

### Which version of Home Assistant has the issue?

-

### What platform are you using?

ESP32

### Board

ESP32-D1-Mini

### Component causing the issue

Serial Flashing

### Example YAML snippet

```yaml
N/a
```

### Anything in the logs that might be useful for us?

_No response_

### Additional information

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.