mirror of
https://github.com/esphome/esphome.git
synced 2025-09-03 03:42:20 +01:00
ESP-IDF support and generic target platforms (#2303)
* Socket refactor and SSL * esp-idf temp * Fixes * Echo component and noise * Add noise API transport support * Updates * ESP-IDF * Complete * Fixes * Fixes * Versions update * New i2c APIs * Complete i2c refactor * SPI migration * Revert ESP Preferences migration, too complex for now * OTA support * Remove echo again * Remove ssl again * GPIOFlags updates * Rename esphal and ICACHE_RAM_ATTR * Make ESP32 arduino compilable again * Fix GPIO flags * Complete pin registry refactor and fixes * Fixes to make test1 compile * Remove sdkconfig file * Ignore sdkconfig file * Fixes in reviewing * Make test2 compile * Make test4 compile * Make test5 compile * Run clang-format * Fix lint errors * Use esp-idf APIs instead of btStart * Another round of fixes * Start implementing ESP8266 * Make test3 compile * Guard esp8266 code * Lint * Reformat * Fixes * Fixes v2 * more fixes * ESP-IDF tidy target * Convert ARDUINO_ARCH_ESPxx * Update WiFiSignalSensor * Update time ifdefs * OTA needs millis from hal * RestartSwitch needs delay from hal * ESP-IDF Uart * Fix OTA blank password * Allow setting sdkconfig * Fix idf partitions and allow setting sdkconfig from yaml * Re-add read/write compat APIs and fix esp8266 uart * Fix esp8266 store log strings in flash * Fix ESP32 arduino preferences not initialized * Update ifdefs * Change how sdkconfig change is detected * Add checks to ci-custom and fix them * Run clang-format * Add esp-idf clang-tidy target and fix errors * Fixes from clang-tidy idf round 2 * Fixes from compiling tests with esp-idf * Run clang-format * Switch test5.yaml to esp-idf * Implement ESP8266 Preferences * Lint * Re-do PIO package version selection a bit * Fix arduinoespressif32 package version * Fix unit tests * Lint * Lint fixes * Fix readv/writev not defined * Fix graphing component * Re-add all old options from core/config.py Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
@@ -40,10 +40,8 @@ class StorageJSON:
|
||||
comment,
|
||||
esphome_version,
|
||||
src_version,
|
||||
arduino_version,
|
||||
address,
|
||||
esp_platform,
|
||||
board,
|
||||
target_platform,
|
||||
build_path,
|
||||
firmware_bin_path,
|
||||
loaded_integrations,
|
||||
@@ -60,15 +58,10 @@ class StorageJSON:
|
||||
# The version of the file in src/main.cpp - Used to migrate the file
|
||||
assert src_version is None or isinstance(src_version, int)
|
||||
self.src_version = src_version # type: int
|
||||
# The version of the Arduino framework, the build files need to be cleared each time
|
||||
# this changes
|
||||
self.arduino_version = arduino_version # type: str
|
||||
# Address of the ESP, for example livingroom.local or a static IP
|
||||
self.address = address # type: str
|
||||
# The type of ESP in use, either ESP32 or ESP8266
|
||||
self.esp_platform = esp_platform # type: str
|
||||
# The ESP board used, for example nodemcuv2
|
||||
self.board = board # type: str
|
||||
self.target_platform = target_platform # type: str
|
||||
# The absolute path to the platformio project
|
||||
self.build_path = build_path # type: str
|
||||
# The absolute path to the firmware binary
|
||||
@@ -84,10 +77,8 @@ class StorageJSON:
|
||||
"comment": self.comment,
|
||||
"esphome_version": self.esphome_version,
|
||||
"src_version": self.src_version,
|
||||
"arduino_version": self.arduino_version,
|
||||
"address": self.address,
|
||||
"esp_platform": self.esp_platform,
|
||||
"board": self.board,
|
||||
"esp_platform": self.target_platform,
|
||||
"build_path": self.build_path,
|
||||
"firmware_bin_path": self.firmware_bin_path,
|
||||
"loaded_integrations": self.loaded_integrations,
|
||||
@@ -109,28 +100,24 @@ class StorageJSON:
|
||||
comment=esph.comment,
|
||||
esphome_version=const.__version__,
|
||||
src_version=1,
|
||||
arduino_version=esph.arduino_version,
|
||||
address=esph.address,
|
||||
esp_platform=esph.esp_platform,
|
||||
board=esph.board,
|
||||
target_platform=esph.target_platform,
|
||||
build_path=esph.build_path,
|
||||
firmware_bin_path=esph.firmware_bin,
|
||||
loaded_integrations=list(esph.loaded_integrations),
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def from_wizard(name, address, esp_platform, board):
|
||||
# type: (str, str, str, str) -> StorageJSON
|
||||
def from_wizard(name, address, esp_platform):
|
||||
# type: (str, str, str) -> StorageJSON
|
||||
return StorageJSON(
|
||||
storage_version=1,
|
||||
name=name,
|
||||
comment=None,
|
||||
esphome_version=const.__version__,
|
||||
src_version=1,
|
||||
arduino_version=None,
|
||||
address=address,
|
||||
esp_platform=esp_platform,
|
||||
board=board,
|
||||
target_platform=esp_platform,
|
||||
build_path=None,
|
||||
firmware_bin_path=None,
|
||||
loaded_integrations=[],
|
||||
@@ -147,10 +134,8 @@ class StorageJSON:
|
||||
"esphome_version", storage.get("esphomeyaml_version")
|
||||
)
|
||||
src_version = storage.get("src_version")
|
||||
arduino_version = storage.get("arduino_version")
|
||||
address = storage.get("address")
|
||||
esp_platform = storage.get("esp_platform")
|
||||
board = storage.get("board")
|
||||
build_path = storage.get("build_path")
|
||||
firmware_bin_path = storage.get("firmware_bin_path")
|
||||
loaded_integrations = storage.get("loaded_integrations", [])
|
||||
@@ -160,10 +145,8 @@ class StorageJSON:
|
||||
comment,
|
||||
esphome_version,
|
||||
src_version,
|
||||
arduino_version,
|
||||
address,
|
||||
esp_platform,
|
||||
board,
|
||||
build_path,
|
||||
firmware_bin_path,
|
||||
loaded_integrations,
|
||||
|
Reference in New Issue
Block a user