my first esphome project so I may need some education. when I install my yaml file to the esp8266 connected to the Ultrasonic Distance Sensor it says [success] then I get the error at the bottom, ESP has been flashed with wrong flash size. the sensor is showing up in HA.
Do I have the wrong esp8266 platform in my yaml? (i have tried a few for teh esp8266mod). It does not seem to be implementing changes I make to the yaml (for example I added an additional output and changed update_interval to 1s but nothing changes.) looking for suggestions. yaml and log below.
esphome:
name: saltlevelsensor
friendly_name: saltlevelsensor
esp8266:
board: d1_mini
logger:
api:
encryption:
key: “1234”
ota:
password: “1234”
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: "Saltlevelsensor Fallback Hotspot"
password: “1234”
time:
- platform: homeassistant
id: homeassistant_time
captive_portal:
text_sensor:
- platform: version
name: salt_level_sensor ESPHome Version
- platform: wifi_info
ip_address:
name: salt_level_sensor IP
ssid:
name: salt_level_sensor SSID
bssid:
name: salt_level_sensor BSSID
switch:
- platform: restart
name: "salt_level_sensor Restart"
sensor:
- platform: uptime
name: salt_level_sensor Uptime
- platform: wifi_signal
name: salt_level_sensor WiFi Signal
update_interval: 1s
- platform: ultrasonic
trigger_pin: D1
echo_pin: D2
name: "Saltlevel in percent"
update_interval: 1s
filters:
- lambda: return (1.02-x)*(100/1.02);
unit_of_measurement: "%"
- platform: ultrasonic
trigger_pin: D1
echo_pin: D2
name: "Saltlevel in cm"
update_interval: 1s
filters:
- lambda: return (1.02-x)*100;
unit_of_measurement: "cm"
- platform: ultrasonic
trigger_pin: D1
echo_pin: D2
name: "Sensor Distance in cm"
update_interval: 1s
filters:
- lambda: return (x*100);
unit_of_measurement: "cm"
INFO ESPHome 2023.8.3
..............
Building /data/saltlevelsensor/.pioenvs/saltlevelsensor/firmware.bin
esp8266_copy_factory_bin(["/data/saltlevelsensor/.pioenvs/saltlevelsensor/firmware.bin"], ["/data/saltlevelsensor/.pioenvs/saltlevelsensor/firmware.elf"])
======================== [SUCCESS] Took 105.83 seconds ========================
INFO Successfully compiled program.
INFO Resolving IP address of saltlevelsensor.local
INFO -> 192.168.10.165
INFO Uploading /data/saltlevelsensor/.pioenvs/saltlevelsensor/firmware.bin (516304 bytes)
INFO Compressed to 359480 bytes
ERROR Error binary size: Error: ESP has been flashed with wrong flash size. Please choose the correct 'board' option (esp01_1m always works) and then flash over USB.