[nrf52,ota] allow to update OTA via cmd#12344
[nrf52,ota] allow to update OTA via cmd#12344tomaszduda23 wants to merge 29 commits intoesphome:devfrom
Conversation
|
To use the changes from this PR as an external component, add the following to your ESPHome configuration YAML file: external_components:
- source: github://pr#12344
components: [nrf52]
refresh: 1h(Added by the PR bot) |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #12344 +/- ##
==========================================
- Coverage 74.28% 74.26% -0.03%
==========================================
Files 55 55
Lines 11597 11597
Branches 1583 1583
==========================================
- Hits 8615 8612 -3
- Misses 2578 2580 +2
- Partials 404 405 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Memory Impact AnalysisComponents:
This analysis runs automatically when components change. Memory usage is measured from a representative test configuration. |
There was a problem hiding this comment.
Pull request overview
Adds support for uploading nRF52 (Zephyr/MCUBoot) firmware updates via esphome upload ... --device ... using mcumgr/SMP over BLE (by name or MAC) or serial, integrating it into the existing nRF52 upload flow.
Changes:
- Add an nRF52 OTA uploader (
smpclient-based) supporting BLE scan-by-name and direct BLE MAC / serial device targeting. - Route nRF52 uploads to the new mcumgr path when
BOOTLOADER_MCUBOOTis used, and allow explicit--device BLE/--device <MAC>selection. - Update Python dependencies to include
smpclientand adjust the pinnedbleakversion.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| requirements.txt | Adds smpclient and changes the pinned bleak version. |
| esphome/components/nrf52/ota.py | New mcumgr/SMP upload implementation (BLE + serial). |
| esphome/components/nrf52/init.py | Hooks the new uploader into the nRF52 upload_program path and tweaks BLE logger scan usage. |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
|
retested |
What does this implement/fix?
It can be used in following way.
Types of changes
Related issue or feature (if applicable):
Pull request in esphome-docs with documentation (if applicable):
Test Environment
Example entry for
config.yaml:# Example config.yamlChecklist:
tests/folder).If user exposed functionality or configuration variables are added/changed: