Hedda
(Hedda)
February 3, 2024, 2:38pm
1
FYI; tomaszduda23 is working on an initial port of ESPHome for nRF-Connect/nRF-SDK for nRF52840:
esphome:dev
← tomaszduda23:nrf52
opened 11:17PM - 10 Jan 24 UTC
# What does this implement/fix?
It is possible to buy cheap [nrf52840 module]… (https://github.com/joric/nrfmicro/wiki). It would be very convenience to program it using yaml files.
It is proof of concept for support NRF52 on esphome.
TODO:
**Arduino**
- [x] GPIO
- [ ] GPIO Interrupts
- [x] CDC logger
- [x] UART0 logger
- [ ] UART0 logger tested
- [x] CDC DFU (0.8.2 is more stable)
- [x] becon demo
- [x] watchdog
- [ ] ESPPreferences
- [ ] preferences_prevent_write if OTA in progress
- [x] ADC
- [ ] ADC VCC
- [ ] sleep
**Zephyr**
- [x] GPIO
- [x] CDC DFU (0.8.2 is more stable)
- [x] CDC logger
- [x] generic zephyr
- [x] nrf-sdk based
- [x] UART0 logger
- [ ] UART0 logger tested
OTA:
1. https://github.com/adafruit/Adafruit_nRF52_Bootloader
- support unencrypted OTA
- unusable with nordic OTA DFU
2. https://github.com/kaidyth/nrf52_bootloader/pull/23
How to communicate with HA? Options:
- [ ] BLE serial
- 10KB/s - 2M PHY, interval of 7.5 ms, 247MTU
- [ ] BTHome
- https://github.com/esphome/feature-requests/issues/1862
- sensors only
- [ ] custom BLE service
- https://novelbits.io/bluetooth-5-speed-maximum-throughput/
- [ ] openthread https://openthread.io/codelabs/openthread-hardware#1
The SoC has only 1MB of memory. All above consume:
```bash
RAM: [= ] 5.9% (used 14736 bytes from 248832 bytes)
Flash: [== ] 17.9% (used 146000 bytes from 815104 bytes)
```
## Types of changes
- [ ] Bugfix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Other
**Related issue or feature (if applicable):** fixes <link to issue>
**Pull request in [esphome-docs](https://github.com/esphome/esphome-docs) with documentation (if applicable):** esphome/esphome-docs#<esphome-docs PR number goes here>
## Test Environment
- [ ] ESP32
- [ ] ESP32 IDF
- [ ] ESP8266
- [ ] RP2040
- [ ] BK72xx
- [ ] RTL87xx
- [x] nrf52840
## Example entry for `config.yaml`:
<!--
Supplying a configuration snippet, makes it easier for a maintainer to test
your PR. Furthermore, for new integrations, it gives an impression of how
the configuration would look like.
Note: Remove this section if this PR does not have an example entry.
-->
```yaml
---
nrf52:
board: nrf52840
esphome:
name: nrf52-test
switch:
- platform: gpio
pin:
number: 15
inverted: true
mode:
output: true
id: gpio_15
logger:
interval:
- interval: 1sec
then:
- switch.toggle: gpio_15
binary_sensor:
- platform: gpio
pin:
number: 9
mode: INPUT_PULLUP
id: gpio_9
sensor:
- platform: pulse_width
pin: P0.10
id: gpio_10
update_interval: 3s
dfu:
beacon:
```
## Checklist:
- [x] The code change is tested and works locally.
- [ ] Tests have been added to verify that the new code works (under `tests/` folder).
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated in [esphome-docs](https://github.com/esphome/esphome-docs).
That development effort might be an interesting sub-project to follow for those who (like myself) have been asking for Thread and Zigbee support in ESPHome (and perhaps posted in the feature request tracker) since Nordic Semiconductor nRF52840 do not support WiFi but does support Thread and Zigbee protocols, (similar to the ESP32-H2), with nRF52840 and the newer nRF5340 being ideal for battery-powered devices:
opened 05:50PM - 03 Sep 21 UTC
enhancement
<!-- READ THIS FIRST:
- This is for feature requests only, for issues please g… o to the issues repository.
- Please be as descriptive as possible, especially use-cases that can otherwise not be solved boost the problem's priority.
DO NOT DELETE ANY TEXT from this template! Otherwise the issue may be closed without a comment.
-->
**Describe the problem you have/What new integration you would like**
A new variant of the ESP32 [was announced last month](https://www.espressif.com/en/news/ESP32_H2), the ESP32-H2. It supports 802.15.4 and therefore Zigbee and Thread, as well as BLE, and now runs on a RISC-V architecture which should be a lot more efficient. It also still supports WiFi.
This looks super interesting because it will finally give home users a way to easily build Zigbee/Thread versions instead of WiFi ones. I think ESPHome supporting this would be a brilliant step forward.
**Please describe your use case for this integration and alternatives you've tried:**
There are no alternatives to ESPHome for Zigbee as far as I know? Or really any simple development environments for home users.
**Additional context**
Of course the H2 isn't out yet. But I think it'd be good to get a discussion on this going before it is released. Zigbee is definitely a lot more friendly to larger home installations in many ways.
Support for battery operated end Zigbee devices would also be a huge leap forward. And I would think that should be possible on the new H2.
2 Likes