I like my systems updated, so with every new version of ESPHome I update my devices (also to get rid of number next to Settings). I’ve got several devices that won’t update unless I edit the config to it’s bare necessities, update the device, edit the config again and update it again. I used to run Tasmota and they had a different approach (without the hard manual labor), they first installed a tasmota-minimal and then uploaded the version you needed.
Am I the only one facing this issue or is it just me?
Sounds like you don’t have enough memory on your devices to hold the existing config and the OTA config. You have a few options:
Buy devices that have more flash memory.
Cut back unneeded devices from your config (especially large components like web server, wake word, Bluetooth Proxy, etc…), or if they are needed split them off onto other devices.
Unfortunately not many suppliers will be that specific. I’ve got a MOES WS UEU16-M from AliExpress a few years ago, nothing on their site mentioned that they replaced the ESP8285 and put in a Beken WB2S. Opening up that device to replace the Beken chipset with a ESP will cause some issues with the build quality of the device (you can smash the metal against a hard object and the thing will pop open, but it will be looser when you close it).
Tasmota also had issues with space, they’ve solved it by installing a minimal version before updating to the updated version. I think that having to edit the config to minimize the build and then again edit the config to install the build for that device is very user friendly, ESPHome could probably take care of that.
While typing this response I thought of something:
substitutions:
name: "zolder--wasmachine"
friendly_name: "Zolder - wasmachine"
esphome:
name: "${name}"
friendly_name: "${friendly_name}"
project:
name: esphome.moes-ws-ueu16-m-template
version: "1.0"
bk72xx:
board: wb2s
preferences:
flash_write_interval: 0s
logger:
baud_rate: 0
packages:
api: !include ./includes/api.yaml
ota: !include ./includes/ota.yaml
wifi: !include ./includes/wifi.yaml
time: !include ./includes/time.yaml
# web_server: !include ./includes/web_server.yaml
text_sensor: !include ./includes/text_sensor.yaml
sensor: !include ./includes/sensor.yaml
switch: !include ./includes/switch.yaml
binary_sensor: !include ./includes/binary_sensor.yaml
captive_portal:
binary_sensor:
- platform: gpio
pin:
number: P10
inverted: true
id: button
on_click:
- switch.toggle: outlet
switch:
- platform: gpio
name: Device - Relay
id: outlet
pin: P26
icon: mdi:power-socket-eu
restore_mode: RESTORE_DEFAULT_OFF
sensor:
# PC191HA includes a BL0937 chip for measuring power consumption
# and BL0937 is a variation of hlw8012, but using inverted SEL pin functionality
- platform: hlw8012
model: BL0937 # note that the model must be specified to use special calculation parameters
sel_pin: # I believe that cf_pin reports either Voltage or Current depending on this select pin
inverted: true # determine whether true reports Voltage
number: P24
cf_pin: # current or voltage (ele_pin: 7)
inverted: true # the logic of BL0937 is opposite from HLW8012
number: P7
cf1_pin: # Power (vi_pin: 8)
inverted: true # the logic of BL0937 is opposite from HLW8012
number: P8
update_interval: 1s # How often to measure and report values
# PC191HA measures and returns Voltage OR Current according to the value of sel_pin,
# but it can change the value of sel_pin periodically
initial_mode: "VOLTAGE" # reports VOLTAGE or CURRENT
change_mode_every: "4294967295" # do NOT swap between reporting Volts or Amps (well, swap after 4000 years)
# reporting Voltage or Current. Note that the first value reported should be ignored as inaccurate
# Adjust according to the actual resistor values on board to calibrate the specific unit
voltage_divider: 891 # LOWER VALUE GIVES LOWER VOLTAGE
current_resistor: 0.00098 # HIGHER VALUE GIVES LOWER WATTAGE
# how the power monitoring values are returned to ESPHome
voltage:
name: "Device - Voltage"
id: voltage
unit_of_measurement: V
accuracy_decimals: 1
filters:
- skip_initial: 2
power:
name: "Device - Power"
id: power
unit_of_measurement: W
accuracy_decimals: 1
filters:
- skip_initial: 2
# power is simply current x voltage -- except that the pc191ha doesn't follow that formula.
# Setting current_resistor to give an accurate Amperage does NOT also give the correct Wattage
# my work-around is to calculate current from power / voltage
- platform: template
name: "Device - Current"
unit_of_measurement: A
accuracy_decimals: 2
update_interval: 5s
lambda: |-
return (id(power).state / id(voltage).state);
filters:
- skip_initial: 5 # give time for data to settle to avoid Nan
I could try to put part of the config in a file and include it just like I did with api, ota, etc. Whenever I face issues updating I can just comment out that !include and build my minimal version.
Btw. the config before updating had the webserver enabled. I had to comment out all below my WiFi config to update the device, then revert the changes to update to my device specific version.
I have the same issue where I can’t update, same device, athom Prescense Senso, it says
ERROR Error binary size: Error: ESP does not have enough space to store OTA file. Please try flashing a minimal firmware (remove everything except ota)
What do you include in the minimal yaml? Can you please share an example
Hi, @bmac6996 - Athom Presence sensors is what I use, too. I had issues updating from 2024.7.3, but managed to get it to 2024.8.3 at some point. According to posts in various places, 8.3 apparently solved the issue, but I can confirm that it hasn’t.