mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-05-02 04:05:14 +00:00
Compare commits
18 Commits
22312812bb
...
60b7d6d795
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60b7d6d795 | ||
|
|
947f29cca0 | ||
|
|
d2a13ec0da | ||
|
|
cc39ba409e | ||
|
|
ac9db6256e | ||
|
|
096f628d97 | ||
|
|
bbc2de08a5 | ||
|
|
df808a2bcf | ||
|
|
d04e7c36f3 | ||
|
|
205d826adb | ||
|
|
3584975acb | ||
|
|
30b9ca4e6c | ||
|
|
7c6ff01ebe | ||
|
|
4db8e43648 | ||
|
|
e610f0d57f | ||
|
|
8244af2940 | ||
|
|
cc60062678 | ||
|
|
e3305ab9db |
@@ -13,6 +13,7 @@ For more details go to [emsesp.org](https://emsesp.org/).
|
|||||||
- boiler pumpkick [#2965](https://github.com/emsesp/EMS-ESP32/discussions/2965)
|
- boiler pumpkick [#2965](https://github.com/emsesp/EMS-ESP32/discussions/2965)
|
||||||
- heatpump reset [#2933](https://github.com/emsesp/EMS-ESP32/issues/2933)
|
- heatpump reset [#2933](https://github.com/emsesp/EMS-ESP32/issues/2933)
|
||||||
- e-mail notification using ReadyMail Client
|
- e-mail notification using ReadyMail Client
|
||||||
|
- 2.nd freshwater module (dhw4) [#2991](https://github.com/emsesp/EMS-ESP32/issues/2991)
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
"build": {
|
"build": {
|
||||||
"core": "esp32",
|
"core": "esp32",
|
||||||
"extra_flags": [
|
"extra_flags": [
|
||||||
|
"-DNO_TLS_SUPPORT",
|
||||||
"-DARDUINO_XIAO_ESP32C6",
|
"-DARDUINO_XIAO_ESP32C6",
|
||||||
"-DARDUINO_USB_MODE=1",
|
"-DARDUINO_USB_MODE=1",
|
||||||
"-DARDUINO_USB_CDC_ON_BOOT=1"
|
"-DARDUINO_USB_CDC_ON_BOOT=1"
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
// @ts-check
|
// @ts-check
|
||||||
import eslint from '@eslint/js';
|
import eslint from '@eslint/js';
|
||||||
import prettierConfig from 'eslint-config-prettier';
|
import prettierConfig from 'eslint-config-prettier';
|
||||||
|
import { defineConfig } from 'eslint/config';
|
||||||
import tseslint from 'typescript-eslint';
|
import tseslint from 'typescript-eslint';
|
||||||
|
|
||||||
export default tseslint.config(
|
export default defineConfig(
|
||||||
eslint.configs.recommended,
|
eslint.configs.recommended,
|
||||||
...tseslint.configs.recommendedTypeChecked,
|
...tseslint.configs.recommendedTypeChecked,
|
||||||
prettierConfig,
|
prettierConfig,
|
||||||
|
|||||||
@@ -49,8 +49,8 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.29.0",
|
"@babel/core": "^7.29.0",
|
||||||
"@eslint/js": "^10.0.1",
|
"@eslint/js": "^10.0.1",
|
||||||
"@preact/compat": "^18.3.1",
|
"@preact/compat": "^18.3.2",
|
||||||
"@preact/preset-vite": "^2.10.4",
|
"@preact/preset-vite": "^2.10.5",
|
||||||
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
||||||
"@types/node": "^25.5.0",
|
"@types/node": "^25.5.0",
|
||||||
"@types/react": "^19.2.14",
|
"@types/react": "^19.2.14",
|
||||||
|
|||||||
26
interface/pnpm-lock.yaml
generated
26
interface/pnpm-lock.yaml
generated
@@ -82,8 +82,8 @@ importers:
|
|||||||
specifier: ^10.0.1
|
specifier: ^10.0.1
|
||||||
version: 10.0.1(eslint@10.1.0)
|
version: 10.0.1(eslint@10.1.0)
|
||||||
'@preact/preset-vite':
|
'@preact/preset-vite':
|
||||||
specifier: ^2.10.4
|
specifier: ^2.10.5
|
||||||
version: 2.10.4(@babel/core@7.29.0)(preact@10.29.0)(rollup@4.59.0)(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(terser@5.46.1))
|
version: 2.10.5(@babel/core@7.29.0)(preact@10.29.0)(rollup@4.59.0)(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(terser@5.46.1))
|
||||||
'@trivago/prettier-plugin-sort-imports':
|
'@trivago/prettier-plugin-sort-imports':
|
||||||
specifier: ^6.0.2
|
specifier: ^6.0.2
|
||||||
version: 6.0.2(prettier@3.8.1)
|
version: 6.0.2(prettier@3.8.1)
|
||||||
@@ -657,8 +657,8 @@ packages:
|
|||||||
peerDependencies:
|
peerDependencies:
|
||||||
preact: '*'
|
preact: '*'
|
||||||
|
|
||||||
'@preact/preset-vite@2.10.4':
|
'@preact/preset-vite@2.10.5':
|
||||||
resolution: {integrity: sha512-L7RQRs2GiG0lLUz7JSg07vU6lhlzdIthH0eqYZmRR70tTB9ikKCq2LHr+PZzhzIOco3Dioi6P6e/fjAmDUMJbQ==}
|
resolution: {integrity: sha512-p0vJpxiVO7KWWazWny3LUZ+saXyZKWv6Ju0bYMWNJRp2YveufRPgSUB1C4MTqGJfz07EehMgfN+AJNwQy+w6Iw==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
'@babel/core': 7.x
|
'@babel/core': 7.x
|
||||||
vite: 2.x || 3.x || 4.x || 5.x || 6.x || 7.x || 8.x
|
vite: 2.x || 3.x || 4.x || 5.x || 6.x || 7.x || 8.x
|
||||||
@@ -1178,8 +1178,8 @@ packages:
|
|||||||
base64-js@1.5.1:
|
base64-js@1.5.1:
|
||||||
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
|
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
|
||||||
|
|
||||||
baseline-browser-mapping@2.10.9:
|
baseline-browser-mapping@2.10.10:
|
||||||
resolution: {integrity: sha512-OZd0e2mU11ClX8+IdXe3r0dbqMEznRiT4TfbhYIbcRPZkqJ7Qwer8ij3GZAmLsRKa+II9V1v5czCkvmHH3XZBg==}
|
resolution: {integrity: sha512-sUoJ3IMxx4AyRqO4MLeHlnGDkyXRoUG0/AI9fjK+vS72ekpV0yWVY7O0BVjmBcRtkNcsAO2QDZ4tdKKGoI6YaQ==}
|
||||||
engines: {node: '>=6.0.0'}
|
engines: {node: '>=6.0.0'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
@@ -3340,8 +3340,8 @@ packages:
|
|||||||
yallist@3.1.1:
|
yallist@3.1.1:
|
||||||
resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==}
|
resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==}
|
||||||
|
|
||||||
yaml@1.10.2:
|
yaml@1.10.3:
|
||||||
resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==}
|
resolution: {integrity: sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==}
|
||||||
engines: {node: '>= 6'}
|
engines: {node: '>= 6'}
|
||||||
|
|
||||||
yargs-parser@21.1.1:
|
yargs-parser@21.1.1:
|
||||||
@@ -3879,7 +3879,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
preact: 10.29.0
|
preact: 10.29.0
|
||||||
|
|
||||||
'@preact/preset-vite@2.10.4(@babel/core@7.29.0)(preact@10.29.0)(rollup@4.59.0)(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(terser@5.46.1))':
|
'@preact/preset-vite@2.10.5(@babel/core@7.29.0)(preact@10.29.0)(rollup@4.59.0)(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.4)(terser@5.46.1))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/core': 7.29.0
|
'@babel/core': 7.29.0
|
||||||
'@babel/plugin-transform-react-jsx': 7.28.6(@babel/core@7.29.0)
|
'@babel/plugin-transform-react-jsx': 7.28.6(@babel/core@7.29.0)
|
||||||
@@ -4320,7 +4320,7 @@ snapshots:
|
|||||||
|
|
||||||
base64-js@1.5.1: {}
|
base64-js@1.5.1: {}
|
||||||
|
|
||||||
baseline-browser-mapping@2.10.9: {}
|
baseline-browser-mapping@2.10.10: {}
|
||||||
|
|
||||||
bin-build@3.0.0:
|
bin-build@3.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -4381,7 +4381,7 @@ snapshots:
|
|||||||
|
|
||||||
browserslist@4.28.1:
|
browserslist@4.28.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
baseline-browser-mapping: 2.10.9
|
baseline-browser-mapping: 2.10.10
|
||||||
caniuse-lite: 1.0.30001780
|
caniuse-lite: 1.0.30001780
|
||||||
electron-to-chromium: 1.5.321
|
electron-to-chromium: 1.5.321
|
||||||
node-releases: 2.0.36
|
node-releases: 2.0.36
|
||||||
@@ -4533,7 +4533,7 @@ snapshots:
|
|||||||
import-fresh: 3.3.1
|
import-fresh: 3.3.1
|
||||||
parse-json: 5.2.0
|
parse-json: 5.2.0
|
||||||
path-type: 4.0.0
|
path-type: 4.0.0
|
||||||
yaml: 1.10.2
|
yaml: 1.10.3
|
||||||
|
|
||||||
cross-spawn@5.1.0:
|
cross-spawn@5.1.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -6534,7 +6534,7 @@ snapshots:
|
|||||||
|
|
||||||
yallist@3.1.1: {}
|
yallist@3.1.1: {}
|
||||||
|
|
||||||
yaml@1.10.2: {}
|
yaml@1.10.3: {}
|
||||||
|
|
||||||
yargs-parser@21.1.1: {}
|
yargs-parser@21.1.1: {}
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
#include "../../src/core/emsesp.h"
|
#include "../../src/core/emsesp.h"
|
||||||
|
|
||||||
#ifndef UUID_SYSLOG_HAVE_GETTIMEOFDAY
|
#ifndef UUID_SYSLOG_HAVE_GETTIMEOFDAY
|
||||||
#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
|
#if defined(ARDUINO_ARCH_ESP8266)
|
||||||
// time() does not return UTC on the ESP8266: https://github.com/esp8266/Arduino/issues/4637
|
// time() does not return UTC on the ESP8266: https://github.com/esp8266/Arduino/issues/4637
|
||||||
#define UUID_SYSLOG_HAVE_GETTIMEOFDAY 1
|
#define UUID_SYSLOG_HAVE_GETTIMEOFDAY 1
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -302,10 +302,10 @@ function updateMask(entity: any, de: any, dd: any) {
|
|||||||
const old_custom_name = dd.nodes[dd_objIndex].cn;
|
const old_custom_name = dd.nodes[dd_objIndex].cn;
|
||||||
console.log(
|
console.log(
|
||||||
'comparing names, old (' +
|
'comparing names, old (' +
|
||||||
old_custom_name +
|
old_custom_name +
|
||||||
') with new (' +
|
') with new (' +
|
||||||
new_custom_name +
|
new_custom_name +
|
||||||
')'
|
')'
|
||||||
);
|
);
|
||||||
if (old_custom_name !== new_custom_name) {
|
if (old_custom_name !== new_custom_name) {
|
||||||
changed = true;
|
changed = true;
|
||||||
@@ -403,15 +403,15 @@ function check_upgrade(version: string) {
|
|||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
'Upgrade this version (' +
|
'Upgrade this version (' +
|
||||||
THIS_VERSION +
|
THIS_VERSION +
|
||||||
') to dev (' +
|
') to dev (' +
|
||||||
dev_version +
|
dev_version +
|
||||||
') is ' +
|
') is ' +
|
||||||
(DEV_VERSION_IS_UPGRADEABLE ? 'YES' : 'NO') +
|
(DEV_VERSION_IS_UPGRADEABLE ? 'YES' : 'NO') +
|
||||||
' and to stable (' +
|
' and to stable (' +
|
||||||
stable_version +
|
stable_version +
|
||||||
') is ' +
|
') is ' +
|
||||||
(STABLE_VERSION_IS_UPGRADEABLE ? 'YES' : 'NO')
|
(STABLE_VERSION_IS_UPGRADEABLE ? 'YES' : 'NO')
|
||||||
);
|
);
|
||||||
data = {
|
data = {
|
||||||
emsesp_version: THIS_VERSION,
|
emsesp_version: THIS_VERSION,
|
||||||
|
|||||||
@@ -154,16 +154,10 @@ build_flags =
|
|||||||
-DBOARD_C3_MINI_V1
|
-DBOARD_C3_MINI_V1
|
||||||
|
|
||||||
; XIAO ESP32C - 512KB SRAM & 4MB Flash - https://wiki.seeedstudio.com/xiao_esp32c6_getting_started/
|
; XIAO ESP32C - 512KB SRAM & 4MB Flash - https://wiki.seeedstudio.com/xiao_esp32c6_getting_started/
|
||||||
[env:c6]
|
[env:c6_xiao_4M]
|
||||||
framework = arduino
|
extends = espressif32_base_4M
|
||||||
board_build.partitions = partitions/esp32_partition_4M.csv
|
|
||||||
board_upload.flash_size = 4MB
|
|
||||||
board_build.app_partition_name = app0
|
board_build.app_partition_name = app0
|
||||||
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.30-2/platform-espressif32.zip ; Arduino Release v3.3.0 based on ESP-IDF v5.5.0
|
|
||||||
board = seeed_xiao_esp32c6
|
board = seeed_xiao_esp32c6
|
||||||
build_flags =
|
|
||||||
${common.build_flags}
|
|
||||||
-DBOARD_C6
|
|
||||||
|
|
||||||
; foundation for building and testing natively, standalone without an ESP32
|
; foundation for building and testing natively, standalone without an ESP32
|
||||||
; use the `standalone` environment instead of `native` for testing
|
; use the `standalone` environment instead of `native` for testing
|
||||||
|
|||||||
@@ -52,7 +52,12 @@ void NTPSettingsService::configureTime(AsyncWebServerRequest * request, JsonVari
|
|||||||
tm.tm_isdst = -1; // not set by strptime, tells mktime to determine daylightsaving
|
tm.tm_isdst = -1; // not set by strptime, tells mktime to determine daylightsaving
|
||||||
time_t time = mktime(&tm);
|
time_t time = mktime(&tm);
|
||||||
struct timeval now = {.tv_sec = time, .tv_usec = {}};
|
struct timeval now = {.tv_sec = time, .tv_usec = {}};
|
||||||
|
#if CONFIG_IDF_TARGET_ESP32C3
|
||||||
|
// settimeofday and adjtime() does not work, unknown how to set time
|
||||||
|
emsesp::EMSESP::logger().warning("manual clock setting not possible");
|
||||||
|
#else
|
||||||
settimeofday(&now, nullptr);
|
settimeofday(&now, nullptr);
|
||||||
|
#endif
|
||||||
AsyncWebServerResponse * response = request->beginResponse(200);
|
AsyncWebServerResponse * response = request->beginResponse(200);
|
||||||
request->send(response);
|
request->send(response);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -61,22 +61,27 @@ void UploadFileService::handleUpload(AsyncWebServerRequest * request, const Stri
|
|||||||
if (_is_firmware) {
|
if (_is_firmware) {
|
||||||
// Check firmware header, 0xE9 magic offset 0 indicates esp bin, chip offset 12: esp32:0, S2:2, C3:5
|
// Check firmware header, 0xE9 magic offset 0 indicates esp bin, chip offset 12: esp32:0, S2:2, C3:5
|
||||||
#if CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4
|
#if CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4
|
||||||
if (len > 12 && (data[0] != 0xE9 || data[12] != 0)) {
|
if (len > 12 && (data[0] != ESP_IMAGE_HEADER_MAGIC || data[12] != ESP_CHIP_ID_ESP32)) {
|
||||||
handleError(request, 503); // service unavailable
|
handleError(request, 503); // service unavailable
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#elif CONFIG_IDF_TARGET_ESP32S2
|
#elif CONFIG_IDF_TARGET_ESP32S2
|
||||||
if (len > 12 && (data[0] != 0xE9 || data[12] != 2)) {
|
if (len > 12 && (data[0] != ESP_IMAGE_HEADER_MAGIC || data[12] != ESP_CHIP_ID_ESP32S2)) {
|
||||||
handleError(request, 503); // service unavailable
|
handleError(request, 503); // service unavailable
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#elif CONFIG_IDF_TARGET_ESP32C3
|
#elif CONFIG_IDF_TARGET_ESP32C3
|
||||||
if (len > 12 && (data[0] != 0xE9 || data[12] != 5)) {
|
if (len > 12 && (data[0] != ESP_IMAGE_HEADER_MAGIC || data[12] != ESP_CHIP_ID_ESP32C3)) {
|
||||||
handleError(request, 503); // service unavailable
|
handleError(request, 503); // service unavailable
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#elif CONFIG_IDF_TARGET_ESP32S3
|
#elif CONFIG_IDF_TARGET_ESP32S3
|
||||||
if (len > 12 && (data[0] != 0xE9 || data[12] != 9)) {
|
if (len > 12 && (data[0] != ESP_IMAGE_HEADER_MAGIC || data[12] != ESP_CHIP_ID_ESP32S3)) {
|
||||||
|
handleError(request, 503); // service unavailable
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#elif CONFIG_IDF_TARGET_ESP32C6
|
||||||
|
if (len > 12 && (data[0] != ESP_IMAGE_HEADER_MAGIC || data[12] != ESP_CHIP_ID_ESP32C6)) {
|
||||||
handleError(request, 503); // service unavailable
|
handleError(request, 503); // service unavailable
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -285,6 +285,8 @@ enum {
|
|||||||
#define EMSESP_PLATFORM "ESP32S3"
|
#define EMSESP_PLATFORM "ESP32S3"
|
||||||
#elif CONFIG_IDF_TARGET_ESP32 || EMSESP_STANDALONE
|
#elif CONFIG_IDF_TARGET_ESP32 || EMSESP_STANDALONE
|
||||||
#define EMSESP_PLATFORM "ESP32"
|
#define EMSESP_PLATFORM "ESP32"
|
||||||
|
#elif CONFIG_IDF_TARGET_ESP32C6
|
||||||
|
#define EMSESP_PLATFORM "ESP32C6"
|
||||||
#else
|
#else
|
||||||
#error Target CONFIG_IDF_TARGET is not supported
|
#error Target CONFIG_IDF_TARGET is not supported
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -34,25 +34,6 @@
|
|||||||
#include "../test/test.h"
|
#include "../test/test.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef EMSESP_STANDALONE
|
|
||||||
#ifdef ESP_IDF_VERSION_MAJOR // IDF 4+
|
|
||||||
#if CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4
|
|
||||||
#include "../esp32/rom/rtc.h"
|
|
||||||
#elif CONFIG_IDF_TARGET_ESP32S2
|
|
||||||
#include "../esp32s2/rom/rtc.h"
|
|
||||||
#elif CONFIG_IDF_TARGET_ESP32C3
|
|
||||||
#include "../esp32c3/rom/rtc.h"
|
|
||||||
#elif CONFIG_IDF_TARGET_ESP32S3
|
|
||||||
#include "../esp32s3/rom/rtc.h"
|
|
||||||
#else
|
|
||||||
#error Target CONFIG_IDF_TARGET is not supported
|
|
||||||
#endif
|
|
||||||
#else // ESP32 Before IDF 4.0
|
|
||||||
#include "../rom/rtc.h"
|
|
||||||
#endif
|
|
||||||
#include <esp_mac.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef NO_TLS_SUPPORT
|
#ifndef NO_TLS_SUPPORT
|
||||||
#define ENABLE_SMTP
|
#define ENABLE_SMTP
|
||||||
#define USE_ESP_SSLCLIENT
|
#define USE_ESP_SSLCLIENT
|
||||||
@@ -63,6 +44,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef EMSESP_STANDALONE
|
#ifndef EMSESP_STANDALONE
|
||||||
|
#include <esp_mac.h>
|
||||||
#include "esp_efuse.h"
|
#include "esp_efuse.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -2761,37 +2743,38 @@ bool System::command_restart(const char * value, const int8_t id) {
|
|||||||
|
|
||||||
std::string System::reset_reason(uint8_t cpu) const {
|
std::string System::reset_reason(uint8_t cpu) const {
|
||||||
#ifndef EMSESP_STANDALONE
|
#ifndef EMSESP_STANDALONE
|
||||||
switch (rtc_get_reset_reason(cpu)) {
|
switch (esp_rom_get_reset_reason(cpu)) {
|
||||||
case 1:
|
case RESET_REASON_CHIP_POWER_ON:
|
||||||
return ("Power on reset");
|
return ("Power on reset");
|
||||||
// case 2 :reset pin not on esp32
|
case 2: // not on esp32
|
||||||
case 3:
|
return ("reset pin");
|
||||||
|
case RESET_REASON_CORE_SW:
|
||||||
return ("Software reset");
|
return ("Software reset");
|
||||||
case 4: // not on S2, C3
|
case 4: // not on S2, C3
|
||||||
return ("Legacy watch dog reset");
|
return ("Legacy watch dog reset");
|
||||||
case 5:
|
case RESET_REASON_CORE_DEEP_SLEEP:
|
||||||
return ("Deep sleep reset");
|
return ("Deep sleep reset");
|
||||||
case 6: // not on S2, C3
|
case 6: // RESET_REASON_CORE_SDIO: // not on S2, S3, C3
|
||||||
return ("Reset by SDIO");
|
return ("Reset by SDIO");
|
||||||
case 7:
|
case RESET_REASON_CORE_MWDT0:
|
||||||
return ("Timer group0 watch dog reset");
|
return ("Timer group0 watch dog reset");
|
||||||
case 8:
|
case RESET_REASON_CORE_MWDT1:
|
||||||
return ("Timer group1 watch dog reset");
|
return ("Timer group1 watch dog reset");
|
||||||
case 9:
|
case RESET_REASON_CORE_RTC_WDT:
|
||||||
return ("RTC watch dog reset");
|
return ("RTC watch dog reset");
|
||||||
case 10:
|
case 10:
|
||||||
return ("Intrusion reset CPU");
|
return ("Intrusion reset CPU");
|
||||||
case 11:
|
case RESET_REASON_CPU0_MWDT0:
|
||||||
return ("Timer group reset CPU");
|
return ("Timer group reset CPU");
|
||||||
case 12:
|
case RESET_REASON_CPU0_SW:
|
||||||
return ("Software reset CPU");
|
return ("Software reset CPU");
|
||||||
case 13:
|
case RESET_REASON_CPU0_RTC_WDT:
|
||||||
return ("RTC watch dog reset: CPU");
|
return ("RTC watch dog reset: CPU");
|
||||||
case 14: // not on S2, C3
|
case 14: // RESET_REASON_CPU1_CPU0: // not on S2, S3, C3
|
||||||
return ("APP CPU reset by PRO CPU");
|
return ("APP CPU reset by PRO CPU");
|
||||||
case 15:
|
case RESET_REASON_SYS_BROWN_OUT:
|
||||||
return ("Brownout reset");
|
return ("Brownout reset");
|
||||||
case 16:
|
case RESET_REASON_SYS_RTC_WDT:
|
||||||
return ("RTC watch dog reset: CPU+RTC");
|
return ("RTC watch dog reset: CPU+RTC");
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -3225,6 +3208,10 @@ void System::set_valid_system_gpios() {
|
|||||||
} else {
|
} else {
|
||||||
valid_system_gpios_ = string_range_to_vector("0-39", "6-11, 20, 24, 28-31");
|
valid_system_gpios_ = string_range_to_vector("0-39", "6-11, 20, 24, 28-31");
|
||||||
}
|
}
|
||||||
|
#elif CONFIG_IDF_TARGET_ESP32C6
|
||||||
|
// https://docs.espressif.com/projects/esp-idf/en/v5.5.3/esp32c6/api-reference/peripherals/gpio.html
|
||||||
|
// 24-30 used for flash, 12-13 USB, 16-17 uart0
|
||||||
|
valid_system_gpios_ = string_range_to_vector("0-30", "12-13, 16-17, 24-30");
|
||||||
#elif defined(EMSESP_STANDALONE)
|
#elif defined(EMSESP_STANDALONE)
|
||||||
valid_system_gpios_ = string_range_to_vector("0-39");
|
valid_system_gpios_ = string_range_to_vector("0-39");
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1759,8 +1759,12 @@ void Thermostat::process_RCTime(std::shared_ptr<const Telegram> telegram) {
|
|||||||
ttime = mktime(tm_); // thermostat time
|
ttime = mktime(tm_); // thermostat time
|
||||||
}
|
}
|
||||||
struct timeval newnow = {.tv_sec = ttime, .tv_usec = 0};
|
struct timeval newnow = {.tv_sec = ttime, .tv_usec = 0};
|
||||||
|
#if CONFIG_IDF_TARGET_ESP32C3
|
||||||
|
// unknown how to set time on C3
|
||||||
|
#else
|
||||||
settimeofday(&newnow, nullptr);
|
settimeofday(&newnow, nullptr);
|
||||||
LOG_INFO("ems-esp time set from thermostat");
|
LOG_INFO("ems-esp time set from thermostat");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,16 +29,21 @@ Water::Water(uint8_t device_type, uint8_t device_id, uint8_t product_id, const c
|
|||||||
dhw_ = device_id - EMSdevice::EMS_DEVICE_ID_DHW1;
|
dhw_ = device_id - EMSdevice::EMS_DEVICE_ID_DHW1;
|
||||||
int8_t tag = DeviceValueTAG::TAG_DHW1 + dhw_;
|
int8_t tag = DeviceValueTAG::TAG_DHW1 + dhw_;
|
||||||
if (flags == EMSdevice::EMS_DEVICE_FLAG_SM100) { // device_id 0x2A, DHW3
|
if (flags == EMSdevice::EMS_DEVICE_FLAG_SM100) { // device_id 0x2A, DHW3
|
||||||
|
|
||||||
// telegram handlers
|
// telegram handlers
|
||||||
register_telegram_type(0x07D6, "SM100wwTemperature", false, MAKE_PF_CB(process_SM100wwTemperature));
|
register_telegram_type(0x07D6 + dhw_ - 2, "SM100wwTemperature", false, MAKE_PF_CB(process_SM100wwTemperature));
|
||||||
register_telegram_type(0x07AA, "SM100wwStatus", false, MAKE_PF_CB(process_SM100wwStatus));
|
register_telegram_type(0x07E0 + dhw_ - 2, "SM100wwStatus2", true, MAKE_PF_CB(process_SM100wwStatus2));
|
||||||
register_telegram_type(0x07AB, "SM100wwCommand", false, MAKE_PF_CB(process_SM100wwCommand));
|
register_telegram_type(0x07A6, "SM100wwParam", true, MAKE_PF_CB(process_SM100wwParam)); // same telegram for all circuits
|
||||||
register_telegram_type(0x07AC, "SM100wwParam1", false, MAKE_PF_CB(process_SM100wwParam2));
|
if (tag == DeviceValueTAG::TAG_DHW3) {
|
||||||
register_telegram_type(0x07A5, "SM100wwCirc", true, MAKE_PF_CB(process_SM100wwCirc));
|
register_telegram_type(0x07AA, "SM100wwStatus", false, MAKE_PF_CB(process_SM100wwStatus));
|
||||||
register_telegram_type(0x07A6, "SM100wwParam", true, MAKE_PF_CB(process_SM100wwParam));
|
register_telegram_type(0x07AC, "SM100wwParam1", false, MAKE_PF_CB(process_SM100wwParam2));
|
||||||
register_telegram_type(0x07AE, "SM100wwKeepWarm", true, MAKE_PF_CB(process_SM100wwKeepWarm));
|
register_telegram_type(0x07A5, "SM100wwCirc", true, MAKE_PF_CB(process_SM100wwCirc));
|
||||||
register_telegram_type(0x07E0, "SM100wwStatus2", true, MAKE_PF_CB(process_SM100wwStatus2));
|
register_telegram_type(0x07AE, "SM100wwKeepWarm", true, MAKE_PF_CB(process_SM100wwKeepWarm));
|
||||||
register_telegram_type(0x07AD, "SM100ValveStatus", false, MAKE_PF_CB(process_SM100ValveStatus));
|
register_telegram_type(0x07AD, "SM100ValveStatus", false, MAKE_PF_CB(process_SM100ValveStatus));
|
||||||
|
register_telegram_type(0x07AB, "SM100wwCommand", false, MAKE_PF_CB(process_SM100wwCommand)); // command from thermostat
|
||||||
|
} else if (tag == DeviceValueTAG::TAG_DHW4) {
|
||||||
|
register_telegram_type(0x07C3, "SM100wwCommand", false, MAKE_PF_CB(process_SM100wwCommand)); // command from dhw3->dhw4
|
||||||
|
}
|
||||||
// device values...
|
// device values...
|
||||||
register_device_value(tag, &wwTemp_, DeviceValueType::UINT16, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(wwTemp), DeviceValueUOM::DEGREES);
|
register_device_value(tag, &wwTemp_, DeviceValueType::UINT16, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(wwTemp), DeviceValueUOM::DEGREES);
|
||||||
register_device_value(tag, &wwTemp2_, DeviceValueType::UINT16, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(wwStorageTemp1), DeviceValueUOM::DEGREES);
|
register_device_value(tag, &wwTemp2_, DeviceValueType::UINT16, DeviceValueNumOp::DV_NUMOP_DIV10, FL_(wwStorageTemp1), DeviceValueUOM::DEGREES);
|
||||||
@@ -100,7 +105,7 @@ Water::Water(uint8_t device_type, uint8_t device_id, uint8_t product_id, const c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// SM100wwTemperature - 0x07D6
|
// SM100wwTemperature - 0x07D6, dhw4: 0x07D7
|
||||||
// Solar Module(0x2A) -> (0x00), (0x7D6), data: 01 C1 00 00 02 5B 01 AF 01 AD 80 00 01 90
|
// Solar Module(0x2A) -> (0x00), (0x7D6), data: 01 C1 00 00 02 5B 01 AF 01 AD 80 00 01 90
|
||||||
void Water::process_SM100wwTemperature(std::shared_ptr<const Telegram> telegram) {
|
void Water::process_SM100wwTemperature(std::shared_ptr<const Telegram> telegram) {
|
||||||
has_update(telegram, wwTemp_, 0); // is *10 TS17
|
has_update(telegram, wwTemp_, 0); // is *10 TS17
|
||||||
@@ -156,12 +161,10 @@ void Water::process_SM100ValveStatus(std::shared_ptr<const Telegram> telegram) {
|
|||||||
has_update(telegram, wwRetValve_, 1);
|
has_update(telegram, wwRetValve_, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
// SM100ww? - 0x7E0, some kind of status, dhw4: 0x7E1
|
||||||
// SM100ww? - 0x7E0, some kind of status
|
|
||||||
// data: 00 00 46 00 00 01 06 0E 06 0E 00 00 00 00 00 03 03 03 03
|
// data: 00 00 46 00 00 01 06 0E 06 0E 00 00 00 00 00 03 03 03 03
|
||||||
// publishes single values offset 1/2(16bit), offset 5, offset 6, offset 7, offset 8, offset 9,
|
// publishes single values offset 1/2(16bit), offset 5, offset 6, offset 7, offset 8, offset 9,
|
||||||
// status2 = 03:"no heat", 06:"heat request", 08:"disinfecting", 09:"hold"
|
// status2 = 03:"no heat", 06:"heat request", 08:"disinfecting", 09:"hold"
|
||||||
*/
|
|
||||||
void Water::process_SM100wwStatus2(std::shared_ptr<const Telegram> telegram) {
|
void Water::process_SM100wwStatus2(std::shared_ptr<const Telegram> telegram) {
|
||||||
// has_update(telegram, wwFlow_, 7); // single byte, wrong see #1387
|
// has_update(telegram, wwFlow_, 7); // single byte, wrong see #1387
|
||||||
has_update(telegram, wwStatus2_, 8);
|
has_update(telegram, wwStatus2_, 8);
|
||||||
@@ -170,6 +173,7 @@ void Water::process_SM100wwStatus2(std::shared_ptr<const Telegram> telegram) {
|
|||||||
|
|
||||||
// SM100wwCommand - 0x07AB
|
// SM100wwCommand - 0x07AB
|
||||||
// Thermostat(0x10) -> Solar Module(0x2A), (0x7AB), data: 01 00 01
|
// Thermostat(0x10) -> Solar Module(0x2A), (0x7AB), data: 01 00 01
|
||||||
|
// or dhw3 module (0x2A) -> dhw4 module(0x2B), (0x7C3), data: 01 01 00
|
||||||
void Water::process_SM100wwCommand(std::shared_ptr<const Telegram> telegram) {
|
void Water::process_SM100wwCommand(std::shared_ptr<const Telegram> telegram) {
|
||||||
// not implemented yet
|
// not implemented yet
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
#define EMSESP_APP_VERSION "3.8.2-dev.C11"
|
#define EMSESP_APP_VERSION "3.8.2-dev.C12"
|
||||||
|
|||||||
@@ -68,6 +68,14 @@ void EMSuart::uart_event_task(void * pvParameters) {
|
|||||||
// initialize UART driver
|
// initialize UART driver
|
||||||
void EMSuart::start(const uint8_t tx_mode, const uint8_t rx_gpio, const uint8_t tx_gpio) {
|
void EMSuart::start(const uint8_t tx_mode, const uint8_t rx_gpio, const uint8_t tx_gpio) {
|
||||||
if (tx_mode_ == EMS_TXMODE_INIT) {
|
if (tx_mode_ == EMS_TXMODE_INIT) {
|
||||||
|
#if CONFIG_IDF_TARGET_ESP32C6
|
||||||
|
uart_config_t uart_config = {.baud_rate = EMSUART_BAUD,
|
||||||
|
.data_bits = UART_DATA_8_BITS,
|
||||||
|
.parity = UART_PARITY_DISABLE,
|
||||||
|
.stop_bits = UART_STOP_BITS_1,
|
||||||
|
.flow_ctrl = UART_HW_FLOWCTRL_DISABLE,
|
||||||
|
.rx_flow_ctrl_thresh = 0};
|
||||||
|
#else
|
||||||
uart_config_t uart_config = {.baud_rate = EMSUART_BAUD,
|
uart_config_t uart_config = {.baud_rate = EMSUART_BAUD,
|
||||||
.data_bits = UART_DATA_8_BITS,
|
.data_bits = UART_DATA_8_BITS,
|
||||||
.parity = UART_PARITY_DISABLE,
|
.parity = UART_PARITY_DISABLE,
|
||||||
@@ -76,6 +84,7 @@ void EMSuart::start(const uint8_t tx_mode, const uint8_t rx_gpio, const uint8_t
|
|||||||
.rx_flow_ctrl_thresh = 0,
|
.rx_flow_ctrl_thresh = 0,
|
||||||
.source_clk = UART_SCLK_APB,
|
.source_clk = UART_SCLK_APB,
|
||||||
.flags = {0}};
|
.flags = {0}};
|
||||||
|
#endif
|
||||||
#if defined(EMSUART_RX_INVERT)
|
#if defined(EMSUART_RX_INVERT)
|
||||||
inverse_mask |= UART_SIGNAL_RXD_INV;
|
inverse_mask |= UART_SIGNAL_RXD_INV;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -506,6 +506,8 @@ void WebSettings::set_board_profile(WebSettings & settings) {
|
|||||||
settings.board_profile = "S2MINI";
|
settings.board_profile = "S2MINI";
|
||||||
#elif CONFIG_IDF_TARGET_ESP32S3
|
#elif CONFIG_IDF_TARGET_ESP32S3
|
||||||
settings.board_profile = "S32S3"; // BBQKees Gateway S3
|
settings.board_profile = "S32S3"; // BBQKees Gateway S3
|
||||||
|
#elif CONFIG_IDF_TARGET_ESP32C6
|
||||||
|
settings.board_profile = "CUSTOM";
|
||||||
#endif
|
#endif
|
||||||
// apply the new board profile setting
|
// apply the new board profile setting
|
||||||
System::load_board_profile(data, settings.board_profile.c_str());
|
System::load_board_profile(data, settings.board_profile.c_str());
|
||||||
|
|||||||
Reference in New Issue
Block a user