esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 36 forks source link

Update with OTA failed on TTGO t-Call module (Program Failed with Code 1) #1069

Closed Basanon closed 4 years ago

Basanon commented 4 years ago

Operating environment/Installation (Hass.io/Docker/pip/etc.): ESPhome 1.14.3, Hassos 3.11, hassio 0.106.1, pi4

ESP (ESP32/ESP8266, Board/Sonoff): TTGO T-Call V1.3

Affected component: OTA Updater

Description of problem: Unable to update module with OTA

Problem-relevant YAML-configuration entries:

esphome:
  name: esp32gsm
  platform: ESP32
  board: esp-wrover-kit

wifi:
  ssid: "WiFi"
  password: "*****"
  manual_ip:
    # Set this to the IP of the ESP
    static_ip: 192.168.1.75
    # Set this to the IP address of the router. Often ends with .1
    gateway: 192.168.1.1
    # The subnet of the network. 255.255.255.0 works for most home networks.
    subnet: 255.255.255.0
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esp32Gsm Fallback Hotspot"
    password: "*****"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
web_server:
  port: 80

i2c:  
  sda: GPIO21
  scl: GPIO22
  scan: True

# Enable Home Assistant API

api:
  services:
  - service: send_sms
    variables:
      recipient: string
      message: string
    then:
    - sim800l.send_sms:
        recipient: !lambda 'return recipient;'
        message: !lambda 'return message;'

uart:
  baud_rate: 9600
  tx_pin: 27
  rx_pin: 26

sim800l:
  on_sms_received:
    - lambda: |-
        id(sms_sender).publish_state(sender);
        id(sms_message).publish_state(message);
    - logger.log:
        format: "Received '%s' from %s"
        args: [ 'message.c_str()', 'sender.c_str()' ]

text_sensor:
- platform: template
  id: sms_sender
  name: "Sms Sender"
- platform: template
  id: sms_message
  name: "Sms Message"

time:
  - platform: sntp
    id: timer
    servers:
      - 0.pool.ntp.org
      - 1.pool.ntp.org
      - 2.pool.ntp.org

switch:
  - platform: gpio
    name: "SIM800_PWKEY"
    pin: 4
    restore_mode: ALWAYS_OFF
  - platform: gpio
    name: "SIM800_RST"
    pin: 5
    restore_mode: ALWAYS_ON
  - platform: gpio
    name: "SIM800_POWER"
    pin: 23
    restore_mode: ALWAYS_ON

Logs (if applicable):

INFO Reading configuration /config/esphome/esp32gsm.yaml...
INFO Detected timezone 'MSK' with UTC offset 3
INFO Generating C++ source...
INFO Compiling app...
INFO Running:  platformio run -d /config/esphome/esp32gsm
Processing esp32gsm (board: esp-wrover-kit; framework: arduino; platform: espressif32@1.11.0)
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
Dependency Graph
|-- <AsyncTCP-esphome> 1.1.1
|-- <ESPmDNS> 1.0
|   |-- <WiFi> 1.0
|-- <FS> 1.0
|-- <ESPAsyncWebServer-esphome> 1.2.6
|   |-- <AsyncTCP-esphome> 1.1.1
|   |-- <FS> 1.0
|   |-- <WiFi> 1.0
|   |-- <ArduinoJson-esphomelib> 5.13.3
|-- <ArduinoJson-esphomelib> 5.13.3
|-- <Wire> 1.0.1
|-- <DNSServer> 1.1.0
|   |-- <WiFi> 1.0
|-- <Update> 1.0
|-- <WiFi> 1.0
Compiling /data/esp32gsm/.pioenvs/esp32gsm/src/main.cpp.o
Linking /data/esp32gsm/.pioenvs/esp32gsm/firmware.elf
Building /data/esp32gsm/.pioenvs/esp32gsm/firmware.bin
Retrieving maximum program size /data/esp32gsm/.pioenvs/esp32gsm/firmware.elf
Checking size /data/esp32gsm/.pioenvs/esp32gsm/firmware.elf
DATA:    [=         ]  13.3% (used 43440 bytes from 327680 bytes)
PROGRAM: [======    ]  57.1% (used 935122 bytes from 1638400 bytes)
========================= [SUCCESS] Took 26.40 seconds =========================
INFO Successfully compiled program.
Traceback (most recent call last):
  File "/usr/local/bin/esphome", line 11, in <module>
    load_entry_point('esphome', 'console_scripts', 'esphome')()
  File "/opt/esphome/esphome/__main__.py", line 566, in main
    return run_esphome(sys.argv)
  File "/opt/esphome/esphome/__main__.py", line 553, in run_esphome
    rc = POST_CONFIG_ACTIONS[args.command](args, config)
  File "/opt/esphome/esphome/__main__.py", line 326, in command_run
    exit_code = upload_program(config, args, port)
  File "/opt/esphome/esphome/__main__.py", line 202, in upload_program
    ota_conf = config[CONF_OTA]
KeyError: 'ota'

Additional information and things you've tried: Module updates successfully with ESPHome Flasher OTA Update thru WEB server on ESP module work just fine

[D][web_server_base:059]: OTA in progress: 85.5%
[D][sensor:092]: 'Wifi Signal': Sending state -49.00000 dB with 0 decimals of accuracy
[D][web_server_base:059]: OTA in progress: 90.0%
[D][web_server_base:059]: OTA in progress: 96.4%
[I][web_server_base:068]: OTA update successful!
[I][app:137]: Rebooting safely...
Basanon commented 4 years ago

Sorry, my bad Copy-Paste and ota: been deleted from YAML