This commit is contained in:
MichaelDvP
2024-03-31 18:22:21 +02:00
17 changed files with 753 additions and 110 deletions

View File

@@ -21,7 +21,7 @@
- Native support for Home Assistant, Domoticz and openHAB via [MQTT Discovery](https://www.home-assistant.io/docs/mqtt/discovery/) - Native support for Home Assistant, Domoticz and openHAB via [MQTT Discovery](https://www.home-assistant.io/docs/mqtt/discovery/)
- Can run standalone as an independent WiFi Access Point or join an existing WiFi network - Can run standalone as an independent WiFi Access Point or join an existing WiFi network
- Easy first-time configuration via a web Captive Portal - Easy first-time configuration via a web Captive Portal
- Support for more than [110+ EMS devices](https://emsesp.github.io/docs/All-Devices/) (boilers, thermostats, solar modules, mixer modules, heat pumps, gateways, switches, heat sources) - Support for more than [120+ EMS devices](https://emsesp.github.io/docs/All-Devices/) (boilers, thermostats, solar modules, mixer modules, heat pumps, gateways, switches, heat sources)
## **Documentation** ## **Documentation**

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
import { defineConfig, splitVendorChunkPlugin } from 'vite'; import { defineConfig } from 'vite';
import viteTsconfigPaths from 'vite-tsconfig-paths'; import viteTsconfigPaths from 'vite-tsconfig-paths';
import preact from '@preact/preset-vite'; import preact from '@preact/preset-vite';
import viteImagemin from 'vite-plugin-imagemin'; import viteImagemin from 'vite-plugin-imagemin';
@@ -30,6 +30,7 @@ export default defineConfig(({ command, mode }) => {
} }
if (mode === 'hosted') { if (mode === 'hosted') {
console.log('Preparing for hosted build');
return { return {
plugins: [preact(), viteTsconfigPaths()], plugins: [preact(), viteTsconfigPaths()],
build: { build: {
@@ -38,11 +39,12 @@ export default defineConfig(({ command, mode }) => {
}; };
} }
console.log('Preparing for production, optimized build');
return { return {
plugins: [ plugins: [
preact(), preact(),
viteTsconfigPaths(), viteTsconfigPaths(),
splitVendorChunkPlugin(),
{ {
...viteImagemin({ ...viteImagemin({
verbose: false, verbose: false,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 262 KiB

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 293 KiB

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 556 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 61 KiB

View File

@@ -10,11 +10,13 @@
; -DEMSESP_TEST ; enable the tests. EN language only ; -DEMSESP_TEST ; enable the tests. EN language only
; -DEMSESP_DE_ONLY ; only DE translated entity names ; -DEMSESP_DE_ONLY ; only DE translated entity names
; -DEMSESP_EN_ONLY ; only EN translated entity names ; -DEMSESP_EN_ONLY ; only EN translated entity names
; -DEMSESP_PINGTEST ; send log message every 1/2 second
; my_build_flags = -DEMSESP_TEST ; my_build_flags = -DEMSESP_TEST
; my_build_flags = -DEMSESP_DEBUG -DEMSESP_TEST ; my_build_flags = -DEMSESP_DEBUG -DEMSESP_TEST
; my_build_flags = -DEMSESP_DEBUG -DEMSESP_TEST -DEMSESP_PINGTEST
[platformio] [platformio]
; default_envs = esp32_4M default_envs = esp32_4M
; default_envs = esp32_16M ; default_envs = esp32_16M
; default_envs = lolin_s3 ; default_envs = lolin_s3
; default_envs = standalone ; default_envs = standalone
@@ -32,13 +34,13 @@
; upload_port = /dev/ttyUSB* ; upload_port = /dev/ttyUSB*
; upload_port = COM5 ; upload_port = COM5
extra_scripts = extra_scripts =
; pre:scripts/build_interface.py ; comment out if you don't want to re-build the WebUI each time pre:scripts/build_interface.py ; comment out if you don't want to re-build the WebUI each time
scripts/rename_fw.py scripts/rename_fw.py
[env:esp32_16M] [env:esp32_16M]
[env:custom] [env:custom]
; use for baisc ESP boards with 4MB flash ; use for basic ESP boards with 4MB flash
; make sure -D TASMOTA_SDK is also enabled ; make sure -D TASMOTA_SDK is also enabled
platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.01.00/platform-espressif32.zip platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.01.00/platform-espressif32.zip
; use for S3 boards: ; use for S3 boards:
@@ -76,7 +78,7 @@ build_flags =
[env:lolin_s3] [env:lolin_s3]
upload_port = /dev/ttyUSB0 upload_port = /dev/ttyUSB0
extra_scripts = extra_scripts =
; pre:scripts/build_interface.py ; comment out if you don't want to re-build the WebUI each time pre:scripts/build_interface.py ; comment out if you don't want to re-build the WebUI each time
scripts/rename_fw.py scripts/rename_fw.py
; pio run -e debug ; pio run -e debug

View File

@@ -752,6 +752,11 @@ void System::system_check() {
if (!last_system_check_ || ((uint32_t)(uuid::get_uptime() - last_system_check_) >= SYSTEM_CHECK_FREQUENCY)) { if (!last_system_check_ || ((uint32_t)(uuid::get_uptime() - last_system_check_) >= SYSTEM_CHECK_FREQUENCY)) {
last_system_check_ = uuid::get_uptime(); last_system_check_ = uuid::get_uptime();
#ifdef EMSESP_PINGTEST
static uint64_t ping_count = 0;
LOG_NOTICE("Ping test, #%d", ping_count++);
#endif
// check if we have a valid network connection // check if we have a valid network connection
if (!ethernet_connected() && (WiFi.status() != WL_CONNECTED)) { if (!ethernet_connected() && (WiFi.status() != WL_CONNECTED)) {
healthcheck_ |= HEALTHCHECK_NO_NETWORK; healthcheck_ |= HEALTHCHECK_NO_NETWORK;

View File

@@ -281,7 +281,11 @@ class System {
static constexpr uint32_t BUTTON_VLongPressDelay = 9000; // Hold period for a very long press event (in ms) static constexpr uint32_t BUTTON_VLongPressDelay = 9000; // Hold period for a very long press event (in ms)
// healthcheck // healthcheck
#ifdef EMSESP_PINGTEST
static constexpr uint32_t SYSTEM_CHECK_FREQUENCY = 500; // do a system check every 1/2 second
#else
static constexpr uint32_t SYSTEM_CHECK_FREQUENCY = 5000; // do a system check every 5 seconds static constexpr uint32_t SYSTEM_CHECK_FREQUENCY = 5000; // do a system check every 5 seconds
#endif
static constexpr uint32_t HEALTHCHECK_LED_LONG_DUARATION = 1500; static constexpr uint32_t HEALTHCHECK_LED_LONG_DUARATION = 1500;
static constexpr uint32_t HEALTHCHECK_LED_FLASH_DUARATION = 150; static constexpr uint32_t HEALTHCHECK_LED_FLASH_DUARATION = 150;
static constexpr uint8_t HEALTHCHECK_NO_BUS = (1 << 0); // 1 static constexpr uint8_t HEALTHCHECK_NO_BUS = (1 << 0); // 1

View File

@@ -28,7 +28,7 @@ namespace emsesp {
class WebLogService : public uuid::log::Handler { class WebLogService : public uuid::log::Handler {
public: public:
static constexpr size_t MAX_LOG_MESSAGES = 50; static constexpr size_t MAX_LOG_MESSAGES = 50;
static constexpr size_t REFRESH_SYNC = 80; static constexpr size_t REFRESH_SYNC = 30;
WebLogService(AsyncWebServer * server, SecurityManager * securityManager); WebLogService(AsyncWebServer * server, SecurityManager * securityManager);