diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9065297..142d68a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -40,13 +40,13 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: # A new tag needs branch history to determine whether its commit is on master. fetch-depth: ${{ startsWith(github.ref, 'refs/tags/v') && github.event.created && '0' || '1' }} - name: Python - uses: actions/setup-python@v6 + uses: actions/setup-python@v7 with: python-version: ${{ env.PYTHON_VERSION }} @@ -98,15 +98,15 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Python - uses: actions/setup-python@v6 + uses: actions/setup-python@v7 with: python-version: ${{ env.PYTHON_VERSION }} - name: Install Node.js - uses: actions/setup-node@v5 + uses: actions/setup-node@v6 with: node-version: "22" @@ -178,7 +178,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: fetch-depth: 0 @@ -190,7 +190,7 @@ jobs: git push origin refs/tags/unstable --force - name: Download artifacts - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v8 with: path: artifacts merge-multiple: true diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 328315f..1df8a13 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Install jq run: sudo apt-get update && sudo apt-get install -y jq @@ -67,16 +67,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Cache - uses: actions/cache@v5 + uses: actions/cache@v6 with: key: ${{ runner.os }}-cpplint path: ~/.cache/pip - name: Python - uses: actions/setup-python@v6 + uses: actions/setup-python@v7 with: python-version: "3.x" diff --git a/platformio.ini b/platformio.ini index 99ce70a..9b20d25 100644 --- a/platformio.ini +++ b/platformio.ini @@ -345,8 +345,20 @@ custom_sdkconfig = ${env:esp32_c6.custom_sdkconfig} CONFIG_ETH_USE_SPI_ETHERNET=y CONFIG_ESP_NETIF_SET_DNS_PER_DEFAULT_NETIF=y -[env:elvinhome_thrm_one] -custom_title = Elvinhome THRM ONE (ESP32 C6, NO BLE) +[env:elvinhome_thrm_one_ble] +custom_title = elvinhome THRM ONE (ESP32 C6, BLE) +extends = env:esp32_c6 +custom_board_flags = -D DEFAULT_OT_IN_GPIO=6 + -D DEFAULT_OT_OUT_GPIO=7 + -D DEFAULT_STATUS_LED_GPIO=1 + -D DEFAULT_SENSOR_INDOOR_GPIO=4 + -D DEFAULT_SENSOR_INDOOR_TYPE=Sensors::Type::NTC_10K_TEMP + -D DEFAULT_OT_RX_LED_GPIO=GPIO_IS_NOT_CONFIGURED + -D DEFAULT_SENSOR_OUTDOOR_GPIO=GPIO_IS_NOT_CONFIGURED + -D DEFAULT_NTC_VREF=3200.0f + +[env:elvinhome_thrm_one_ethernet] +custom_title = elvinhome THRM ONE (ESP32 C6, ETHERNET) extends = env:esp32_c6_ethernet custom_board_flags = -D DEFAULT_ETH_CLK_GPIO=22 -D DEFAULT_ETH_MOSI_GPIO=20 diff --git a/src/network.cpp b/src/network.cpp index 36f8f61..0c833f8 100644 --- a/src/network.cpp +++ b/src/network.cpp @@ -192,8 +192,8 @@ bool isEthernetConfigured(const NetworkSettings& config) { GPIO_IS_VALID_OUTPUT(gpios.mosi) && GPIO_IS_VALID_INPUT(gpios.miso) && GPIO_IS_VALID_OUTPUT(gpios.cs) && - GPIO_IS_VALID_INPUT(gpios.irq) && - GPIO_IS_VALID_OUTPUT(gpios.rst); + (gpios.irq == GPIO_IS_NOT_CONFIGURED || GPIO_IS_VALID_INPUT(gpios.irq)) && + (gpios.rst == GPIO_IS_NOT_CONFIGURED || GPIO_IS_VALID_OUTPUT(gpios.rst)); #else (void)config; return false; @@ -589,10 +589,20 @@ static bool startEthernet() { const auto& gpios = networkSettings.ethernet.w5500; ESP_LOGI(L_NETWORK, "Initialize W5500 Ethernet"); - if (!ETH.begin( - ETH_PHY_W5500, 1, gpios.cs, gpios.irq, gpios.rst, - SPI2_HOST, gpios.clk, gpios.miso, gpios.mosi, 12 - )) { + const bool initialized = ETH.begin( + ETH_PHY_W5500, + 1, + gpios.cs, + gpios.irq == GPIO_IS_NOT_CONFIGURED ? -1 : gpios.irq, // optionally + gpios.rst == GPIO_IS_NOT_CONFIGURED ? -1 : gpios.rst, // optionally + SPI2_HOST, + gpios.clk, + gpios.miso, + gpios.mosi, + 12 + ); + + if (!initialized) { ESP_LOGE(L_NETWORK, "W5500 initialization failed, check GPIOs and wiring"); stopEthernet(); return false; diff --git a/src_data/locales/cn.json b/src_data/locales/cn.json index 116a442..1b28434 100644 --- a/src_data/locales/cn.json +++ b/src_data/locales/cn.json @@ -29,6 +29,8 @@ "save": "保存", "saved": "已保存", "refresh": "刷新", + "search": "搜索", + "close": "关闭", "restore": "恢复", "restored": "已恢复", "backup": "备份", @@ -154,23 +156,27 @@ "ethernet": "以太网", "wifi": "Wi-Fi", "availableNetworks": "可用网络", - "staSettings": "WiFi 设置", - "apSettings": "AP 设置" + "staSettings": "连接到 Wi-Fi", + "apSettings": "备用接入点" }, "scan": { "pos": "#", "info": "Info", + "hiddenSsid": "请输入隐藏网络的名称", + "empty": "未找到网络", + "failed": "无法获取网络列表。", "unavailable": "仅在 Wi-Fi 模式下可扫描网络。" }, "ethernet": { + "unavailable": "此固件版本不支持以太网。", "notConfigured": "配置全部六个 GPIO 引脚以使用以太网。", - "clk": "SPI 时钟 GPIO", + "clk": "SPI clock GPIO", "mosi": "SPI MOSI GPIO", "miso": "SPI MISO GPIO", "cs": "SPI CS GPIO", - "irq": "中断 GPIO", - "rst": "复位 GPIO", + "irq": "Interrupt GPIO", + "rst": "Reset GPIO", "note": "W5500 SPI 接线" }, "wifi": { diff --git a/src_data/locales/en.json b/src_data/locales/en.json index 80b5f71..49e9a14 100644 --- a/src_data/locales/en.json +++ b/src_data/locales/en.json @@ -29,6 +29,8 @@ "save": "Save", "saved": "Saved", "refresh": "Refresh", + "search": "Search", + "close": "Close", "restore": "Restore", "restored": "Restored", "backup": "Backup", @@ -154,23 +156,27 @@ "ethernet": "Ethernet", "wifi": "Wi-Fi", "availableNetworks": "Available networks", - "staSettings": "WiFi settings", - "apSettings": "AP settings" + "staSettings": "Connect to Wi-Fi", + "apSettings": "Fallback access point" }, "scan": { "pos": "#", "info": "Info", + "hiddenSsid": "Enter the hidden network name", + "empty": "No networks found", + "failed": "Could not retrieve the list of networks.", "unavailable": "Network scanning is available only in Wi-Fi mode." }, "ethernet": { + "unavailable": "This firmware build does not support Ethernet.", "notConfigured": "Configure all six GPIOs to use Ethernet.", - "clk": "SPI clock GPIO", + "clk": "SPI CLK GPIO", "mosi": "SPI MOSI GPIO", "miso": "SPI MISO GPIO", "cs": "SPI CS GPIO", - "irq": "Interrupt GPIO", - "rst": "Reset GPIO", + "irq": "IRQ GPIO", + "rst": "RST GPIO", "note": "W5500 SPI wiring" }, "wifi": { diff --git a/src_data/locales/it.json b/src_data/locales/it.json index a7fd682..c6e7924 100644 --- a/src_data/locales/it.json +++ b/src_data/locales/it.json @@ -29,6 +29,8 @@ "save": "Salva", "saved": "Salvato", "refresh": "Ricarica", + "search": "Cerca", + "close": "Chiudi", "restore": "Recupera", "restored": "Recuperato", "backup": "Backup", @@ -154,23 +156,27 @@ "ethernet": "Ethernet", "wifi": "Wi-Fi", "availableNetworks": "Reti disponibili", - "staSettings": "Impostazioni WiFi", - "apSettings": "Impostazioni AP" + "staSettings": "Connessione al Wi-Fi", + "apSettings": "Punto di accesso di riserva" }, "scan": { "pos": "#", "info": "Info", + "hiddenSsid": "Inserisci il nome della rete nascosta", + "empty": "Nessuna rete trovata", + "failed": "Impossibile recuperare la lista delle reti.", "unavailable": "La ricerca delle reti è disponibile solo in modalità Wi-Fi." }, "ethernet": { + "unavailable": "Questa versione del firmware non supporta Ethernet.", "notConfigured": "Configura tutti e sei i GPIO per utilizzare Ethernet.", - "clk": "GPIO clock SPI", - "mosi": "GPIO MOSI SPI", - "miso": "GPIO MISO SPI", - "cs": "GPIO CS SPI", - "irq": "GPIO interrupt", - "rst": "GPIO reset", + "clk": "SPI clock GPIO", + "mosi": "SPI MOSI GPIO", + "miso": "SPI MISO GPIO", + "cs": "SPI CS GPIO", + "irq": "Interrupt GPIO", + "rst": "Reset GPIO", "note": "Cablaggio SPI del W5500" }, "wifi": { diff --git a/src_data/locales/nl.json b/src_data/locales/nl.json index 4d58b12..005059b 100644 --- a/src_data/locales/nl.json +++ b/src_data/locales/nl.json @@ -29,6 +29,8 @@ "save": "Opslaan", "saved": "Opgeslagen", "refresh": "Vernieuwen", + "search": "Zoeken", + "close": "Sluiten", "restore": "Herstellen", "restored": "Hersteld", "backup": "Back-up", @@ -154,18 +156,22 @@ "ethernet": "Ethernet", "wifi": "Wi-Fi", "availableNetworks": "Beschikbare netwerken", - "staSettings": "WiFi-instellingen", - "apSettings": "AP-instellingen" + "staSettings": "Verbinden met wifi", + "apSettings": "Reservetoegangspunt" }, "scan": { "pos": "#", "info": "Info", + "hiddenSsid": "Voer de naam van het verborgen netwerk in", + "empty": "Geen netwerken gevonden", + "failed": "De lijst met netwerken kon niet worden opgehaald.", "unavailable": "Netwerken zoeken is alleen beschikbaar in de Wi-Fi-modus." }, "ethernet": { + "unavailable": "Deze firmwarebuild ondersteunt geen Ethernet.", "notConfigured": "Configureer alle zes GPIO's om Ethernet te gebruiken.", - "clk": "SPI-klok GPIO", + "clk": "SPI clock GPIO", "mosi": "SPI MOSI GPIO", "miso": "SPI MISO GPIO", "cs": "SPI CS GPIO", diff --git a/src_data/locales/ru.json b/src_data/locales/ru.json index 1fb38c9..7247a63 100644 --- a/src_data/locales/ru.json +++ b/src_data/locales/ru.json @@ -29,6 +29,8 @@ "save": "Сохранить", "saved": "Сохранено", "refresh": "Обновить", + "search": "Поиск", + "close": "Закрыть", "restore": "Восстановить настройки", "restored": "Восстановлено", "backup": "Сохранить настройки", @@ -154,23 +156,27 @@ "ethernet": "Ethernet", "wifi": "Wi-Fi", "availableNetworks": "Доступные сети", - "staSettings": "Настройки подключения", - "apSettings": "Настройки точки доступа" + "staSettings": "Подключение к Wi-Fi", + "apSettings": "Резервная точка доступа" }, "scan": { "pos": "#", "info": "Инфо", + "hiddenSsid": "Введите имя скрытой сети", + "empty": "Сети не найдены", + "failed": "Не удалось получить список сетей.", "unavailable": "Поиск сетей доступен только в режиме Wi-Fi." }, "ethernet": { + "unavailable": "Эта сборка прошивки не поддерживает Ethernet.", "notConfigured": "Для подключения через Ethernet настройте все шесть GPIO.", - "clk": "GPIO тактирования SPI", - "mosi": "GPIO MOSI SPI", - "miso": "GPIO MISO SPI", - "cs": "GPIO CS SPI", - "irq": "GPIO прерывания", - "rst": "GPIO сброса", + "clk": "SPI clock GPIO", + "mosi": "SPI MOSI GPIO", + "miso": "SPI MISO GPIO", + "cs": "SPI CS GPIO", + "irq": "Interrupt GPIO", + "rst": "Reset GPIO", "note": "Подключение W5500 по SPI" }, "wifi": { diff --git a/src_data/pages/network.html b/src_data/pages/network.html index 9945a25..fb5741c 100644 --- a/src_data/pages/network.html +++ b/src_data/pages/network.html @@ -41,47 +41,128 @@
@@ -91,147 +172,65 @@
-

network.section.wifi

+

network.section.staSettings

-
-

network.section.availableNetworks

-

-
- -
-
-
- - - - - - - - - -
network.scan.posnetwork.wifi.ssidnetwork.scan.info
+
+ + +
+ +
- - -
-
+
+ -
-
-
-

network.section.staSettings

-

-
- -
-
+
- -
-
-
-

network.section.apSettings

-

-
- -
- -
-
-
- - + +
+
+ +

network.section.availableNetworks

+
+ +
+ + + + + + + + + +
network.scan.posnetwork.wifi.ssidnetwork.scan.info
+
+
+ +
+
+