ESPHome 2026.1.0-dev
Loading...
Searching...
No Matches
esphome::ota Namespace Reference

Data Structures

class  ArduinoLibreTinyOTABackend
 
class  ArduinoRP2040OTABackend
 
class  ESP8266OTABackend
 OTA backend for ESP8266 using native SDK functions. More...
 
class  IDFOTABackend
 
class  OTABackend
 
class  OTAComponent
 
class  OTAErrorTrigger
 
class  OTAGlobalCallback
 Global callback that aggregates OTA state from all OTA components. More...
 
class  OTAGlobalStateListener
 Listener interface for global OTA state changes (includes OTA component pointer). More...
 
class  OTAProgressTrigger
 
class  OTAStateChangeTrigger
 
class  OTAStateListener
 Listener interface for OTA state changes. More...
 
class  OTAStateTrigger
 

Typedefs

using OTAStartTrigger = OTAStateTrigger<OTA_STARTED>
 
using OTAEndTrigger = OTAStateTrigger<OTA_COMPLETED>
 
using OTAAbortTrigger = OTAStateTrigger<OTA_ABORT>
 

Enumerations

enum  OTAResponseTypes {
  OTA_RESPONSE_OK = 0x00 , OTA_RESPONSE_REQUEST_AUTH = 0x01 , OTA_RESPONSE_REQUEST_SHA256_AUTH = 0x02 , OTA_RESPONSE_HEADER_OK = 0x40 ,
  OTA_RESPONSE_AUTH_OK = 0x41 , OTA_RESPONSE_UPDATE_PREPARE_OK = 0x42 , OTA_RESPONSE_BIN_MD5_OK = 0x43 , OTA_RESPONSE_RECEIVE_OK = 0x44 ,
  OTA_RESPONSE_UPDATE_END_OK = 0x45 , OTA_RESPONSE_SUPPORTS_COMPRESSION = 0x46 , OTA_RESPONSE_CHUNK_OK = 0x47 , OTA_RESPONSE_ERROR_MAGIC = 0x80 ,
  OTA_RESPONSE_ERROR_UPDATE_PREPARE = 0x81 , OTA_RESPONSE_ERROR_AUTH_INVALID = 0x82 , OTA_RESPONSE_ERROR_WRITING_FLASH = 0x83 , OTA_RESPONSE_ERROR_UPDATE_END = 0x84 ,
  OTA_RESPONSE_ERROR_INVALID_BOOTSTRAPPING = 0x85 , OTA_RESPONSE_ERROR_WRONG_CURRENT_FLASH_CONFIG = 0x86 , OTA_RESPONSE_ERROR_WRONG_NEW_FLASH_CONFIG = 0x87 , OTA_RESPONSE_ERROR_ESP8266_NOT_ENOUGH_SPACE = 0x88 ,
  OTA_RESPONSE_ERROR_ESP32_NOT_ENOUGH_SPACE = 0x89 , OTA_RESPONSE_ERROR_NO_UPDATE_PARTITION = 0x8A , OTA_RESPONSE_ERROR_MD5_MISMATCH = 0x8B , OTA_RESPONSE_ERROR_RP2040_NOT_ENOUGH_SPACE = 0x8C ,
  OTA_RESPONSE_ERROR_UNKNOWN = 0xFF
}
 
enum  OTAState {
  OTA_COMPLETED = 0 , OTA_STARTED , OTA_IN_PROGRESS , OTA_ABORT ,
  OTA_ERROR
}
 

Functions

OTAGlobalCallbackget_global_ota_callback ()
 
std::unique_ptr< ota::OTABackendmake_ota_backend ()
 

Variables

OTAGlobalCallbackglobal_ota_callback {nullptr}
 

Typedef Documentation

◆ OTAAbortTrigger

◆ OTAEndTrigger

◆ OTAStartTrigger

Enumeration Type Documentation

◆ OTAResponseTypes

Enumerator
OTA_RESPONSE_OK 
OTA_RESPONSE_REQUEST_AUTH 
OTA_RESPONSE_REQUEST_SHA256_AUTH 
OTA_RESPONSE_HEADER_OK 
OTA_RESPONSE_AUTH_OK 
OTA_RESPONSE_UPDATE_PREPARE_OK 
OTA_RESPONSE_BIN_MD5_OK 
OTA_RESPONSE_RECEIVE_OK 
OTA_RESPONSE_UPDATE_END_OK 
OTA_RESPONSE_SUPPORTS_COMPRESSION 
OTA_RESPONSE_CHUNK_OK 
OTA_RESPONSE_ERROR_MAGIC 
OTA_RESPONSE_ERROR_UPDATE_PREPARE 
OTA_RESPONSE_ERROR_AUTH_INVALID 
OTA_RESPONSE_ERROR_WRITING_FLASH 
OTA_RESPONSE_ERROR_UPDATE_END 
OTA_RESPONSE_ERROR_INVALID_BOOTSTRAPPING 
OTA_RESPONSE_ERROR_WRONG_CURRENT_FLASH_CONFIG 
OTA_RESPONSE_ERROR_WRONG_NEW_FLASH_CONFIG 
OTA_RESPONSE_ERROR_ESP8266_NOT_ENOUGH_SPACE 
OTA_RESPONSE_ERROR_ESP32_NOT_ENOUGH_SPACE 
OTA_RESPONSE_ERROR_NO_UPDATE_PARTITION 
OTA_RESPONSE_ERROR_MD5_MISMATCH 
OTA_RESPONSE_ERROR_RP2040_NOT_ENOUGH_SPACE 
OTA_RESPONSE_ERROR_UNKNOWN 

Definition at line 14 of file ota_backend.h.

◆ OTAState

Enumerator
OTA_COMPLETED 
OTA_STARTED 
OTA_IN_PROGRESS 
OTA_ABORT 
OTA_ERROR 

Definition at line 44 of file ota_backend.h.

Function Documentation

◆ get_global_ota_callback()

OTAGlobalCallback * esphome::ota::get_global_ota_callback ( )

Definition at line 9 of file ota_backend.cpp.

◆ make_ota_backend()

std::unique_ptr< ota::OTABackend > esphome::ota::make_ota_backend ( )

Definition at line 15 of file ota_backend_arduino_libretiny.cpp.

Variable Documentation

◆ global_ota_callback

OTAGlobalCallback* esphome::ota::global_ota_callback {nullptr}

Definition at line 7 of file ota_backend.cpp.