Skip to content

Commit 4bffa2b

Browse files
committed
chore: add info about issues caused by Bluetooth components
Fixes #21
1 parent fd621da commit 4bffa2b

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,39 @@ api:
6969
id(nspanel).upload_tft(url);
7070
```
7171

72+
### Coexistence with Bluetooth components
73+
74+
There is a [known issue](https://github.com/sairon/esphome-nspanel-lovelace-ui/issues/21) that some operations,
75+
especially the TFT firmware update, can become unreliable when components using Bluetooth are enabled
76+
(like [esp32_ble_tracker](https://esphome.io/components/esp32_ble_tracker.html) or its extension
77+
[bluetooth_proxy](https://esphome.io/components/bluetooth_proxy.html)). Generally it's recommended
78+
to disable the Web Server component and do a re-flash using the serial cable if the device was originally
79+
flashed using ESPHome version older than 2012.12.0. However, this doesn't fix the problem during the TFT update.
80+
A workaround is to stop the Bluetooth scanning before the upgrade is started. To do that, simply add an ID to
81+
the `esp32_ble_tracker` component (it's added implicitly with `bluetooth_proxy`, so if you don't have it in
82+
your configuration, just add it), e.g.:
83+
84+
```yaml
85+
esp32_ble_tracker:
86+
id: ble_tracker
87+
```
88+
89+
and then modify the `upload_tft` action to call the `stop_scan` action on it before the upload is started:
90+
91+
```yaml
92+
- service: upload_tft
93+
variables:
94+
url: string
95+
then:
96+
- lambda: |-
97+
id(ble_tracker).stop_scan();
98+
id(nspanel).upload_tft(url);
99+
```
100+
101+
Please note that the upgrade will still fail if it is performed from the on-screen notification about new
102+
firmware version. Unfortunately there is no easy fix for that, in that case it is recommended to avoid
103+
`auto` or `auto-notify` options for the `updateMode` in the backend configuration.
104+
72105
### Other functions
73106

74107
There are currently few more public functions which can be useful for debugging or writing custom automations

0 commit comments

Comments
 (0)