Essentially. But hope isn’t really necessary as esphome set’s the “successful boot” flag not right after booting (typically only a few seconds) but has kind of a “cool down” till it declares a boot “successful”. So just power cycle it like 10 times every 10 seconds should easily let you activate the safe mode.
But one thing you can even try even before activiting the safe mode is to just try to ota it directly:
So in that case if you have esphome locally installed (for example with pip ) on your laptop you should be able to call:
esphome run garden_lights_front_1.yaml --device 192.168.30.121
from the terminal to verify, compile and ota upload directly to 192.168.30.121
sparkydave
(🇦🇺 Dave)
September 21, 2022, 12:38am
22
Thanks for all that, I’ll give it a try tonight.
sparkydave
(🇦🇺 Dave)
September 21, 2022, 10:22am
23
Sorry to be a noob here but I get the following error:
C:\Users\David>esphome version
Version: 2022.9.0
C:\Users\David>esphome run garden_lights_front_1.yaml --device 192.168.30.121
←[32mINFO Reading configuration garden_lights_front_1.yaml...←[0m
←[31mERROR Error while reading config: Invalid YAML syntax:
Error reading file garden_lights_front_1.yaml: [Errno 2] No such file or directo
ry: 'garden_lights_front_1.yaml'←[0m
C:\Users\David>
So I have no idea where I need to save the yaml file…
You can just open the terminal in the folder where the file is located and then just run the esphome ...
command.
At the moment you are running esphome in that path: C:\Users\David
Ether copy your yaml to that directory (your “home” directory) or just open a terminal in the directory that stores your yaml file already
sparkydave
(🇦🇺 Dave)
September 21, 2022, 8:07pm
25
Thank you. I’m a step closer, I get the .bin file complied and ESPhome tries to connect to the device but it fails to connect. Perhaps I’m not power cycling it properly to get into the safe boot mode. I’ll keep trying with various on/off timing.
error:
←[32mINFO Successfully compiled program.←[0m
←[32mINFO Connecting to 192.168.30.121←[0m
←[31mERROR Connecting to 192.168.30.121:8266 failed: [WinError 10061] No connect
ion could be made because the target machine actively refused it←[0m
Can you get logs from the device?
esphome logs garden_lights_front_1.yaml --device 192.168.30.121
sparkydave
(🇦🇺 Dave)
September 22, 2022, 9:57am
27
Same error as above.
I’ll try a few more times to see if perhaps I’m not getting the device into safe boot mode.
Spiro
September 22, 2022, 11:39am
28
And if that doesn’t work, it’s time for
Blacky
September 22, 2022, 11:50am
29
@sparkydave
Here is a link from OttoWinter the founder of ESPHome. This should help and answer some questions.
opened 08:23PM - 17 Oct 19 UTC
closed 10:26PM - 05 Dec 20 UTC
integration: ota
stale
<!-- Thanks for reporting a bug for this project. READ THIS FIRST:
- Provide … as many details as possible. Simply saying "X gives bug" or "X gives error" is not enough!
- Paste logs, configuration sample and code into the backticks (```).
- Read through the template carefully and fill out all missing details.
- Please also search for similar issues in this issue tracker first and read through the ESPHome FAQ.
DO NOT DELETE ANY TEXT from this template! Otherwise the issue may be closed without a comment.
-->
**Operating environment/Installation (Hass.io/Docker/pip/etc.):**
<!--
Please provide details about your environment below this line. -->
Hass.io HassOS 3.5
Home Assistant 0.100.2
ESPHome 1.13.6
**ESP (ESP32/ESP8266, Board/Sonoff):**
<!--
Please provide details about which ESP you're using below.
-->
ESP8266, Arilux AL-LC11
**Affected component:**
<!--
Please add the link to the documentation at https://esphome.io/index.html of the component in question.
-->
https://esphome.io/components/remote_receiver.html
https://esphome.io/components/ota.html
**Description of problem:**
For test purpose I tried to increase the buffer_size of the component remote_receiver.
After this my device is still available on the network (reply to ping) but I can't access to log or upload new version via OTA.
**Problem-relevant YAML-configuration entries:**
```yaml
esphome:
name: led_xxx
platform: ESP8266
board: esp01_1m
wifi:
ssid: "xxx"
password: "xxx"
sensor:
- platform: wifi_signal
name: "Signal WiFi LED xxx"
update_interval: 60s
- platform: uptime
name: Uptime LED xxx
binary_sensor:
- platform: status
name: "Status LED xxx"
remote_receiver:
pin:
number: GPIO04
inverted: True
dump: all
buffer_size: 10000
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
light:
- platform: rgb
name: "LED xxx"
red: output_component1
green: output_component2
blue: output_component3
id: led_strip
output:
- platform: esp8266_pwm
id: output_component1
pin: GPIO5
- platform: esp8266_pwm
id: output_component2
pin: GPIO13
- platform: esp8266_pwm
id: output_component3
pin: GPIO12
```
**Logs (if applicable):**
<!--
Please copy the debug log here. If possible, also connect to the ESP over USB and copy those logs into the backticks.
-->
**Compile And Upload led_xxx.yaml**
```
INFO Reading configuration...
INFO Generating C++ source...
INFO Compiling app...
INFO Running: platformio run -d /config/esphome/led_xxx
Processing led_xxx (framework: arduino; platform: [email protected] ; board: esp01_1m)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/esp01_1m.html
PLATFORM: Espressif 8266 > Espressif Generic ESP8266 ESP-01 1M
HARDWARE: ESP8266 80MHz 80KB RAM (1MB Flash)
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 27 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS>
| |-- <ESP8266WiFi> 1.0
|-- <ESPAsyncTCP> 1.2.0
| |-- <ESP8266WiFi> 1.0
Retrieving maximum program size /data/led_xxx/.pioenvs/led_xxx/firmware.elf
Checking size /data/led_xxx/.pioenvs/led_xxx/firmware.elf
Memory Usage -> http://bit.ly/pio-memory-usage
DATA: [==== ] 40.7% (used 33320 bytes from 81920 bytes)
PROGRAM: [=== ] 34.7% (used 354824 bytes from 1023984 bytes)
========================= [SUCCESS] Took 10.42 seconds =========================
INFO Successfully compiled program.
INFO Resolving IP address of led_xxx.local
INFO -> 192.168.1.13
INFO Uploading /data/led_xxx/.pioenvs/led_xxx/firmware.bin (358976 bytes)
ERROR Error receiving acknowledge version: timed out
```
**Show Logs led_xxx.yaml**
```
INFO Reading configuration...
INFO Starting log output from led_xxx.local using esphome API
INFO Connecting to led_xxx.local:6053 (192.168.1.13)
WARNING Initial connection failed. The ESP might not be connected to WiFi yet (Timeout while waiting for message response!). Re-Trying in 1 seconds
INFO Connecting to led_xxx.local:6053 (192.168.1.13)
WARNING Initial connection failed. The ESP might not be connected to WiFi yet (Timeout while waiting for message response!). Re-Trying in 2 seconds
INFO Connecting to led_xxx.local:6053 (192.168.1.13)
WARNING Initial connection failed. The ESP might not be connected to WiFi yet (Timeout while waiting for message response!). Re-Trying in 4 seconds
```
During these two steps upload and show the device is answering to ping command on the network.
**Additional information and things you've tried:**
If possible I would like to avoid to have to update via serial port and then do it via OTA.
I see that OTA offer an “OTA safe mode”. Is there a way to for my device to enter in this mode?
I try to power on the device only for some seconds and then power off and run this cycle more that 10 times but I do not success to enter in “OTA safe mode”.
How can I update my device?
Thanks,
Christophe
sparkydave
(🇦🇺 Dave)
September 23, 2022, 1:25am
30
Interesting. Ok, so I was actually preventing safe mode by power cycling rather than just leaving it for a while.
Back to the test bench…
Thanks for the info Blacky
I tried opeing up this controller after many failed attempts to get access using teh ESPhome CLI but as I expected the device is completely filled with potting compound. It’s so frustrating because I feel like I was really close to getting somewhere.
Is the potting resin opaque or transparent ? If you can see the PCB through it, you may be able to reach the required pins or test pads by using a backlight, a column drill, a very fine drill bit and a loooot of patience… I have done that on one occasion. Once you’re done, you can refill the holes with epoxy resin.
Unfortunately the potting is black. I might see successful I am at chipping it out since I seem to have nothing to loose at this point.