1138 Commits

Author SHA1 Message Date
Proddy
993e2fdc22 Merge pull request #2739 from proddy/dev
update tests
2025-11-12 21:28:13 +01:00
proddy
0d05cf489b update tests 2025-11-12 21:27:44 +01:00
Proddy
0961b814d5 Merge pull request #2738 from proddy/dev
updates
2025-11-12 21:25:22 +01:00
proddy
999c407f12 update 2025-11-12 21:24:52 +01:00
proddy
7c137d71ca update 2025-11-12 21:24:48 +01:00
Proddy
ad26768d6d Merge pull request #2737 from MichaelDvP/dev
fixes and changes for #2732, #2733, #2735
2025-11-12 21:15:12 +01:00
Proddy
5ed7d60ae8 Merge branch 'dev' into dev 2025-11-12 21:14:57 +01:00
Proddy
a67379fcb2 Merge pull request #2734 from proddy/dev
minor updates
2025-11-12 21:11:34 +01:00
proddy
cccae3fbcc fixes #2728 2025-11-12 21:10:24 +01:00
proddy
10d85c6547 formatting 2025-11-12 19:07:22 +01:00
MichaelDvP
21af1adefe chore: update generated files 2025-11-12 17:30:35 +00:00
MichaelDvP
fe02258a00 dev 28, changelog 2025-11-12 18:19:11 +01:00
MichaelDvP
3d8ec8e295 wwprio to mixer, boiler 2025-11-12 16:32:46 +01:00
MichaelDvP
d5b496aa67 add pid characteristic #2735 2025-11-12 16:32:17 +01:00
MichaelDvP
8458cfc468 alanogsensor pulse,add mqtt/HA output #2732 2025-11-12 13:38:26 +01:00
MichaelDvP
f10d2ef48d allow syslog mark intervall up to 1 hour #2733 2025-11-12 13:36:24 +01:00
proddy
2ee433bb89 ui small changes 2025-11-12 09:59:50 +01:00
proddy
237cf91f5a package update 2025-11-12 09:59:38 +01:00
proddy
8db7e4a5b9 updated 2025-11-11 22:07:42 +01:00
proddy
a3703514b1 package update 2025-11-11 21:43:11 +01:00
proddy
db8ed34dc4 update dictionary 2025-11-11 21:43:05 +01:00
proddy
21b89cf84d default test data is all 2025-11-11 21:41:18 +01:00
proddy
fc0f29337b Syslog: allow longer intervals than 10 sec for "Mark interval" #2733 2025-11-11 21:41:03 +01:00
Proddy
84b9e6ae18 Merge pull request #2730 from mattreim/dev
Update German translation
2025-11-11 21:31:35 +01:00
mattreim
cbabaa7d91 Update German translation 2025-11-10 23:13:49 +01:00
Proddy
4cfe704242 Merge pull request #2729 from proddy/dev
web UI improvements and more fixes for system sensors
2025-11-10 22:38:04 +01:00
proddy
25cae61cc1 updated tests 2025-11-10 22:37:12 +01:00
proddy
d96b3e6d05 updated 2025-11-10 22:37:03 +01:00
Proddy
1f261476d5 Merge branch 'emsesp:dev' into dev 2025-11-10 22:31:07 +01:00
Proddy
3171fc7375 Merge pull request #2727 from MichaelDvP/dev
pumpmode enum for HT3 boilers #2721, add commands manual defrost, chimneysweeper
2025-11-10 22:30:52 +01:00
proddy
ba843c1589 changed HA entity_format text so its clearer 2025-11-10 22:27:11 +01:00
proddy
f7f01ea875 fix factory log message 2025-11-10 22:09:35 +01:00
proddy
8ea1dfc7d2 dev-27 2025-11-10 22:09:25 +01:00
proddy
9616a113b0 fixes to #2725 2025-11-10 21:50:47 +01:00
proddy
4aaf6e95cf update tests 2025-11-10 21:35:35 +01:00
proddy
edfdfb1016 fix standalone 2025-11-10 21:27:50 +01:00
proddy
3067149357 remove all from customizations only removes the entities, not the sensors ('as' and 'ts') 2025-11-10 21:25:20 +01:00
proddy
d5548c8bdc fix count for analog sensors 2025-11-10 21:24:41 +01:00
proddy
cf66dc99b4 tidy count_entities() 2025-11-10 21:24:03 +01:00
proddy
891619fa26 move factory log down so it gets displayed in log 2025-11-10 21:23:35 +01:00
proddy
1f6462be38 rename reset to "remove all", move top of screen and fix messages when auto-restarting 2025-11-10 21:22:24 +01:00
proddy
e74dc1fd78 new translations 2025-11-10 21:20:37 +01:00
proddy
f59768ce17 added new route for userprofile 2025-11-10 21:20:22 +01:00
proddy
22d015615d fixed jumpy buttons, moved user profile to its own component 2025-11-10 21:20:10 +01:00
proddy
0ef0ca8518 package update 2025-11-10 21:19:43 +01:00
proddy
1917c5d7cb package update 2025-11-10 21:19:31 +01:00
proddy
ff0fe593d3 show "no data" if there is no data and move help tooltip 2025-11-10 21:19:20 +01:00
proddy
12e8d64ec2 is_system fixes 2025-11-10 11:28:49 +01:00
MichaelDvP
c0c13eb687 chore: update generated files 2025-11-10 09:05:42 +00:00
MichaelDvP
91b78f9a23 pumpmode enum for HT3 boilers #2721, add commands manual defrost, chimneysweeper 2025-11-10 09:54:33 +01:00
Proddy
32474d10ce Merge pull request #2724 from proddy/dev
fixes to system sensors
2025-11-09 15:00:34 +01:00
proddy
7c3de25c20 update unit tests 2025-11-09 14:58:27 +01:00
proddy
f75b7b1a59 add is_system to analog and temperature sensors, highlight in Sensors page, remove from Dashboard, change button icon to be consistent when updating 2025-11-09 14:56:50 +01:00
Proddy
a3e01b8a3b Merge pull request #2717 from proddy/dev
fix some bugs, add some text
2025-11-09 09:39:25 +01:00
proddy
6c9a9b8632 updated for dev-26 2025-11-09 09:35:48 +01:00
proddy
3fba75868f increase size of factor textfield 2025-11-09 08:29:26 +01:00
proddy
8dee390d75 update test 2025-11-08 16:42:47 +01:00
proddy
dc838639b2 add is_system to analog sensor so internal sensors cannot be removed 2025-11-08 16:30:40 +01:00
proddy
3fd05c8eb7 fix lint error 2025-11-08 16:28:26 +01:00
proddy
5f0df140b0 factory reset show system monitor 2025-11-08 16:28:04 +01:00
proddy
b98cbd3ec5 add mock sensor data 2025-11-08 16:27:25 +01:00
proddy
18d67d088e update 2025-11-08 15:27:16 +01:00
proddy
0bf60394fe dev-26 2025-11-08 15:27:10 +01:00
proddy
cec5ffd547 package update 2025-11-08 15:27:03 +01:00
proddy
026ea4450e error is color red 2025-11-08 15:26:54 +01:00
proddy
9a1dd5bb98 update standalone and test output 2025-11-08 12:47:00 +01:00
proddy
fbc42fbb15 double press resets wifi to AP (https://github.com/emsesp/EMS-ESP32/discussions/2720) 2025-11-08 12:41:25 +01:00
proddy
5613cde00f update defaults 2025-11-08 12:27:08 +01:00
proddy
d65d6f49cd fix FS format, move AP* from Network system info to own node 2025-11-08 11:30:40 +01:00
proddy
c9bc18cf4b fix, attempt #3 2025-11-06 18:29:39 +01:00
Proddy
9179127bce Merge branch 'emsesp:dev' into dev 2025-11-06 14:48:08 +01:00
Proddy
16b6bef393 Merge pull request #2719 from misa1515/patch-26
Update locale_translations.h
2025-11-06 14:47:49 +01:00
misa1515
52159ac596 Update locale_translations.h 2025-11-06 13:46:47 +01:00
proddy
0dc3fd43e9 remove comment, rollback changes 2025-11-06 12:57:13 +01:00
proddy
b0d490036f fix bug, only find dest 2025-11-06 12:56:58 +01:00
proddy
c28b098c65 show ntp in info 2025-11-06 12:56:42 +01:00
proddy
4a6ccce09a add ntp for completeness and testing 2025-11-06 12:56:20 +01:00
proddy
5053ad08dd add comment 2025-11-06 12:56:00 +01:00
proddy
72b4809ed8 update tests 2025-11-06 12:55:49 +01:00
proddy
6799fe5189 rename Initialising to Booting 2025-11-06 12:55:40 +01:00
proddy
12635ff4a5 optimizations and show # entities and languages 2025-11-05 22:29:15 +01:00
proddy
5908fd9d9c show language count 2025-11-05 20:50:29 +01:00
proddy
5c07a2c0cc remove specific commands like ntp/enabled (ap/enabled didn't work) and replace with just service name 2025-11-05 16:54:08 +01:00
proddy
f5048abae7 formatting 2025-11-05 16:53:25 +01:00
Proddy
76acffdb2e Merge pull request #2715 from MichaelDvP/dev
add SRC climate humidity #2714
2025-11-05 15:03:01 +01:00
MichaelDvP
1ac96aa02e add SRC climate humidity #2714 2025-11-05 14:50:32 +01:00
Proddy
3386ac7f8a Merge pull request #2701 from proddy/dev
web optimizations
2025-11-05 14:06:26 +01:00
proddy
1e4c157c28 package update 2025-11-05 14:04:50 +01:00
proddy
a1c5297eef add aria-label to buttons and text fields with no label #2710 2025-11-05 14:02:00 +01:00
proddy
cda04bef26 don't print out file names in bundle 2025-11-05 09:12:36 +01:00
proddy
1edf60b617 formatting 2025-11-05 09:01:35 +01:00
proddy
32cf4dd6c9 3.7.3-dev.25 2025-11-05 09:01:29 +01:00
proddy
f0caeb089d package update 2025-11-05 08:58:04 +01:00
proddy
23f1e7569c formatting 2025-11-05 08:57:56 +01:00
proddy
5087fdb5d6 prevent flicker when refreshing 2025-11-04 18:17:35 +01:00
proddy
b654a42229 package update 2025-11-04 18:06:09 +01:00
proddy
d312c8e592 update 2025-11-04 18:06:04 +01:00
proddy
319787bae3 switch our dialog with box 2025-11-04 18:05:57 +01:00
proddy
d124b04a2c tidy up error page 2025-11-04 18:05:41 +01:00
proddy
4ef8a3a163 package update 2025-11-04 01:00:46 +01:00
proddy
41b5cdddf2 smaller window 2025-11-04 01:00:39 +01:00
proddy
e10453b2fd don't show border 2025-11-04 01:00:27 +01:00
proddy
d2f665ab70 fix name 2025-11-04 01:00:17 +01:00
proddy
4083478b65 smaller font 2025-11-04 01:00:08 +01:00
proddy
01136a19a5 make wait uint16_t to allow max 2000 2025-11-03 18:18:08 +01:00
proddy
0b2df96461 add message test 2025-11-03 18:15:29 +01:00
Proddy
f66c3ff322 Merge branch 'dev' into dev 2025-11-03 18:02:43 +01:00
proddy
5d8fe89e5a python optimizations 2025-11-03 18:01:09 +01:00
Proddy
22eb5436ab Merge pull request #2709 from MichaelDvP/dev
some smaller fixes
2025-11-03 17:59:53 +01:00
proddy
17bdd87576 optimized window size detection 2025-11-03 17:51:51 +01:00
proddy
8f7c0a1d97 all values 2025-11-03 17:51:04 +01:00
proddy
3b453b18bc add section for all values 2025-11-03 17:50:53 +01:00
proddy
a1fc5bf54b fix lint warning 2025-11-03 17:50:43 +01:00
proddy
0cb413a579 package update 2025-11-03 17:50:30 +01:00
MichaelDvP
d326d345f4 chore: update generated files 2025-11-03 10:53:17 +00:00
MichaelDvP
1de647e8a5 tcp stack 6k, move message shuntingYard to scheduler 2025-11-03 11:37:24 +01:00
MichaelDvP
c562b88b32 update pkg 2025-11-03 11:36:28 +01:00
proddy
f2e38330ea fix window positioning 2025-11-02 19:46:11 +01:00
MichaelDvP
f2dca2a90a dev24, fix syslog timestamp #2704 2025-11-02 17:45:14 +01:00
proddy
9f1cd04d45 auto-formatting 2025-11-02 13:01:03 +01:00
proddy
fe67f3a982 fix syslog, remove filter 2025-11-02 13:00:55 +01:00
proddy
2fd6e9ebf5 package update 2025-11-02 13:00:45 +01:00
Proddy
0f1195de82 Merge pull request #2705 from auenkind/devcontainer
Add devcontainer config
2025-11-02 10:29:37 +01:00
David Neu
267042f74f add devcontainer config 2025-11-02 08:25:18 +00:00
MichaelDvP
ea9783dbfc use ems/ems+ telegrams for forceheatingoff, add fanspd #2702 2025-11-01 19:23:13 +01:00
proddy
67655c4b06 package updates 2025-11-01 16:12:09 +01:00
Proddy
2970aa5ba3 Merge branch 'dev' into dev 2025-11-01 16:10:21 +01:00
proddy
99a3ffcf17 optimizations, use md5 for hash 2025-11-01 16:04:47 +01:00
MichaelDvP
9bc5bde3c2 fix maxflowtemp for convectors, coolingon as bit, nrg with decimals 2025-11-01 13:27:09 +01:00
proddy
0edb844225 remove pnpm build 2025-10-31 18:41:37 +01:00
proddy
e3feb8f11e webUI target also builds 2025-10-31 18:41:27 +01:00
proddy
6b7534b7fb optimizations 2025-10-31 18:38:38 +01:00
proddy
ca1506de8b add custom error page 2025-10-31 18:36:18 +01:00
proddy
1cb535dea3 optimized for speed 2025-10-31 18:35:01 +01:00
proddy
5d32b6d383 package update 2025-10-31 18:34:39 +01:00
Proddy
c203b8e6d2 Merge pull request #2697 from MichaelDvP/dev
solar ts8, ts16, set selflowtemp: write to ems+ and ems telegrams
2025-10-30 07:54:40 +01:00
proddy
e6dbe020c1 package update 2025-10-29 12:40:28 +01:00
proddy
63cf1603b0 modules menuitem resized 2025-10-29 12:40:21 +01:00
MichaelDvP
c184a0af10 Merge branch 'dev' of https://github.com/MichaelDvP/EMS-ESP32 into dev 2025-10-29 10:48:32 +01:00
MichaelDvP
8a4e6d5ed5 fix selflowtemp, #2641 2025-10-29 10:46:46 +01:00
proddy
aadb67fa79 speed up mock logging 2025-10-28 22:19:43 +01:00
proddy
4949471518 package update 2025-10-28 22:19:43 +01:00
proddy
9504723ef2 add back security 2025-10-28 22:19:43 +01:00
proddy
3abfb7bb9c optimizations 2025-10-28 22:19:43 +01:00
MichaelDvP
3ef6bf8681 chore: update generated files 2025-10-28 16:04:27 +00:00
MichaelDvP
1647a10b1b add solar TS16, TS8, #2690 2025-10-28 16:52:39 +01:00
Proddy
55b893362c Merge pull request #2696 from MichaelDvP/dev
remove cpu temperature for esp32
2025-10-27 19:36:06 +01:00
MichaelDvP
48f1928327 remove cpu temperature for esp32 2025-10-27 17:30:43 +01:00
Proddy
dc793f145d Merge pull request #2694 from MichaelDvP/dev
fix dashboard write #2693
2025-10-27 17:07:05 +01:00
MichaelDvP
77e0b7d89c fix dashboard write #2693 2025-10-27 11:08:04 +01:00
MichaelDvP
cec19860bc Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-10-27 11:04:28 +01:00
Proddy
898acb90d0 Merge pull request #2688 from proddy/dev
dont run if no C++ src files changed
2025-10-26 12:14:07 +01:00
proddy
a074ac732d dont run if no C++ src files changed 2025-10-26 12:12:37 +01:00
Proddy
c71526b95c Merge pull request #2687 from proddy/dev
ui design cleanup
2025-10-26 12:03:25 +01:00
proddy
f035e31dcf cosmetic improvements 2025-10-26 11:59:19 +01:00
proddy
35192b9dde optimized 2025-10-26 08:51:47 +01:00
Proddy
b5ac637231 Merge pull request #2685 from proddy/dev
small changes to make web tables prettier and consistent
2025-10-25 17:12:42 +02:00
proddy
4e0ef8b0e3 remove bold on select 2025-10-25 17:10:58 +02:00
proddy
c32ee4dfb5 consistent design between dashboard and device tables 2025-10-25 16:59:20 +02:00
proddy
accfeab6fa prettier menu items 2025-10-25 16:59:04 +02:00
proddy
d98f3cc8c5 python cleanup 2025-10-25 16:03:13 +02:00
proddy
342f238983 3.7.3-dev.23 2025-10-25 16:03:02 +02:00
proddy
73f8ea0fc5 lower case some texts 2025-10-25 16:02:50 +02:00
proddy
f2bd1ff575 added assumeChangesOnlyAffectDirectDependencies 2025-10-25 15:23:05 +02:00
proddy
b3ec23d6bd more optimizations, see if it makes a difference 2025-10-25 15:22:51 +02:00
proddy
1fc7fa4720 cache what we can 2025-10-25 15:22:29 +02:00
proddy
58ae058465 use memo and callbacks for reduced rendering vis caching 2025-10-25 15:21:59 +02:00
proddy
7ece395d1b smaller table for dialog 2025-10-25 14:49:14 +02:00
proddy
4bb876031e text change 2025-10-25 14:16:12 +02:00
proddy
e4f129db04 don't compile code when target is build_webUI 2025-10-25 14:15:03 +02:00
proddy
90038e08dc force a build for WebUI 2025-10-25 14:14:42 +02:00
proddy
4c30e930cf add building section 2025-10-25 14:14:25 +02:00
proddy
dd69e02f6b add memo cache, smaller toaster windows 2025-10-25 11:44:08 +02:00
MichaelDvP
f2ccf1953d Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-10-25 11:35:50 +02:00
proddy
0e133840c9 package update 2025-10-25 11:11:51 +02:00
proddy
e12b277472 typo 2025-10-25 11:11:38 +02:00
Proddy
dc7b1809c1 Merge pull request #2682 from emsesp/alert-autofix-40
Potential fix for code scanning alert no. 40: Workflow does not contain permissions
2025-10-25 11:01:00 +02:00
Proddy
8c2146ff55 Merge pull request #2683 from emsesp/alert-autofix-41
Potential fix for code scanning alert no. 41: Workflow does not contain permissions
2025-10-25 11:00:44 +02:00
Proddy
882d412409 Potential fix for code scanning alert no. 41: Workflow does not contain permissions
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-10-25 10:46:57 +02:00
Proddy
3f88a9469c Potential fix for code scanning alert no. 40: Workflow does not contain permissions
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-10-25 10:46:08 +02:00
Proddy
3ac7d43a81 Merge pull request #2681 from proddy/dev
CI/CD fixes
2025-10-25 10:38:43 +02:00
proddy
d12446b6d9 range fix 2025-10-25 10:36:55 +02:00
MichaelDvP
865fb3a967 typo 2025-10-25 10:31:45 +02:00
proddy
48538222b2 chore: update generated files 2025-10-25 08:30:43 +00:00
proddy
8d44f61517 auto-generated (will be overwritten) 2025-10-25 09:53:43 +02:00
proddy
0e4f6f4209 optimized scripts 2025-10-25 09:53:25 +02:00
proddy
a2823563bf rename post py file 2025-10-25 09:53:08 +02:00
proddy
353cdb324d run unit test on PR 2025-10-25 09:52:44 +02:00
proddy
216f799db1 update checkout 2025-10-25 09:52:35 +02:00
proddy
4d6f080263 modified the comments 2025-10-25 09:52:23 +02:00
MichaelDvP
b9d124618c chore: update generated files 2025-10-25 06:58:56 +00:00
MichaelDvP
ab5d9e8d36 add tags to modbus doc generate 2025-10-25 08:47:10 +02:00
Proddy
4cdeecd952 Merge pull request #2679 from MichaelDvP/dev
bosch texts to utf8, add entities #2669
2025-10-24 21:06:29 +02:00
MichaelDvP
59b3933cb6 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-10-24 18:15:35 +02:00
Proddy
179ddcb348 Merge pull request #2678 from proddy/dev
fix native/standalone
2025-10-24 18:15:03 +02:00
proddy
efa2c8fc4b rename native to standalone 2025-10-24 18:06:52 +02:00
proddy
c958c7d61a fix native 2025-10-24 18:05:12 +02:00
Proddy
35fca9c450 Merge pull request #2677 from proddy/dev
updates to version
2025-10-24 16:28:03 +02:00
proddy
61962fbc07 only build web with target -t build 2025-10-24 16:25:28 +02:00
proddy
39e724befe don't build web on each target 2025-10-24 16:25:15 +02:00
proddy
43bb77b095 optimizations using caching 2025-10-24 16:24:55 +02:00
proddy
28e1e46586 always build web first 2025-10-24 15:35:54 +02:00
proddy
2f5b879652 handle buildweb condition when its part of a pio chain 2025-10-24 15:33:50 +02:00
proddy
16930fe8ca add back for reference 2025-10-24 15:32:35 +02:00
proddy
1db1b6e524 package update 2025-10-24 15:31:57 +02:00
proddy
43eba7a010 show dialog with version information 2025-10-24 15:31:49 +02:00
MichaelDvP
49278bdea4 fix warning 2025-10-24 12:52:25 +02:00
MichaelDvP
2405e11af2 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-10-24 09:45:10 +02:00
MichaelDvP
23b6894484 dev.22 update changelog 2025-10-24 09:44:22 +02:00
proddy
a837c9398c updated 2025-10-24 09:40:41 +02:00
Proddy
ea484e15f9 Merge pull request #2676 from proddy/dev
remove
2025-10-23 23:18:34 +02:00
proddy
cce99a8b1d remove 2025-10-23 23:18:09 +02:00
Proddy
f29faafd78 Merge pull request #2675 from emsesp/alert-autofix-38
Potential fix for code scanning alert no. 38: Workflow does not contain permissions
2025-10-23 22:43:33 +02:00
Proddy
c3eafbcd85 Potential fix for code scanning alert no. 38: Workflow does not contain permissions
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-10-23 22:40:23 +02:00
Proddy
65e18ab4e2 Merge pull request #2674 from proddy/dev
use pio to update CSV files
2025-10-23 22:38:42 +02:00
proddy
8bb16ed3a7 update workflows to use new pio builds 2025-10-23 22:35:57 +02:00
proddy
e685284f72 chore: update generated files 2025-10-23 19:43:00 +00:00
proddy
86d2805642 package update (again) 2025-10-23 21:20:03 +02:00
proddy
29b98a15a4 revert test changes 2025-10-23 21:12:47 +02:00
proddy
ba9df92b12 chore: update generated files 2025-10-23 19:05:12 +00:00
proddy
0eac1c9bf9 force a test 2025-10-23 20:52:31 +02:00
proddy
515feb9f9e test auto-commit 2025-10-23 18:43:00 +02:00
proddy
0b84b79e1d Update workflow configurations and build scripts
- Modified GitHub workflow files for dev, stable, and test releases
- Updated platformio.ini and pio_local.ini_example configurations
- Enhanced build_interface.py script functionality
2025-10-23 18:37:14 +02:00
MichaelDvP
8fd129f4fe create src circuit for entity-list/modbus 2025-10-23 18:08:02 +02:00
proddy
ba334930fe replace auto-gen of XLS doc files and Modbus with python 2025-10-23 17:16:32 +02:00
proddy
982d64ddca remove tx/rx limits for standalone 2025-10-23 17:16:04 +02:00
proddy
3577300361 package update 2025-10-23 17:15:43 +02:00
proddy
0478e0ff7c auto-generated 2025-10-23 17:15:34 +02:00
proddy
c2cfd0a1b0 updated 2025-10-23 17:15:25 +02:00
MichaelDvP
637ba30df1 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-10-23 13:32:39 +02:00
MichaelDvP
fa8421b297 special char for servicecode 2025-10-23 13:31:42 +02:00
MichaelDvP
61c23a57d9 larger buffer for print handlers 2025-10-23 13:31:26 +02:00
Proddy
43f61fd2df Merge pull request #2672 from proddy/dev
rollback \n in console tests
2025-10-23 07:22:14 +02:00
proddy
85eed64fe9 rollback \n in console tests 2025-10-23 07:20:40 +02:00
Proddy
43634a4312 Merge pull request #2671 from proddy/dev
small fixes
2025-10-23 07:18:15 +02:00
proddy
9757db4438 fix, remove exit 2025-10-23 07:17:43 +02:00
proddy
17a2ba7f1a package update 2025-10-23 07:17:30 +02:00
proddy
03c7417888 auto-gen 2025-10-23 07:17:22 +02:00
Proddy
2b2c86ba5a Merge pull request #2665 from proddy/dev
optimize WebUI and finally remove lint warnings
2025-10-22 22:37:47 +02:00
proddy
2b2217e8ce updated 2025-10-22 22:24:37 +02:00
proddy
08d3e8bab6 package update 2025-10-22 22:24:31 +02:00
Proddy
ded3552873 Merge branch 'dev' into dev 2025-10-22 22:17:08 +02:00
proddy
9a7893e99f package update 2025-10-22 18:34:15 +02:00
proddy
307ef4e285 fix lint warnings 2025-10-22 18:34:00 +02:00
MichaelDvP
99b43b0379 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-10-22 17:45:40 +02:00
MichaelDvP
6fb8fbba18 convert latin1 chars to utf8 2025-10-22 17:24:20 +02:00
MichaelDvP
09c750e622 update pkg 2025-10-22 17:22:37 +02:00
proddy
f75deb3505 fix missing notification after save 2025-10-22 15:37:04 +02:00
proddy
6281f9cfe1 package update 2025-10-22 15:36:52 +02:00
MichaelDvP
b4f174f2f4 add entities from #2669 2025-10-22 12:54:38 +02:00
proddy
70810b5e71 formatting 2025-10-20 22:27:13 +02:00
proddy
82cc91cb63 fix lint warnings 2025-10-20 22:24:56 +02:00
proddy
48a3fc5656 fix broken fork URL 2025-10-20 22:24:48 +02:00
proddy
9d20eef12d fix warnings, correctly show abort text when cancelling 2025-10-20 22:20:30 +02:00
proddy
d59e183415 update eslint 2025-10-20 22:20:09 +02:00
proddy
50396a5def package update 2025-10-20 22:19:58 +02:00
proddy
ab92d07716 add REINSTALL 2025-10-20 22:19:49 +02:00
proddy
9172dd9181 embed css 2025-10-20 22:19:33 +02:00
proddy
0852502f52 show re-install firmware button 2025-10-20 22:19:19 +02:00
proddy
c3d066650c fix lint warnings 2025-10-20 22:19:05 +02:00
proddy
172e8d0028 fix msgpack 2025-10-20 22:18:55 +02:00
proddy
812c6ac475 optimized 2025-10-20 22:18:43 +02:00
Proddy
f7c1f0b0d0 Merge pull request #2666 from MichaelDvP/dev
some small fixes
2025-10-20 17:49:41 +02:00
MichaelDvP
125190a0ac formatting 2025-10-20 15:54:44 +02:00
MichaelDvP
35c7349e5c update test expected results 2025-10-20 12:07:49 +02:00
MichaelDvP
d7e916269d add missing modbus tags 2025-10-20 11:13:36 +02:00
MichaelDvP
f5f78182b6 fix display setting FW200 2025-10-20 11:12:58 +02:00
proddy
87bcd4598a 3.7.3-dev.21 2025-10-19 16:25:12 +02:00
proddy
21a814b5ec fix lint warnings 2025-10-19 16:24:52 +02:00
proddy
687d9a40c9 add lazy loading for components 2025-10-19 16:24:37 +02:00
proddy
9d01791fcb add useCallbacks for caching and speed 2025-10-19 16:24:17 +02:00
proddy
028afbe85d optimized 2025-10-19 16:23:53 +02:00
proddy
4bdea56d78 use Memo for caching 2025-10-19 16:23:34 +02:00
proddy
bf0737aab8 optimized 2025-10-19 16:23:09 +02:00
proddy
42d879a87b move catch-all path to end 2025-10-19 16:22:53 +02:00
proddy
79b5671533 remove aggressive compression 2025-10-19 16:22:21 +02:00
proddy
f48d67d9e7 optimize code for speed and size 2025-10-19 16:21:52 +02:00
proddy
16f7a454db use vector instead of dequeue for memory optimization 2025-10-19 16:10:15 +02:00
proddy
02b486ea80 updated dictionary 2025-10-19 16:09:56 +02:00
proddy
61d50e2c79 optimizations 2025-10-18 17:17:41 +02:00
proddy
a5af36e15b use 3.7.3 as latest version 2025-10-18 17:17:17 +02:00
proddy
e11ba9e657 formatting 2025-10-18 17:17:04 +02:00
proddy
878f0702b2 typo 2025-10-18 17:16:53 +02:00
proddy
fa711373f2 replace 9 with DeviceValueTAG::TAG_DHW1 2025-10-18 17:16:43 +02:00
proddy
e9a4a33942 auto-generated 2025-10-18 17:16:19 +02:00
proddy
f445f36eb1 extend CharToUpper for all languages 2025-10-18 17:16:10 +02:00
proddy
148124ef04 typo 2025-10-18 17:15:50 +02:00
proddy
27fbafbe62 add missing controller/datetime 2025-10-18 17:15:26 +02:00
proddy
a949673539 update packages 2025-10-18 17:15:07 +02:00
proddy
32193e3c62 optimizations 2025-10-18 17:14:53 +02:00
proddy
5f79f0848f auto-generated 2025-10-18 17:14:33 +02:00
proddy
4d91128aed update dictionary 2025-10-18 17:14:23 +02:00
MichaelDvP
6f1d507df9 SRC modes: off, manual auto 2025-10-18 09:08:05 +02:00
MichaelDvP
9b50306172 set ecodifftemp min to 4 degree 2025-10-18 09:07:10 +02:00
MichaelDvP
0fbc8e2420 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-10-17 11:14:30 +02:00
MichaelDvP
f0d162554b SRC plus: allow only ascii names, pkg update 2025-10-17 10:55:37 +02:00
MichaelDvP
d92361a8bb fix use after free 2025-10-17 10:41:32 +02:00
MichaelDvP
13bf2c44e7 publish connect device 2025-10-16 20:59:56 +02:00
Proddy
cd155ba680 Merge pull request #2660 from MichaelDvP/dev
add dhw modetype #2659, complete SRC plus entities
2025-10-16 16:07:47 +02:00
MichaelDvP
2a565dc677 fix standalone 2025-10-15 20:17:44 +02:00
MichaelDvP
9bf57c3e22 dev20, remove obj_id again 2025-10-15 15:09:22 +02:00
MichaelDvP
766281d8d2 add dhw modetype #2659 2025-10-15 14:32:44 +02:00
MichaelDvP
bd128072c0 fix childlock setting 2025-10-15 10:49:46 +02:00
MichaelDvP
88e4ba7ecf update pkg 2025-10-15 09:03:45 +02:00
MichaelDvP
96e5251050 typo 2025-10-15 07:58:14 +02:00
MichaelDvP
187b163ffd add testdata, use selRoomTemp for climate 2025-10-14 18:56:19 +02:00
MichaelDvP
9d04058984 add back obj_id for HA test 2025-10-14 08:30:52 +02:00
MichaelDvP
12b06aa657 fix mqtt climatefor SRC 2025-10-13 21:46:22 +02:00
MichaelDvP
47b3e4bf00 fix srcx/seltemp 2025-10-13 19:58:25 +02:00
MichaelDvP
f0f40bbcac fix src commands, icon 2025-10-13 08:46:22 +02:00
MichaelDvP
036e2917a5 SRC plus: mqtt subscribe, modbus 2025-10-12 11:35:24 +02:00
MichaelDvP
d294c418c1 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-10-11 10:12:20 +02:00
Proddy
40da7572cd Merge pull request #2656 from proddy/dev
fix NL translation - https://github.com/emsesp/EMS-ESP32/pull/2655
2025-10-11 07:44:42 +02:00
proddy
532dc66282 fix NL translation - https://github.com/emsesp/EMS-ESP32/pull/2655 2025-10-11 07:43:46 +02:00
MichaelDvP
8913f38fd0 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-10-10 19:25:18 +02:00
MichaelDvP
11782eef8b SRC #2636, add childlock, icons, fix long names 2025-10-09 13:25:09 +02:00
Proddy
b5f4eb6c62 Merge pull request #2652 from proddy/dev
fix HA obj_id/default_entity_id fix
2025-10-08 21:42:48 +02:00
proddy
ee4f58ce20 HA obj_id/default_entity_id fix - #2640 2025-10-08 21:38:56 +02:00
proddy
0fe0ee77b3 package update 2025-10-08 21:38:26 +02:00
Proddy
74e58aaa3d Merge pull request #2651 from MichaelDvP/dev
add SRC tags,no remote for Junkers_old
2025-10-08 16:49:18 +02:00
MichaelDvP
d39d6c7f1f Junkers old does not support remote thermostats 2025-10-08 12:03:21 +02:00
MichaelDvP
4043eaf271 add tag for SRC plus SingleRoomControllers 2025-10-08 12:02:55 +02:00
Proddy
73ac60a8b2 Merge pull request #2650 from proddy/dev
auto-update
2025-10-08 09:11:21 +02:00
proddy
1d6b283033 auto-gen files 2025-10-08 09:10:27 +02:00
proddy
08ca4e44e8 auto-update 2025-10-08 09:10:18 +02:00
Proddy
255c173469 Merge pull request #2647 from MichaelDvP/dev
fixes and additions, see description
2025-10-07 17:38:33 +02:00
MichaelDvP
aeee318cca skip frequ-measurement in standalone build 2025-10-07 12:38:19 +02:00
MichaelDvP
eb14e89c35 fix writing calIntTemp for remote thermostats #2646 2025-10-07 10:36:48 +02:00
MichaelDvP
8411ea6773 fix forceheatingoff ems+ 2025-10-07 09:35:53 +02:00
MichaelDvP
015110a72e changelog, dev19 2025-10-07 09:00:27 +02:00
MichaelDvP
dae345f359 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-10-07 08:15:07 +02:00
MichaelDvP
4cfd9b699c fix misuse of forceheatingoff 2025-10-07 07:23:27 +02:00
Proddy
bd6371fd9d Merge pull request #2630 from proddy/dev
API changes
2025-10-06 23:23:54 +02:00
proddy
7507596869 update tests 2025-10-06 22:17:38 +02:00
proddy
5d99bd923b remove comment 2025-10-06 22:17:32 +02:00
proddy
7402776248 fix string compare for value 2025-10-06 22:17:23 +02:00
proddy
8b5cc82df9 package update 2025-10-06 22:17:07 +02:00
MichaelDvP
7c5351f15f add Greenstar 2000 boiler #2645 2025-10-06 18:28:14 +02:00
MichaelDvP
b29f02e5dd remove scan deep 2025-10-06 18:22:12 +02:00
MichaelDvP
e9e7162bcd typos, update 2025-10-06 08:59:16 +02:00
proddy
b24aae9123 Merge branch 'dev' of https://github.com/proddy/EMS-ESP32 into dev 2025-10-05 21:18:29 +02:00
proddy
9dbd634322 reduce brightness of RGB LED (bbqkees request) 2025-10-05 21:18:28 +02:00
proddy
daffc94c7f add message api example 2025-10-05 20:09:43 +02:00
proddy
93de0e2f42 clear old sensors when testing standalone 2025-10-05 15:36:30 +02:00
proddy
145172b6e9 have system/message API parse logic via shuntingyard 2025-10-05 15:36:11 +02:00
proddy
c4a2f8bac8 don't check mqtt if not using 2025-10-05 15:35:34 +02:00
proddy
0c0c928efc init list 2025-10-05 15:35:17 +02:00
proddy
4d829b0b78 add nullptr check 2025-10-05 15:35:03 +02:00
proddy
01e7d9b027 add consts 2025-10-05 15:34:52 +02:00
proddy
439da1d1e9 add comment 2025-10-05 15:34:41 +02:00
proddy
ac45c17204 merge Michael's changes 2025-10-05 15:34:30 +02:00
proddy
cd24c7815b merge Michael's change 2025-10-05 15:33:55 +02:00
proddy
9665efbf38 add checks, add a const, clear old scheduler items when testing standalone 2025-10-05 15:33:37 +02:00
proddy
d8aafdbfd4 code cleaning 2025-10-05 15:33:01 +02:00
proddy
0c6aef5b60 clean up standalone tests 2025-10-05 15:32:38 +02:00
proddy
48a1bd0fe6 dev.18 2025-10-05 15:32:18 +02:00
proddy
44cfffe8a4 add 2 more tests 2025-10-05 15:32:09 +02:00
proddy
e75bf8871e update tests 2025-10-05 15:32:00 +02:00
proddy
22703f4100 bump asynctcp, increase asynctcp stack from 6 to 8KB 2025-10-05 15:31:39 +02:00
proddy
c066ab8400 update dictionary 2025-10-05 15:17:16 +02:00
proddy
4a0625e31c fix debug section for S3 2025-10-05 15:16:30 +02:00
proddy
9aaaba5bb7 package update 2025-10-05 15:16:16 +02:00
MichaelDvP
689a3a9a69 selflowtemp and forceheatingoff for ems+ telegrams (2E0 command) 2025-10-05 09:22:46 +02:00
MichaelDvP
391a312f0c add CR11 calinttemp 2025-10-05 07:45:24 +02:00
MichaelDvP
f782eac0cf rename HA dev_i, SRC: do not fetch inactive circuits, long names, HA climated 2025-10-02 11:49:53 +02:00
MichaelDvP
d88513d789 SRC thermostat test, update1 2025-09-30 08:48:56 +02:00
MichaelDvP
59d07e81d6 test SRC Plus implementation, #2636 2025-09-29 12:47:08 +02:00
MichaelDvP
419fe8ef5d dev 18, changelog 2025-09-26 08:47:48 +02:00
MichaelDvP
4cfcba18ee analogsensors pulse output #2624 and frequncy input #2631 2025-09-26 08:47:31 +02:00
MichaelDvP
b1d6ab3c96 ventilation bypass state from 0x55C, #1197 2025-09-26 08:46:11 +02:00
MichaelDvP
ae26754bc8 update pkg 2025-09-26 08:44:58 +02:00
MichaelDvP
61c3b47269 fix display partition name, remove double quotes in shuntingyard 2025-09-25 17:11:21 +02:00
proddy
50bedb2b39 some refactoring 2025-09-21 19:20:04 +02:00
proddy
13db83a6de support plain text POSTs to APIs 2025-09-21 19:19:25 +02:00
proddy
ec43a07866 add shuntingyard tests 2025-09-21 19:18:58 +02:00
proddy
fbc11b8ef8 update unit tests 2025-09-21 19:18:32 +02:00
proddy
f1c5a911f9 special checks for message command 2025-09-21 19:18:19 +02:00
proddy
76c0aa6be8 shuntingyard as a class library 2025-09-21 19:16:55 +02:00
proddy
61bf2332bb update words 2025-09-21 19:16:16 +02:00
proddy
39ca956e1f update libs 2025-09-21 19:16:05 +02:00
proddy
0683b77437 remove TODOs 2025-09-21 19:15:43 +02:00
proddy
5da2760dc6 fix sonar checks 2025-09-21 19:15:29 +02:00
proddy
3fabaf900f auto-update 2025-09-21 19:15:09 +02:00
MichaelDvP
b2a8738672 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-09-16 17:19:44 +02:00
MichaelDvP
c3b9c1ef98 revert commit 4b2468d61 to fix wifi issue with tasmota core 2025-09-16 14:52:30 +02:00
Proddy
aef6b6e92d Merge pull request #2620 from nename0/scheduler-nested-json
Nested JSON structured in Scheduler HTTP fetch
2025-09-11 13:14:37 +02:00
Proddy
dc46dac02a Merge pull request #2623 from MichaelDvP/dev
fix link, #2622
2025-09-09 15:56:40 +02:00
MichaelDvP
025c430611 fix link, #2622 2025-09-09 15:49:57 +02:00
nename0
995ab7233d Add "keys" for nested values in scheduler HTTP response 2025-09-07 11:50:38 +02:00
Proddy
1507989ca3 Merge pull request #2617 from MichaelDvP/dev 2025-09-02 17:13:27 +02:00
MichaelDvP
022e808b14 allow API post single value (with content-Type:application/json) 2025-09-02 12:12:26 +02:00
Proddy
9b604e9c78 Merge pull request #2615 from MichaelDvP/dev 2025-08-31 14:36:40 +02:00
MichaelDvP
cd3cc09386 fix board from fuse for S32S3 2025-08-30 09:54:07 +02:00
MichaelDvP
0df21a7843 do not mention fuse in board details 2025-08-29 10:45:48 +02:00
MichaelDvP
9225ad2ad9 workaround for platform 6.12 2025-08-29 09:06:32 +02:00
MichaelDvP
227b1ac59b revert to platform 6.11, GH action fails with 6.12 2025-08-28 10:53:19 +02:00
MichaelDvP
a9a6e32dd1 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-08-28 10:43:09 +02:00
MichaelDvP
3c4278029f BBQKees board settings/fuse, remove esp32 cpu temperature, dev17 2025-08-28 09:40:01 +02:00
MichaelDvP
3b4e09208e CR11 mode setting, FW200 display settings 2025-08-28 09:12:55 +02:00
Proddy
e9e0688737 Merge pull request #2614 from proddy/dev
lib updates
2025-08-28 07:27:43 +02:00
proddy
7bb1b7bb91 update library and re-gen files 2025-08-28 07:23:51 +02:00
proddy
4302bc9978 added dev-15 updates 2025-08-28 07:23:42 +02:00
proddy
60d884df88 auto-format 2025-08-28 07:23:26 +02:00
proddy
177c635bc1 add c6 (experimental), upgrade AsyncWebServer 2025-08-28 07:23:11 +02:00
Proddy
9a97c28bf0 Merge pull request #2613 from MichaelDvP/dev
dev16
2025-08-24 10:22:20 +02:00
MichaelDvP
deb87cf5d7 fix standalone 2025-08-23 19:25:59 +02:00
MichaelDvP
a50227638b fix boiler wwMaxPower and ww_disinfect, dev16 2025-08-18 17:34:16 +02:00
MichaelDvP
92b1515c8a update pkg 2025-08-14 07:52:12 +02:00
MichaelDvP
0c5cf0475c Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-08-05 18:45:10 +02:00
Proddy
f26e937514 Update sonar 2025-08-04 20:48:55 +02:00
Proddy
1e4ca8b57f Merge pull request #2603 from proddy/dev
small updates
2025-08-04 17:38:28 +02:00
proddy
4d88bbd28f package update 2025-08-04 17:36:35 +02:00
proddy
0ce110df9e add back factory reset after long button press - we missed in pull/1969 2025-08-04 17:36:30 +02:00
proddy
3759fc81ba asynctcp 3.4.7 2025-08-04 17:35:46 +02:00
MichaelDvP
7965ecd856 NTC parameters for E32V2.2 P2B 2025-08-04 10:30:40 +02:00
MichaelDvP
7b0169bb68 update to eModbus 1.7.4 2025-08-04 10:16:50 +02:00
MichaelDvP
f10f3d5305 esp32: some pins have no internal pullup 2025-08-04 10:15:59 +02:00
MichaelDvP
ed9e2704b0 syslog, changing level is not a fail 2025-08-04 10:15:15 +02:00
proddy
c47dd0e523 add option for Arduino Core 3.3 2025-08-03 10:57:09 +02:00
proddy
80c75bae77 package update 2025-08-03 10:56:56 +02:00
MichaelDvP
cfa973b08b fix standalone 2025-08-02 16:07:27 +02:00
MichaelDvP
83987b71e0 MM100 flow and pressure 2025-08-02 13:08:09 +02:00
MichaelDvP
a318f34988 update packages 2025-08-02 13:04:24 +02:00
MichaelDvP
5cc1660675 update AsyncTCP 3.4.7 2025-08-02 13:03:45 +02:00
MichaelDvP
8a48da38b8 revert to fetch mixer config 2025-07-31 18:56:17 +02:00
MichaelDvP
d514e67eb8 update pkg 2025-07-31 18:55:37 +02:00
MichaelDvP
69964482f8 AsyncTCP 3.4.6, check log queue for overflow 2025-07-31 18:55:23 +02:00
MichaelDvP
2aa691212c add command system/fuse/mfg, board E32V2.2, check systemvolatage >2.6V 2025-07-28 14:16:10 +02:00
MichaelDvP
c27134f185 fix gpio for core voltage detect 2025-07-23 20:39:24 +02:00
MichaelDvP
c8033692b1 update pkg 2025-07-23 20:36:22 +02:00
MichaelDvP
c537d0ab8b add gateway E32V3, autodetect by gpio39 core voltage 2025-07-23 18:47:33 +02:00
MichaelDvP
bee703eb1f test: fetch MM100 config only once 2025-07-23 11:56:27 +02:00
MichaelDvP
5d2bd6a2af set climate action cooling 2025-07-23 11:55:11 +02:00
MichaelDvP
67f0f40a8a Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-07-14 07:33:47 +02:00
Proddy
e796fbef7a Merge pull request #2594 from proddy/dev
bump to 3.7.3-dev.14
2025-07-10 21:01:13 +02:00
proddy
da7ef04741 3.7.3-dev.14 2025-07-10 21:00:14 +02:00
proddy
ddb318dfc6 package update 2025-07-10 20:59:36 +02:00
proddy
88643dc8e3 update 2025-07-10 20:59:31 +02:00
MichaelDvP
cf3854563d Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-07-10 12:12:28 +02:00
MichaelDvP
4b2468d616 some checks 2025-07-10 12:09:17 +02:00
Proddy
4b08aba9c4 Merge pull request #2593 from proddy/dev
minor updates and ESP32Async/AsyncTCP back to v3.4.2
2025-07-08 22:08:50 +02:00
proddy
0a18add447 show ems device details in MQTT HA screen 2025-07-08 22:05:45 +02:00
proddy
ca8d23ff3a package update 2025-07-08 22:05:28 +02:00
proddy
c7e833194f ESP32Async/AsyncTCP @ 3.4.2 2025-07-08 22:05:15 +02:00
Proddy
f63f658421 Merge pull request #2588 from misa1515/patch-25
Update locale_translations.h
2025-07-01 07:34:41 +02:00
misa1515
13fcf09470 Update locale_translations.h 2025-06-30 21:51:18 +02:00
Proddy
f560cbd60c Merge pull request #2587 from proddy/dev
package updates
2025-06-30 15:46:08 +02:00
proddy
38ead7e10f update arduinojson, espressif-platform and web packages 2025-06-30 15:42:38 +02:00
proddy
326bba9b42 package update 2025-06-29 13:39:36 +02:00
proddy
d9a18bf255 auto-gen 2025-06-29 13:39:31 +02:00
MichaelDvP
6c42cbfb4b make task cores configurable in platformio.ini 2025-06-28 13:00:53 +02:00
MichaelDvP
6691c81956 test for #2585 2025-06-25 17:46:38 +02:00
MichaelDvP
2f95ef305d roll back to asyncTCP 3.4.2, add CS6800 mixer 2025-06-25 13:33:44 +02:00
proddy
7afde0ce6e auto-update 2025-06-14 09:30:54 +02:00
proddy
f3cdafe7d0 ESPAsyncWebServer 3.7.8 support 2025-06-14 09:30:47 +02:00
Proddy
4bf23e1bda Merge pull request #2582 from MichaelDvP/dev
hybrid csh5800iG and fix crashes
2025-06-13 18:53:16 +02:00
MichaelDvP
aca66457f9 fixes crashs: revert to platform 6.10.0 2025-06-13 08:52:02 +02:00
MichaelDvP
121887bdce Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-06-11 11:35:29 +02:00
MichaelDvP
32d7cf4e9c fix possible crash 2025-06-11 11:35:01 +02:00
Proddy
3f8227e95e Merge pull request #2580 from proddy/dev
MQTT HA discovery refactoring
2025-06-10 21:59:25 +02:00
proddy
10d84261da add another version test for downgrading 2025-06-10 11:19:39 +02:00
proddy
51848d8347 auto translate 2025-06-10 11:19:26 +02:00
proddy
1c0669144f update docs 2025-06-10 11:19:16 +02:00
proddy
41a2ba6e5d fixes #2579 2025-06-09 16:07:26 +02:00
proddy
b6fe9e7569 package update 2025-06-09 16:07:00 +02:00
MichaelDvP
faa2c5f1aa set CS5800iG as gas boiler and HP, #2569 2025-06-07 11:57:53 +02:00
MichaelDvP
c71034ff12 analog counter save to nvs on command and update 2025-06-07 11:57:01 +02:00
proddy
71be615bbe add HP CS5800iG #2569 2025-06-06 17:24:11 +02:00
Proddy
ce53fd1d04 Merge pull request #2575 from proddy/dev
some minor fixes and updates
2025-06-05 19:31:29 +02:00
proddy
1772876f9e 3.7.3-dev.12 2025-06-05 19:31:04 +02:00
proddy
cd5dbebea9 package update 2025-06-05 19:30:47 +02:00
proddy
6c67b78a1c package update 2025-06-05 10:46:29 +02:00
proddy
9b4deb271b update async lib 2025-06-04 08:35:59 +02:00
proddy
0e9283af5c add test for hpmode over mqtt 2025-06-04 08:35:53 +02:00
proddy
58011700fe package update 2025-06-04 08:35:39 +02:00
proddy
079a08ff7b upercase mqtt 2025-06-01 21:34:09 +02:00
proddy
b64a55e460 https://github.com/emsesp/EMS-ESP32/discussions/2550 - publish sensor when interval is set to 0(auto) 2025-06-01 18:51:02 +02:00
proddy
2b7ef5b6ba AsyncTCP @ 3.4.3 2025-06-01 17:40:15 +02:00
proddy
d62eef4eca 3.7.3-dev.12 2025-06-01 12:48:56 +02:00
proddy
0f6d6e69f5 package update 2025-06-01 12:43:27 +02:00
proddy
97f689b8a7 add comment for reference 2025-06-01 12:41:52 +02:00
proddy
be9b4a070c remove duplicate no-watch 2025-06-01 12:41:27 +02:00
proddy
bc15dd4463 lib updates 2025-06-01 12:41:10 +02:00
proddy
1613caea86 MQTT Command Topic with slashes #2571 2025-06-01 12:40:53 +02:00
proddy
4b39ab76ab MQTT Command Topic with slashes #2571 2025-06-01 12:40:42 +02:00
Proddy
d04c882590 Merge pull request #2566 from proddy/dev
pnpm mods
2025-05-25 11:08:25 +02:00
proddy
a199bf21e1 pnpm mods 2025-05-25 11:07:11 +02:00
Proddy
3ae8722ece Merge branch 'emsesp:dev' into dev 2025-05-24 10:11:39 +02:00
Proddy
6a6cef57cf Merge pull request #2565 from MichaelDvP/dev
remove optimistic option #2551
2025-05-23 17:04:11 +02:00
MichaelDvP
090491aab6 remove optimistic option #2551 2025-05-23 07:42:21 +02:00
MichaelDvP
ca81a02a8c masked enums with single mask, update seltemp in advance 2025-05-23 07:41:43 +02:00
proddy
f64188bd5d update pkg 2025-05-22 22:08:45 +02:00
Proddy
d3e0f180c5 Merge pull request #2559 from emsesp/alert-autofix-36
Potential fix for code scanning alert no. 36: Workflow does not contain permissions
2025-05-18 21:26:38 +02:00
Proddy
3f4d87a1d2 Merge pull request #2560 from emsesp/alert-autofix-35
Potential fix for code scanning alert no. 35: Workflow does not contain permissions
2025-05-18 21:26:30 +02:00
Proddy
1d89e651a4 Merge pull request #2561 from emsesp/alert-autofix-34
Potential fix for code scanning alert no. 34: Workflow does not contain permissions
2025-05-18 21:26:24 +02:00
Proddy
fad67b4ef9 Potential fix for code scanning alert no. 34: Workflow does not contain permissions
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-05-18 18:25:34 +02:00
Proddy
ce1c22ee35 Potential fix for code scanning alert no. 35: Workflow does not contain permissions
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-05-18 18:25:10 +02:00
Proddy
169b5f34ea Potential fix for code scanning alert no. 36: Workflow does not contain permissions
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-05-18 18:24:36 +02:00
Proddy
131c03714f Merge pull request #2558 from proddy/dev
replace yarn with pnpm
2025-05-18 18:02:18 +02:00
proddy
024c4a0c21 replace yarn with pnpm 2025-05-18 18:00:46 +02:00
proddy
b0d111d86f test pnpm 2025-05-18 17:36:08 +02:00
proddy
faeef9c821 remove yarn 2025-05-18 17:36:01 +02:00
proddy
60a5b28a21 pnpm 2025-05-18 16:25:22 +02:00
proddy
f4b5cf04a0 update asyncweb mention 2025-05-18 16:24:02 +02:00
proddy
d69f26acac upgrade yarn to pnpm because why not 2025-05-18 15:53:38 +02:00
Proddy
2a50701107 Merge pull request #2557 from proddy/dev
mqtt tidy up and shower active fixed for HA
2025-05-18 11:48:59 +02:00
proddy
ab099c45b8 updated 2025-05-18 11:48:13 +02:00
proddy
47f21019a0 clean-up publish retain functions 2025-05-18 11:47:22 +02:00
proddy
5c473c2b3d shower active is shown in HA on EMS-ESP boot 2025-05-18 11:47:04 +02:00
proddy
9ddc587334 add comment 2025-05-18 11:46:45 +02:00
proddy
9b0a7a4872 AsyncTCP 3.4.1 2025-05-18 11:46:28 +02:00
Proddy
97528e9df6 Merge pull request #2556 from proddy/dev
minor updates
2025-05-17 11:17:47 +02:00
proddy
b797e1e2bb eslint update 2025-05-17 11:01:27 +02:00
proddy
bb52d35c99 add comments 2025-05-17 10:24:25 +02:00
proddy
4c9026e11a fix standalone osx 2025-05-16 19:34:54 +02:00
proddy
6cd4e8a5b6 run update_all 2025-05-16 09:22:58 +02:00
Proddy
dfe037a7d3 Merge pull request #2547 from vmonkey/patch-6
Small update-Czech
2025-05-16 08:03:20 +02:00
Proddy
b87622185d Merge pull request #2554 from MichaelDvP/dev
fixes and additions
2025-05-16 08:03:03 +02:00
MichaelDvP
0318f8156d fix standalone 2025-05-12 19:10:59 +02:00
MichaelDvP
0c03fa1308 mqtt publish_time sensors instead of temperature sensors 2025-05-12 16:49:33 +02:00
MichaelDvP
2d6e02171f Typo 2025-05-12 16:47:33 +02:00
MichaelDvP
2da312bf15 optimistic only for writable values 2025-05-12 16:29:36 +02:00
MichaelDvP
52f59a7b1d fix set chargeoptimization #2543 2025-05-12 08:00:14 +02:00
MichaelDvP
6c8624298c devices entity search case-independend, #2553 2025-05-11 18:47:21 +02:00
MichaelDvP
ce2d2fb867 search entities case independend #2553 2025-05-11 15:01:34 +02:00
MichaelDvP
ba2ad4e175 typo 2025-05-11 15:00:41 +02:00
MichaelDvP
b3320c3e48 ha optimistic, cs6800 changes, custom entity hide 2025-05-10 16:14:54 +02:00
MichaelDvP
dc1094b6ba show ntp connect in log 2025-05-10 13:36:40 +02:00
MichaelDvP
bb60568d83 update pkg 2025-05-10 13:36:11 +02:00
MichaelDvP
67b5c5dd26 chargeOptimization #2543, charging pump #2544 2025-05-06 19:14:31 +02:00
MichaelDvP
6866d5b7a9 update pkg 2025-05-05 18:29:06 +02:00
Marek Tyburec
b4e9af89ee Small update-Czech
Fix Czech grammar in dashboard
2025-05-04 07:12:32 +02:00
Proddy
775ed99b22 Merge pull request #2539 from proddy/dev
add back formidable to fix build without mock-api
2025-04-25 18:29:08 +02:00
proddy
2ec13273fd update lock file 2025-04-25 18:27:12 +02:00
proddy
a846b01103 auto-generate 2025-04-25 18:27:00 +02:00
proddy
6dffb08545 add back formidable 2025-04-25 18:26:52 +02:00
Proddy
16f7cc148d Merge pull request #2538 from MichaelDvP/dev
use messagetime in WebLogService::show() #2533
2025-04-25 18:18:24 +02:00
MichaelDvP
568431ada4 use messagetime in WebLogService::show() 2025-04-25 12:16:33 +02:00
Proddy
6034c1e5eb Merge pull request #2535 from MichaelDvP/dev
show console log with ISO date/time, #2533
2025-04-25 09:18:06 +02:00
MichaelDvP
e3566feefb show console log with ISO date/time, #2533 2025-04-25 08:05:15 +02:00
MichaelDvP
ea46c79278 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-04-24 10:25:16 +02:00
MichaelDvP
a02831e04e read only first error log message 2025-04-24 10:23:54 +02:00
MichaelDvP
3b8c973f2a fix debug message in console help 2025-04-24 10:23:34 +02:00
MichaelDvP
2c65936b3e update pkg 2025-04-24 10:23:11 +02:00
Proddy
bc04c34d58 Merge pull request #2532 from proddy/dev
add tests for custom commands
2025-04-23 21:43:38 +02:00
proddy
5047f1752e add tests for custom entities 2025-04-23 21:30:02 +02:00
proddy
1fa7a6c549 package update 2025-04-23 21:29:30 +02:00
MichaelDvP
f9ebe33a7d read thermostat errorlog 0xC0 on 0xBF 2025-04-23 09:36:00 +02:00
Proddy
e719dd963d Merge pull request #2530 from proddy/dev
updated libs and fix for domoticz discovery warnings
2025-04-22 16:08:16 +02:00
proddy
c6b0099581 domoticz warnings on custom entities - https://github.com/emsesp/EMS-ESP32/discussions/2408#discussioncomment-12896868 2025-04-22 16:07:22 +02:00
proddy
71726530c0 auto-generated 2025-04-22 16:06:49 +02:00
proddy
a749ecb298 ArduinoJson 7.4.1 and updated AsyncWS libs 2025-04-22 16:06:41 +02:00
proddy
7e963529c4 package update 2025-04-22 16:06:18 +02:00
Proddy
c76409cf3f Merge pull request #2529 from MichaelDvP/dev
dev.9: fix writing auxHeaterSource #2489
2025-04-22 11:05:34 +02:00
MichaelDvP
efd0872690 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-04-22 07:23:28 +02:00
MichaelDvP
57098b578f fix writing auxHeaterSource #2489 2025-04-22 06:58:23 +02:00
Proddy
6472e9e224 run at 1:30am 2025-04-21 09:06:37 +02:00
Proddy
026828efc7 Merge pull request #2528 from MichaelDvP/dev
fix GH build
2025-04-20 21:43:38 +02:00
MichaelDvP
fe6e9be4d3 fix GH build 2025-04-20 18:12:59 +02:00
Proddy
7745a6f9a1 Merge pull request #2527 from MichaelDvP/dev 2025-04-20 17:56:56 +02:00
MichaelDvP
c523a379fe add C6 telegram, fixes #1963 2025-04-20 17:07:30 +02:00
MichaelDvP
2854e9cbe9 IPM DHW module, fixes #2524 2025-04-20 17:03:03 +02:00
Proddy
4985f104c7 Merge pull request #2526 from proddy/dev
small changes
2025-04-19 12:54:28 +02:00
proddy
a0ea5f7ea1 clean-up unused packages 2025-04-19 12:52:58 +02:00
proddy
efc35d0594 update react-table-library for React 19 2025-04-19 11:46:42 +02:00
proddy
ccd6c6f8ad workarond for missing package 2025-04-19 09:08:35 +02:00
proddy
b426e0eb45 move NTP set time to Settings page 2025-04-18 16:19:07 +02:00
proddy
c53e1de569 update translations 2025-04-18 16:18:54 +02:00
proddy
8058e98748 update packages 2025-04-18 16:18:41 +02:00
proddy
ba419d09eb add Michael's https://github.com/emsesp/EMS-ESP32/pull/2522# 2025-04-18 16:18:08 +02:00
proddy
c701247652 auto-generate 2025-04-18 16:17:35 +02:00
proddy
12754d1c07 https://github.com/emsesp/EMS-ESP32/discussions/2523 2025-04-18 16:17:21 +02:00
Proddy
9a4daba31a Merge pull request #2521 from misa1515/patch-24
Update index.ts
2025-04-16 15:06:07 +02:00
misa1515
a2aa2dccdd Update index.ts 2025-04-15 21:46:19 +02:00
Proddy
25af51a8e8 Merge pull request #2517 from proddy/dev
update packages
2025-04-12 09:10:13 +02:00
proddy
ddc597ff03 update packages 2025-04-12 09:09:52 +02:00
Proddy
75310afd63 Merge pull request #2515 from MichaelDvP/dev
FB100 controls hc1, fixes #2510
2025-04-12 09:06:04 +02:00
MichaelDvP
3095323c93 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-04-10 12:57:40 +02:00
Proddy
4667718f12 Merge pull request #2513 from proddy/dev
arduinojson 7.4 and package update
2025-04-10 08:18:00 +02:00
proddy
2cb1c5d7e7 arduinojson 7.4 and package update 2025-04-10 08:16:33 +02:00
MichaelDvP
d7b9754ddb do not create hc on empty message 2025-04-09 17:38:58 +02:00
MichaelDvP
99b769626e check dv.hasValue for commands 2025-04-09 13:30:40 +02:00
MichaelDvP
70035b059c comment out HA config of shower timestamp 2025-04-08 17:59:01 +02:00
MichaelDvP
b252c2f95a FB100 controls hc1, fixes #2510 2025-04-08 17:53:06 +02:00
Proddy
baa4f2eb39 Merge pull request #2508 from proddy/dev
fixes #2507 - download based on tasmota builds
2025-04-05 10:56:03 +02:00
proddy
c7b970b5b0 auto-generated 2025-04-05 10:55:01 +02:00
proddy
3ed5b65191 fixes #2507 2025-04-05 10:54:55 +02:00
Proddy
6e01c00d46 Merge pull request #2506 from MichaelDvP/dev
remove wifi full scan
2025-04-04 10:30:23 +02:00
MichaelDvP
e72afc9065 remove wifi full scan, dev.6 2025-04-04 08:24:59 +02:00
MichaelDvP
de2f3e712d updte pkg 2025-04-04 08:20:00 +02:00
Proddy
cacb92cd47 Merge pull request #2504 from MichaelDvP/dev
some smaller fixes
2025-04-03 09:51:26 +02:00
MichaelDvP
3eb20fa700 add some HA config on mqtt reconnect 2025-04-02 17:49:22 +02:00
MichaelDvP
d35574d494 update pkg 2025-04-02 17:48:27 +02:00
MichaelDvP
3cb29220ab fetch first c0 telegram #2501 2025-04-01 18:58:59 +02:00
MichaelDvP
d91812ab8f add thermostat C0 message #2501 2025-04-01 12:41:21 +02:00
MichaelDvP
856f8efd25 update scheduler if there is pending change #2502 2025-04-01 12:34:02 +02:00
MichaelDvP
d32378ccd4 do not scan methode for arduino 3 2025-04-01 12:33:04 +02:00
MichaelDvP
f5006d1a11 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-03-31 10:50:23 +02:00
Proddy
c3468e6308 Merge pull request #2498 from proddy/dev
fixes #2497
2025-03-31 10:19:13 +02:00
proddy
9f4de56099 switch between dev and stable 2025-03-31 10:18:32 +02:00
proddy
78738de811 version update text changes 2025-03-31 10:18:21 +02:00
proddy
e64596ad61 updated comments 2025-03-31 10:17:33 +02:00
proddy
024357ae80 bump 3.7.3-dev.4 2025-03-31 10:17:19 +02:00
proddy
3f07d3b75f ignore local yarn 2025-03-31 10:17:05 +02:00
proddy
cb7c695c67 tidy up 2025-03-30 15:13:52 +02:00
proddy
912a764c2d package update 2025-03-30 15:13:40 +02:00
proddy
c9c0f55b64 remove optimizer 2025-03-30 15:13:15 +02:00
proddy
6991677cf9 improve version check, #1497 2025-03-30 14:51:59 +02:00
proddy
83330907cd added full tests for different version upgrades, both backend and webUI 2025-03-30 14:51:13 +02:00
proddy
3571998da3 rename version.h 2025-03-30 14:50:40 +02:00
MichaelDvP
77465ebe81 always show buttons for stable and dev 2025-03-30 14:11:02 +02:00
MichaelDvP
006e5493e2 reactivate wifi all channel scan 2025-03-30 14:09:02 +02:00
proddy
b29136433d 3.7.3 2025-03-30 10:18:45 +02:00
proddy
0347a4b8b0 fix possible out of scope warning 2025-03-30 10:18:38 +02:00
proddy
3330103a8d compile with IDF 5 2025-03-30 10:18:24 +02:00
proddy
0a02252fee move experimental IDF 5 to pio_local.ini 2025-03-30 10:17:44 +02:00
proddy
642f2116d2 testing Arduino Core v3.2.0 / ESP-IDF v5.4.1 2025-03-29 08:08:54 +01:00
proddy
7b8e45c2f7 package update 2025-03-29 08:05:53 +01:00
proddy
0f2244607f fixes #2497 - showFirmwareDialog() was missing argument 2025-03-28 17:23:46 +01:00
proddy
32ab9dda45 replace reset with restart 2025-03-28 17:22:36 +01:00
proddy
b6659b8586 auto-generate 2025-03-28 17:22:20 +01:00
proddy
5eb85066ef package update 2025-03-28 17:22:11 +01:00
proddy
9398fc72a0 update version check tests 2025-03-28 17:20:25 +01:00
MichaelDvP
1bcd453e3f fix version links for dev #2497 2025-03-28 16:46:49 +01:00
MichaelDvP
d405478a13 fix deviceName length (#2482), formatting 2025-03-28 09:39:38 +01:00
Proddy
c927e5f496 Merge pull request #2496 from MichaelDvP/dev
fix secure mqtt and add auxHeaterSource
2025-03-27 18:37:12 +01:00
MichaelDvP
c5dbd7452e add auxHeaterSource #2489 2025-03-27 17:23:42 +01:00
MichaelDvP
3a0b4ea587 fix switch to secure mqtt #2492 2025-03-27 13:57:59 +01:00
MichaelDvP
6f4cdb7122 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-03-27 07:50:12 +01:00
Proddy
b5d6757660 Merge pull request #2493 from proddy/dev
upgrade mui v7, fix makefile build
2025-03-26 22:09:56 +01:00
proddy
0dcde46296 upgrade mui v7, fix makefile build 2025-03-26 20:24:08 +01:00
Proddy
ac7e91beff Merge pull request #2491 from MichaelDvP/dev
fixes and additions
2025-03-26 18:42:19 +01:00
MichaelDvP
9ea1e2752d update pkg, Grid2->Grid 2025-03-26 17:30:33 +01:00
MichaelDvP
b5471aef94 fix typo in set_wwswitchtime, fixes #2490 2025-03-26 17:03:51 +01:00
MichaelDvP
f31329ceff fix dhw progMode, #2490 2025-03-26 07:16:08 +01:00
MichaelDvP
40d48f4407 add FLAG_HMC310, fix switchtimeWW 2025-03-25 18:13:43 +01:00
MichaelDvP
11b7e1f86e update pkg 2025-03-24 18:44:02 +01:00
MichaelDvP
e364a71eda Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-03-23 18:35:08 +01:00
Proddy
e006bebb86 Merge pull request #2488 from proddy/dev
rename github actions
2025-03-23 16:56:40 +01:00
proddy
fa3d42a1c7 rename github actions 2025-03-23 16:55:57 +01:00
Proddy
e435fd4391 Merge pull request #2487 from proddy/dev
clean-up
2025-03-23 15:46:17 +01:00
proddy
d42efb32ab clean-up 2025-03-23 15:45:53 +01:00
proddy
ad8f2dc823 add 2025-03-23 15:43:07 +01:00
Proddy
f2ff14f511 Merge pull request #2479 from proddy/dev
fix test data
2025-03-23 14:01:26 +01:00
proddy
e5e9d4c713 fix test data with led_type 2025-03-23 14:00:46 +01:00
proddy
4c5f93000b add led_type to comment 2025-03-23 14:00:35 +01:00
proddy
0c7301a020 TYPE has param 2025-03-23 14:00:20 +01:00
MichaelDvP
74c63bf17e set HMC310 to BC400 compatible 2025-03-23 10:07:22 +01:00
MichaelDvP
4564e0b828 fix printable chars in lastcode 2025-03-23 10:06:49 +01:00
Proddy
2ab9607989 Merge pull request #2478 from misa1515/patch-23
Update index.ts
2025-03-23 07:34:25 +01:00
misa1515
29d198b46d Update index.ts 2025-03-22 22:41:41 +01:00
MichaelDvP
8387ca0c07 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-03-22 11:59:04 +01:00
MichaelDvP
3796fb8027 add analog sensor NTC and RGB-Led, dev29 2025-03-22 11:41:37 +01:00
MichaelDvP
1da08633ec add scheduler random function (rnd(x) => random 0..x) 2025-03-22 11:41:00 +01:00
MichaelDvP
b097e372e4 update pkg and libs 2025-03-22 11:39:48 +01:00
Proddy
846776929e Merge pull request #2475 from proddy/dev
3.7.3-dev.0
2025-03-22 10:44:09 +01:00
proddy
6e1d56b8ee 3.7.3-dev.0 2025-03-22 10:43:44 +01:00
Proddy
32f7eb7299 Merge pull request #2474 from proddy/dev
update prepare for 3.7.2 stable
2025-03-22 10:09:17 +01:00
proddy
3fc9c3b56c update prepare for 3.7.2 stable 2025-03-22 10:07:58 +01:00
Proddy
e2e46543d2 Merge pull request #2472 from JokerGermany/own1-program-switchtime---german-translation
make switchtime more clear in the german translation
2025-03-22 09:51:15 +01:00
JokerGermany
a2b22198ec make switchtime more clear in the german translation
"Programmschaltzeit 1" don't make clear that "Eigen 1" is meant.
2025-03-21 10:20:57 +01:00
Proddy
642b59f729 Merge pull request #2471 from MichaelDvP/dev
add suprapur-o, fixes #2470
2025-03-20 16:46:48 +01:00
MichaelDvP
9e81de2164 add Suprapur-o, dev28 2025-03-20 11:45:04 +01:00
MichaelDvP
d44797db1d update libs 2025-03-20 11:44:37 +01:00
MichaelDvP
673ee3f79b update pkg 2025-03-20 11:44:23 +01:00
Proddy
38a8179544 Merge pull request #2469 from proddy/dev
update test
2025-03-15 13:49:19 +01:00
proddy
cfb59ac6a0 update test 2025-03-15 13:48:56 +01:00
Proddy
80c26e1adb Merge pull request #2468 from MichaelDvP/dev
shuntingYard support empty strings
2025-03-15 13:47:19 +01:00
MichaelDvP
d0de6e8d0f Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-03-15 13:38:13 +01:00
Proddy
68be7d00ff Merge pull request #2466 from proddy/dev
added new return code when processing commands
2025-03-15 13:02:38 +01:00
proddy
d3e6043911 replace with LOG_DEBUG 2025-03-15 13:01:42 +01:00
proddy
373895b36a test for NO_VALUE in prep for Michael's change 2025-03-15 13:01:29 +01:00
proddy
594e10dbe1 formatting 2025-03-15 13:01:14 +01:00
proddy
e3c5b462da formatting 2025-03-15 13:01:05 +01:00
proddy
8a1376b169 add test for NO_VALUE 2025-03-15 13:00:47 +01:00
proddy
900e26cf9f package update 2025-03-15 13:00:31 +01:00
MichaelDvP
071e81f29b shuntingYard work with empty strings 2025-03-15 12:03:42 +01:00
proddy
d1bd861ff0 default return code is OK 2025-03-13 22:46:25 +01:00
proddy
f5925dbb3b formatting 2025-03-13 22:46:15 +01:00
proddy
b1eedcb1d8 add new return code NO_VALUE 2025-03-13 22:46:04 +01:00
proddy
ed7a9f43de update tests 2025-03-13 22:45:26 +01:00
proddy
67885950ef package update 2025-03-13 22:44:45 +01:00
Proddy
74ddb771e9 Merge pull request #2464 from MichaelDvP/dev
bitmask for bool custom entities as hex value
2025-03-13 08:40:33 +01:00
MichaelDvP
584d0e0b48 shuntingYard string addition, add tohex() function 2025-03-13 07:45:37 +01:00
MichaelDvP
8d9ca33ea3 bitmask for bool custom entities as hex value 2025-03-12 09:23:00 +01:00
Proddy
f0eea1a6a3 Merge pull request #2461 from MichaelDvP/dev 2025-03-11 10:53:35 +01:00
MichaelDvP
79cc0377c0 fix sonar fail for special characters in strings (ascii>127) 2025-03-11 10:00:10 +01:00
Proddy
115cec08fa Merge pull request #2460 from MichaelDvP/dev 2025-03-11 09:23:38 +01:00
MichaelDvP
6df592c2b8 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-03-11 07:33:30 +01:00
MichaelDvP
f2b81489ba mixed case strings in scheduler, #2457 2025-03-11 07:33:23 +01:00
Proddy
0d8760219a Merge pull request #2459 from proddy/dev
package updates, fix auto-gen of csv files
2025-03-10 21:58:23 +01:00
proddy
e8e8d9c130 3.7.2-dev.27 2025-03-10 21:57:18 +01:00
proddy
8f712412f5 package update 2025-03-10 21:47:16 +01:00
proddy
f8ece46163 changed comment 2025-03-10 21:47:07 +01:00
proddy
cd8b1add54 formatting 2025-03-10 21:46:55 +01:00
proddy
1c415a9715 re-generated 2025-03-10 21:46:36 +01:00
proddy
e1e3601640 add newline to fix csv gen 2025-03-10 21:46:20 +01:00
MichaelDvP
c2f718b49a shuntingYard mixed case, only compare and commands converted to lower case 2025-03-10 19:42:16 +01:00
Proddy
cee1874689 Merge pull request #2458 from MichaelDvP/dev
fixes #2456, #2457, shuntingYard tests from #2452
2025-03-10 18:38:38 +01:00
MichaelDvP
57d172aac2 Merge branch 'support_nested_conditionals' of https://github.com/philwingfield/EMS-ESP32 into dev 2025-03-10 11:59:09 +01:00
wingphil
bb26900213 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into support_nested_conditionals 2025-03-10 10:11:21 +00:00
wingphil
9d1ee27533 Add test for nested conditionals without brackets 2025-03-10 10:09:44 +00:00
MichaelDvP
7fd735f667 rename remoteseltemp to cooltemp, fix #2456 2025-03-10 11:02:03 +01:00
MichaelDvP
2e79c3a5c6 enlarge tx queue (overflow in #2455) 2025-03-10 10:56:31 +01:00
MichaelDvP
d769999f10 shuntingYard get api-data lowerCase, fix #2457 2025-03-10 10:55:15 +01:00
MichaelDvP
bd93d26361 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-03-09 17:35:50 +01:00
MichaelDvP
72feefe709 allow brackets in conditions (idea from philwingfield) 2025-03-08 16:50:12 +01:00
Proddy
1d6c2c9664 Merge pull request #2453 from MichaelDvP/dev
fix lastcode #2438, heating/tapwater for heatpumps from activity #2450
2025-03-07 20:51:41 +01:00
MichaelDvP
85c78bc8e9 update pkg 2025-03-07 18:23:40 +01:00
MichaelDvP
18bdcfe050 fix lastcode #2438, heating/tapwater for heatpumps from activity #2450 2025-03-07 18:12:36 +01:00
wingphil
a6f77250b5 Format with clang 2025-03-07 17:08:05 +00:00
wingphil
9874ecde82 feat: Support nested conditionals in shuntingYard 2025-03-07 16:53:41 +00:00
MichaelDvP
584b8788be Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-03-07 16:42:56 +01:00
Proddy
7eb15652c7 Merge pull request #2449 from MichaelDvP/dev
fix #2446, pc0Flow for all boilers, fix #2411
2025-03-07 13:00:48 +01:00
MichaelDvP
2c28a607ba Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-03-06 16:44:45 +01:00
wingphil
45eca462e7 test: Move shuntingYard tests to new file 2025-03-06 14:07:51 +00:00
wingphil
4474868afc Add tests for inline conditionals, try to capture current behaviour 2025-03-06 13:59:20 +00:00
wingphil
6c6b5b060d test: Copy shuntingYard tests so that we can assert the output 2025-03-06 13:27:12 +00:00
Proddy
c03eb290d1 Merge pull request #2447 from philwingfield/fix_unit_tests
Fix console unit tests due to changed shell output
2025-03-05 19:38:41 +01:00
wingphil
de9bd44071 Merge branch 'fix_unit_tests' of https://github.com/philwingfield/EMS-ESP32 into fix_unit_tests 2025-03-05 16:16:13 +00:00
wingphil
b7458b0686 test: fix console unit tests due to changed shell output 2025-03-05 16:14:45 +00:00
wingphil
a660ec1afa test: fix console unit tests due to changed shell output 2025-03-05 16:13:20 +00:00
MichaelDvP
c4f6f01f7e fix #2446, pc0Flow for all boilers, fix #2411 2025-03-05 14:20:40 +01:00
Proddy
9f60560f2b Merge pull request #2445 from proddy/dev
upload translation - thanks mattreim
2025-03-04 22:11:34 +01:00
proddy
7b50f80cb8 upload translation - thanks mattreim 2025-03-04 22:09:42 +01:00
Proddy
656d275c56 Merge pull request #2444 from proddy/dev
move Version back to Status page
2025-03-04 20:58:06 +01:00
proddy
eca17f2b2c move Version back to Status page 2025-03-04 20:57:24 +01:00
Proddy
7f60279aa3 Merge pull request #2443 from proddy/dev
fix autofresh in web
2025-03-04 20:26:15 +01:00
proddy
5227fafa1b fix auto refresh (disable cache) 2025-03-04 20:24:55 +01:00
proddy
4991e2b7cd add upload to Version page 2025-03-04 20:24:27 +01:00
Proddy
34c514709a Merge pull request #2442 from MichaelDvP/dev 2025-03-04 07:55:22 +01:00
MichaelDvP
7dfedfeb10 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-03-04 07:36:53 +01:00
MichaelDvP
c8bf4cae17 typo 2025-03-04 07:36:31 +01:00
Proddy
2818e268b6 Merge pull request #2441 from proddy/dev
standalone console working
2025-03-03 21:01:25 +01:00
proddy
7a95c11f62 package update 2025-03-03 20:55:23 +01:00
proddy
d712b1cce9 command NOT_FOUND when not found 2025-03-03 15:13:04 +01:00
proddy
03fa92352b 3.7.2-dev.24 2025-03-03 15:12:42 +01:00
proddy
e121fdb47f fix shell standalone 2025-03-03 15:12:28 +01:00
proddy
c05793f64f package update 2025-03-03 15:12:19 +01:00
proddy
3836610d81 typo 2025-03-03 15:12:07 +01:00
MichaelDvP
c3f87cd321 fix CR10 #2437 2025-03-03 10:11:18 +01:00
Proddy
4d5a27f45e Merge pull request #2439 from proddy/dev
ESPAsyncWebServer @ 3.7.2
2025-03-02 21:39:54 +01:00
proddy
c37c1aaad5 size of log level box 2025-03-02 21:38:24 +01:00
proddy
110c0df6fb change test log message 2025-03-02 21:38:12 +01:00
proddy
04ac3be242 adjust cache 2025-03-02 17:44:53 +01:00
proddy
44c4ee8bc0 show device id in hex 2025-03-02 17:33:31 +01:00
proddy
57c4d550a3 ESPAsyncWebServer @ 3.7.2 2025-03-02 17:33:16 +01:00
Proddy
4bcb95eece Merge pull request #2436 from proddy/dev
show localized elapsed time in version
2025-03-02 15:21:47 +01:00
proddy
0a92d455c8 show localized elapsed time 2025-03-02 15:13:56 +01:00
proddy
edb30931ae remove days_Ago 2025-03-02 15:13:16 +01:00
proddy
d03ab7a16f formatting 2025-03-02 15:13:06 +01:00
proddy
ea9b6b3e00 removed unused file 2025-03-02 13:27:14 +01:00
proddy
bae6b600bd formatting 2025-03-02 13:27:04 +01:00
proddy
7eac920985 move build python script to scripts folder 2025-03-02 13:26:55 +01:00
Proddy
00c2b5992c Merge pull request #2435 from proddy/dev
minor changes
2025-03-02 09:46:55 +01:00
proddy
43d2fa1f00 remove duplicate log message 2025-03-02 09:23:37 +01:00
proddy
92d40d9287 reset search when closing pane 2025-03-02 09:23:15 +01:00
proddy
7a47a2090f fix message in testing devices 2025-03-02 09:22:59 +01:00
proddy
0d98491a97 suppress debug comment 2025-03-02 09:22:33 +01:00
Proddy
16cf16616e Merge pull request #2434 from proddy/dev
update libs
2025-03-01 22:37:42 +01:00
proddy
d9f56ef3ae ESP32Async/AsyncTCP @ 3.3.6 2025-03-01 22:35:14 +01:00
proddy
c8934af9bb update example 2025-03-01 22:17:18 +01:00
Proddy
cbacaa98d9 Merge pull request #2432 from proddy/dev
EMS-ESP-Modules.git @ 1.0.5
2025-03-01 10:54:30 +01:00
proddy
f1b6a0baf3 EMS-ESP-Modules.git @ 1.0.5 2025-03-01 10:54:05 +01:00
Proddy
4d15f48e2b Merge pull request #2431 from proddy/dev
prep for 3.7.2 stable
2025-03-01 10:45:28 +01:00
proddy
2ffd00e28a update dhw.mode with own_prog 2025-03-01 10:44:51 +01:00
proddy
8ef5be9a7f ArduinoJson @ 7.3.1 2025-03-01 10:44:13 +01:00
proddy
8769faeb83 package update 2025-03-01 10:44:03 +01:00
Proddy
cefbf2d4d6 Merge pull request #2430 from proddy/dev
#2427 links open in new window
2025-02-26 21:00:39 +01:00
proddy
bfd5082054 #2427 2025-02-26 20:58:21 +01:00
proddy
3d3a634d94 package update 2025-02-26 20:58:14 +01:00
Proddy
1cb078cd3c Merge pull request #2429 from misa1515/patch-22
Update locale_translations.h
2025-02-26 18:48:38 +01:00
Proddy
22683f5d12 Merge pull request #2428 from misa1515/patch-21
Update index.ts
2025-02-26 18:48:22 +01:00
misa1515
57b42aa7c2 Update locale_translations.h 2025-02-26 17:51:47 +01:00
misa1515
4a59743024 Update index.ts 2025-02-26 17:47:02 +01:00
Proddy
66cec18dee Merge pull request #2426 from proddy/dev
3.7.2-dev.23
2025-02-25 20:50:06 +01:00
proddy
ad71938fde Merge branch 'dev' of https://github.com/proddy/EMS-ESP32 into dev 2025-02-25 20:49:39 +01:00
proddy
d4155d6e9e 3.7.2-dev.23 2025-02-25 20:49:38 +01:00
Proddy
af6be4c6b1 Merge pull request #2425 from proddy/dev
new command 'set admin password'
2025-02-25 20:47:32 +01:00
proddy
cfbd0168c3 new command 'set admin password' 2025-02-25 20:46:43 +01:00
proddy
61b9bd7581 fix standalone board profile 2025-02-25 20:46:29 +01:00
proddy
4c7ad7124e package update 2025-02-25 20:46:18 +01:00
Proddy
0413314cfb Merge pull request #2424 from proddy/dev
fix weird bug where the total # entities would be incorrect
2025-02-24 22:19:46 +01:00
proddy
ab7cbe8ead show all entities, even if they are marked hidden 2025-02-24 22:18:41 +01:00
proddy
d1264828eb add comment 2025-02-24 22:18:24 +01:00
Proddy
76a317b5c0 Merge pull request #2423 from proddy/dev
add search to Devices webpage
2025-02-24 21:42:14 +01:00
proddy
ec11ae2ef7 add search 2025-02-24 21:38:14 +01:00
proddy
b857c6eb44 change color or num entities so its consistent 2025-02-24 21:37:56 +01:00
proddy
3f8add73ac adjust toast messages 2025-02-24 21:37:29 +01:00
proddy
08b0ddbb7f update packages 2025-02-24 21:37:13 +01:00
proddy
c44cb7e7fd add comments 2025-02-24 21:37:02 +01:00
Proddy
77ff61046e Merge pull request #2422 from MichaelDvP/dev
second fix #2410
2025-02-24 09:51:12 +01:00
MichaelDvP
a8eb06bef2 second fix #2410 2025-02-23 08:33:53 +01:00
Proddy
566b5c8ea5 Merge pull request #2420 from proddy/dev
collection of minor fixes
2025-02-22 13:40:40 +01:00
proddy
eeccd076a0 airbypass 2025-02-22 13:38:04 +01:00
proddy
f45ac9d0ef 3.7.2-dev.22 2025-02-22 13:37:55 +01:00
proddy
cdd9acddfa remove obsolete return_not_found() 2025-02-22 13:37:37 +01:00
proddy
e484f11d12 add test data and comments 2025-02-22 13:37:12 +01:00
proddy
19572f313a don't build web in standalone native 2025-02-22 13:36:45 +01:00
proddy
af9ad5d624 add test data for writing to analog sensor 2025-02-22 13:36:28 +01:00
proddy
8adca69140 update unit tests, add analogsensors 2025-02-22 13:36:12 +01:00
proddy
01710316ed add test for analogsensors 2025-02-22 13:36:00 +01:00
proddy
ab80c82a22 package update 2025-02-22 13:35:37 +01:00
proddy
dceafe65a7 formatting 2025-02-22 13:35:18 +01:00
proddy
4734a81fdb add airbypass 2025-02-22 13:35:08 +01:00
Proddy
a2c099e615 Merge pull request #2419 from MichaelDvP/dev
fix naming of bypass #2417
2025-02-22 11:26:16 +01:00
MichaelDvP
f9b88a1b6b fix naming of bypass #2417 2025-02-22 11:16:54 +01:00
Proddy
7f2b8cc971 Merge pull request #2416 from vmonkey/patch-5
Update CZ
2025-02-22 08:20:58 +01:00
Marek Tyburec
582fb3d72f Update CZ 2025-02-22 08:19:16 +01:00
Marek Tyburec
bf4fa74742 Update CZ 2025-02-22 08:17:07 +01:00
Proddy
c62b3b9864 Merge pull request #2415 from MichaelDvP/dev
fix dhw mode #2410
2025-02-21 21:50:16 +01:00
MichaelDvP
0ae9795d6b fix dhw mode #2410 2025-02-21 12:01:36 +01:00
Proddy
7488c31cd3 Merge pull request #2414 from proddy/dev
minor updates
2025-02-20 22:48:01 +01:00
proddy
dc0e634004 3.7.2-dev.21 2025-02-20 22:47:07 +01:00
proddy
57e7c0ae4f package update 2025-02-20 22:46:55 +01:00
proddy
7214acfa20 update ESPAsyncWebServer to 3.7.1 2025-02-20 22:46:48 +01:00
proddy
ff6d47bb9c spelling 2025-02-20 22:46:21 +01:00
proddy
81971ba53f fixes #2412 2025-02-20 22:46:10 +01:00
Proddy
a58f37e3eb Merge pull request #2407 from proddy/dev
fix showing version in dialog
2025-02-16 11:32:22 +01:00
proddy
09a746cf8e fix showing version in dialog 2025-02-16 11:31:49 +01:00
proddy
ea70119138 US spelling for favorite 2025-02-16 11:28:51 +01:00
Proddy
5a9c5b5e2d Merge pull request #2406 from MichaelDvP/dev
fix verify telegram-type
2025-02-16 11:24:09 +01:00
MichaelDvP
7fb09c5045 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-02-16 11:05:21 +01:00
MichaelDvP
705171f305 fix verify telegram-type 2025-02-16 11:04:19 +01:00
Proddy
400d1a5f1a Merge pull request #2405 from proddy/dev
re-generated files for 3.7.2-dev.20
2025-02-16 11:03:48 +01:00
proddy
c4855cc5f2 re-generated files for 3.7.2-dev.20 2025-02-16 11:02:41 +01:00
Proddy
1e4b487299 Merge pull request #2404 from MichaelDvP/dev
add vacation mode CR50 #2403
2025-02-16 10:48:13 +01:00
MichaelDvP
cbd883103e add vacation mode CR50 #2403 2025-02-16 09:05:44 +01:00
MichaelDvP
2ce12943cd update pkg 2025-02-16 08:42:23 +01:00
Proddy
4151a82b3b Merge pull request #2399 from proddy/dev
improvements to version checking
2025-02-09 20:18:00 +00:00
proddy
b871081ef1 show upgrades for both stable and dev releases 2025-02-09 20:13:52 +00:00
proddy
da51d1d7d9 comments on version tests 2025-02-09 20:13:10 +00:00
proddy
82dae30224 3.7.2-dev.19 2025-02-09 20:12:50 +00:00
proddy
1fdac2fdab package update 2025-02-09 20:12:36 +00:00
proddy
56b23e27d7 formating 2025-02-09 20:12:19 +00:00
Proddy
ba29aa62d3 Merge pull request #2398 from proddy/dev
updates
2025-02-08 22:34:35 +00:00
proddy
be2342285f update AsyncWS libs 2025-02-08 22:33:45 +00:00
proddy
5595c01221 update 2025-02-08 22:33:27 +00:00
proddy
133cddef5b exclude IDF 2025-02-08 22:33:20 +00:00
proddy
0fdba1f84d fix for OSX 2025-02-08 22:33:08 +00:00
proddy
e10ec26e79 update 2025-02-08 22:32:56 +00:00
proddy
ffbb397dba update version 2025-02-08 22:32:48 +00:00
Proddy
799076d0c4 Merge pull request #2396 from misa1515/patch-20
Update index.ts
2025-02-07 21:00:29 +01:00
misa1515
1fbd10df27 Update index.ts 2025-02-06 23:06:10 +01:00
Proddy
4a2f82f1e8 Merge pull request #2393 from mattreim/dev
Update German translation
2025-02-03 22:29:47 +01:00
mattreim
d913e4d90b Update German translation 2025-02-03 21:46:53 +01:00
Proddy
0958c29c9e Merge pull request #2392 from proddy/dev
translations in version webUI page
2025-02-03 20:47:21 +01:00
proddy
36e1c9f79d updates 2025-02-03 20:37:53 +01:00
proddy
8fedac53dd more translations 2025-02-03 20:35:17 +01:00
proddy
a1c6159fc5 package update 2025-02-03 20:35:09 +01:00
proddy
5b33acba5e auto-formatting 2025-02-03 20:34:56 +01:00
Proddy
4abaef2943 Merge pull request #2391 from MichaelDvP/dev
disable old led port when changing port, #2389
2025-02-03 12:20:04 +01:00
MichaelDvP
ad71773293 disable old led port when changing port, #2389 2025-02-03 09:18:41 +01:00
Proddy
5b07309939 Merge pull request #2390 from proddy/dev
fix system command read from crashing
2025-02-02 17:17:40 +01:00
proddy
7a044a1dcd don't use flag tautological-constant-out-of-range-compare 2025-02-02 17:17:03 +01:00
proddy
6507764157 use default icondegrees in HA 2025-02-02 17:16:47 +01:00
proddy
7dfa8fc883 command read with no args crashed EMS-ESP 2025-02-02 17:16:32 +01:00
proddy
6df7965bb2 bump version dev-18 2025-02-02 17:16:11 +01:00
Proddy
02a3dee764 Merge pull request #2388 from proddy/dev
minor changes
2025-02-02 13:34:25 +01:00
proddy
d5895f1710 add example lib_deps 2025-02-02 13:33:28 +01:00
proddy
2b90ad3f6d add example for allvalues 2025-02-02 13:29:35 +01:00
proddy
0bb61b4296 show error when action command fails 2025-02-02 13:29:18 +01:00
proddy
2378fb547c default values 2025-02-02 13:29:02 +01:00
proddy
a79ff3f417 stop flash when ems bus not yet connected 2025-02-02 13:28:55 +01:00
proddy
4bc93615c5 add space when showing error 2025-02-02 13:28:37 +01:00
proddy
685f0d93e5 add allvalues 2025-02-02 13:28:23 +01:00
proddy
1d7b6674bb remove allvalues 2025-02-02 13:28:15 +01:00
proddy
014405e451 package update 2025-02-02 13:28:02 +01:00
Proddy
aff3ca3ad3 Merge pull request #2382 from proddy/dev
remove flash from web dashboard, add tooltip component
2025-01-29 21:09:39 +01:00
Proddy
b723d09952 Merge branch 'emsesp:dev' into dev 2025-01-29 21:07:31 +01:00
Proddy
bfff842c82 Merge pull request #2381 from MichaelDvP/dev
ignore src==0 (#2378) and fix typo
2025-01-29 21:07:01 +01:00
proddy
ad7d21764d remove flash from dashboard 2025-01-29 21:04:01 +01:00
MichaelDvP
f2ae84b004 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-01-29 08:37:04 +01:00
MichaelDvP
a81956654e ignore src==0, fixes #2378 2025-01-29 08:36:03 +01:00
MichaelDvP
3cb662799f fix typo 2025-01-29 08:35:19 +01:00
Proddy
9188d03d61 Merge pull request #2380 from proddy/dev
tidy up dashboard text and alerts
2025-01-28 22:35:21 +01:00
proddy
3df2d36453 https://github.com/emsesp/EMS-ESP32/discussions/2377 2025-01-28 22:33:23 +01:00
Proddy
0ab7eb42e4 Merge pull request #2373 from proddy/dev
support entities api endpoint for multiple devices of same type
2025-01-26 14:56:31 +01:00
proddy
84d4fb37fa update 2025-01-26 14:54:38 +01:00
proddy
aa9b38da03 make makefile work for all platforms 2025-01-26 14:48:49 +01:00
proddy
8342867807 3.7.2-dev.16 2025-01-26 14:48:32 +01:00
proddy
d8cff865da tidy up flags 2025-01-26 14:45:40 +01:00
proddy
096f7e1c88 fix lint warnings 2025-01-26 14:45:33 +01:00
proddy
0608d847f5 update generated docs 2025-01-26 14:01:41 +01:00
proddy
b20360c2a5 update lock 2025-01-26 13:59:37 +01:00
proddy
59b5086cab no need for virtual functions 2025-01-26 13:57:06 +01:00
proddy
2e3024ab61 move all statics up 2025-01-26 13:56:50 +01:00
proddy
b5299719da replace emsesp_stub.h 2025-01-26 13:56:31 +01:00
proddy
2620f56e0d lint warnings 2025-01-26 13:30:53 +01:00
proddy
20b978c46c add lto flag 2025-01-26 13:30:29 +01:00
proddy
5c8a18df68 arduino 6.10.0 and lto flag 2025-01-26 13:30:20 +01:00
proddy
3464d6c324 add test for /api/thermostat/entities 2025-01-26 13:12:26 +01:00
proddy
eac0cc0521 prevent possible out of scope 2025-01-26 13:12:11 +01:00
proddy
0953d37303 support multi devices of same type 2025-01-25 13:31:05 +01:00
proddy
1d3fec2a95 changed text 2025-01-25 13:30:41 +01:00
proddy
61b374b7c0 changed comment 2025-01-25 13:30:30 +01:00
proddy
c47cc0d5f1 test multiple thermostats hc1 hc2 2025-01-25 13:30:14 +01:00
proddy
939882efbf auto-formatting 2025-01-25 13:30:03 +01:00
Proddy
f42cbf548e Merge pull request #2371 from proddy/dev
some minor changes
2025-01-25 08:43:28 +01:00
proddy
91075ace37 comment 2025-01-25 08:40:47 +01:00
proddy
de6405f8d1 neopixel to standalone to not break build 2025-01-25 08:35:35 +01:00
proddy
2ffcaf4a9e move async* libs 2025-01-25 08:35:17 +01:00
proddy
1bda62309b auto-formatting 2025-01-25 08:35:05 +01:00
proddy
83659e5da8 remove loading messages 2025-01-25 08:15:10 +01:00
proddy
a6e136561e show boot partitions 2025-01-25 08:15:02 +01:00
proddy
a75d7487fc Merge branch 'dev' of https://github.com/proddy/EMS-ESP32 into dev 2025-01-25 08:14:25 +01:00
proddy
31b0dd8d58 update packages 2025-01-25 08:12:55 +01:00
Proddy
696bd1f455 Merge branch 'emsesp:dev' into dev 2025-01-25 07:31:09 +01:00
Proddy
18355efde2 Merge pull request #2367 from misa1515/patch-18
Update locale_translations.h
2025-01-25 07:30:49 +01:00
Proddy
d5100134e4 Merge pull request #2368 from misa1515/patch-19
Update index.ts
2025-01-25 07:30:39 +01:00
Proddy
b932242e04 Merge pull request #2370 from MichaelDvP/dev
add RGB Led to board profile
2025-01-25 07:30:11 +01:00
MichaelDvP
73ccff3412 add RGB Led to board profile 2025-01-24 19:23:19 +01:00
MichaelDvP
e5f852a7ed fix C3 board settings 2025-01-24 19:22:49 +01:00
MichaelDvP
581f19462d don't show double log entries after startup 2025-01-24 19:22:20 +01:00
misa1515
eb59b37251 Update index.ts 2025-01-22 23:36:48 +01:00
misa1515
f3696f60cd Update locale_translations.h 2025-01-22 23:32:31 +01:00
proddy
6b4e21f5db remove duplicate wwCurFlow_ in HIU and HEATPUMP 2025-01-22 23:15:58 +01:00
proddy
3d4d5b7bbc show restarting before it actually restarts 2025-01-22 22:31:36 +01:00
proddy
e6f15681c0 use same ha_uom function to add uom, state and device class 2025-01-22 22:31:21 +01:00
proddy
5f52a646ff 3.7.2-dev.15 2025-01-22 22:30:38 +01:00
proddy
be4f9296a5 add board_build.app_partition_name = app0 2025-01-22 22:30:15 +01:00
proddy
c3181f589c minor change 2025-01-22 22:29:58 +01:00
proddy
872cd40f56 remove Loading... message 2025-01-22 22:29:40 +01:00
proddy
30b9de49bf revert back to default test 2025-01-22 22:29:27 +01:00
Proddy
8a91c6eb2f Merge pull request #2366 from proddy/dev
show progress bar when automatically installing firmware, fix modbus headers
2025-01-21 22:07:00 +01:00
proddy
243471e21d show progress bar when automatically installing firmware 2025-01-21 22:06:01 +01:00
proddy
b8f97ec94d 3.7.2-dev.14 2025-01-21 22:05:26 +01:00
proddy
8576a6f253 added for testing 2025-01-21 22:05:10 +01:00
proddy
b33e6ceca9 package update 2025-01-21 20:28:51 +01:00
proddy
8eaf7f32cd fix csv file generation for non modbus 2025-01-21 20:28:47 +01:00
Proddy
becdc8cef5 Merge pull request #2363 from proddy/dev
fix memory type for S3 so PSRAM is used, fix WebUI upload restarting
2025-01-20 21:05:14 +01:00
proddy
651688219c fix logic for uploading so it restarts 2025-01-20 21:03:52 +01:00
proddy
b9a4bb3511 3.7.2-dev.13 2025-01-20 21:03:29 +01:00
proddy
b318274129 fix memory type for S3 so PSRAM is used 2025-01-20 21:03:20 +01:00
Proddy
8b0e5ba8e7 Merge pull request #2362 from proddy/dev
introduce system status in WebUI for easier monitoring of tasks
2025-01-20 17:42:07 +01:00
proddy
4a9b74b311 include tag in entity_dump unless we're generating it for modbus 2025-01-20 12:57:00 +01:00
proddy
371b198eb6 update generated files 2025-01-20 12:56:23 +01:00
proddy
a6dfdb2c4c package update 2025-01-20 12:56:15 +01:00
proddy
3122c2b2a9 print tag in dump_entities.csv 2025-01-20 12:14:46 +01:00
proddy
9ac8d149fb use system status with standalone 2025-01-20 12:14:30 +01:00
proddy
91e1b0b3b8 added comment 2025-01-20 12:14:12 +01:00
proddy
01636ced88 update dictionary 2025-01-20 12:14:01 +01:00
proddy
53e587537f remove unused system status's 2025-01-20 12:13:51 +01:00
proddy
77eeacf121 remove duplicate 157 thermostat in standalone 2025-01-20 12:13:34 +01:00
proddy
a89c42d659 package update 2025-01-20 12:13:10 +01:00
proddy
ba4bc423f4 rename Restart Monitor 2025-01-20 12:13:00 +01:00
proddy
8cd341576d use await 2025-01-20 12:12:47 +01:00
proddy
006eae5862 introduce system status in WebUI for easier monitoring of tasks 2025-01-19 18:18:04 +01:00
Proddy
6e29de4463 Merge pull request #2361 from proddy/dev
include CPU temp in heartbeat MWTT topic for ESP32
2025-01-19 10:02:38 +01:00
proddy
92d816b990 include CPU temp in heartbeat MWTT topic for ESP32 2025-01-19 10:00:03 +01:00
proddy
37ad1968b5 formating 2025-01-19 09:59:39 +01:00
Proddy
01793dd4f6 Merge pull request #2360 from proddy/dev
implement CPU temp for ESP32
2025-01-18 16:13:29 +01:00
proddy
9a7f7fa1d5 updated 2025-01-18 16:12:59 +01:00
proddy
648675d002 auto-formatting 2025-01-18 16:10:44 +01:00
proddy
462d865fc9 implement CPU temp for ESP32 2025-01-18 16:08:26 +01:00
proddy
9f24851948 add comments 2025-01-18 16:08:04 +01:00
proddy
a5e5ec5098 transformNumFloat with default values 2025-01-18 16:07:57 +01:00
proddy
db90546bc3 transformNumFloat with default values 2025-01-18 16:07:41 +01:00
proddy
2d9ea3ee8d show CPU temp in C or F 2025-01-18 16:07:18 +01:00
proddy
4d3cafcf29 fix DASHBOARD_1 in DE 2025-01-18 16:07:05 +01:00
proddy
8685ffb1bf update Tasmota platform (for testing 3.x) 2025-01-18 16:06:54 +01:00
proddy
86408b3452 package update 2025-01-18 16:06:31 +01:00
Proddy
eab94f3b84 Merge pull request #2352 from proddy/dev
small collection of changes
2025-01-16 22:29:53 +01:00
proddy
9123dbcc9e 3.7.2-dev.11 2025-01-16 21:58:13 +01:00
proddy
ec6f426b06 remove comments 2025-01-16 21:57:53 +01:00
proddy
5482937332 detect browser language if non set 2025-01-16 21:55:51 +01:00
proddy
0b667703c2 update 2025-01-16 21:55:36 +01:00
proddy
c732c96fc2 re-gen files 2025-01-16 21:55:19 +01:00
proddy
e3d260429c formatting 2025-01-16 21:54:54 +01:00
proddy
77eb2c747b tidy up lang header 2025-01-16 21:54:38 +01:00
proddy
6853cd738f package update 2025-01-16 21:54:17 +01:00
proddy
d58776beab fix DASHBOARD_1 2025-01-16 21:53:57 +01:00
Proddy
94a7b1e438 Merge branch 'emsesp:dev' into dev 2025-01-16 16:32:09 +01:00
Proddy
c3f7540f74 Merge pull request #2356 from MichaelDvP/dev
prepare for modbus support AM200, #2354
2025-01-16 16:30:35 +01:00
MichaelDvP
4642a50f69 prepare for modbus support AM200 2025-01-16 09:48:11 +01:00
proddy
b23bcf3f0b message optional in MessageBox 2025-01-14 22:09:23 +01:00
proddy
570678e3d3 show message in Dashboard if no fav entities set 2025-01-14 21:44:56 +01:00
proddy
64a2f5eb11 gracefully close mqtt on restart 2025-01-14 19:03:30 +01:00
proddy
24fba8b382 add test for #2351 2025-01-14 19:03:12 +01:00
proddy
9339ef481a package update 2025-01-14 19:01:11 +01:00
proddy
075789b902 fix showing Active in NTP 2025-01-12 15:19:12 +01:00
Proddy
1dd1b47faf Merge pull request #2343 from proddy/dev
minor updates
2025-01-12 14:16:46 +01:00
proddy
525a164c69 include temp as HA sensor - #2346 2025-01-12 12:09:36 +01:00
proddy
b60f333edb use translation for is_required 2025-01-12 11:58:03 +01:00
proddy
2323fdfe56 update packages 2025-01-12 11:57:53 +01:00
proddy
9b7fed4d1f tidy up imports 2025-01-12 11:50:05 +01:00
proddy
67c59c9b4b modify settings based on board type 2025-01-12 11:49:52 +01:00
proddy
b5fea921e6 grey out modbus with explanation if no psram 2025-01-12 11:49:27 +01:00
proddy
eeb071afc6 3.7.2-dev.10 2025-01-12 08:57:53 +01:00
proddy
5669873101 don't echo wifi password after setting it 2025-01-11 21:11:03 +01:00
proddy
d371c9bc82 auto-formatting 2025-01-11 21:06:47 +01:00
proddy
153dd19fc6 don't auto-install if on Tasmota 2025-01-11 19:02:15 +01:00
proddy
ae258a75d9 simulate ESP32 and ESP32-S3 2025-01-11 19:01:53 +01:00
proddy
37c4be321f output also the flash size 2025-01-11 19:01:03 +01:00
proddy
c810d58064 changed comments, make sure S32 V2 is compiled with Tasmota 2025-01-11 19:00:47 +01:00
proddy
5a27817d11 updated example 2025-01-11 19:00:14 +01:00
proddy
4be2f9283d updated dictionary 2025-01-11 19:00:05 +01:00
proddy
a65162fbbc updated generated file 2025-01-11 18:59:49 +01:00
proddy
494cf3b6a8 package update 2025-01-11 18:59:39 +01:00
proddy
b900194402 package update 2025-01-11 18:59:30 +01:00
proddy
d6e72e72d7 auto-formatting 2025-01-11 18:59:10 +01:00
proddy
960baadeca changed text 2025-01-11 18:58:59 +01:00
proddy
ed92b37869 updated 2025-01-11 18:58:51 +01:00
proddy
1598809815 package update 2025-01-11 12:55:23 +01:00
Proddy
3131969fc1 Merge branch 'emsesp:dev' into dev 2025-01-10 18:11:40 +01:00
Proddy
fb44bc33b9 Merge pull request #2341 from MichaelDvP/dev
fix mqtt commands with base path #2339
2025-01-10 17:10:57 +01:00
MichaelDvP
59a806ac8c fix mqtt commands with base path #2339 2025-01-10 15:14:48 +01:00
proddy
6a2a27e47e mathieucarbou/ESPAsyncWebServer @ 3.6.0 2025-01-09 16:33:07 +01:00
Proddy
251d0af028 Merge branch 'emsesp:dev' into dev 2025-01-09 14:21:45 +01:00
Proddy
8fa800e2f7 Merge pull request #2338 from MichaelDvP/dev
small fixes and additions
2025-01-09 14:21:24 +01:00
MichaelDvP
df9d20ad88 disable WS queue, web log messages are already queued 2025-01-09 12:39:29 +01:00
MichaelDvP
c07754047d add solar influence #2212 2025-01-09 09:18:50 +01:00
MichaelDvP
9c00af317e Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2025-01-09 08:55:12 +01:00
MichaelDvP
d3d132ec45 unused id 2025-01-09 08:55:01 +01:00
MichaelDvP
7adba972e7 Don't show uom for empty string 2025-01-09 08:54:36 +01:00
proddy
d83399bd1f fix Make for OSX 2025-01-08 21:46:05 +01:00
proddy
4471da4aa9 update packages 2025-01-08 21:45:59 +01:00
Proddy
b3be1d9351 Merge pull request #2337 from proddy/dev
replace arduino platform 3.1.0 with previous 2.0.18
2025-01-08 20:20:01 +01:00
proddy
c6b8c2a630 3.7.2-dev.9 2025-01-08 20:17:28 +01:00
proddy
3f51c21dc7 tests for 4MB firmware upload 2025-01-08 20:17:20 +01:00
proddy
a8cdbc4fd6 tidy up directory listing 2025-01-08 20:16:59 +01:00
proddy
95e5babb13 package update 2025-01-08 20:16:48 +01:00
proddy
74cb23a8bb replace arduino platform 3.1.0 with previous 2.0.18 to see if it fixed #2333 2025-01-08 20:16:40 +01:00
Proddy
6be304f295 Merge pull request #2332 from proddy/dev
formatting upgrade button
2025-01-05 22:46:19 +01:00
proddy
e702b0b733 formatting upgrade button 2025-01-05 22:45:48 +01:00
Proddy
bfbd263c74 Merge pull request #2331 from proddy/dev
web UI small changes
2025-01-05 18:28:39 +01:00
proddy
472f922369 tidy up formatting, add a re-install option 2025-01-05 18:26:18 +01:00
proddy
b13c608ff3 formatting imports 2025-01-05 13:34:02 +01:00
proddy
5464909121 change icon size and use customizations icon 2025-01-05 13:32:54 +01:00
Proddy
d874b3f808 Merge pull request #2328 from proddy/dev
core update #2108
2025-01-04 15:07:01 +01:00
proddy
92108bc743 update comments 2025-01-04 14:59:41 +01:00
proddy
66ca1e52bb add local yarn files 2025-01-04 14:59:37 +01:00
proddy
3589094d06 update lock file 2025-01-04 14:59:13 +01:00
proddy
801ed6ef79 update dictionary 2025-01-04 14:59:03 +01:00
proddy
2547ae45a8 comment 2025-01-04 14:50:29 +01:00
proddy
93e4abe72d update packages 2025-01-04 14:13:51 +01:00
proddy
eb87651c47 merge #2108 2025-01-04 13:41:39 +01:00
Proddy
4138598db2 Merge pull request #2320 from misa1515/patch-16
Update locale_translations.h
2025-01-04 13:30:40 +01:00
Proddy
913bbd6e3b Merge pull request #2322 from misa1515/patch-17
Update index.ts
2025-01-01 21:46:39 +01:00
misa1515
d35881b05b Update index.ts 2025-01-01 21:35:02 +01:00
misa1515
33b54ccf12 Update locale_translations.h 2025-01-01 17:47:43 +01:00
Proddy
a8775b2200 Merge pull request #2317 from proddy/dev
cleanup yarn
2024-12-31 13:07:07 +01:00
proddy
6d3746222d updated 2024-12-31 13:06:16 +01:00
proddy
fe169ac80f formatting 2024-12-31 13:06:11 +01:00
proddy
83724e3d44 formatting 2024-12-31 13:05:59 +01:00
proddy
a4db3ef5c4 regenerate files 2024-12-31 13:05:49 +01:00
proddy
f8adad7865 cleanup yarn 2024-12-31 13:05:33 +01:00
proddy
12c094228e add comment 2024-12-31 13:05:07 +01:00
Proddy
902ea80807 Merge pull request #2311 from Sbried/dev
Updated unknown compressor stati "enum_hpactivity"
2024-12-31 12:44:57 +01:00
Proddy
73831d9ac6 Merge pull request #2316 from proddy/dev
fix underlines in Tab headers (webUI) and NL translations
2024-12-31 12:44:31 +01:00
proddy
6bfda79441 NL translations 2024-12-31 12:28:06 +01:00
proddy
112de78fc5 update packages 2024-12-31 12:16:27 +01:00
proddy
adbd2381e1 ignore dependencies 2024-12-31 12:16:16 +01:00
proddy
397f3f546e fix webUI tabs (underline) 2024-12-31 12:15:59 +01:00
Proddy
43d3c28e16 Merge pull request #2307 from ovenystas/fix-sv-translation-bug
fix: Sv translation bugs
2024-12-30 21:28:23 +01:00
Proddy
747a64b869 Merge pull request #2315 from MichaelDvP/dev
fix thermostat clock year, #2313
2024-12-30 21:27:04 +01:00
MichaelDvP
7c2e5560bd fix thermostat clock year, #2313 2024-12-30 19:28:46 +01:00
Sbried
9194db9f70 Updated unknown compressor stati "enum_hpactivity" 0, 5 and added status 7.
No idea what is the difference bewteen 4 (pool) and 5 (pool_heating).
2024-12-29 12:57:26 +01:00
Ove Nystås
fece00c0c6 fix: Sv translation bugs 2024-12-26 19:50:16 +01:00
Proddy
ba3ae5ea56 Merge pull request #2305 from MichaelDvP/dev
fixes #2288, #2299, #2295 (new  FLAG)
2024-12-23 15:29:04 +01:00
MichaelDvP
4c69c9e445 fix show ntp_time (as local time) 2024-12-23 13:03:59 +01:00
MichaelDvP
97925c47fd remove broken ntp_time 2024-12-23 12:12:25 +01:00
MichaelDvP
ad89fe15b1 fix seltep command for CR11 #2295 2024-12-23 09:09:36 +01:00
MichaelDvP
29035cabfe Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2024-12-22 15:59:18 +01:00
MichaelDvP
9b3d43d27f add min/max for #2288, own flag for CR11 #2295 2024-12-22 15:58:46 +01:00
Proddy
0b4f17473a Merge pull request #2303 from proddy/dev
show ntp time in status, use useInterval everywhere instead of alova'…
2024-12-21 16:31:23 +01:00
proddy
b0c29b57c7 show ntp time in status, use useInterval everywhere instead of alova's AutoRequest 2024-12-21 16:30:05 +01:00
Proddy
6d22f6aebf Merge pull request #2302 from proddy/dev
minor refresh
2024-12-20 17:49:39 +01:00
proddy
3e3e10e6a0 formatting 2024-12-20 17:48:14 +01:00
proddy
b854c777c8 update dictionary 2024-12-20 17:48:04 +01:00
proddy
b71fdd77e8 modbus update with c11 2024-12-20 17:47:56 +01:00
proddy
0f6f7cea19 vite update 2024-12-20 17:47:41 +01:00
Proddy
58beb092c2 Merge pull request #2301 from oliof/patch-1
Update CHANGELOG_LATEST.md
2024-12-20 12:15:41 +01:00
Harald Wagener
c3f200f73b Update CHANGELOG_LATEST.md
fix link to issue #2182
2024-12-20 10:41:37 +01:00
Proddy
98640c11b1 Merge pull request #2298 from MichaelDvP/dev
update for #2294 and #2295
2024-12-19 20:29:49 +01:00
MichaelDvP
d7904bdcaf set mode to manual for CR11, dont show remotetemp for non-master thermostats 2024-12-19 16:52:57 +01:00
MichaelDvP
ce05a94d58 update changelog, dev.6 2024-12-19 12:42:09 +01:00
MichaelDvP
c0ed62dc7a modbus: don't show not found errors in first minute 2024-12-19 12:24:46 +01:00
MichaelDvP
1557fa98b1 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2024-12-19 09:39:46 +01:00
MichaelDvP
81a530f153 add CR11 thermostat, #2295 2024-12-19 09:38:18 +01:00
Proddy
a4733c3e6a Merge pull request #2296 from proddy/dev
added EMS Device Ventilation module as test data
2024-12-18 21:29:29 +01:00
proddy
7851b8e94c type check 2024-12-18 21:25:22 +01:00
proddy
36838f7690 add example Ventilator to demo 2024-12-18 21:10:35 +01:00
proddy
fdd87d0757 update toastify 2024-12-18 21:10:19 +01:00
MichaelDvP
c8822aff64 fix modbus write for signed values 2024-12-18 13:44:24 +01:00
MichaelDvP
4b3205fc9c modbus publish emsesp-INT8 as modbus-int16, fix #2294 2024-12-18 12:55:53 +01:00
MichaelDvP
afc05ae9e8 update pkg, change for toastify 11 2024-12-18 12:53:55 +01:00
proddy
9c3044efa0 re-generated files 2024-12-16 21:49:37 +01:00
proddy
8caeb129c1 update 2024-12-16 21:49:28 +01:00
proddy
0427504f0e typo 2024-12-16 21:44:34 +01:00
proddy
4f11a7caa1 update dictionary 2024-12-16 21:44:27 +01:00
proddy
150695c185 formatting 2024-12-16 21:44:14 +01:00
proddy
3558591480 remove unused function 2024-12-16 21:43:56 +01:00
proddy
f7a24052c2 make makefile work for OSX 2024-12-16 21:38:06 +01:00
proddy
75c452486c update packages, add workaround for itty-router bug 2024-12-16 21:37:58 +01:00
Proddy
40cab6775c Merge pull request #2292 from ovenystas/add-sv-translations
Add, update and fix misspellings in Swedish translation
2024-12-15 11:20:02 +01:00
Ove Nystås
392829c7db Add, update and fix misspellings in Swedish translation 2024-12-15 00:41:36 +01:00
Proddy
4621c9d616 Merge pull request #2291 from MichaelDvP/dev
thermostat settings for #2290, #2288,#1957 (#2287)
2024-12-13 22:50:46 +01:00
MichaelDvP
006d664ec9 CW100 settings telegram 0x241, #2290 2024-12-13 15:58:06 +01:00
MichaelDvP
0cc9ac4dd8 add reduce threshold #2288, absent mode #1957 (#2287) 2024-12-13 10:14:44 +01:00
MichaelDvP
502096dc22 update pkg 2024-12-13 10:08:42 +01:00
Proddy
8c424c7a64 Merge pull request #2283 from misa1515/patch-15
Update locale_translations.h
2024-12-12 22:35:27 +01:00
misa1515
d7c118b88a Update locale_translations.h 2024-12-09 18:57:16 +01:00
misa1515
1fdb0b7516 Update locale_translations.h 2024-12-07 16:51:42 +01:00
Proddy
c2fc771756 Merge pull request #2280 from MichaelDvP/dev
small fixes and changes
2024-12-06 08:37:49 +01:00
MichaelDvP
6f759c5bc4 update changelog 2024-12-06 08:37:12 +01:00
MichaelDvP
facbbf1353 fix info command #2274, fix standanlone 2024-12-06 08:33:02 +01:00
MichaelDvP
a218c7a781 Add "duplicate" option to Custom Entities #2266 2024-12-05 19:27:04 +01:00
MichaelDvP
5f42709eab update asyncTCP to threadsafe 3.2.14, ems-esp v3.7.2-dev.4 2024-12-05 12:57:19 +01:00
MichaelDvP
5ec0f657a0 newer CT200 temperatures, #2277 2024-12-05 10:09:26 +01:00
MichaelDvP
812911ffbb version 2.7.2-dev.3 2024-12-04 18:28:40 +01:00
MichaelDvP
55235687ba change modbus timeout to seconds and default 300 sec, #2254 2024-12-04 18:28:13 +01:00
MichaelDvP
a970009d20 update eModbus to 1.7.2, #2254 2024-12-04 18:26:45 +01:00
MichaelDvP
4afc16e2cb modbus command path to api #2276 2024-12-04 18:25:31 +01:00
MichaelDvP
3772d72b43 pkg update 2024-12-03 18:17:42 +01:00
MichaelDvP
607f949638 fix render long numbers, #2267 2024-12-03 12:39:30 +01:00
Proddy
473cf7c8af Merge pull request #2275 from proddy/dev
minor updates
2024-12-02 22:12:29 +01:00
Proddy
e0909df06c Merge branch 'emsesp:dev' into dev 2024-12-02 22:11:40 +01:00
proddy
5fc606ef6d remove duplicate code segment, remove weblog # 2024-12-02 22:10:28 +01:00
proddy
a3032f4da7 update packages 2024-12-02 22:10:11 +01:00
proddy
7fdd65e8ca update dictionary 2024-12-02 22:10:05 +01:00
Proddy
dc6bf883f1 Merge pull request #2270 from mkurek/patch-1
Fix typo in polish ventilation translation
2024-12-02 21:45:16 +01:00
Proddy
ce5edd93b4 Merge pull request #2272 from MichaelDvP/dev
heatingtypes #2268, pretty telegram, service commands #2182
2024-12-02 21:44:23 +01:00
Mateusz Kurek
e36e6bec9c Fix typo in polish ventilation translation
prędjkość -> prędkość
2024-12-01 23:41:41 +01:00
MichaelDvP
c8fd08b6d2 changelog v3.7.2-dev.2 2024-12-01 18:06:35 +01:00
MichaelDvP
c0d693c1c8 add RC35 heatingtypes for remote room control, #2268 2024-12-01 18:06:09 +01:00
MichaelDvP
5d2a6e2898 pretty telegram with operation between src and dst 2024-12-01 17:56:23 +01:00
MichaelDvP
4547a5ceb0 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2024-12-01 17:11:47 +01:00
Proddy
76151c4395 Merge pull request #2265 from proddy/dev
fixes #2264 - tab links broken
2024-11-30 21:29:03 +01:00
proddy
481089b1b4 3.7.2-dev.1 2024-11-30 21:27:59 +01:00
proddy
463787b7f4 fixes #2264 2024-11-30 21:27:34 +01:00
proddy
e2258a1c43 package update 2024-11-30 21:27:22 +01:00
MichaelDvP
5528f29b6a Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2024-11-29 11:00:24 +01:00
MichaelDvP
e3861d54c9 remove command txMode, fix writeable camelCase names 2024-11-29 11:00:04 +01:00
Proddy
3368f2803c Merge pull request #2260 from proddy/dev
3.7.2-dev
2024-11-29 10:33:36 +01:00
proddy
6ca1d68d23 3.7.2-dev 2024-11-29 10:33:12 +01:00
MichaelDvP
cf93081252 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2024-11-28 15:44:39 +01:00
MichaelDvP
30fca2a190 system commands withing command (api/mqtt/console), alternative to #2182 2024-11-28 15:40:42 +01:00
237 changed files with 15486 additions and 14061 deletions

View File

@@ -21,7 +21,7 @@ _Make sure your have performed every step and checked the applicable boxes befor
- [ ] Searched the issue in [issues](https://github.com/emsesp/EMS-ESP32/issues)
- [ ] Searched the issue in [discussions](https://github.com/emsesp/EMS-ESP32/discussions)
- [ ] Searched the issue in the [docs](https://emsesp.org/Troubleshooting/)
- [ ] Searched the issue in the [docs](https://docs.emsesp.org/Troubleshooting/)
- [ ] Searched the issue in the [chat](https://discord.gg/3J3GgnzpyT)
- [ ] Provide the System information in the area below, taken from `http://<IP>/api/system`

View File

@@ -1,7 +1,7 @@
blank_issues_enabled: false
contact_links:
- name: EMS-ESP Docs
url: https://emsesp.org
url: https://docs.emsesp.org
about: All the information related to EMS-ESP.
- name: EMS-ESP Discussions and Support
url: https://github.com/emsesp/EMS-ESP32/discussions

View File

@@ -64,7 +64,29 @@ jobs:
- name: Commit the generated files
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: update generated files for v${{steps.build_info.outputs.VERSION}}"
commit_message: "chore: update generated files"
- name: Configure Git
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
- name: Check for changes and commit
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "Changes detected, committing..."
git add .
git commit -m "Auto-commit build artifacts and configuration updates
- Updated build configurations
- Generated build artifacts
- Version: ${{steps.build_info.outputs.VERSION}}"
echo "Pushing changes to repository..."
git push origin dev
else
echo "No changes to commit"
fi
- name: Create GitHub Release
id: 'automatic_releases'

5
.gitignore vendored
View File

@@ -2,6 +2,7 @@
.vscode/c_cpp_properties.json
.vscode/extensions.json
.vscode/launch.json
.vscode/settings.json
# c++ compiling
.clang_complete
@@ -72,6 +73,4 @@ logs/*
sdkconfig.*
sdkconfig_tasmota_esp32
pnpm-lock.yaml
.cache/
interface/.tsbuildinfo
test/test_api/package-lock.json
package.json

View File

@@ -5,92 +5,6 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [3.8.0]
## Added
- analogsensor types: NTC and RGB-Led
- Flag for HMC310 [#2465](https://github.com/emsesp/EMS-ESP32/issues/2465)
- boiler auxheatersource [#2489](https://github.com/emsesp/EMS-ESP32/discussions/2489)
- thermostat last error for RC100/300 [#2501](https://github.com/emsesp/EMS-ESP32/issues/2501)
- boiler 0xC6 telegram [#1963](https://github.com/emsesp/EMS-ESP32/issues/1963)
- CS6800i changes [#2448](https://github.com/emsesp/EMS-ESP32/issues/2448), [#2449](https://github.com/emsesp/EMS-ESP32/issues/2449)
- charging pump [#2544](https://github.com/emsesp/EMS-ESP32/issues/2544)
- hybrid CSH5800iG [#2569](https://github.com/emsesp/EMS-ESP32/issues/2569)
- added EMS Device details to Home Assistant MQTT Discovery
- disinfection command [#2601](https://github.com/emsesp/EMS-ESP32/issues/2601)
- added new board profile for upcoming BBQKees E32V2.2
- set differential pressure entity in Mixer device
- set set climate action cooling/heating in HA [#2583](https://github.com/emsesp/EMS-ESP32/issues/2583)
- Internal sensors of E32V2_2
- FW200 display options [#2610](https://github.com/emsesp/EMS-ESP32/discussions/2610)
- CR11 mode settings OFF/MANUAL depends on selTemp [#2437](https://github.com/emsesp/EMS-ESP32/issues/2437)
- implemented eFuse settings for BBQKees boards to store model type and ESP chipset
- Analogsensors for pulse output [#2624](https://github.com/emsesp/EMS-ESP32/discussions/2624)
- Analogsensors frequency input [#2631](https://github.com/emsesp/EMS-ESP32/discussions/2631)
- SRC plus thermostats [#2636](https://github.com/emsesp/EMS-ESP32/issues/2636)
- Greenstar 2000 [#2645](https://github.com/emsesp/EMS-ESP32/issues/2645)
- RC3xx `dhw modetype` [#2659](https://github.com/emsesp/EMS-ESP32/discussions/2659)
- new boiler entities VR0,VR1, compressor speed [#2669](https://github.com/emsesp/EMS-ESP32/issues/2669)
- solar temperature TS16 [#2690](https://github.com/emsesp/EMS-ESP32/issues/2690)
- pumpmode enum for HT3 boilers, add commands for manual defrost, chimneysweeper [#2727](https://github.com/emsesp/EMS-ESP32/issues/2727)
- pid settings [#2735](https://github.com/emsesp/EMS-ESP32/issues/2735)
- refresh MQTT button added to MQTT Settings page
- heating assistance, rounding custum settings [#2763](https://github.com/emsesp/EMS-ESP32/discussions/2763)
- added counter 0..2 for short pulses, high frequency [#2758](https://github.com/emsesp/EMS-ESP32/issues/2758)
- added LWT (Last Will and Testament) to MQTT entities in Home Assistant
- added api/metrics endpoint for prometheus integration by @gr3enk [#2774](https://github.com/emsesp/EMS-ESP32/pull/2774)
- added RTL8201 to eth phy list [#2800](https://github.com/emsesp/EMS-ESP32/issues/2800)
- added partitions to Web UI Version page, so previous firmware versions can be installed [#2837](https://github.com/emsesp/EMS-ESP32/issues/2837)
- button pressures show LED. On a long press (10 seconds) the LED flashes for 5 seconds to indicate a factory reset is about to happen. [#2848](https://github.com/emsesp/EMS-ESP32/issues/2848)
- added `txpause` command to pause the TX, by setting Txmode to 0 (disabled) [#2850](https://github.com/emsesp/EMS-ESP32/issues/2850)
## Fixed
- dhw/switchtime [#2490](https://github.com/emsesp/EMS-ESP32/issues/2490)
- switch to secure mqtt [#2492](https://github.com/emsesp/EMS-ESP32/issues/2492)
- update link buttons [#2497](https://github.com/emsesp/EMS-ESP32/issues/2497)
- refresh scheduler states [#2502](https://github.com/emsesp/EMS-ESP32/discussions/2502)
- also rebuild HA config on mqtt connect for scheduler, custom and shower
- FB100 controls the hc, not the master [#2510](https://github.com/emsesp/EMS-ESP32/issues/2510)
- IPM DHW module, [#2524](https://github.com/emsesp/EMS-ESP32/issues/2524)
- charge optimization [#2543](https://github.com/emsesp/EMS-ESP32/issues/2543)
- shower active state retained, shows correctly in HA
- MQTT Command Topic with slashes [#2571](https://github.com/emsesp/EMS-ESP32/issues/2571)
- Add pulsed water meter input to V1.3 gateway with Lilygo S3 [#2550](https://github.com/emsesp/EMS-ESP32/issues/2550)
- fix missing long 10-second press of Button to perform a factory reset
- fix wwMaxPower on Junkers ZBS14 [#2609](https://github.com/emsesp/EMS-ESP32/issues/2609)
- ventilation bypass state from telegram 0x55C [#1197](https://github.com/emsesp/EMS-ESP32/issues/1197)
- set selflowtemp for ems+ boilers [#2641](https://github.com/emsesp/EMS-ESP32/discussions/2641)
- syslog timestamp [#2704](https://github.com/emsesp/EMS-ESP32/issues/2704)
- fixed FS format command [#2720](https://github.com/emsesp/EMS-ESP32/discussions/2720)
- dhw priority setting to boiler and mixer, telegrams 0x2CC, 0x2CD, etc.
- check for valid GPIOs when board profile is changed [#2841](https://github.com/emsesp/EMS-ESP32/issues/2841)
## Changed
- show console log with ISO date/time [#2533](https://github.com/emsesp/EMS-ESP32/discussions/2533)
- removed ESP32 CPU temperature
- updated core libraries like AsyncTCP, AsyncWebServer and Modbus
- remove command `scan deep`
- ignore repeated `forceheatingoff` commands [#2641](https://github.com/emsesp/EMS-ESP32/discussions/2641)
- optimized web for better performance by adding lazy loading and caching
- internal system analog sensors (core_voltage, supply_voltage and gateway_temperature) cannot be accidentally removed
- double click button reconnects EMS-ESP to AP
- place system message command in side scheduler loop to reduce stack memory usage by 2KB
- syslog mark interval set to 1 hour
- handle process_telegram in oneloop
- improved GPIO validation for Analog Sensors and System GPIOs
- entities with no values are greyed out in the Web UI in the Customization page
- added System Status to Web Status page
- show number on entities and supported languages in log on boot
- on tx read fail delay the 3rd. retry 2 sec
- move vectors and lists to PSRAM
- removed unused last topic/payload echo-check
- added Home Assistant device details to MQTT Discovery for all devices
- device_class and state_class changes for HA MQTT Discovery [#2825](https://github.com/emsesp/EMS-ESP32/issues/2825)
## [3.7.2] 22 March 2025
## Added
@@ -171,7 +85,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- The automatically generated temperature sensor ID has replaced dashes (`-`) with underscores (`_`) to be compatible with Home Assistant.
- `api/system/info` has it's JSON key names changed to camelCase syntax.
For more details go to [emsesp.org](https://emsesp.org/).
For more details go to [docs.emsesp.org](https://docs.emsesp.org/).
## Added

View File

@@ -1,3 +1,68 @@
# Changelog
For more details go to [emsesp.org](https://emsesp.org/).
For more details go to [docs.emsesp.org](https://docs.emsesp.org/).
## [3.7.3]
## Added
- analogsensor types: NTC and RGB-Led
- Flag for HMC310 [#2465](https://github.com/emsesp/EMS-ESP32/issues/2465)
- boiler auxheatersource [#2489](https://github.com/emsesp/EMS-ESP32/discussions/2489)
- thermostat last error for RC100/300 [#2501](https://github.com/emsesp/EMS-ESP32/issues/2501)
- boiler 0xC6 telegram [#1963](https://github.com/emsesp/EMS-ESP32/issues/1963)
- CS6800i changes [#2448](https://github.com/emsesp/EMS-ESP32/issues/2448), [#2449](https://github.com/emsesp/EMS-ESP32/issues/2449)
- charging pump [#2544](https://github.com/emsesp/EMS-ESP32/issues/2544)
- hybrid CSH5800iG [#2569](https://github.com/emsesp/EMS-ESP32/issues/2569)
- add EMS Device details to Home Assistant MQTT Discovery
- disinfection command [#2601](https://github.com/emsesp/EMS-ESP32/issues/2601)
- added new board profile for upcoming BBQKees E32V2.2
- set differential pressure entity in Mixer device
- set set climate action cooling/heating in HA [#2583](https://github.com/emsesp/EMS-ESP32/issues/2583)
- Internal sensors of E32V2_2
- FW200 display options [#2610](https://github.com/emsesp/EMS-ESP32/discussions/2610)
- CR11 mode settings OFF/MANUAL depends on selTemp [#2437](https://github.com/emsesp/EMS-ESP32/issues/2437)
- implemented eFuse settings for BBQKees boards to store model type and ESP chipset
- Analogsensors for pulse output [#2624](https://github.com/emsesp/EMS-ESP32/discussions/2624)
- Analogsensors frequency input [#2631](https://github.com/emsesp/EMS-ESP32/discussions/2631)
- SRC plus thermostats [#2636](https://github.com/emsesp/EMS-ESP32/issues/2636)
- Greenstar 2000 [#2645](https://github.com/emsesp/EMS-ESP32/issues/2645)
- RC3xx `dhw modetype` [#2659](https://github.com/emsesp/EMS-ESP32/discussions/2659)
- new boiler entities VR0,VR1, compressor speed [#2669](https://github.com/emsesp/EMS-ESP32/issues/2669)
- solar temperature TS16 [#2690](https://github.com/emsesp/EMS-ESP32/issues/2690)
- pumpmode enum for HT3 boilers, add commands for manual defrost, chimneysweeper [#2727](https://github.com/emsesp/EMS-ESP32/issues/2727)
- pid settings [#2735](https://github.com/emsesp/EMS-ESP32/issues/2735)
## Fixed
- dhw/switchtime [#2490](https://github.com/emsesp/EMS-ESP32/issues/2490)
- switch to secure mqtt [#2492](https://github.com/emsesp/EMS-ESP32/issues/2492)
- update link buttons [#2497](https://github.com/emsesp/EMS-ESP32/issues/2497)
- refresh scheduler states [#2502](https://github.com/emsesp/EMS-ESP32/discussions/2502)
- also rebuild HA config on mqtt connect for scheduler, custom and shower
- FB100 controls the hc, not the master [#2510](https://github.com/emsesp/EMS-ESP32/issues/2510)
- IPM DHW module, [#2524](https://github.com/emsesp/EMS-ESP32/issues/2524)
- charge optimization [#2543](https://github.com/emsesp/EMS-ESP32/issues/2543)
- shower active state retained, shows correctly in HA
- MQTT Command Topic with slashes [#2571](https://github.com/emsesp/EMS-ESP32/issues/2571)
- Add pulsed water meter input to V1.3 gateway with Lilygo S3 [#2550](https://github.com/emsesp/EMS-ESP32/issues/2550)
- fix missing long 10-second press of Button to perform a factory reset
- fix wwMaxPower on Junkers ZBS14 [#2609](https://github.com/emsesp/EMS-ESP32/issues/2609)
- ventilation bypass state from telegram 0x55C [#1197](https://github.com/emsesp/EMS-ESP32/issues/1197)
- set selflowtemp for ems+ boilers [#2641](https://github.com/emsesp/EMS-ESP32/discussions/2641)
- syslog timestamp [#2704](https://github.com/emsesp/EMS-ESP32/issues/2704)
- fixed FS format command [#2720](https://github.com/emsesp/EMS-ESP32/discussions/2720)
- dhw priority setting to boiler and mixer, telegrams 0x2CC, 0x2CD, etc.
## Changed
- show console log with ISO date/time [#2533](https://github.com/emsesp/EMS-ESP32/discussions/2533)
- remove ESP32 CPU temperature
- updated core libraries like AsyncTCP, AsyncWebServer and Modbus
- remove command `scan deep`
- ignore repeated `forceheatingoff` commands [#2641](https://github.com/emsesp/EMS-ESP32/discussions/2641)
- optimized web for better performance by adding lazy loading and caching
- internal system analog sensors (core_voltage, supply_voltage and gateway_temperature) cannot be accidentally removed
- double click button reconnects EMS-ESP to AP
- place system message command in side scheduler loop to reduce stack memory usage by 2KB
- syslog mark interval set to 1 hour

View File

@@ -6,7 +6,7 @@ Everybody is welcome and invited to contribute to the EMS-ESP Project by:
- providing Pull Requests (Features, Fixes, suggestions)
- testing new released features and report issues on your EMS equipment
- contributing to missing [documentation](https://emsesp.org)
- contributing to missing [documentation](https://docs.emsesp.org)
This document describes rules that are in effect for this repository, meant for handling issues by contributors in the issue tracker and PRs.

View File

@@ -21,14 +21,13 @@ endif
# Optimize parallel build configuration
UNAME_S := $(shell uname -s)
JOBS ?= 1
ifeq ($(UNAME_S),Linux)
EXTRA_CPPFLAGS = -D LINUX
JOBS := $(shell nproc)
JOBS ?= $(shell nproc)
endif
ifeq ($(UNAME_S),Darwin)
EXTRA_CPPFLAGS = -D OSX -Wno-tautological-constant-out-of-range-compare
JOBS := $(shell sysctl -n hw.ncpu)
JOBS ?= $(shell sysctl -n hw.ncpu)
endif
# Set optimal parallel build settings
@@ -47,8 +46,8 @@ MAKEFLAGS += -j$(JOBS) -l$(shell echo $$(($(JOBS) * 2)))
#----------------------------------------------------------------------
TARGET := emsesp
BUILD := build
SOURCES := src/core src/devices src/web src/test lib_standalone lib/semver lib/espMqttClient/src lib/espMqttClient/src/* lib/ArduinoJson/src lib/uuid-common/src lib/uuid-console/src lib/uuid-log/src lib/PButton
INCLUDES := src/core src/devices src/web src/test lib_standalone lib/* lib/semver lib/espMqttClient/src lib/espMqttClient/src/Transport lib/ArduinoJson/src lib/uuid-common/src lib/uuid-console/src lib/uuid-log/src lib/uuid-telnet/src lib/uuid-syslog/src
SOURCES := src/core src/devices src/web src/test lib_standalone lib/semver lib/espMqttClient/src lib/espMqttClient/src/* lib/ArduinoJson/src lib/uuid-common/src lib/uuid-console/src lib/uuid-log/src lib/PButton
INCLUDES := src/core src/devices src/web src/test lib/* lib_standalone lib/semver lib/espMqttClient/src lib/espMqttClient/src/Transport lib/ArduinoJson/src lib/uuid-common/src lib/uuid-console/src lib/uuid-log/src lib/uuid-telnet/src lib/uuid-syslog/src
LIBRARIES :=
CPPCHECK = cppcheck
@@ -67,7 +66,7 @@ DEFINES += -DARDUINOJSON_ENABLE -DARDUINOJSON_ENABLE_ARDUINO_STRING -DARDUINOJSO
DEFINES += -DEMSESP_STANDALONE -DEMSESP_TEST -DEMSESP_DEBUG -DEMC_RX_BUFFER_SIZE=1500
DEFINES += $(ARGS)
DEFAULTS = -DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.8.0-dev.0\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32S3\"
DEFAULTS = -DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.7.3-dev\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32S3\"
#----------------------------------------------------------------------
# Sources & Files
@@ -138,7 +137,6 @@ DEPFLAGS += -MF $(BUILD)/$*.d -MT $@
LINK.o = $(LD) $(LDFLAGS) $(LDLIBS) $^ -o $@
COMPILE.c = $(CC) $(C_STANDARD) $(CFLAGS) $(DEPFLAGS) -c $< -o $@
COMPILE.cpp = $(CXX) $(CXX_STANDARD) $(CXXFLAGS) $(DEPFLAGS) -c $< -o $@
COMPILE.s = $(CC) $(CFLAGS) $(DEPFLAGS) -c $< -o $@
#----------------------------------------------------------------------
# Special Built-in Target
@@ -182,7 +180,6 @@ $(BUILD)/%.o: %.cpp
$(BUILD)/%.o: %.s
@mkdir -p $(@D)
@$(ECHO) Compiling $@
@$(COMPILE.s)
cppcheck: $(SOURCES)

View File

@@ -15,7 +15,7 @@
<a href="https://github.com/emsesp/EMS-ESP32/blob/dev/CONTRIBUTING.md">
<img src="https://img.shields.io/badge/Contribute-ff4785?style=for-the-badge&logo=git&logoColor=white" alt="Contribute" />
</a>
<a href="https://emsesp.org">
<a href="https://docs.emsesp.org">
<img src="https://img.shields.io/badge/Documentation-0077b5?style=for-the-badge&logo=googledocs&logoColor=white" alt="Guides" />
</a>
<a href="https://discord.gg/3J3GgnzpyT">
@@ -60,17 +60,17 @@ It requires a small circuit to interface with the EMS bus which can be purchased
## 🚀&nbsp; **Installing**
Head over to the [Installation Guide](https://emsesp.org/Installing) section of the documentation for instructions on how to install EMS-ESP.
Head over to [download.emsesp.org](https://download.emsesp.org) for instructions on how to install EMS-ESP. There is also further details on which boards are supported in [this section](https://docs.emsesp.org/Installing/) of the documentation.
## 📋&nbsp; **Documentation**
Visit [emsesp.org](https://emsesp.org) for more details on how to install and configure EMS-ESP. There is also a collection of Frequently Asked Questions and Troubleshooting tips with example customizations from the community.
Visit [emsesp.org](https://docs.emsesp.org) for more details on how to install and configure EMS-ESP. There is also a collection of Frequently Asked Questions and Troubleshooting tips with example customizations from the community.
## 💬&nbsp; **Getting Support**
To chat with the community reach out on our [Discord Server](https://discord.gg/3J3GgnzpyT).
If you find an issue or have a request, see [how to request support](https://emsesp.org/Support/) on how to submit a bug report or feature request.
If you find an issue or have a request, see [how to request support](https://docs.emsesp.org/Support/) on how to submit a bug report or feature request.
## 🎥&nbsp; **Live Demo**

View File

@@ -25,7 +25,7 @@
"upload": {
"flash_size": "32MB",
"maximum_ram_size": 327680,
"maximum_size": 33554432,
"maximum_size": 16777216,
"require_upload_port": true,
"speed": 460800
},

View File

@@ -34,7 +34,6 @@
"sdkconfig.*",
"managed_components/**",
"pnpm-*.yaml",
"vite.config.ts",
"lib/esp32-psram/**"
"vite.config.ts"
]
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "EMS-ESP",
"version": "3.8.0",
"version": "3.7.3",
"description": "EMS-ESP WebUI",
"homepage": "https://emsesp.org",
"author": "proddy, emsesp.org",
@@ -17,55 +17,55 @@
"preview-standalone": "typesafe-i18n --no-watch && vite build && concurrently -c \"auto\" \"pnpm:mock-rest\" \"vite preview\"",
"standalone": "concurrently -c \"auto\" \"typesafe-i18n\" \"pnpm:mock-rest\" \"vite dev\"",
"typesafe-i18n": "typesafe-i18n --no-watch",
"build_webUI": "typesafe-i18n --no-watch && vite build && node progmem-generator.js",
"webUI": "vite build && node progmem-generator.js",
"format": "prettier -l -w '**/*.{ts,tsx,js,css,json,md}'",
"lint": "eslint . --fix",
"standalone-devcontainer": "concurrently -c \"auto\" \"typesafe-i18n\" \"pnpm:mock-rest\" \"vite --host\""
},
"dependencies": {
"@alova/adapter-xhr": "2.3.1",
"@alova/adapter-xhr": "2.2.1",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.1",
"@mui/icons-material": "^7.3.6",
"@mui/material": "^7.3.6",
"@mui/icons-material": "^7.3.5",
"@mui/material": "^7.3.5",
"@preact/compat": "^18.3.1",
"@table-library/react-table-library": "4.1.15",
"alova": "3.4.1",
"alova": "3.3.4",
"async-validator": "^4.2.5",
"etag": "^1.8.1",
"formidable": "^3.5.4",
"jwt-decode": "^4.0.0",
"magic-string": "^0.30.21",
"mime-types": "^3.0.2",
"preact": "^10.28.1",
"react": "^19.2.3",
"react-dom": "^19.2.3",
"mime-types": "^3.0.1",
"preact": "^10.27.2",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"react-icons": "^5.5.0",
"react-router": "^7.11.0",
"react-router": "^7.9.5",
"react-toastify": "^11.0.5",
"typesafe-i18n": "^5.26.2",
"typescript": "^5.9.3"
},
"devDependencies": {
"@babel/core": "^7.28.5",
"@eslint/js": "^9.39.2",
"@eslint/js": "^9.39.1",
"@preact/compat": "^18.3.1",
"@preact/preset-vite": "^2.10.2",
"@trivago/prettier-plugin-sort-imports": "^6.0.0",
"@types/node": "^25.0.3",
"@types/react": "^19.2.7",
"@types/node": "^24.10.1",
"@types/react": "^19.2.4",
"@types/react-dom": "^19.2.3",
"axe-core": "^4.11.0",
"concurrently": "^9.2.1",
"eslint": "^9.39.2",
"eslint": "^9.39.1",
"eslint-config-prettier": "^10.1.8",
"prettier": "^3.7.4",
"prettier": "^3.6.2",
"rollup-plugin-visualizer": "^6.0.5",
"terser": "^5.44.1",
"typescript-eslint": "^8.51.0",
"vite": "^7.3.0",
"typescript-eslint": "^8.46.4",
"vite": "^7.2.2",
"vite-plugin-imagemin": "^0.6.1",
"vite-tsconfig-paths": "^6.0.3"
"vite-tsconfig-paths": "^5.1.4"
},
"packageManager": "pnpm@10.27.0+sha512.72d699da16b1179c14ba9e64dc71c9a40988cbdc65c264cb0e489db7de917f20dcf4d64d8723625f2969ba52d4b7e2a1170682d9ac2a5dcaeaab732b7e16f04a"
"packageManager": "pnpm@10.22.0+sha512.bf049efe995b28f527fd2b41ae0474ce29186f7edcb3bf545087bd61fbbebb2bf75362d1307fda09c2d288e1e499787ac12d4fcb617a974718a6051f2eee741c"
}

6091
interface/pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -8,6 +8,7 @@ import type { Locales } from 'i18n/i18n-types';
import { loadLocaleAsync } from 'i18n/i18n-util.async';
import { detectLocale, navigatorDetector } from 'typesafe-i18n/detectors';
// Memoize available locales to prevent recreation on every render
const AVAILABLE_LOCALES = [
'de',
'en',

View File

@@ -11,15 +11,17 @@ import { createTheme } from '@mui/material/styles';
import type { RequiredChildrenProps } from 'utils';
// Memoize dialog style to prevent recreation
export const dialogStyle = {
'& .MuiDialog-paper': {
borderRadius: '8px',
borderColor: '#565656',
borderStyle: 'solid',
borderWidth: '2px'
borderWidth: '1px'
}
} as const;
// Memoize theme creation to prevent recreation
const theme = responsiveFontSizes(
createTheme({
typography: {

View File

@@ -1,4 +1,4 @@
import { memo, useCallback, useContext, useEffect, useMemo, useState } from 'react';
import { memo, useCallback, useContext, useMemo, useState } from 'react';
import { toast } from 'react-toastify';
import ForwardIcon from '@mui/icons-material/Forward';
@@ -81,15 +81,6 @@ const SignIn = memo(() => {
// Memoize callback to prevent recreation on every render
const submitOnEnter = useMemo(() => onEnterCallback(signIn), [signIn]);
// get rid of scrollbar
useEffect(() => {
const originalOverflow = document.body.style.overflow;
document.body.style.overflow = 'hidden';
return () => {
document.body.style.overflow = originalOverflow;
};
}, []);
return (
<Box
display="flex"
@@ -111,27 +102,23 @@ const SignIn = memo(() => {
width: '100%'
})}
>
<Typography mb={1} variant="h4">
{PROJECT_NAME}
</Typography>
<Typography variant="h4">{PROJECT_NAME}</Typography>
<LanguageSelector />
<Box
mt={1}
display="flex"
flexDirection="column"
gap={1}
alignItems="center"
>
<Box display="flex" flexDirection="column" alignItems="center">
<ValidatedTextField
fieldErrors={fieldErrors || {}}
disabled={processing}
sx={{
width: '32ch'
width: 240
}}
name="username"
label={LL.USERNAME(0)}
value={signInRequest.username}
onChange={updateLoginRequestValue}
margin="normal"
variant="outlined"
slotProps={{
input: {
autoCapitalize: 'none',
@@ -143,13 +130,14 @@ const SignIn = memo(() => {
fieldErrors={fieldErrors || {}}
disabled={processing}
sx={{
width: '32ch'
width: 240
}}
name="password"
label={LL.PASSWORD()}
value={signInRequest.password}
onChange={updateLoginRequestValue}
onKeyDown={submitOnEnter}
variant="outlined"
/>
</Box>

View File

@@ -285,17 +285,13 @@ const Customizations = () => {
return value as string;
}
const isCommand = useCallback((de: DeviceEntity) => {
return de.n && de.n[0] === '!';
}, []);
const formatName = useCallback(
(de: DeviceEntity, withShortname: boolean) => {
let name: string;
if (isCommand(de)) {
if (de.n && de.n[0] === '!') {
name = de.t
? `${LL.COMMAND(1)}: ${de.t} ${de.n?.slice(1)}`
: `${LL.COMMAND(1)}: ${de.n?.slice(1)}`;
? `${LL.COMMAND(1)}: ${de.t} ${de.n.slice(1)}`
: `${LL.COMMAND(1)}: ${de.n.slice(1)}`;
} else if (de.cn && de.cn !== '') {
name = de.t ? `${de.t} ${de.cn}` : de.cn;
} else {
@@ -547,7 +543,7 @@ const Customizations = () => {
return (
<>
<Box color="warning.main">
<Typography variant="body2" mt={1} mb={1}>
<Typography variant="body2" mt={1}>
<OptionIcon type="favorite" isSet={true} />={LL.CUSTOMIZATIONS_HELP_2()}
&nbsp;&nbsp;
<OptionIcon type="readonly" isSet={true} />={LL.CUSTOMIZATIONS_HELP_3()}
@@ -670,27 +666,14 @@ const Customizations = () => {
<EntityMaskToggle onUpdate={updateDeviceEntity} de={de} />
</Cell>
<Cell>
<span
style={{
color:
de.v === undefined && !isCommand(de) ? 'grey' : 'inherit'
}}
{formatName(de, false)}&nbsp;(
<Link
target="_blank"
href={APIURL + selectedDeviceTypeNameURL + '/' + de.id}
>
{formatName(de, false)}&nbsp;(
<Link
style={{
color:
de.v === undefined && !isCommand(de)
? 'grey'
: 'primary'
}}
target="_blank"
href={APIURL + selectedDeviceTypeNameURL + '/' + de.id}
>
{de.id}
</Link>
)
</span>
{de.id}
</Link>
)
</Cell>
<Cell>
{!(de.m & DeviceEntityMask.DV_READONLY) && formatValue(de.mi)}
@@ -743,9 +726,8 @@ const Customizations = () => {
{devices && renderDeviceList()}
{selectedDevice !== -1 && !rename && renderDeviceData()}
{restartNeeded ? (
<MessageBox level="warning" message={LL.RESTART_TEXT(0)}>
<MessageBox my={2} level="warning" message={LL.RESTART_TEXT(0)}>
<Button
sx={{ ml: 2 }}
startIcon={<PowerSettingsNewIcon />}
variant="contained"
color="error"

View File

@@ -263,7 +263,7 @@ const Dashboard = memo(() => {
return (
<>
{!data.connected && (
<MessageBox level="error" message={LL.EMS_BUS_WARNING()} />
<MessageBox mb={2} level="error" message={LL.EMS_BUS_WARNING()} />
)}
{data.connected && data.nodes.length > 0 && !hasFavEntities && (

View File

@@ -533,17 +533,19 @@ const Devices = memo(() => {
const renderCoreData = () => (
<>
{!coreData.connected ? (
<MessageBox level="error" message={LL.EMS_BUS_WARNING()} />
) : (
<Box justifyContent="center" flexDirection="column">
<IconContext.Provider
value={{
color: 'lightblue',
size: '18',
style: { verticalAlign: 'middle' }
}}
>
<Box justifyContent="center" flexDirection="column">
<IconContext.Provider
value={{
color: 'lightblue',
size: '18',
style: { verticalAlign: 'middle' }
}}
>
{!coreData.connected && (
<MessageBox my={2} level="error" message={LL.EMS_BUS_WARNING()} />
)}
{coreData.connected && (
<Table
data={{ nodes: [...coreData.devices] }}
select={device_select}
@@ -579,9 +581,9 @@ const Devices = memo(() => {
</>
)}
</Table>
</IconContext.Provider>
</Box>
)}
)}
</IconContext.Provider>
</Box>
</>
);

View File

@@ -42,7 +42,8 @@ interface CustomSupport {
html: string | null;
}
const DEFAULT_IMAGE_URL = 'https://emsesp.org/_media/images/installer.jpeg';
// Constants moved outside component to prevent recreation
const DEFAULT_IMAGE_URL = 'https://docs.emsesp.org/_media/images/installer.jpeg';
const SUPPORT_BOX_STYLES: SxProps<Theme> = {
borderRadius: 3,
@@ -115,7 +116,7 @@ const HelpComponent = () => {
const helpLinks: HelpLink[] = useMemo(
() => [
{
href: 'https://emsesp.org',
href: 'https://docs.emsesp.org',
icon: <MenuBookIcon />,
label: () => LL.HELP_INFORMATION_1()
},

View File

@@ -1,4 +1,4 @@
import { useCallback, useContext, useMemo, useRef, useState } from 'react';
import { useCallback, useContext, useMemo, useState } from 'react';
import { toast } from 'react-toastify';
import AddCircleOutlineOutlinedIcon from '@mui/icons-material/AddCircleOutlineOutlined';
@@ -54,6 +54,7 @@ const MS_PER_SECOND = 1000;
const MS_PER_MINUTE = 60 * MS_PER_SECOND;
const MS_PER_HOUR = 60 * MS_PER_MINUTE;
const MS_PER_DAY = 24 * MS_PER_HOUR;
const DEFAULT_GPIO = 21; // Safe GPIO for all platforms
const MIN_TEMP_ID = -100;
const MAX_TEMP_ID = 100;
const GPIO_25 = 25;
@@ -127,21 +128,14 @@ const Sensors = () => {
const [temperatureDialogOpen, setTemperatureDialogOpen] = useState<boolean>(false);
const [analogDialogOpen, setAnalogDialogOpen] = useState<boolean>(false);
const [creating, setCreating] = useState<boolean>(false);
const firstAvailableGPIO = useRef<number>(undefined);
const { data: sensorData, send: fetchSensorData } = useRequest(readSensorData, {
initialData: {
ts: [],
as: [],
analog_enabled: false,
available_gpios: [] as number[],
platform: 'ESP32'
}
}).onSuccess((event) => {
// store the first available GPIO in a ref
if (event.data.available_gpios.length > 0) {
firstAvailableGPIO.current = event.data.available_gpios[0];
}
});
const { send: sendTemperatureSensor } = useRequest(
@@ -191,14 +185,10 @@ const Sensors = () => {
sortToggleType: SortToggleType.AlternateWithReset,
sortFns: {
GPIO: (array) =>
[...array].sort(
(a, b) => ((a as AnalogSensor)?.g ?? 0) - ((b as AnalogSensor)?.g ?? 0)
),
[...array].sort((a, b) => (a as AnalogSensor).g - (b as AnalogSensor).g),
NAME: (array) =>
[...array].sort((a, b) =>
((a as AnalogSensor)?.n ?? '').localeCompare(
(b as AnalogSensor)?.n ?? ''
)
(a as AnalogSensor).n.localeCompare((b as AnalogSensor).n)
),
TYPE: (array) =>
[...array].sort((a, b) => (a as AnalogSensor).t - (b as AnalogSensor).t),
@@ -347,23 +337,19 @@ const Sensors = () => {
}, [fetchSensorData]);
const addAnalogSensor = useCallback(() => {
if (firstAvailableGPIO.current === undefined) {
toast.error('No available GPIO found');
return;
}
setCreating(true);
setSelectedAnalogSensor({
id: Math.floor(Math.random() * (MAX_TEMP_ID - MIN_TEMP_ID) + MIN_TEMP_ID),
n: '',
g: firstAvailableGPIO.current,
u: DeviceValueUOM.NONE,
g: DEFAULT_GPIO,
u: 0,
v: 0,
o: 0,
t: 0,
f: 1,
t: AnalogType.DIGITAL_IN, // default to digital in 1
d: false,
s: false,
o_n: ''
o_n: '',
s: false
});
setAnalogDialogOpen(true);
}, []);
@@ -462,7 +448,7 @@ const Sensors = () => {
>
<Cell stiff>{as.g}</Cell>
<Cell>{as.n}</Cell>
<Cell stiff>{AnalogTypeNames[as.t - 1]} </Cell>
<Cell stiff>{AnalogTypeNames[as.t]} </Cell>
{(as.t === AnalogType.DIGITAL_OUT &&
as.g !== GPIO_25 &&
as.g !== GPIO_26) ||
@@ -470,7 +456,9 @@ const Sensors = () => {
as.t === AnalogType.PULSE ? (
<Cell stiff>{as.v ? LL.ON() : LL.OFF()}</Cell>
) : (
<Cell stiff>{formatValue(as.v, as.u)}</Cell>
<Cell stiff>
{as.t !== AnalogType.NOTUSED ? formatValue(as.v, as.u) : ''}
</Cell>
)}
</Row>
))}
@@ -585,9 +573,12 @@ const Sensors = () => {
onSave={onAnalogDialogSave}
creating={creating}
selectedItem={selectedAnalogSensor}
analogGPIOList={sensorData.available_gpios}
disabledTypeList={sensorData.exclude_types}
validator={analogSensorItemValidation(sensorData.as, selectedAnalogSensor)}
validator={analogSensorItemValidation(
sensorData.as,
selectedAnalogSensor,
creating,
sensorData.platform
)}
/>
)}
{sensorData?.analog_enabled === true && me.admin && (

View File

@@ -14,6 +14,7 @@ import {
Grid,
InputAdornment,
MenuItem,
TextField,
Typography
} from '@mui/material';
@@ -34,8 +35,6 @@ interface DashboardSensorsAnalogDialogProps {
onSave: (as: AnalogSensor) => void;
creating: boolean;
selectedItem: AnalogSensor;
analogGPIOList: number[];
disabledTypeList: number[];
validator: Schema;
}
@@ -45,8 +44,6 @@ const SensorsAnalogDialog = ({
onSave,
creating,
selectedItem,
analogGPIOList,
disabledTypeList,
validator
}: DashboardSensorsAnalogDialogProps) => {
const { LL } = useI18nContext();
@@ -68,16 +65,7 @@ const SensorsAnalogDialog = ({
// Memoize helper functions to check sensor type conditions
const isCounterOrRate = useMemo(
() =>
editItem.t === AnalogType.COUNTER ||
editItem.t === AnalogType.RATE ||
(editItem.t >= AnalogType.CNT_0 && editItem.t <= AnalogType.CNT_2),
[editItem.t]
);
const isCounter = useMemo(
() =>
editItem.t === AnalogType.COUNTER ||
(editItem.t >= AnalogType.CNT_0 && editItem.t <= AnalogType.CNT_2),
() => editItem.t >= AnalogType.COUNTER && editItem.t <= AnalogType.RATE,
[editItem.t]
);
const isFreqType = useMemo(
@@ -91,13 +79,13 @@ const SensorsAnalogDialog = ({
editItem.t === AnalogType.PWM_2,
[editItem.t]
);
const isDACOutGPIO = useMemo(
const isDigitalOutGPIO = useMemo(
() =>
editItem.t === AnalogType.DIGITAL_OUT &&
(editItem.g === 25 || editItem.g === 26),
[editItem.t, editItem.g]
);
const isDigitalOutGPIO = useMemo(
const isDigitalOutNonGPIO = useMemo(
() =>
editItem.t === AnalogType.DIGITAL_OUT &&
editItem.g !== 25 &&
@@ -108,18 +96,12 @@ const SensorsAnalogDialog = ({
// Memoize menu items to avoid recreation on each render
const analogTypeMenuItems = useMemo(
() =>
AnalogTypeNames.map((val, i) => ({ name: val, value: i + 1 }))
.sort((a, b) => a.name.localeCompare(b.name))
.map(({ name, value }) => (
<MenuItem
key={name}
value={value}
disabled={disabledTypeList?.includes(value)}
>
{name}
</MenuItem>
)),
[disabledTypeList]
AnalogTypeNames.map((val, i) => (
<MenuItem key={val} value={i}>
{val}
</MenuItem>
)),
[]
);
const uomMenuItems = useMemo(
@@ -132,23 +114,6 @@ const SensorsAnalogDialog = ({
[]
);
const analogGPIOMenuItems = () =>
// add selectedItem.g to the list
[
...(analogGPIOList?.includes(selectedItem.g) || selectedItem.g === undefined
? analogGPIOList
: [selectedItem.g, ...analogGPIOList])
]
.filter((gpio, idx, arr) => arr.indexOf(gpio) === idx)
.sort((a, b) => a - b)
.map((gpio: number) => {
return (
<MenuItem key={gpio} value={gpio}>
{gpio}
</MenuItem>
);
});
// Reset form when dialog opens or selectedItem changes
useEffect(() => {
if (open) {
@@ -191,67 +156,72 @@ const SensorsAnalogDialog = ({
<DialogTitle>{dialogTitle}</DialogTitle>
<DialogContent dividers>
<Grid container spacing={2}>
<ValidatedTextField
name="g"
label="GPIO"
value={editItem.g}
sx={{ width: '9ch' }}
disabled={editItem.s || !creating}
select
onChange={updateFormValue}
>
{analogGPIOMenuItems()}
</ValidatedTextField>
<Grid>
<ValidatedTextField
fieldErrors={fieldErrors || {}}
name="g"
label="GPIO"
sx={{ width: '11ch' }}
value={numberValue(editItem.g)}
type="number"
variant="outlined"
onChange={updateFormValue}
/>
</Grid>
{creating && (
<Grid>
<Box color="warning.main" mt={2}>
<Typography variant="body2">{LL.WARN_GPIO()}</Typography>
</Box>
</Grid>
)}
<Grid>
<ValidatedTextField
fieldErrors={fieldErrors || {}}
name="n"
label={LL.NAME(0)}
value={editItem.n}
fullWidth
variant="outlined"
onChange={updateFormValue}
/>
</Grid>
<Grid>
<ValidatedTextField
<TextField
name="t"
label={LL.TYPE(0)}
value={editItem.t}
fullWidth
select
onChange={updateFormValue}
disabled={editItem.s}
>
{analogTypeMenuItems}
</ValidatedTextField>
</TextField>
</Grid>
{(isCounterOrRate ||
isFreqType ||
editItem.t === AnalogType.ADC ||
editItem.t === AnalogType.TIMER) && (
{(isCounterOrRate || isFreqType) && (
<Grid>
<ValidatedTextField
<TextField
name="u"
label={LL.UNIT()}
value={editItem.u}
sx={{ width: '15ch' }}
select
onChange={updateFormValue}
disabled={editItem.s}
>
{uomMenuItems}
</ValidatedTextField>
</TextField>
</Grid>
)}
{editItem.t === AnalogType.ADC && (
<Grid>
<ValidatedTextField
<TextField
name="o"
label={LL.OFFSET()}
value={numberValue(editItem.o)}
type="number"
sx={{ width: '11ch' }}
variant="outlined"
onChange={updateFormValue}
disabled={editItem.s}
slotProps={{
input: {
startAdornment: (
@@ -265,14 +235,14 @@ const SensorsAnalogDialog = ({
)}
{editItem.t === AnalogType.NTC && (
<Grid>
<ValidatedTextField
<TextField
name="o"
label={LL.OFFSET()}
value={numberValue(editItem.o)}
sx={{ width: '11ch' }}
type="number"
variant="outlined"
onChange={updateFormValue}
disabled={editItem.s}
slotProps={{
input: {
startAdornment: (
@@ -284,16 +254,16 @@ const SensorsAnalogDialog = ({
/>
</Grid>
)}
{isCounter && (
{editItem.t === AnalogType.COUNTER && (
<Grid>
<ValidatedTextField
<TextField
name="o"
label={LL.STARTVALUE()}
value={numberValue(editItem.o)}
type="number"
sx={{ width: '11ch' }}
variant="outlined"
onChange={updateFormValue}
disabled={editItem.s}
slotProps={{
htmlInput: { step: '0.001' }
}}
@@ -302,90 +272,85 @@ const SensorsAnalogDialog = ({
)}
{editItem.t === AnalogType.RGB && (
<Grid>
<ValidatedTextField
<TextField
name="o"
label={'RGB ' + LL.VALUE(0)}
value={numberValue(editItem.o)}
type="number"
sx={{ width: '11ch' }}
variant="outlined"
onChange={updateFormValue}
disabled={editItem.s}
/>
</Grid>
)}
{(isCounterOrRate ||
isFreqType ||
editItem.t === AnalogType.ADC ||
editItem.t === AnalogType.TIMER) && (
{isCounterOrRate && (
<Grid>
<ValidatedTextField
<TextField
name="f"
label={LL.FACTOR()}
value={numberValue(editItem.f)}
sx={{ width: '14ch' }}
type="number"
variant="outlined"
onChange={updateFormValue}
disabled={editItem.s}
slotProps={{
htmlInput: { step: '0.001' }
}}
/>
</Grid>
)}
{isDACOutGPIO && (
{isDigitalOutGPIO && (
<Grid>
<ValidatedTextField
<TextField
name="o"
label={LL.VALUE(0)}
value={numberValue(editItem.o)}
sx={{ width: '11ch' }}
type="number"
variant="outlined"
onChange={updateFormValue}
disabled={editItem.s}
slotProps={{
htmlInput: { min: '0', max: '255', step: '1' }
}}
/>
</Grid>
)}
{isDigitalOutGPIO && (
{isDigitalOutNonGPIO && (
<>
<Grid>
<ValidatedTextField
<TextField
name="o"
label={LL.VALUE(0)}
value={numberValue(editItem.o)}
select
variant="outlined"
onChange={updateFormValue}
disabled={editItem.s}
>
<MenuItem value={0}>{LL.OFF()}</MenuItem>
<MenuItem value={1}>{LL.ON()}</MenuItem>
</ValidatedTextField>
</TextField>
</Grid>
<Grid>
<ValidatedTextField
<TextField
name="f"
label={LL.POLARITY()}
value={editItem.f}
sx={{ width: '15ch' }}
select
onChange={updateFormValue}
disabled={editItem.s}
>
<MenuItem value={1}>{LL.ACTIVEHIGH()}</MenuItem>
<MenuItem value={-1}>{LL.ACTIVELOW()}</MenuItem>
</ValidatedTextField>
</TextField>
</Grid>
<Grid>
<ValidatedTextField
<TextField
name="u"
label={LL.STARTVALUE()}
sx={{ width: '15ch' }}
value={editItem.u}
select
onChange={updateFormValue}
disabled={editItem.s}
>
<MenuItem value={0}>{LL.UNCHANGED()}</MenuItem>
<MenuItem value={1}>
@@ -394,21 +359,21 @@ const SensorsAnalogDialog = ({
<MenuItem value={2}>
{LL.ALWAYS()}&nbsp;{LL.ON()}
</MenuItem>
</ValidatedTextField>
</TextField>
</Grid>
</>
)}
{isPWM && (
<>
<Grid>
<ValidatedTextField
<TextField
name="f"
label={LL.FREQ()}
value={numberValue(editItem.f)}
type="number"
variant="outlined"
sx={{ width: '11ch' }}
onChange={updateFormValue}
disabled={editItem.s}
slotProps={{
input: {
startAdornment: (
@@ -420,14 +385,14 @@ const SensorsAnalogDialog = ({
/>
</Grid>
<Grid>
<ValidatedTextField
<TextField
name="o"
label={LL.DUTY_CYCLE()}
value={numberValue(editItem.o)}
type="number"
sx={{ width: '11ch' }}
variant="outlined"
onChange={updateFormValue}
disabled={editItem.s}
slotProps={{
input: {
startAdornment: (
@@ -443,28 +408,27 @@ const SensorsAnalogDialog = ({
{editItem.t === AnalogType.PULSE && (
<>
<Grid>
<ValidatedTextField
<TextField
name="o"
label={LL.POLARITY()}
value={editItem.o}
sx={{ width: '11ch' }}
select
onChange={updateFormValue}
disabled={editItem.s}
>
<MenuItem value={0}>{LL.ACTIVEHIGH()}</MenuItem>
<MenuItem value={1}>{LL.ACTIVELOW()}</MenuItem>
</ValidatedTextField>
</TextField>
</Grid>
<Grid>
<ValidatedTextField
<TextField
name="f"
label="Pulse"
value={numberValue(editItem.f)}
type="number"
sx={{ width: '15ch' }}
variant="outlined"
onChange={updateFormValue}
disabled={editItem.s}
slotProps={{
input: {
startAdornment: (
@@ -478,24 +442,6 @@ const SensorsAnalogDialog = ({
</>
)}
</Grid>
{fieldErrors && Object.keys(fieldErrors).length > 0 && (
<Box mt={1}>
{Object.values(fieldErrors).map((errArr, idx) =>
Array.isArray(errArr)
? errArr.map((err, j) => (
<Typography
key={`${idx}-${j}`}
color="error"
variant="caption"
display="block"
>
{err.message}
</Typography>
))
: null
)}
</Box>
)}
{editItem.s && (
<Grid>
<Typography mt={1} color="warning.main" variant="body2">

View File

@@ -89,15 +89,15 @@ export interface TemperatureSensor {
export interface AnalogSensor {
id: number;
g: number; // GPIO
n: string; // name
v: number; // value
u: number; // uom
o: number; // offset
f: number; // factor
t: number; // type
n: string;
v: number;
u: number;
o: number;
f: number;
t: number;
d: boolean; // deleted flag
s: boolean; // system sensor flag
o_n?: string; // original name
o_n?: string;
}
export interface WriteTemperatureSensor {
@@ -111,8 +111,6 @@ export interface SensorData {
ts: TemperatureSensor[];
as: AnalogSensor[];
analog_enabled: boolean;
available_gpios: number[];
exclude_types: number[];
platform: string;
}
@@ -202,7 +200,7 @@ export enum DeviceValueUOM {
export const DeviceValueUOM_s = [
'',
'°C',
'°C Rel',
'°C',
'%',
'l/min',
'kWh',
@@ -232,6 +230,7 @@ export const DeviceValueUOM_s = [
export enum AnalogType {
REMOVED = -1,
NOTUSED = 0,
DIGITAL_IN = 1,
COUNTER = 2,
ADC = 3,
@@ -246,31 +245,26 @@ export enum AnalogType {
PULSE = 12,
FREQ_0 = 13,
FREQ_1 = 14,
FREQ_2 = 15,
CNT_0 = 16,
CNT_1 = 17,
CNT_2 = 18
FREQ_2 = 15
}
export const AnalogTypeNames = [
'Digital In', // 1
'Counter', // 2
'ADC In', // 3
'Timer', // 4
'Rate', // 5
'Digital Out', // 6
'PWM 0', // 7
'PWM 1', // 8
'PWM 2', // 9
'NTC Temp', // 10
'RGB Led', // 11
'Pulse', // 12
'Freq 0', // 13
'Freq 1', // 14
'Freq 2', // 15
'Counter 0', // 16
'Counter 1', // 17
'Counter 2' // 18
'(disabled)',
'Digital In',
'Counter',
'ADC In',
'Timer',
'Rate',
'Digital Out',
'PWM 0',
'PWM 1',
'PWM 2',
'NTC Temp.',
'RGB Led',
'Pulse',
'Freq 0',
'Freq 1',
'Freq 2'
] as const;
export const BOARD_PROFILES = {

View File

@@ -45,15 +45,121 @@ const VALIDATION_LIMITS = {
HEX_BASE: 16
} as const;
// Helper to create GPIO validator from invalid ranges
const createGPIOValidator = (
invalidRanges: Array<number | [number, number]>,
maxValue: number
) => ({
validator(
_rule: InternalRuleItem,
value: number,
callback: (error?: string) => void
) {
if (!value) {
callback();
return;
}
if (value < 0 || value > maxValue) {
callback(ERROR_MESSAGES.GPIO_INVALID);
return;
}
for (const range of invalidRanges) {
if (typeof range === 'number') {
if (value === range) {
callback(ERROR_MESSAGES.GPIO_INVALID);
return;
}
} else {
const [start, end] = range;
if (value >= start && value <= end) {
callback(ERROR_MESSAGES.GPIO_INVALID);
return;
}
}
}
callback();
}
});
export const GPIO_VALIDATOR = createGPIOValidator(
[[6, 11], 1, 20, 24, [28, 31]],
40
);
export const GPIO_VALIDATORC3 = createGPIOValidator([[11, 19]], 21);
export const GPIO_VALIDATORS2 = createGPIOValidator(
[
[19, 20],
[22, 32]
],
40
);
export const GPIO_VALIDATORS3 = createGPIOValidator(
[
[19, 20],
[22, 37],
[39, 42]
],
48
);
const GPIO_FIELD_NAMES = [
'led_gpio',
'dallas_gpio',
'pbutton_gpio',
'tx_gpio',
'rx_gpio'
] as const;
type ValidationRules = Array<{
required?: boolean;
message?: string;
[key: string]: unknown;
}>;
const createGPIOValidations = (
validator: typeof GPIO_VALIDATOR
): Record<string, ValidationRules> =>
GPIO_FIELD_NAMES.reduce(
(acc, field) => {
const fieldName = field.replace('_gpio', '').toUpperCase();
acc[field] = [
{ required: true, message: `${fieldName} GPIO is required` },
validator
];
return acc;
},
{} as Record<string, ValidationRules>
);
const PLATFORM_VALIDATORS = {
ESP32: GPIO_VALIDATOR,
ESP32C3: GPIO_VALIDATORC3,
ESP32S2: GPIO_VALIDATORS2,
ESP32S3: GPIO_VALIDATORS3
} as const;
export const createSettingsValidator = (settings: Settings) => {
const schema: Record<string, ValidationRules> = {};
// Add GPIO validations for CUSTOM board profiles
if (
settings.board_profile === 'CUSTOM' &&
settings.platform in PLATFORM_VALIDATORS
) {
Object.assign(
schema,
createGPIOValidations(
PLATFORM_VALIDATORS[settings.platform as keyof typeof PLATFORM_VALIDATORS]
)
);
}
// Syslog validations
if (settings.syslog_enabled) {
schema.syslog_host = [
@@ -295,21 +401,52 @@ export const temperatureSensorItemValidation = (
n: [NAME_PATTERN, uniqueTemperatureNameValidator(sensors, sensor.o_n)]
});
export const isGPIOUniqueValidator = (sensors: AnalogSensor[]) => ({
validator(
_rule: InternalRuleItem,
gpio: number,
callback: (error?: string) => void
) {
if (sensors.some((as) => as.g === gpio)) {
callback(ERROR_MESSAGES.GPIO_DUPLICATE);
return;
}
callback();
}
});
export const uniqueAnalogNameValidator = (
sensors: AnalogSensor[],
o_name?: string
) => createUniqueFieldNameValidator(sensors, (s) => s.n, o_name);
const getPlatformGPIOValidator = (platform: string) => {
switch (platform) {
case 'ESP32S3':
return GPIO_VALIDATORS3;
case 'ESP32S2':
return GPIO_VALIDATORS2;
case 'ESP32C3':
return GPIO_VALIDATORC3;
default:
return GPIO_VALIDATOR;
}
};
export const analogSensorItemValidation = (
sensors: AnalogSensor[],
sensor: AnalogSensor
sensor: AnalogSensor,
creating: boolean,
platform: string
) => {
const gpioValidator = getPlatformGPIOValidator(platform);
return new Schema({
// name is required and must be unique
n: [
{ required: true, message: 'Name is required' },
NAME_PATTERN,
uniqueAnalogNameValidator(sensors, sensor.o_n)
n: [NAME_PATTERN, uniqueAnalogNameValidator(sensors, sensor.o_n)],
g: [
{ required: true, message: 'GPIO is required' },
gpioValidator,
...(creating ? [isGPIOUniqueValidator(sensors)] : [])
]
});
};

View File

@@ -328,9 +328,9 @@ const ApplicationSettings = () => {
>
<MenuItem value={-1}>OFF</MenuItem>
<MenuItem value={3}>ERR</MenuItem>
<MenuItem value={4}>WARN</MenuItem>
<MenuItem value={5}>NOTICE</MenuItem>
<MenuItem value={6}>INFO</MenuItem>
<MenuItem value={7}>DEBUG</MenuItem>
<MenuItem value={9}>ALL</MenuItem>
</TextField>
</Grid>
@@ -602,7 +602,6 @@ const ApplicationSettings = () => {
<MenuItem value={0}>{LL.DISABLED(1)}</MenuItem>
<MenuItem value={1}>LAN8720</MenuItem>
<MenuItem value={2}>TLK110</MenuItem>
<MenuItem value={3}>RTL8201</MenuItem>
</TextField>
</Grid>
</Grid>
@@ -858,9 +857,8 @@ const ApplicationSettings = () => {
</Grid>
{restartNeeded && (
<MessageBox level="warning" message={LL.RESTART_TEXT(0)}>
<MessageBox my={2} level="warning" message={LL.RESTART_TEXT(0)}>
<Button
sx={{ ml: 2 }}
startIcon={<PowerSettingsNewIcon />}
variant="contained"
color="error"

View File

@@ -1,11 +1,8 @@
import { useCallback, useMemo, useState } from 'react';
import { toast } from 'react-toastify';
import CancelIcon from '@mui/icons-material/Cancel';
import SettingsBackupRestoreIcon from '@mui/icons-material/SettingsBackupRestore';
import WarningIcon from '@mui/icons-material/Warning';
import {
Box,
Button,
Checkbox,
Grid,
@@ -33,8 +30,6 @@ import type { MqttSettingsType } from 'types';
import { numberValue, updateValueDirty, useRest } from 'utils';
import { createMqttSettingsValidator, validate } from 'validators';
import { callAction } from '../../api/app';
const MqttSettings = () => {
const {
loadData,
@@ -57,16 +52,6 @@ const MqttSettings = () => {
const [fieldErrors, setFieldErrors] = useState<ValidateFieldsError>();
const sendResetMQTT = useCallback(() => {
void callAction({ action: 'resetMQTT' })
.then(() => {
toast.success('MQTT ' + LL.REFRESH() + ' successful');
})
.catch((error) => {
toast.error(String(error.error?.message || 'An error occurred'));
});
}, []);
const updateFormValue = useMemo(
() =>
updateValueDirty(
@@ -129,28 +114,16 @@ const MqttSettings = () => {
<SectionContent>
{blocker ? <BlockNavigation blocker={blocker} /> : null}
<>
<Box display="flex" gap={2} mb={1}>
<BlockFormControlLabel
control={
<Checkbox
name="enabled"
checked={data.enabled}
onChange={updateFormValue}
/>
}
label={LL.ENABLE_MQTT()}
/>
{data.enabled && (
<Button
startIcon={<SettingsBackupRestoreIcon />}
color="secondary"
variant="outlined"
onClick={sendResetMQTT}
>
{LL.REFRESH() + ' MQTT'}
</Button>
)}
</Box>
<BlockFormControlLabel
control={
<Checkbox
name="enabled"
checked={data.enabled}
onChange={updateFormValue}
/>
}
label={LL.ENABLE_MQTT()}
/>
<Grid container spacing={2} rowSpacing={0}>
<Grid>
<ValidatedTextField
@@ -266,7 +239,6 @@ const MqttSettings = () => {
label={LL.CERT()}
variant="outlined"
value={data.rootCA}
sx={{ width: '50ch' }}
onChange={updateFormValue}
margin="normal"
/>

View File

@@ -2,7 +2,9 @@ import { useMemo } from 'react';
import { MenuItem } from '@mui/material';
export const TIME_ZONES: Record<string, string> = {
type TimeZones = Record<string, string>;
export const TIME_ZONES: Readonly<TimeZones> = {
'Africa/Abidjan': 'GMT0',
'Africa/Accra': 'GMT0',
'Africa/Addis_Ababa': 'EAT-3',

View File

@@ -355,9 +355,8 @@ const NetworkSettings = () => {
</>
)}
{restartNeeded && (
<MessageBox level="warning" message={LL.RESTART_TEXT(0)}>
<MessageBox my={2} level="warning" message={LL.RESTART_TEXT(0)}>
<Button
sx={{ ml: 2 }}
startIcon={<PowerSettingsNewIcon />}
variant="contained"
color="error"

View File

@@ -94,7 +94,7 @@ const WiFiNetworkSelector = ({ networkList }: { networkList: WiFiNetworkList })
);
if (networkList.networks.length === 0) {
return <MessageBox message={LL.NETWORK_NO_WIFI()} level="info" />;
return <MessageBox mt={2} mb={1} message={LL.NETWORK_NO_WIFI()} level="info" />;
}
return <List>{networkList.networks.map(renderNetwork)}</List>;

View File

@@ -8,10 +8,10 @@ import DeviceHubIcon from '@mui/icons-material/DeviceHub';
import DirectionsBusIcon from '@mui/icons-material/DirectionsBus';
import LogoDevIcon from '@mui/icons-material/LogoDev';
import MemoryIcon from '@mui/icons-material/Memory';
import MonitorHeartIcon from '@mui/icons-material/MonitorHeart';
import PowerSettingsNewIcon from '@mui/icons-material/PowerSettingsNew';
import RouterIcon from '@mui/icons-material/Router';
import SettingsInputAntennaIcon from '@mui/icons-material/SettingsInputAntenna';
import TimerIcon from '@mui/icons-material/Timer';
import WifiIcon from '@mui/icons-material/Wifi';
import {
Avatar,
@@ -37,7 +37,7 @@ import { FormLoader, SectionContent, useLayoutTitle } from 'components';
import ListMenuItem from 'components/layout/ListMenuItem';
import { AuthenticatedContext } from 'contexts/authentication';
import { useI18nContext } from 'i18n/i18n-react';
import { NTPSyncStatus, NetworkConnectionStatus, SystemStatusCodes } from 'types';
import { NTPSyncStatus, NetworkConnectionStatus } from 'types';
import { useInterval } from 'utils';
import { formatDateTime } from 'utils/time';
@@ -113,27 +113,6 @@ const SystemStatus = () => {
}
}, [data?.bus_status, data?.bus_uptime, LL]);
// Memoize derived status values to avoid recalculation on every render
const systemStatus = useMemo(() => {
if (!data) return '??';
switch (data.status) {
case SystemStatusCodes.SYSTEM_STATUS_PENDING_UPLOAD:
case SystemStatusCodes.SYSTEM_STATUS_UPLOADING:
return LL.WAIT_FIRMWARE();
case SystemStatusCodes.SYSTEM_STATUS_ERROR_UPLOAD:
return LL.ERROR();
case SystemStatusCodes.SYSTEM_STATUS_PENDING_RESTART:
case SystemStatusCodes.SYSTEM_STATUS_RESTART_REQUESTED:
return LL.RESTARTING_PRE();
case SystemStatusCodes.SYSTEM_STATUS_INVALID_GPIO:
return LL.GPIO_OF(LL.FAILED(0));
default:
// SystemStatusCodes.SYSTEM_STATUS_NORMAL
return 'OK';
}
}, [data?.status, LL]);
const busStatusHighlight = useMemo(() => {
if (!data) return theme.palette.warning.main;
@@ -334,13 +313,10 @@ const SystemStatus = () => {
<ListItem>
<ListItemAvatar>
<Avatar sx={{ bgcolor: '#c5572c', color: 'white' }}>
<MonitorHeartIcon />
<TimerIcon />
</Avatar>
</ListItemAvatar>
<ListItemText
primary={LL.STATUS_OF(LL.SYSTEM(0))}
secondary={`${systemStatus} (${LL.UPTIME()}: ${uptimeText})`}
/>
<ListItemText primary={LL.UPTIME()} secondary={uptimeText} />
{me.admin && (
<Button
startIcon={<PowerSettingsNewIcon />}

View File

@@ -113,7 +113,7 @@ const SystemMonitor = () => {
minWidth: '300px',
maxWidth: '500px',
backgroundColor: '#393939',
border: 2,
border: 3,
borderColor: '#565656',
borderRadius: '8px',
boxShadow: '0 8px 32px rgba(0, 0, 0, 0.3)',
@@ -136,10 +136,10 @@ const SystemMonitor = () => {
</Typography>
{errorMessage ? (
<MessageBox level="error" message={errorMessage}>
<MessageBox my={2} level="error" message={errorMessage}>
<Button
sx={{ ml: 2 }}
size="small"
sx={{ ml: 2 }}
startIcon={<CancelIcon />}
variant="contained"
color="error"

View File

@@ -1,12 +1,4 @@
import {
memo,
useCallback,
useContext,
useEffect,
useMemo,
useRef,
useState
} from 'react';
import { memo, useCallback, useContext, useEffect, useMemo, useState } from 'react';
import { toast } from 'react-toastify';
import CancelIcon from '@mui/icons-material/Cancel';
@@ -18,10 +10,12 @@ import WarningIcon from '@mui/icons-material/Warning';
import {
Box,
Button,
Checkbox,
Dialog,
DialogActions,
DialogContent,
DialogTitle,
FormControlLabel,
Grid,
IconButton,
Link,
@@ -60,13 +54,6 @@ const DEV_RELNOTES_URL =
'https://github.com/emsesp/EMS-ESP32/blob/dev/CHANGELOG_LATEST.md';
// Types for better type safety
interface PartitionData {
partition: string;
version: string;
install_date?: string;
size: number;
}
interface VersionData {
emsesp_version: string;
arduino_version: string;
@@ -74,9 +61,6 @@ interface VersionData {
flash_chip_size: number;
psram: boolean;
build_flags?: string;
partition: string;
partitions: PartitionData[];
developer_mode: boolean;
}
interface UpgradeCheckData {
@@ -96,10 +80,6 @@ const VersionInfoDialog = memo(
showVersionInfo,
latestVersion,
latestDevVersion,
partitionVersion,
partition,
currentPartition,
size,
locale,
LL,
onClose
@@ -107,10 +87,6 @@ const VersionInfoDialog = memo(
showVersionInfo: number;
latestVersion?: VersionInfo;
latestDevVersion?: VersionInfo;
partitionVersion?: VersionInfo | undefined;
partition: string;
currentPartition: string;
size: number;
locale: string;
LL: TranslationFunctions;
onClose: () => void;
@@ -118,19 +94,8 @@ const VersionInfoDialog = memo(
if (showVersionInfo === 0) return null;
const isStable = showVersionInfo === 1;
const isDev = showVersionInfo === 2;
const isPartition = showVersionInfo === 3;
const version = isStable
? latestVersion
: isDev
? latestDevVersion
: partitionVersion;
const relNotesUrl = isStable
? STABLE_RELNOTES_URL
: isDev
? DEV_RELNOTES_URL
: '';
const version = isStable ? latestVersion : latestDevVersion;
const relNotesUrl = isStable ? STABLE_RELNOTES_URL : DEV_RELNOTES_URL;
return (
<Dialog sx={dialogStyle} open={showVersionInfo !== 0} onClose={onClose}>
@@ -147,17 +112,14 @@ const VersionInfoDialog = memo(
borderBottom: 'none',
pr: 1,
py: 0.5,
fontSize: 13
fontSize: 13,
width: 90
}}
>
{LL.VERSION()}
{LL.TYPE(0)}
</TableCell>
<TableCell sx={{ borderBottom: 'none', py: 0.5, fontSize: 13 }}>
{isPartition
? typeof version === 'string'
? version
: version?.name
: version?.name}
{isStable ? LL.STABLE() : LL.DEVELOPMENT()}
</TableCell>
</TableRow>
<TableRow sx={{ height: 24, borderBottom: 'none' }}>
@@ -169,61 +131,15 @@ const VersionInfoDialog = memo(
borderBottom: 'none',
pr: 1,
py: 0.5,
fontSize: 13,
width: 140
fontSize: 13
}}
>
{isPartition ? LL.TYPE(0) : LL.RELEASE_TYPE()}
{LL.VERSION()}
</TableCell>
<TableCell sx={{ borderBottom: 'none', py: 0.5, fontSize: 13 }}>
{partition === currentPartition && LL.ACTIVE() + ' '}
{isStable
? LL.STABLE()
: isDev
? LL.DEVELOPMENT()
: 'Partition ' + LL.VERSION()}
{version?.name}
</TableCell>
</TableRow>
{isPartition && (
<TableRow sx={{ height: 24, borderBottom: 'none' }}>
<TableCell
component="th"
scope="row"
sx={{
color: 'lightblue',
borderBottom: 'none',
pr: 1,
py: 0.5,
fontSize: 13
}}
>
Partition
</TableCell>
<TableCell sx={{ borderBottom: 'none', py: 0.5, fontSize: 13 }}>
{partition}
</TableCell>
</TableRow>
)}
{isPartition && (
<TableRow sx={{ height: 24, borderBottom: 'none' }}>
<TableCell
component="th"
scope="row"
sx={{
color: 'lightblue',
borderBottom: 'none',
pr: 1,
py: 0.5,
fontSize: 13
}}
>
Size
</TableCell>
<TableCell sx={{ borderBottom: 'none', py: 0.5, fontSize: 13 }}>
{size} KB
</TableCell>
</TableRow>
)}
{version?.published_at && (
<TableRow sx={{ height: 24, borderBottom: 'none' }}>
<TableCell
@@ -237,7 +153,7 @@ const VersionInfoDialog = memo(
fontSize: 13
}}
>
{isPartition ? 'Install Date' : 'Build Date'}
Build Date
</TableCell>
<TableCell sx={{ borderBottom: 'none', py: 0.5, fontSize: 13 }}>
{prettyDateTime(locale, new Date(version.published_at))}
@@ -248,17 +164,15 @@ const VersionInfoDialog = memo(
</Table>
</DialogContent>
<DialogActions>
{!isPartition && (
<Button
variant="outlined"
component="a"
href={relNotesUrl}
target="_blank"
color="primary"
>
Changelog
</Button>
)}
<Button
variant="outlined"
component="a"
href={relNotesUrl}
target="_blank"
color="primary"
>
Changelog
</Button>
<Button variant="outlined" onClick={onClose} color="secondary">
{LL.CLOSE()}
</Button>
@@ -304,7 +218,7 @@ const InstallDialog = memo(
return (
<Dialog sx={dialogStyle} open={openInstallDialog} onClose={onClose}>
<DialogTitle>
{`${LL.INSTALL()} ${fetchDevVersion ? LL.DEVELOPMENT() : LL.STABLE()} Firmware`}
{`${LL.UPDATE()} ${fetchDevVersion ? LL.DEVELOPMENT() : LL.STABLE()} Firmware`}
</DialogTitle>
<DialogContent dividers>
<Typography mb={2}>
@@ -349,54 +263,6 @@ const InstallDialog = memo(
}
);
const InstallPartitionDialog = memo(
({
openInstallPartitionDialog,
version,
partition,
LL,
onClose,
onInstall
}: {
openInstallPartitionDialog: boolean;
version: string;
partition: string;
LL: TranslationFunctions;
onClose: () => void;
onInstall: (partition: string) => void;
}) => {
return (
<Dialog sx={dialogStyle} open={openInstallPartitionDialog} onClose={onClose}>
<DialogTitle>
{LL.INSTALL()} {LL.STORED_VERSIONS()}
</DialogTitle>
<DialogContent dividers>
<Typography mb={2}>{LL.INSTALL_VERSION(LL.INSTALL(), version)}</Typography>
</DialogContent>
<DialogActions>
<Button
startIcon={<CancelIcon />}
variant="outlined"
onClick={onClose}
color="secondary"
>
{LL.CANCEL()}
</Button>
<Button
startIcon={<WarningIcon color="warning" />}
variant="outlined"
onClick={() => onInstall(partition)}
color="primary"
>
{LL.INSTALL()}
</Button>
</DialogActions>
</Dialog>
);
}
);
// Helper function moved outside component
const getPlatform = (data: VersionData): string => {
return `${data.esp_platform}-${data.flash_chip_size >= 16384 ? '16MB' : '4MB'}${data.psram ? '+' : ''}`;
@@ -409,14 +275,6 @@ const Version = () => {
// State management
const [restarting, setRestarting] = useState<boolean>(false);
const [openInstallDialog, setOpenInstallDialog] = useState<boolean>(false);
const [partitionVersion, setPartitionVersion] = useState<VersionInfo | undefined>(
undefined
);
const [partition, setPartition] = useState<string>('');
const [openInstallPartitionDialog, setOpenInstallPartitionDialog] =
useState<boolean>(false);
const [usingDevVersion, setUsingDevVersion] = useState<boolean>(false);
const [fetchDevVersion, setFetchDevVersion] = useState<boolean>(false);
const [devUpgradeAvailable, setDevUpgradeAvailable] = useState<boolean>(false);
@@ -424,8 +282,7 @@ const Version = () => {
useState<boolean>(false);
const [internetLive, setInternetLive] = useState<boolean>(false);
const [downloadOnly, setDownloadOnly] = useState<boolean>(false);
const [showVersionInfo, setShowVersionInfo] = useState<number>(0); // 1 = stable, 2 = dev, 3 = partition
const [firmwareSize, setFirmwareSize] = useState<number>(0);
const [showVersionInfo, setShowVersionInfo] = useState<number>(0);
const { send: sendCheckUpgrade } = useRequest(
(versions: string) => callAction({ action: 'checkUpgrade', param: versions }),
@@ -436,13 +293,6 @@ const Version = () => {
setStableUpgradeAvailable(data.stable_upgradeable);
});
const { send: sendSetPartition } = useRequest(
(partition: string) => callAction({ action: 'setPartition', param: partition }),
{ immediate: false }
).onError((error) => {
toast.error(String(error.error?.message || 'An error occurred'));
});
const {
data,
send: loadData,
@@ -469,38 +319,18 @@ const Version = () => {
// Memoized values
const platform = useMemo(() => (data ? getPlatform(data) : ''), [data]);
// Memoize filtered partitions to avoid recomputing on every render
const otherPartitions = useMemo(
() => data?.partitions.filter((p) => p.partition !== data.partition) ?? [],
[data]
);
const setPartitionVersionInfo = useCallback(
(partition: string) => {
setShowVersionInfo(3);
// search for the partition in the data.partitions array
const partitionData = data?.partitions.find((p) => p.partition === partition);
if (partitionData) {
setPartitionVersion({
name: partitionData.version,
published_at: partitionData.install_date ?? ''
});
setPartition(partitionData.partition);
setFirmwareSize(partitionData.size);
}
},
[data]
const isDev = useMemo(
() => data?.emsesp_version.includes('dev') ?? false,
[data?.emsesp_version]
);
const doRestart = useCallback(async () => {
setRestarting(true);
await sendAPI({ device: 'system', cmd: 'restart', id: 0 }).catch(
(error: Error) => {
toast.error(error.message);
}
);
setRestarting(true);
}, [sendAPI]);
const installFirmwareURL = useCallback(
@@ -508,28 +338,9 @@ const Version = () => {
await sendUploadURL(url).catch((error: Error) => {
toast.error(error.message);
});
await doRestart();
},
[sendUploadURL, doRestart]
);
const installPartitionFirmware = useCallback(
async (partition: string) => {
await sendSetPartition(partition).catch((error: Error) => {
toast.error(error.message);
});
setRestarting(true);
},
[sendSetPartition]
);
const showPartitionDialog = useCallback(
(version: string, partition: string, install_date: string) => {
setOpenInstallPartitionDialog(true);
setPartitionVersion({ name: version, published_at: install_date });
setPartition(partition);
},
[]
[sendUploadURL]
);
const showFirmwareDialog = useCallback((useDevVersion: boolean) => {
@@ -541,21 +352,13 @@ const Version = () => {
setOpenInstallDialog(false);
}, []);
const closeInstallPartitionDialog = useCallback(() => {
setOpenInstallPartitionDialog(false);
}, []);
const handleVersionInfoClose = useCallback(() => {
setShowVersionInfo(0);
setPartitionVersion(undefined);
setPartition('');
}, []);
// check upgrades - only once when both versions are available
const upgradeCheckedRef = useRef(false);
// Effect for checking upgrades
useEffect(() => {
if (latestVersion && latestDevVersion && !upgradeCheckedRef.current) {
upgradeCheckedRef.current = true;
if (latestVersion && latestDevVersion) {
const versions = `${latestDevVersion.name},${latestVersion.name}`;
sendCheckUpgrade(versions)
.catch((error: Error) => {
@@ -595,7 +398,7 @@ const Version = () => {
{LL.LATEST_VERSION(usingDevVersion ? LL.DEVELOPMENT() : LL.STABLE())}
</span>
<Button
sx={{ ml: 1 }}
sx={{ ml: 2 }}
variant="outlined"
size="small"
onClick={() => showFirmwareDialog(showingDev)}
@@ -610,7 +413,7 @@ const Version = () => {
return (
<Button
sx={{ ml: 1 }}
sx={{ ml: 2 }}
variant="outlined"
color={choice === LL.UPDATE_AVAILABLE() ? 'success' : 'warning'}
size="small"
@@ -638,13 +441,14 @@ const Version = () => {
return (
<>
<Box p={2} border="1px solid grey" borderRadius={2}>
<Typography mb={1} variant="h6" color="primary">
<Typography mb={2} variant="h6" color="primary">
{LL.THIS_VERSION()}
</Typography>
<Grid
container
direction="row"
rowSpacing={1}
sx={{
justifyContent: 'flex-start',
alignItems: 'baseline'
@@ -661,12 +465,6 @@ const Version = () => {
&nbsp; &#40;{data.build_flags}&#41;
</Typography>
)}
<IconButton
onClick={() => setPartitionVersionInfo(data.partition)}
aria-label={LL.FIRMWARE_VERSION_INFO()}
>
<InfoOutlinedIcon color="primary" sx={{ fontSize: 18 }} />
</IconButton>
</Typography>
</Grid>
@@ -699,11 +497,57 @@ const Version = () => {
</Typography>
</Typography>
</Grid>
<Grid size={{ xs: 4, md: 2 }}>
<Typography color="secondary">{LL.RELEASE_TYPE()}</Typography>
</Grid>
<Grid size={{ xs: 8, md: 10 }}>
<FormControlLabel
disabled={!isDev}
control={
<Checkbox
sx={{
'&.Mui-checked': {
color: 'lightblue'
}
}}
/>
}
slotProps={{
typography: {
color: 'grey'
}
}}
checked={!isDev}
label={LL.STABLE()}
sx={{ '& .MuiSvgIcon-root': { fontSize: 16 } }}
/>
<FormControlLabel
disabled={isDev}
control={
<Checkbox
sx={{
'&.Mui-checked': {
color: 'lightblue'
}
}}
/>
}
slotProps={{
typography: {
color: 'grey'
}
}}
checked={isDev}
label={LL.DEVELOPMENT()}
sx={{ '& .MuiSvgIcon-root': { fontSize: 16 } }}
/>
</Grid>
</Grid>
{internetLive ? (
<>
<Typography mt={4} mb={1} variant="h6" color="primary">
<Typography mt={2} mb={2} variant="h6" color="primary">
{LL.AVAILABLE_VERSION()}
</Typography>
@@ -716,47 +560,6 @@ const Version = () => {
alignItems: 'baseline'
}}
>
{otherPartitions.length > 0 && data.developer_mode && (
<>
<Grid size={{ xs: 4, md: 2 }}>
<Typography color="secondary">
{LL.STORED_VERSIONS()}
</Typography>
</Grid>
<Grid size={{ xs: 8, md: 10 }}>
{otherPartitions.map((partition) => (
<Typography key={partition.partition} mb={1}>
{partition.version}
<IconButton
onClick={() =>
setPartitionVersionInfo(partition.partition)
}
aria-label={LL.FIRMWARE_VERSION_INFO()}
>
<InfoOutlinedIcon
color="primary"
sx={{ fontSize: 18 }}
/>
</IconButton>
<Button
sx={{ ml: 0 }}
variant="outlined"
size="small"
onClick={() =>
showPartitionDialog(
partition.version,
partition.partition,
partition.install_date ?? ''
)
}
>
{LL.INSTALL()}
</Button>
</Typography>
))}
</Grid>
</>
)}
<Grid size={{ xs: 4, md: 2 }}>
<Typography color="secondary">{LL.STABLE()}</Typography>
</Grid>
@@ -802,11 +605,7 @@ const Version = () => {
showVersionInfo={showVersionInfo}
latestVersion={latestVersion}
latestDevVersion={latestDevVersion}
partitionVersion={partitionVersion}
locale={locale}
partition={partition}
currentPartition={data?.partition ?? ''}
size={firmwareSize}
LL={LL}
onClose={handleVersionInfoClose}
/>
@@ -821,14 +620,6 @@ const Version = () => {
onClose={closeInstallDialog}
onInstall={installFirmwareURL}
/>
<InstallPartitionDialog
openInstallPartitionDialog={openInstallPartitionDialog}
version={partitionVersion?.name || ''}
partition={partition}
LL={LL}
onClose={closeInstallPartitionDialog}
onInstall={installPartitionFirmware}
/>
<Typography sx={{ pt: 2, pb: 2 }} variant="h6" color="primary">
{LL.UPLOAD()}
</Typography>
@@ -844,6 +635,7 @@ const Version = () => {
loadData,
LL,
platform,
isDev,
internetLive,
latestVersion,
latestDevVersion,
@@ -857,15 +649,7 @@ const Version = () => {
handleVersionInfoClose,
closeInstallDialog,
installFirmwareURL,
doRestart,
otherPartitions,
setPartitionVersionInfo,
showPartitionDialog,
partitionVersion,
partition,
firmwareSize,
closeInstallPartitionDialog,
installPartitionFirmware
doRestart
]);
return <SectionContent>{restarting ? <SystemMonitor /> : content}</SectionContent>;

View File

@@ -19,8 +19,10 @@ import { I18nContext } from 'i18n/i18n-react';
import type { Locales } from 'i18n/i18n-types';
import { loadLocaleAsync } from 'i18n/i18n-util.async';
// Extract style to constant to prevent recreation
const flagStyle: CSSProperties = { width: 16, verticalAlign: 'middle' };
// Define language options outside component to prevent recreation
interface LanguageOption {
key: Locales;
flag: string;

View File

@@ -15,35 +15,13 @@ export type ValidatedTextFieldProps = ValidatedFieldProps & TextFieldProps;
const ValidatedTextField: FC<ValidatedTextFieldProps> = ({
fieldErrors,
sx,
...rest
}) => {
const errors = fieldErrors?.[rest.name];
return (
<>
<TextField
error={!!errors}
{...rest}
aria-label="Error"
sx={{
'& .MuiInputBase-input.Mui-disabled': {
WebkitTextFillColor: 'grey'
},
...(sx || {})
}}
{...(rest.disabled && {
slotProps: {
select: {
IconComponent: () => null
},
inputLabel: {
style: { color: 'grey' }
}
}
})}
color={rest.disabled ? 'secondary' : 'primary'}
/>
<TextField error={!!errors} {...rest} aria-label="Error" />
{errors?.map((e) => (
<FormHelperText key={e.message} sx={{ color: 'rgb(250, 95, 84)' }}>
{e.message}

View File

@@ -22,6 +22,7 @@ interface ListMenuItemProps {
disabled?: boolean;
}
// Extract styles to prevent recreation
const iconStyles: CSSProperties = {
justifyContent: 'right',
color: 'lightblue',

View File

@@ -16,7 +16,7 @@ const FormLoaderComponent = ({ errorMessage, onRetry }: FormLoaderProps) => {
if (errorMessage) {
return (
<MessageBox level="error" message={errorMessage}>
<MessageBox my={2} level="error" message={errorMessage}>
{onRetry && (
<Button
sx={{ ml: 2 }}

View File

@@ -3,6 +3,7 @@ import { memo } from 'react';
import { Box, CircularProgress } from '@mui/material';
import type { SxProps, Theme } from '@mui/material';
// Extract styles to prevent recreation on every render
const containerStyles: SxProps<Theme> = {
display: 'flex',
justifyContent: 'center',

View File

@@ -7,6 +7,7 @@ interface LoadingSpinnerProps {
height?: number | string;
}
// Extract styles to prevent recreation on every render
const circularProgressStyles: SxProps<Theme> = (theme: Theme) => ({
margin: theme.spacing(4),
color: theme.palette.text.secondary

View File

@@ -60,6 +60,7 @@ const cz: Translation = {
DUTY_CYCLE: 'Pracovní cyklus',
UNIT: 'Jednotka',
STARTVALUE: 'Počáteční hodnota',
WARN_GPIO: 'Upozornění: buďte opatrní při přiřazování GPIO!',
EDIT: 'Upravit',
SENSOR: 'Senzor',
TEMP_SENSOR: 'Teplotní senzor',
@@ -355,8 +356,7 @@ const cz: Translation = {
SWITCH_RELEASE_TYPE: 'Přepnout na {0} verzi',
FIRMWARE_VERSION_INFO: 'Informace o verzi firmwaru',
NO_DATA: 'Žádná data',
USER_PROFILE: 'Uživatelský profil',
STORED_VERSIONS: 'Uložené verze'
USER_PROFILE: 'Uživatelský profil'
};
export default cz;

View File

@@ -60,6 +60,7 @@ const de: Translation = {
DUTY_CYCLE: 'Arbeitszyklus',
UNIT: 'Maßeinheit',
STARTVALUE: 'Startwert',
WARN_GPIO: 'Warnung: Vorsicht bei der korrekten Wahl des GPIO!',
EDIT: 'Editiere',
SENSOR: 'Sensor',
TEMP_SENSOR: 'Temperatursensor',
@@ -355,8 +356,7 @@ const de: Translation = {
SWITCH_RELEASE_TYPE: 'Zum {0}-Release wechseln',
FIRMWARE_VERSION_INFO: 'Firmware-Versionsinformation',
NO_DATA: 'Keine Daten',
USER_PROFILE: 'Benutzerprofil',
STORED_VERSIONS: 'Gespeicherte Versionen'
USER_PROFILE: 'Benutzerprofil'
};
export default de;

View File

@@ -60,6 +60,7 @@ const en: Translation = {
DUTY_CYCLE: 'Duty Cycle',
UNIT: 'UoM',
STARTVALUE: 'Start Value',
WARN_GPIO: 'Warning: be careful when assigning a GPIO!',
EDIT: 'Edit',
SENSOR: 'Sensor',
TEMP_SENSOR: 'Temperature Sensor',
@@ -355,8 +356,7 @@ const en: Translation = {
SWITCH_RELEASE_TYPE: 'Switch to {0} release',
FIRMWARE_VERSION_INFO: 'Firmware Version Information',
NO_DATA: 'No data',
USER_PROFILE: 'User Profile',
STORED_VERSIONS: 'Stored Versions'
USER_PROFILE: 'User Profile'
};
export default en;

View File

@@ -60,6 +60,7 @@ const fr: Translation = {
DUTY_CYCLE: 'Cycle de fonctionnement',
UNIT: 'Unité',
STARTVALUE: 'Valeur de départ',
WARN_GPIO: 'Attention: soyez vigilant en choisissant un GPIO!',
EDIT: 'Éditer',
SENSOR: 'Capteur',
TEMP_SENSOR: 'Capteur de température',
@@ -355,8 +356,7 @@ const fr: Translation = {
SWITCH_RELEASE_TYPE: 'Passer à la version {0}',
FIRMWARE_VERSION_INFO: 'Informations sur la version du firmware',
NO_DATA: 'Aucune donnée',
USER_PROFILE: 'Profil utilisateur',
STORED_VERSIONS: 'Versions stockées'
USER_PROFILE: 'Profil utilisateur'
};
export default fr;

View File

@@ -60,6 +60,7 @@ const it: Translation = {
DUTY_CYCLE: 'Ciclo di lavoro',
UNIT: 'UoM',
STARTVALUE: 'Valore di partenza',
WARN_GPIO: 'Avvertimento: prestare attenzione quando si assegna un GPIO!',
EDIT: 'Modifica',
SENSOR: 'Sensore',
TEMP_SENSOR: 'Sensore Temperatura',
@@ -355,8 +356,7 @@ const it: Translation = {
SWITCH_RELEASE_TYPE: 'Cambia in {0} rilascio',
FIRMWARE_VERSION_INFO: 'Informazioni sulla versione del firmware',
NO_DATA: 'Nessun dato',
USER_PROFILE: 'Profilo utente',
STORED_VERSIONS: 'Versioni memorizzate'
USER_PROFILE: 'Profilo utente'
};
export default it;

View File

@@ -60,6 +60,7 @@ const nl: Translation = {
DUTY_CYCLE: 'Duty Cycle',
UNIT: 'UoM',
STARTVALUE: 'Startwaarde',
WARN_GPIO: 'Waarschuwing: let op met het koppelen van de juiste GPIO pin!',
EDIT: 'Wijzigen',
SENSOR: 'Sensor',
TEMP_SENSOR: 'Temperatuur sensor',
@@ -355,8 +356,7 @@ const nl: Translation = {
SWITCH_RELEASE_TYPE: 'Switch naar {0} release',
FIRMWARE_VERSION_INFO: 'Informatie over firmwareversie',
NO_DATA: 'Geen data',
USER_PROFILE: 'Gebruikersprofiel',
STORED_VERSIONS: 'Opgeslagen versies'
USER_PROFILE: 'Gebruikersprofiel'
};
export default nl;

View File

@@ -60,6 +60,7 @@ const no: Translation = {
DUTY_CYCLE: 'Duty Cycle',
UNIT: 'UoM',
STARTVALUE: 'Startverdi',
WARN_GPIO: 'Advarsel: vær forsiktig ved aktivering av GPIO!',
EDIT: 'Endre',
SENSOR: 'Sensor',
TEMP_SENSOR: 'Temperatursensor',
@@ -355,8 +356,7 @@ const no: Translation = {
SWITCH_RELEASE_TYPE: 'Bytt til {0} utgivelse',
FIRMWARE_VERSION_INFO: 'Informasjon om firmwareversjon',
NO_DATA: 'Ingen data',
USER_PROFILE: 'Brukerprofil',
STORED_VERSIONS: 'Lagret versjoner'
USER_PROFILE: 'Brukerprofil'
};
export default no;

View File

@@ -60,6 +60,7 @@ const pl: BaseTranslation = {
DUTY_CYCLE: 'Wypełnienie',
UNIT: 'J.m.',
STARTVALUE: 'Wartość początkowa',
WARN_GPIO: 'Uwaga! Zachowaj ostrożność przypisując GPIO do urządzenia!',
EDIT: 'Edycja',
SENSOR: '{{c|ustawienia c||ustawień c|}}zujnika',
TEMP_SENSOR: 'czujnika temperatury',
@@ -331,7 +332,7 @@ const pl: BaseTranslation = {
SERVICES: 'Usługi',
ALLVALUES: 'Wszystkie wartości',
SPECIAL_FUNCTIONS: 'Specjalne funkcje',
WAIT_FIRMWARE: 'Firmware ściąga się i instaluje',
WAIT_FIRMWARE: 'Firma jest wysyłana i instaluje się',
INSTALL_VERSION: 'To zainstaluje wersję {1} {0}. Jesteś pewny?',
UPDATE_AVAILABLE: 'aktualizacja dostępna',
LATEST_VERSION: 'Jesteś używając najnowszej wersji firmware {0}',
@@ -355,8 +356,7 @@ const pl: BaseTranslation = {
SWITCH_RELEASE_TYPE: 'Zmień na {0} wydanie',
FIRMWARE_VERSION_INFO: 'Informacje o wersji firmware',
NO_DATA: 'Brak danych',
USER_PROFILE: 'Profil użytkownika',
STORED_VERSIONS: 'Zapisane wersje'
USER_PROFILE: 'Profil użytkownika'
};
export default pl;

View File

@@ -60,6 +60,7 @@ const sk: Translation = {
DUTY_CYCLE: 'Pracovný cyklus',
UNIT: 'UoM',
STARTVALUE: 'Počiatočná hodnota',
WARN_GPIO: 'Upozornenie: Buďte opatrní pri priraďovaní GPIO!',
EDIT: 'Editovať',
SENSOR: 'Snímač',
TEMP_SENSOR: 'Snímač teploty',
@@ -355,8 +356,7 @@ const sk: Translation = {
SWITCH_RELEASE_TYPE: 'Prepnúť na {0} verziu',
FIRMWARE_VERSION_INFO: 'Informácie o verzii firmware',
NO_DATA: 'Žiadne dáta',
USER_PROFILE: 'Profil používateľa',
STORED_VERSIONS: 'Uložené verzie'
USER_PROFILE: 'Profil používateľa'
};
export default sk;

View File

@@ -60,6 +60,7 @@ const sv: Translation = {
DUTY_CYCLE: 'Pulskvot',
UNIT: 'Måttenhet',
STARTVALUE: 'Startvärde',
WARN_GPIO: 'Varning: Var försiktig vid aktivering av GPIO!',
EDIT: 'Ändra',
SENSOR: 'Sensor',
TEMP_SENSOR: 'Temperatursensor',
@@ -355,8 +356,7 @@ const sv: Translation = {
SWITCH_RELEASE_TYPE: 'Byt till {0} utgåva',
FIRMWARE_VERSION_INFO: 'Information om firmwareversion',
NO_DATA: 'Ingen data',
USER_PROFILE: 'Användarprofil',
STORED_VERSIONS: 'Lagrad versioner'
USER_PROFILE: 'Användarprofil'
};
export default sv;

View File

@@ -60,6 +60,7 @@ const tr: Translation = {
DUTY_CYCLE: 'Görev Çevrimi',
UNIT: 'ÖB',
STARTVALUE: 'Başlangıç değeri',
WARN_GPIO: 'Uyarı: bir GPIO atarken dikkatli olun!',
EDIT: 'Değiştir',
SENSOR: 'Sensör',
TEMP_SENSOR: 'Sıcaklık Sensörü',
@@ -355,8 +356,7 @@ const tr: Translation = {
SWITCH_RELEASE_TYPE: '{0} sürümüne geç',
FIRMWARE_VERSION_INFO: 'Firmware Sürüm Bilgisi',
NO_DATA: 'Hiçbir veri yok',
USER_PROFILE: 'Kullanıcı Profili',
STORED_VERSIONS: 'Kaydedilmiş Sürümler'
USER_PROFILE: 'Kullanıcı Profili'
};
export default tr;

View File

@@ -91,12 +91,12 @@ function ErrorPage() {
<p style={errorPageStyles.message2}>
Please report on{' '}
<a
href="https://emsesp.org/Support"
href="https://docs.emsesp.org/Support"
target="_blank"
rel="noreferrer"
style={{ color: 'inherit', textDecoration: 'underline' }}
>
https://emsesp.org/Support
https://docs.emsesp.org/Support
</a>
</p>
</div>

View File

@@ -2,15 +2,13 @@ import type { busConnectionStatus } from 'app/main/types';
import type { NetworkConnectionStatus } from './network';
// match SYSTEM_STATUS in System.h
export enum SystemStatusCodes {
SYSTEM_STATUS_NORMAL = 0,
SYSTEM_STATUS_PENDING_UPLOAD = 1,
SYSTEM_STATUS_UPLOADING = 100,
SYSTEM_STATUS_ERROR_UPLOAD = 3,
SYSTEM_STATUS_PENDING_RESTART = 4,
SYSTEM_STATUS_RESTART_REQUESTED = 5,
SYSTEM_STATUS_INVALID_GPIO = 6
SYSTEM_STATUS_RESTART_REQUESTED = 5
}
export interface SystemStatus {
@@ -52,14 +50,7 @@ export interface SystemStatus {
model: string;
has_loader: boolean;
has_partition: boolean;
partitions: {
partition: string;
version: string;
size: number;
install_date?: string;
}[];
status: number; // System Status Codes which matches SYSTEM_STATUS in System.h
developer_mode: boolean;
status: number; // SystemStatusCodes which matches SYSTEM_STATUS in System.h
temperature?: number;
}

View File

@@ -25,7 +25,6 @@ export const extractEventValue = (
normalizedValue.endsWith('.') ||
normalizedValue === '-' ||
normalizedValue === '-.' ||
normalizedValue === '-0' ||
endsWithDecimalAndZeros;
if (isIncomplete) {

View File

@@ -60,28 +60,21 @@ export const useRest = <D>({ read, update }: RestRequestOptions<D>) => {
// Reset states before saving
setRestartNeeded(false);
setErrorMessage(undefined);
setDirtyFlags([]);
setOrigData(data as D);
try {
await writeData(data as D);
// Only update origData on successful save (dirtyFlags cleared by onSuccess handler)
setOrigData(data as D);
} catch (error) {
const message = error instanceof Error ? error.message : String(error);
if (message === REBOOT_ERROR_MESSAGE) {
setRestartNeeded(true);
return; // Early return - save succeeded but needs reboot
} else {
toast.error(message);
setErrorMessage(message);
}
// Restore original data on validation error
if (origData) {
updateData({ data: origData });
}
toast.error(message);
setErrorMessage(message);
setDirtyFlags([]); // Clear flags so user can retry
}
}, [data, writeData, origData, updateData]);
}, [data, writeData]);
return useMemo(
() => ({

View File

@@ -26,9 +26,6 @@ const RESOLVE_ALIASES = {
'react/jsx-runtime': 'preact/jsx-runtime'
};
// Common resolve extensions - prioritize TypeScript/React files for Windows compatibility
const RESOLVE_EXTENSIONS = ['.tsx', '.ts', '.jsx', '.js', '.mjs', '.json'];
// Bundle file interface
interface BundleFile {
name: string;
@@ -104,12 +101,7 @@ const createBasePlugins = (
devToolsEnabled: boolean,
includeBundleReporter = true
) => {
const plugins = [
createPreactPlugin(devToolsEnabled),
viteTsconfigPaths({
projects: ['./tsconfig.json']
})
];
const plugins = [createPreactPlugin(devToolsEnabled), viteTsconfigPaths()];
if (includeBundleReporter) {
plugins.push(bundleSizeReporter());
}
@@ -226,8 +218,7 @@ export default defineConfig(
return {
plugins: [...createBasePlugins(true, true), mockServer()],
resolve: {
alias: RESOLVE_ALIASES,
extensions: RESOLVE_EXTENSIONS
alias: RESOLVE_ALIASES
},
server: {
open: true,
@@ -255,8 +246,7 @@ export default defineConfig(
return {
plugins: createBasePlugins(false, true),
resolve: {
alias: RESOLVE_ALIASES,
extensions: RESOLVE_EXTENSIONS
alias: RESOLVE_ALIASES
},
build: {
...createBaseBuildConfig(),
@@ -289,8 +279,7 @@ export default defineConfig(
})
],
resolve: {
alias: RESOLVE_ALIASES,
extensions: RESOLVE_EXTENSIONS
alias: RESOLVE_ALIASES
},
build: {
...createBaseBuildConfig(),

View File

@@ -36,9 +36,6 @@ class PButton {
void onVLongPress(uint16_t, buttonEventHandler handler);
bool init(uint8_t pin, bool pullMode);
bool check(void);
bool button_busy() {
return buttonBusy_;
}
private:
uint16_t Debounce_; // Debounce period to prevent flickering when pressing or releasing the button (in ms)
@@ -50,21 +47,21 @@ class PButton {
bool pullMode_;
bool enabled_;
bool state_; // Value read from button
bool lastState_; // Last value of button state
bool dblClickWaiting_; // whether we're waiting for a double click (down)
bool dblClickOnNextUp_; // whether to register a double click on next release, or whether to wait and click
bool singleClickOK_; // whether it's OK to do a single click
bool state_; // Value read from button
bool lastState_; // Last value of button state
bool dblClickWaiting_; // whether we're waiting for a double click (down)
bool dblClickOnNextUp_; // whether to register a double click on next release, or whether to wait and click
bool singleClickOK_; // whether it's OK to do a single click
uint32_t downTime_; // time the button was pressed down
uint32_t upTime_; // time the button was released
uint32_t downTime_; // time the button was pressed down
uint32_t upTime_; // time the button was released
bool ignoreUP_; // whether to ignore the button release because the click+hold was triggered
bool waitForUP_; // when held, whether to wait for the up event
bool longPressHappened_; // whether or not the hold event happened already
bool vLongPressHappened_; // whether or not the long hold event happened already
bool buttonBusy_; // false if idle
bool buttonBusy_; // false if idle
buttonEventHandler cb_onClick, cb_onDblClick, cb_onLongPress, cb_onVLongPress;
};

View File

@@ -1,91 +0,0 @@
# ESP32-PSRAM Library
[![Arduino Library](https://img.shields.io/badge/Arduino-Library-blue.svg)](https://www.arduino.cc/reference/en/libraries/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
A comprehensive memory management library for ESP32 microcontrollers, providing efficient data structures that leverage __PSRAM__ and __HIMEM__ for expanded storage capabilities.
## Overview
The ESP32 can only address 4MB of PSRAM directly, so the remaining 4MB (HIMEM) are usually unsued!
__esp32-psram__ is a C++ library that helps you manage large amounts of data on ESP32 devices by utilizing the full external PSRAM (SPI RAM) supporting the high memory (HIMEM) regions. This allows your applications to work with much larger datasets than would be possible using just internal RAM.
- **Use any STL Class in PSRAM**:
- Adapt any [STL class](https://en.wikipedia.org/wiki/Standard_Template_Library) that accepts with an Allocator by using the [AllocatorPSRAM](https://pschatzmann.github.io/esp32-psram/html/classesp32__psram_1_1_p_s_r_a_m_allocator.html)
- **Memory-Efficient Data Structures**:
- `VectorPSRAM`: Vector implementation that automatically stores data in PSRAM
- `VectorHIMEM`: Vector implementation for extremely large datasets using ESP32's high memory region
- **File System Abstractions**:
- `FilePSRAM`: File-like interface backed by PSRAM
- `FileHIMEM`: File-like interface backed by high memory
- SD card-like API using familiar file operations to write to PSRAM or HIMEM.
- **Streaming Data Handling**:
- `RingBufferStreamRAM`: Circular buffer implementation in RAM (Stream-based)
- `RingBufferStreamPSRAM`: Circular buffer implementation in PSRAM (Stream-based)
- `RingBufferStreamHIMEM`: Circular buffer implementation in high memory (Stream-based)
- Fully compatible with Arduino's Stream class
- **Typed Ring Buffers**:
- `TypedRingBufferRAM<T>`: Type-safe circular buffer for any data type using RAM
- `TypedRingBufferPSRAM<T>`: PSRAM version for storing complex data structures
- `TypedRingBufferHIMEM<T>`: High memory version for storing complex data structures
- Optimized for struct/class storage with proper memory management
## Installation
1. Download the latest release from GitHub
2. Extract the ZIP file
3. Move the folder to your Arduino libraries directory (typically `~/Arduino/libraries/` on Linux/macOS or `Documents\Arduino\libraries\` on Windows)
4. Restart Arduino IDE
## API Reference
- [Class Reference](https://pschatzmann.github.io/esp32-psram/html/namespaceesp32__psram.html)
- [Further Information](https://github.com/pschatzmann/esp32-psram/wiki)
## Memory Performance Comparison
| Memory Type | Access Speed | Capacity | Use Case |
|-------------|--------------|----------|----------|
| RAM (DRAM) | Very Fast | ~200-300KB | Small, performance-critical data |
| PSRAM | Fast | Up to 4MB | Medium-sized datasets, frequent access |
| HIMEM | Medium | Up to 8MB | Large datasets, less frequent access |
## Hardware Compatibility
| ESP32 Board | PSRAM Size | HIMEM Support | Notes |
|-------------|------------|--------------|-------|
| ESP32 | Up to 4MB | Yes | Most common ESP32 modules |
| ESP32-S2 | Up to 2MB | Limited | Check board specifications |
| ESP32-S3 | Up to 8MB | Yes | Best memory capabilities |
| ESP32-C3 | None | No | Not compatible with this library |
## Design Philosophy
The ESP32-PSRAM library is designed with these principles in mind:
1. **Familiar interfaces**: API design mimics standard C++ containers and Arduino libraries
2. **Memory efficiency**: Automatic use of appropriate memory regions
3. **Type safety**: Template-based to work with any data type
4. **Flexibility**: Configurable for different memory types and use cases
5. **Zero overhead**: Direct memory access with minimal abstraction layers
## License
MIT License
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## Acknowledgements
This library was inspired by the need for better memory management solutions on ESP32, especially for audio, image processing, and data logging applications.

View File

@@ -1,10 +0,0 @@
name=ESP32-PSRAM
version=0.1.3
author=Phil Schatzmann
maintainer=https://github.com/pschatzmann
sentence=Memory management library for ESP32 using PSRAM and HIMEM
paragraph=A comprehensive memory management library that provides vector, file, and ring buffer implementations using ESP32's PSRAM and HIMEM. Allows applications to work with large datasets beyond internal memory limitations.
category=Data Storage
url=https://github.com/pschatzmann/esp32-psram
architectures=esp32
depends=

View File

@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2025 Phil Schatzmann
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,31 +0,0 @@
#pragma once
#ifdef ESP32
/**
* @file ESP32-PSRAM.h
* @brief Main include file for the ESP32-PSRAM library
*
* This header includes all components of the ESP32-PSRAM library and
* provides a using namespace directive for easier access to library features.
*/
// Include all library components
#include "esp32-psram/AllocatorPSRAM.h" // PSRAM-backed vector
#include "esp32-psram/VectorPSRAM.h" // PSRAM-backed vector
#include "esp32-psram/VectorHIMEM.h" // HIMEM-backed vector
// #include "esp32-psram/InMemoryFile.h" // File interface using vectors
// #include "esp32-psram/PSRAM.h" // PSRAM file system
// #include "esp32-psram/HIMEM.h" // HIMEM file system
#include "esp32-psram/RingBufferStream.h" // Stream-based ring buffer
#include "esp32-psram/TypedRingBuffer.h" // Typed ring buffer for structured data
#define stringPSRAM std::basic_string<char, std::char_traits<char>, AllocatorPSRAM<char>>
#ifndef ESP32_PSRAM_NO_NAMESPACE
using namespace esp32_psram;
#endif
#else
#error "This library is only compatible with ESP32 platforms."
#endif // ESP32

View File

@@ -1,159 +0,0 @@
#pragma once
#include <esp_heap_caps.h>
/**
* @namespace esp32_psram
* @brief Namespace containing ESP32 PSRAM-specific implementations
*/
namespace esp32_psram {
/**
* @class AllocatorPSRAM
* @brief Custom allocator that uses ESP32's PSRAM for memory allocation
* @tparam T Type of elements to allocate
*
* This allocator uses ESP32's heap_caps_malloc with MALLOC_CAP_SPIRAM flag
* to ensure all memory is allocated in PSRAM instead of regular RAM. If PSRAM
* allocation fails, it falls back to regular RAM.
*/
template <typename T>
class AllocatorPSRAM {
public:
using value_type = T;
using pointer = T*;
using const_pointer = const T*;
using reference = T&;
using const_reference = const T&;
using size_type = std::size_t;
using difference_type = std::ptrdiff_t;
/**
* @brief Default constructor
*/
AllocatorPSRAM() noexcept {}
/**
* @brief Copy constructor from another allocator type
* @tparam U Type of the other allocator
* @param other The other allocator
*/
template <typename U>
AllocatorPSRAM(const AllocatorPSRAM<U>&) noexcept {}
/**
* @brief Allocate memory from PSRAM
* @param n Number of elements to allocate
* @return Pointer to allocated memory
* @throws std::bad_alloc If allocation fails or size is too large
*/
pointer allocate(size_type n) {
// if (n > std::numeric_limits<size_type>::max() / sizeof(T))
// throw std::bad_alloc();
// in Arduino excepitons are disabled!
assert(n <= std::numeric_limits<size_type>::max() / sizeof(T));
pointer p = static_cast<pointer>(
heap_caps_malloc(n * sizeof(T), MALLOC_CAP_SPIRAM));
if (p == nullptr) {
p = static_cast<pointer>(malloc(n * sizeof(T)));
}
// if (!p) throw std::bad_alloc();
// in Arduino excepitons are disabled!
assert(p);
return p;
}
/**
* @brief Deallocate memory
* @param p Pointer to memory to deallocate
* @param size Size of allocation (unused)
*/
void deallocate(pointer p, size_type) noexcept { heap_caps_free(p); }
/**
* @brief Rebind allocator to another type
* @tparam U Type to rebind the allocator to
*/
template <typename U>
struct rebind {
using other = AllocatorPSRAM<U>;
};
};
/**
* @class AllocatorOnlyPSRAM
* @brief Custom allocator that uses ESP32's PSRAM for memory allocation
* @tparam T Type of elements to allocate
*
* This allocator uses ESP32's heap_caps_malloc with MALLOC_CAP_SPIRAM flag
* to ensure all memory is allocated in PSRAM instead of regular RAM.
* If PSRAM allocation fails, it does not fall back to regular RAM.
*/
template <typename T>
class AllocatorOnlyPSRAM {
public:
using value_type = T;
using pointer = T*;
using const_pointer = const T*;
using reference = T&;
using const_reference = const T&;
using size_type = std::size_t;
using difference_type = std::ptrdiff_t;
/**
* @brief Default constructor
*/
AllocatorOnlyPSRAM() noexcept {}
/**
* @brief Copy constructor from another allocator type
* @tparam U Type of the other allocator
* @param other The other allocator
*/
template <typename U>
AllocatorOnlyPSRAM(const AllocatorOnlyPSRAM<U>&) noexcept {}
/**
* @brief Allocate memory from PSRAM
* @param n Number of elements to allocate
* @return Pointer to allocated memory
* @throws std::bad_alloc If allocation fails or size is too large
*/
pointer allocate(size_type n) {
// if (n > std::numeric_limits<size_type>::max() / sizeof(T))
// throw std::bad_alloc();
// in Arduino excepitons are disabled!
assert(n <= std::numeric_limits<size_type>::max() / sizeof(T));
pointer p = static_cast<pointer>(
heap_caps_malloc(n * sizeof(T), MALLOC_CAP_SPIRAM));
// if (!p) throw std::bad_alloc();
// in Arduino excepitons are disabled!
assert(p);
return p;
}
/**
* @brief Deallocate memory
* @param p Pointer to memory to deallocate
* @param size Size of allocation (unused)
*/
void deallocate(pointer p, size_type) noexcept { heap_caps_free(p); }
/**
* @brief Rebind allocator to another type
* @tparam U Type to rebind the allocator to
*/
template <typename U>
struct rebind {
using other = AllocatorOnlyPSRAM<U>;
};
};
} // namespace esp32_psram

View File

@@ -1,54 +0,0 @@
#pragma once
#include <Arduino.h>
#include "InMemoryFS.h"
#include "VectorHIMEM.h"
namespace esp32_psram {
/**
* @class HIMEMClass
* @brief Class for managing files stored in ESP32's High Memory (HIMEM)
*
* This class provides an interface similar to SD.h for managing files
* that are stored in HIMEM memory (beyond the 4MB boundary) rather than on an SD card.
* HIMEM offers larger storage capacity but slightly slower access than regular PSRAM.
*/
class HIMEMClass : public InMemoryFS<VectorHIMEM<uint8_t>, FileHIMEM> {
public:
/**
* @brief Initialize the HIMEM filesystem
* @return true if initialization was successful, false otherwise
*/
bool begin() override {
if (esp_himem_get_free_size() > 0) {
initialized = true;
return true;
}
initialized = false;
return false;
}
/**
* @brief Get total space (returns available HIMEM)
* @return Total HIMEM size in bytes
*/
uint64_t totalBytes() override {
return esp_himem_get_phys_size();
}
/**
* @brief Get free space (returns free HIMEM)
* @return Free HIMEM size in bytes
*/
uint64_t freeBytes() override {
return esp_himem_get_free_size();
}
};
/**
* @brief Global instance of HIMEMClass for easy access
*/
static HIMEMClass HIMEM;
} // namespace esp32_psram

View File

@@ -1,362 +0,0 @@
#pragma once
#include <algorithm>
#include <limits>
#include <memory>
#include <vector>
// ESP32 HIMEM headers - using conditional inclusion for compatibility
#if __has_include("esp32/himem.h")
#include "esp32/himem.h"
#elif __has_include("esp_himem.h")
#include "esp_himem.h"
#else
// Fall back to Arduino ESP32 core path
extern "C" {
#include "esp32/himem.h"
}
// Define missing constants if needed
#ifndef ESP_HIMEM_BLKSZ
#define ESP_HIMEM_BLKSZ (32 * 1024)
#endif
#endif
// Make sure ESP_HIMEM_PROT_RW is defined
#ifndef ESP_HIMEM_PROT_RW
#define ESP_HIMEM_PROT_RW 0
#endif
namespace esp32_psram {
static constexpr const char* TAG = "HIMEM"; // Tag for ESP logging
/**
* @class HimemBlock
* @brief Manages a block of himem memory with mapping functionality
*/
class HimemBlock {
public:
/**
* @brief Default constructor
*/
HimemBlock() { ESP_LOGD(TAG, "HimemBlock constructor called"); }
/**
* @brief Allocate a block of himem
* @param block_size Size of memory to allocate in bytes
* @return the allocated (block) size in bytes, 0 otherwise
*/
size_t allocate(size_t block_size) {
ESP_LOGI(TAG, "HimemBlock::allocate(%u bytes) - Current handle: %p",
block_size, handle);
if (handle != 0) {
ESP_LOGW(TAG, "Cannot allocate: Block already allocated");
return false; // Already allocated
}
// Round up to the nearest multiple of ESP_HIMEM_BLKSZ (32K)
block_size = ((block_size + ESP_HIMEM_BLKSZ - 1) / ESP_HIMEM_BLKSZ) *
ESP_HIMEM_BLKSZ;
size = block_size;
esp_err_t err = esp_himem_alloc(block_size, &handle);
if (err != ESP_OK) {
ESP_LOGE(TAG, "HIMEM allocation failed - error: %d, size: %d", err,
block_size);
return 0;
}
ESP_LOGD(TAG, "- Successfully allocated %u bytes, handle: %p", block_size,
handle);
return block_size;
}
/**
* @brief Read data from HIMEM at specified offset
* @param dest Destination buffer
* @param offset Offset in HIMEM to read from
* @param length Number of bytes to read
* @return Number of bytes actually read
*/
size_t read(void* dest, size_t offset, size_t length) {
ESP_LOGD(TAG, "HimemBlock::read(dst=%p, offset=%u, length=%u)", dest,
offset, length);
if (!handle || offset >= size) {
ESP_LOGW(TAG, "Read failed: %s",
!handle ? "Invalid handle" : "Offset beyond size");
return 0;
}
// Ensure we don't read past the end
length = std::min(length, size - offset);
if (length == 0) {
ESP_LOGW(TAG, "Read failed: Zero length after bounds check");
return 0;
}
// Calculate which block this belongs to
size_t block_index = offset / ESP_HIMEM_BLKSZ;
size_t block_offset = offset % ESP_HIMEM_BLKSZ;
size_t bytes_read = 0;
ESP_LOGD(TAG, "- Reading from block %u, offset %u", block_index,
block_offset);
uint8_t* dest_ptr = static_cast<uint8_t*>(dest);
while (bytes_read < length) {
// Ensure the correct block is mapped
if (!ensure_block_mapped(block_index)) {
return bytes_read;
}
// Calculate how much to read from this block
size_t block_remain = ESP_HIMEM_BLKSZ - block_offset;
size_t to_read = std::min(block_remain, length - bytes_read);
ESP_LOGD(TAG, "- Reading %u bytes from window at offset %u", to_read,
block_offset);
// Copy the data
memcpy(dest_ptr + bytes_read,
static_cast<uint8_t*>(mapped_ptr) + block_offset, to_read);
bytes_read += to_read;
block_index++;
block_offset = 0; // Reset offset for next blocks
}
ESP_LOGD(TAG, "- Successfully read %u bytes", bytes_read);
return bytes_read;
}
/**
* @brief Write data to HIMEM at specified offset
* @param src Source buffer
* @param offset Offset in HIMEM to write to
* @param length Number of bytes to write
* @return Number of bytes actually written
*/
size_t write(const void* src, size_t offset, size_t length) {
ESP_LOGD(TAG, "HimemBlock::write(src=%p, offset=%u, length=%u)", src,
offset, length);
if (!handle || offset >= size) {
ESP_LOGW(TAG, "Write failed: %s",
!handle ? "Invalid handle" : "Offset beyond size");
return 0;
}
// Ensure we don't write past the end
length = std::min(length, size - offset);
if (length == 0) {
ESP_LOGW(TAG, "Write failed: Zero length after bounds check");
return 0;
}
// Calculate which block this belongs to
size_t block_index = offset / ESP_HIMEM_BLKSZ;
size_t block_offset = offset % ESP_HIMEM_BLKSZ;
size_t bytes_written = 0;
ESP_LOGD(TAG, "- Writing to block %u, offset %u", block_index,
block_offset);
const uint8_t* src_ptr = static_cast<const uint8_t*>(src);
while (bytes_written < length) {
// Ensure the correct block is mapped
if (!ensure_block_mapped(block_index)) {
return bytes_written;
}
// Calculate how much to write to this block
size_t block_remain = ESP_HIMEM_BLKSZ - block_offset;
size_t to_write = std::min(block_remain, length - bytes_written);
ESP_LOGD(TAG, "- Writing %u bytes to window at offset %u", to_write,
block_offset);
// Copy the data
memcpy(static_cast<uint8_t*>(mapped_ptr) + block_offset,
src_ptr + bytes_written, to_write);
bytes_written += to_write;
block_index++;
block_offset = 0; // Reset offset for next blocks
}
ESP_LOGD(TAG, "- Successfully wrote %u bytes", bytes_written);
return bytes_written;
}
bool getAddress(size_t offset, void* &result, size_t &available) {
size_t block_index = offset / ESP_HIMEM_BLKSZ;
size_t block_offset = offset % ESP_HIMEM_BLKSZ;
if (!ensure_block_mapped(block_index)) return false;
available = ESP_HIMEM_BLKSZ - block_offset;
result = static_cast<uint8_t*>(mapped_ptr)+block_offset;
return true;
}
/**
* @brief Unmap the himem block
*/
void unmap() {
ESP_LOGD(TAG, "HimemBlock::unmap() - mapped_ptr=%p, range=%p", mapped_ptr,
range);
if (mapped_ptr && range) {
ESP_LOGD(TAG, "- Unmapping memory and freeing range");
esp_himem_unmap(range, mapped_ptr, ESP_HIMEM_BLKSZ);
esp_himem_free_map_range(range);
mapped_ptr = nullptr;
range = 0;
current_mapped_block = SIZE_MAX; // Reset currently mapped block
ESP_LOGD(TAG, "- Unmapped successfully");
} else {
ESP_LOGD(TAG, "- Nothing to unmap");
}
}
/**
* @brief Free the himem block
*/
void free() {
ESP_LOGD(TAG, "HimemBlock::free() - handle=%p", handle);
if (handle) {
ESP_LOGD(TAG, "- Unmapping before freeing");
unmap();
ESP_LOGD(TAG, "- Freeing HIMEM handle %p", handle);
esp_himem_free(handle);
handle = 0;
size = 0;
ESP_LOGD(TAG, " - Successfully freed HIMEM block");
} else {
ESP_LOGD(TAG, "- Nothing to free");
}
}
/**
* @brief Get the size of the allocated block
* @return Size of the allocated block in bytes
*/
size_t get_size() const {
ESP_LOGD(TAG, "HimemBlock::get_size() = %u", size);
return size;
}
/**
* @brief Destructor - ensures memory is properly freed
*/
~HimemBlock() {
ESP_LOGD(TAG, "HimemBlock destructor called");
free();
}
/**
* @brief Copy constructor (deleted)
*/
HimemBlock(const HimemBlock&) = delete;
/**
* @brief Move constructor
*/
HimemBlock(HimemBlock&& other) noexcept
: handle(other.handle),
range(other.range),
mapped_ptr(other.mapped_ptr),
size(other.size),
current_mapped_block(other.current_mapped_block) {
ESP_LOGD(TAG, "HimemBlock move constructor - moving handle=%p, size=%u",
other.handle, other.size);
other.handle = 0;
other.range = 0;
other.mapped_ptr = nullptr;
other.size = 0;
other.current_mapped_block = SIZE_MAX;
}
/**
* @brief Copy assignment operator (deleted)
*/
HimemBlock& operator=(const HimemBlock&) = delete;
/**
* @brief Move assignment operator
*/
HimemBlock& operator=(HimemBlock&& other) noexcept {
ESP_LOGD(TAG, "HimemBlock move assignment - from handle=%p to handle=%p",
other.handle, handle);
if (this != &other) {
ESP_LOGD(TAG, "Freeing current resources before move assignment");
free();
handle = other.handle;
range = other.range;
mapped_ptr = other.mapped_ptr;
size = other.size;
current_mapped_block = other.current_mapped_block;
ESP_LOGD(TAG, "Moved resources, new size=%u", size);
other.handle = 0;
other.range = 0;
other.mapped_ptr = nullptr;
other.size = 0;
other.current_mapped_block = SIZE_MAX;
} else {
ESP_LOGD(TAG, "Self-assignment detected, no action taken");
}
return *this;
}
protected:
esp_himem_handle_t handle = 0;
esp_himem_rangehandle_t range = 0;
void* mapped_ptr = nullptr;
size_t size = 0;
size_t current_mapped_block =
SIZE_MAX; // Track which block is currently mapped
/**
* @brief Ensure a specific block is mapped into memory
* @param block_index The index of the block to map
* @return true if mapping successful, false otherwise
*/
bool ensure_block_mapped(size_t block_index) {
// If the requested block is already mapped, we're done
if (block_index == current_mapped_block) {
return true;
}
// Unmap previous block if any
if (mapped_ptr) {
ESP_LOGD(TAG, "- Unmapping block %u before mapping new block %u",
current_mapped_block, block_index);
unmap(); // Unmap previous block
}
// Allocate map range
ESP_LOGD(TAG, "- Allocating map range for block %u", block_index);
esp_err_t err = esp_himem_alloc_map_range(ESP_HIMEM_BLKSZ, &range);
if (err != ESP_OK) {
ESP_LOGE(TAG, "Failed to allocate map range: %d", err);
return false;
}
// Map the current block
ESP_LOGD(TAG, "- Mapping block %u (offset %u)", block_index,
block_index * ESP_HIMEM_BLKSZ);
err = esp_himem_map(handle, range, block_index * ESP_HIMEM_BLKSZ, 0,
ESP_HIMEM_BLKSZ, ESP_HIMEM_PROT_RW, &mapped_ptr);
if (err != ESP_OK) {
ESP_LOGE(TAG, "Failed to map memory: %d", err);
esp_himem_free_map_range(range);
range = 0;
return false;
}
current_mapped_block = block_index;
return true;
}
};
} // namespace esp32_psram

View File

@@ -1,251 +0,0 @@
#pragma once
#include <Arduino.h>
#include <map>
#include "InMemoryFile.h"
// Define Arduino file mode constants if not already defined
#ifndef FILE_READ
#define FILE_READ 0
#endif
#ifndef FILE_WRITE
#define FILE_WRITE 1
#endif
#ifndef FILE_APPEND
#define FILE_APPEND 2
#endif
namespace esp32_psram {
/**
* @class InMemoryFS
* @brief Base class for memory-based file systems like PSRAM and HIMEM
*
* This class provides a common interface for in-memory file systems,
* with methods for file management and traversal.
*
* @tparam VectorType The vector implementation to use (VectorPSRAM or
* VectorHIMEM)
* @tparam FileType The file implementation to return (FilePSRAM or FileHIMEM)
*/
template <typename VectorType, typename FileType>
class InMemoryFS {
public:
/**
* @brief Initialize the file system
* @return true if initialization was successful, false otherwise
*/
virtual bool begin() = 0;
/**
* @brief Check if a file exists
* @param filename Name of the file to check
* @return true if the file exists, false otherwise
*/
bool exists(const char* filename) {
if (!initialized) return false;
return fileData.find(std::string(filename)) != fileData.end();
}
/**
* @brief Open a file
* @param filename Name of the file to open
* @param mode Mode to open the file in (FILE_READ, FILE_WRITE, etc.)
* @return A file object for the opened file
*/
FileType open(const char* filename, uint8_t mode) {
ESP_LOGD("InMemoryFS", "Opening file %s with mode %d", filename, mode);
if (!initialized) {
ESP_LOGW("InMemoryFS", "Filesystem not initialized");
FileType emptyFile;
return emptyFile;
}
// Convert Arduino file modes to our enum
FileMode fileMode;
if (mode == FILE_READ) {
fileMode = FileMode::READ;
} else if (mode == FILE_WRITE) {
fileMode = FileMode::WRITE;
} else if (mode == FILE_APPEND) {
fileMode = FileMode::APPEND;
} else {
fileMode = FileMode::READ_WRITE;
}
std::string filenameStr(filename);
auto it = fileData.find(filenameStr);
FileType file;
if (it != fileData.end()) {
// File exists, create a new file pointing to existing data
ESP_LOGD("InMemoryFS", "File exists, connecting to existing data");
file.setVector(&(it->second));
} else if (mode != FILE_READ) {
// File doesn't exist, create it for writing or appending
ESP_LOGD("InMemoryFS", "Creating new file for writing");
fileData[filenameStr] = VectorType(); // Create empty vector in the map
file.setVector(&(fileData[filenameStr]));
} else {
// File doesn't exist and mode is READ
ESP_LOGW("InMemoryFS", "File doesn't exist and mode is READ");
return file; // Return empty file
}
// Configure the file
file.setName(filename);
file.open(fileMode);
// Set up the next file callback
file.setNextFileCallback(
[this](const char* currentFileName, FileMode currentMode) -> FileType {
ESP_LOGD("InMemoryFS", "NextFile callback called for %s",
currentFileName);
// Get the next filename
String nextName = this->getNextFileName(currentFileName);
if (nextName.isEmpty()) {
ESP_LOGD("InMemoryFS", "No next file found");
return FileType(); // Return empty file if no next file
}
// Convert FileMode to Arduino mode
uint8_t arduinoMode;
if (currentMode == FileMode::READ)
arduinoMode = FILE_READ;
else if (currentMode == FileMode::WRITE)
arduinoMode = FILE_WRITE;
else if (currentMode == FileMode::APPEND)
arduinoMode = FILE_APPEND;
else
arduinoMode = FILE_READ | FILE_WRITE;
// Open and return the next file
ESP_LOGD("InMemoryFS", "Returning next file: %s", nextName.c_str());
return this->open(nextName.c_str(), arduinoMode);
});
ESP_LOGD("InMemoryFS", "File opened successfully");
return file;
}
/**
* @brief Remove a file
* @param filename Name of the file to remove
* @return true if the file was removed, false otherwise
*/
bool remove(const char* filename) {
if (!initialized) return false;
std::string filenameStr(filename);
auto it = fileData.find(filenameStr);
if (it != fileData.end()) {
fileData.erase(it);
return true;
}
return false;
}
/**
* @brief Create a directory (no-op for compatibility)
* @param dirname Name of the directory
* @return Always returns true for compatibility
*/
bool mkdir(const char* dirname) {
// No directories in this implementation, just for compatibility
return true;
}
/**
* @brief Remove a directory (no-op for compatibility)
* @param dirname Name of the directory
* @return Always returns true for compatibility
*/
bool rmdir(const char* dirname) {
// No directories in this implementation, just for compatibility
return true;
}
/**
* @brief Get the name of the next file after the specified file
* @param currentFileName Name of the current file
* @return Name of the next file, or empty string if there are no more files
*/
String getNextFileName(const char* currentFileName) {
if (!initialized || fileData.empty()) {
return String();
}
if (currentFileName == nullptr || strlen(currentFileName) == 0 ||
strcmp(currentFileName, "/") == 0) {
// Return the first file if current is empty or is root directory
return String(fileData.begin()->first.c_str());
}
std::string current(currentFileName);
auto it = fileData.find(current);
if (it == fileData.end()) {
// Current file not found, find the next one alphabetically
for (auto& entry : fileData) {
if (entry.first > current) {
return String(entry.first.c_str());
}
}
// No file after the specified name
return String();
} else {
// Found the current file, get the next one
++it;
if (it != fileData.end()) {
return String(it->first.c_str());
} else {
// Was the last file
return String();
}
}
}
/**
* @brief Get the first file in the filesystem
* @return Name of the first file, or empty string if there are no files
*/
String getFirstFileName() {
if (!initialized || fileData.empty()) {
return String();
}
return String(fileData.begin()->first.c_str());
}
/**
* @brief Get the total number of files
* @return Number of files in the filesystem
*/
size_t fileCount() const {
if (!initialized) return 0;
return fileData.size();
}
/**
* @brief Get total space
* @return Total memory size in bytes
*/
virtual uint64_t totalBytes() = 0;
/**
* @brief Get free space
* @return Free memory size in bytes
*/
virtual uint64_t freeBytes() = 0;
protected:
bool initialized = false;
std::map<std::string, VectorType> fileData;
};
} // namespace esp32_psram

View File

@@ -1,421 +0,0 @@
#pragma once
#include <Arduino.h>
#include "VectorHIMEM.h"
#include "VectorPSRAM.h"
namespace esp32_psram {
// Define file modes
enum class FileMode { READ, WRITE, APPEND, READ_WRITE };
/**
* @class InMemoryFile
* @brief A file-like interface for vector-backed storage in memory
*
* This class provides a file-like interface (compatible with Arduino's Stream)
* for reading and writing data to vector-backed storage. It can use either
* standard PSRAM or ESP32's HIMEM (high memory beyond the 4MB boundary)
* as its underlying storage mechanism through the VectorPSRAM and VectorHIMEM
* implementations.
*
* InMemoryFile offers familiar file operations like open, close, read, write,
* seek, and truncate while managing the data in memory rather than on disk.
* This makes it useful for temporary storage, data processing, or situations
* where file operations are needed but filesystem access is not available
* or desirable.
*
* The class can either manage its own internal vector or reference an external
* vector supplied by another component (like PSRAMClass or HIMEMClass).
*
* @tparam VectorType The vector implementation to use for storage (typically
* VectorPSRAM<uint8_t> or VectorHIMEM<uint8_t>)
*
* @note The performance characteristics will depend on the underlying vector
* implementation. HIMEM operations are generally slower than regular
* PSRAM operations but allow for larger storage capacity.
*/
template <typename VectorType>
class InMemoryFile : public Stream {
public:
// Define a single callback type that returns the next file directly
using NextFileCallback =
std::function<InMemoryFile<VectorType>(const char*, FileMode)>;
/**
* @brief Default constructor - initializes with internal vector
*/
InMemoryFile() : data_ptr(&internal_data) {
ESP_LOGD(TAG, "InMemoryFile constructor called");
}
/**
* @brief Constructor with filename and mode
* @param filename Name of the file
* @param mode Mode to open the file in
*/
InMemoryFile(const char* filename, FileMode mode)
: data_ptr(&internal_data), name_(filename) {
ESP_LOGD(TAG, "InMemoryFile constructor with name and mode called");
open(mode);
}
/**
* @brief Destructor - ensures proper cleanup
*/
virtual ~InMemoryFile() {
ESP_LOGD(TAG, "InMemoryFile destructor called");
close();
if (!using_external_vector) {
data_ptr = nullptr;
}
}
/**
* @brief Set the vector to use for this file
* @param vec Pointer to the vector to use
*/
void setVector(VectorType* vec) {
ESP_LOGD(TAG, "Setting external vector pointer: %p", vec);
if (vec) {
data_ptr = vec;
using_external_vector = true;
} else {
data_ptr = &internal_data;
using_external_vector = false;
}
}
/**
* @brief Set the name of this file
* @param name The name to set
*/
void setName(const char* name) {
ESP_LOGD(TAG, "Setting file name: %s", name);
name_ = name;
}
/**
* @brief Open the file with the specified mode
* @param mode Mode to open the file in
* @return true if opened successfully, false otherwise
*/
bool open(FileMode mode) {
ESP_LOGD(TAG, "Opening file '%s' with mode %d", name_.c_str(),
static_cast<int>(mode));
this->mode = mode;
if (mode == FileMode::WRITE) {
// Clear the vector for writing
data_ptr->clear();
position_ = 0;
} else if (mode == FileMode::APPEND) {
// Position at end for appending
position_ = data_ptr->size();
} else {
// READ or READ_WRITE - position at beginning
position_ = 0;
}
open_ = true;
return true;
}
/**
* @brief Close the file
*/
void close() {
ESP_LOGD(TAG, "Closing file '%s'", name_.c_str());
open_ = false;
}
/**
* @brief Check if file is open
* @return true if open, false otherwise
*/
bool isOpen() const { return open_; }
/**
* @brief Get the name of the file
* @return File name
*/
String name() const { return name_; }
/**
* @brief Get the size of the file
* @return File size in bytes
*/
size_t size() const { return data_ptr->size(); }
// Stream interface implementation
/**
* @brief Read a single byte from the file
* @return The next byte, or -1 if no data is available
*/
int read() override {
ESP_LOGD(TAG, "InMemoryFile::read() - position %u", (unsigned)position_);
if (!open_ || (mode != FileMode::READ && mode != FileMode::READ_WRITE)) {
ESP_LOGE(TAG, "read failed: file not open for reading");
return -1;
}
if (position_ >= data_ptr->size()) {
ESP_LOGD(TAG, "read at EOF: pos=%u, size=%u", (unsigned)position_,
(unsigned)data_ptr->size());
return -1; // EOF
}
uint8_t byte = (*data_ptr)[position_++];
return byte;
}
/**
* @brief Read multiple bytes from the file
* @param buffer Buffer to store the read data
* @param size Maximum number of bytes to read
* @return Number of bytes actually read
*/
size_t readBytes(char* buffer, size_t size) override {
ESP_LOGD(TAG, "InMemoryFile::readBytes: %u", (unsigned)size);
if (!open_ || (mode != FileMode::READ && mode != FileMode::READ_WRITE)) {
ESP_LOGE(TAG, "read failed: file not open for reading");
return 0;
}
// Calculate how many bytes we can actually read
size_t available_bytes = data_ptr->size() - position_;
size_t bytes_to_read = min(size, available_bytes);
// Read the bytes
for (size_t i = 0; i < bytes_to_read; i++) {
buffer[i] = (*data_ptr)[position_ + i];
}
position_ += bytes_to_read;
return bytes_to_read;
}
/**
* @brief Get the number of bytes available to read
* @return Number of bytes available
*/
int available() override {
if (!open_) return 0;
return data_ptr->size() - position_;
}
/**
* @brief Peek at the next byte without advancing the position
* @return The next byte, or -1 if no data is available
*/
int peek() override {
if (!open_ || (mode != FileMode::READ && mode != FileMode::READ_WRITE)) {
return -1;
}
if (position_ >= data_ptr->size()) {
return -1; // EOF
}
return (*data_ptr)[position_];
}
/**
* @brief Ensure all data is committed to the storage
* No-op for this implementation since data is in memory
*/
void flush() override {
// No-op for in-memory implementation
}
/**
* @brief Write a single byte to the file
* @param b The byte to write
* @return 1 if the byte was written, 0 otherwise
*/
size_t write(uint8_t b) override {
ESP_LOGD(TAG, "InMemoryFile::write: 1 byte");
if (!open_ || (mode != FileMode::WRITE && mode != FileMode::APPEND &&
mode != FileMode::READ_WRITE)) {
ESP_LOGE(TAG, "write failed: file not open for writing");
return 0;
}
if (position_ >= data_ptr->size()) {
// Append to the end
data_ptr->push_back(b);
} else {
// Replace existing byte
(*data_ptr)[position_] = b;
}
position_++;
return 1;
}
/**
* @brief Write multiple bytes to the file
* @param buffer Buffer containing the data to write
* @param size Number of bytes to write
* @return Number of bytes actually written
*/
size_t write(const uint8_t* buffer, size_t size) override {
ESP_LOGD(TAG, "InMemoryFile::write: %u", (unsigned)size);
if (!open_ || (mode != FileMode::WRITE && mode != FileMode::APPEND &&
mode != FileMode::READ_WRITE)) {
ESP_LOGE(TAG, "write failed: file not open for writing");
return 0;
}
if (position_ >= data_ptr->size()) {
// Append to the end
data_ptr->reserve(data_ptr->size() + size); // Optimize capacity
for (size_t i = 0; i < size; i++) {
data_ptr->push_back(buffer[i]);
}
} else {
// Replace/insert bytes
size_t space_available = data_ptr->size() - position_;
size_t bytes_to_replace = min(size, space_available);
size_t bytes_to_append = size - bytes_to_replace;
// Replace existing bytes
for (size_t i = 0; i < bytes_to_replace; i++) {
(*data_ptr)[position_ + i] = buffer[i];
}
// Append remaining bytes
for (size_t i = 0; i < bytes_to_append; i++) {
data_ptr->push_back(buffer[bytes_to_replace + i]);
}
}
position_ += size;
return size;
}
// File-specific methods
/**
* @brief Set the current position in the file
* @param pos The position to seek to
* @return true if successful, false otherwise
*/
bool seek(size_t pos) {
ESP_LOGD(TAG, "InMemoryFile::seek: %u", (unsigned)pos);
if (!open_ || pos > data_ptr->size()) {
ESP_LOGE(TAG, "seek failed: file not open or position beyond size");
return false;
}
position_ = pos;
return true;
}
/**
* @brief Get the current position in the file
* @return Current position
*/
size_t position() const { return position_; }
/**
* @brief Truncate the file to the current position
*/
void truncate() {
ESP_LOGD(TAG, "InMemoryFile::truncate at position %u", (unsigned)position_);
if (!open_ || (mode != FileMode::WRITE && mode != FileMode::READ_WRITE)) {
ESP_LOGE(TAG, "truncate failed: file not open for writing");
return;
}
if (position_ < data_ptr->size()) {
// Create a new vector with just the data up to position_
VectorType new_data;
new_data.reserve(position_);
for (size_t i = 0; i < position_; i++) {
new_data.push_back((*data_ptr)[i]);
}
// Replace the old data
*data_ptr = std::move(new_data);
}
}
operator bool() const { return open_; }
/**
* @brief Set callback for navigating to the next file
*
* This function sets a callback that will be used to retrieve the next
* file when getNextFile() is called. The callback takes the current file name
* and mode, and returns the next file object directly.
*
* @param callback Function that returns the next file
*/
void setNextFileCallback(NextFileCallback callback) {
ESP_LOGD(TAG, "Setting next file callback");
nextFileCallback = callback;
}
/**
* @brief Get the next file in the filesystem
*
* This method uses the registered callback to get the next file
* after this one in the filesystem.
*
* @return The next file, or an empty file if there is no next file or
* callback isn't set
*/
InMemoryFile<VectorType> getNextFile() {
if (!nextFileCallback || name_.isEmpty()) {
// Return empty file if callback isn't set or no name
InMemoryFile<VectorType> emptyFile;
return emptyFile;
}
// Get the next file directly using the callback
return nextFileCallback(name_.c_str(), mode);
}
/**
* @brief Reserve storage
* @param new_cap The new capacity of the file
*/
bool reserve(size_t new_cap) {
if (data_ptr == nullptr) return false;
data_ptr->reserve(new_cap);
return true;
}
/**
* @brief Get the number of bytes that can be held in current storage.
* Please note that this might dynamically grow!
* @return The capacity of the file
*/
size_t capacity() const {
if (data_ptr == nullptr) return 0;
return data_ptr->capacity();
}
private:
VectorType* data_ptr =
nullptr; // Pointer to vector data (internal or external)
VectorType internal_data; // Internal vector for standalone use
bool using_external_vector = false;
size_t position_ = 0;
bool open_ = false;
FileMode mode = FileMode::READ;
String name_;
// Single callback for getting the next file
NextFileCallback nextFileCallback = nullptr;
// Tags for debug logging
static constexpr const char* TAG = "InMemoryFile";
};
// Type aliases for convenience
using FilePSRAM = InMemoryFile<VectorPSRAM<uint8_t>>;
using FileHIMEM = InMemoryFile<VectorHIMEM<uint8_t>>;
} // namespace esp32_psram

View File

@@ -1,54 +0,0 @@
#pragma once
#include <Arduino.h>
#include "InMemoryFS.h"
#include "VectorPSRAM.h"
namespace esp32_psram {
/**
* @class PSRAMClass
* @brief Class for managing files stored in ESP32's PSRAM
*
* This class provides an interface similar to SD.h for managing files
* that are stored in PSRAM memory rather than on an SD card.
*/
class PSRAMClass : public InMemoryFS<VectorPSRAM<uint8_t>, FilePSRAM> {
public:
/**
* @brief Initialize the PSRAM filesystem
* @return true if initialization was successful, false otherwise
*/
bool begin() override {
if (ESP.getFreePsram() > 0) {
initialized = true;
return true;
}
initialized = false;
return false;
}
/**
* @brief Get total space (returns available PSRAM)
* @return Total PSRAM size in bytes
*/
uint64_t totalBytes() override {
return ESP.getPsramSize();
}
/**
* @brief Get free space (returns free PSRAM)
* @return Free PSRAM size in bytes
*/
uint64_t freeBytes() override {
return ESP.getFreePsram();
}
};
/**
* @brief Global instance of PSRAMClass for easy access
*/
static PSRAMClass PSRAM;
} // namespace esp32_psram

View File

@@ -1,250 +0,0 @@
#pragma once
#include <Arduino.h>
#include <Stream.h>
#include "VectorPSRAM.h"
#include "VectorHIMEM.h"
namespace esp32_psram {
/**
* @class RingBufferStream
* @brief A circular buffer implementation that extends Arduino's Stream
* @tparam VectorType The vector type to use as underlying storage
*
* This class implements a ring buffer (circular buffer) that uses a vector container
* for storage. It extends Arduino's Stream class to provide standard stream functionality.
* The buffer can be used with any vector type, including VectorPSRAM and VectorHIMEM.
*/
template <typename VectorType>
class RingBufferStream : public Stream {
private:
VectorType buffer;
size_t readIndex = 0;
size_t writeIndex = 0;
bool full = false;
size_t maxSize;
public:
/**
* @brief Constructor with specified buffer size
* @param size The size of the buffer in bytes
*/
RingBufferStream(size_t size) : maxSize(size) {
buffer.resize(size);
}
/**
* @brief Get the number of bytes available for reading
* @return Number of bytes available
*/
int available() override {
if (full) {
return maxSize;
}
if (writeIndex >= readIndex) {
return writeIndex - readIndex;
} else {
return maxSize - (readIndex - writeIndex);
}
}
/**
* @brief Read a byte from the buffer
* @return The byte read, or -1 if the buffer is empty
*/
int read() override {
if (isEmpty()) {
return -1;
}
uint8_t value = buffer[readIndex];
readIndex = (readIndex + 1) % maxSize;
full = false;
return value;
}
/**
* @brief Look at the next byte in the buffer without removing it
* @return The next byte to be read, or -1 if the buffer is empty
*/
int peek() override {
if (isEmpty()) {
return -1;
}
return buffer[readIndex];
}
/**
* @brief Write a byte to the buffer
* @param value The byte to write
* @return 1 if the byte was written, 0 if the buffer is full
*/
size_t write(uint8_t value) override {
if (full) {
return 0;
}
buffer[writeIndex] = value;
writeIndex = (writeIndex + 1) % maxSize;
// Check if buffer is now full
if (writeIndex == readIndex) {
full = true;
}
return 1;
}
/**
* @brief Write multiple bytes to the buffer
* @param data Pointer to the data to write
* @param size Number of bytes to write
* @return Number of bytes written
*/
size_t write(const uint8_t *data, size_t size) {
size_t bytesWritten = 0;
for (size_t i = 0; i < size; i++) {
if (write(data[i])) {
bytesWritten++;
} else {
break;
}
}
return bytesWritten;
}
/**
* @brief Clear the buffer, removing all content
*/
void flush() override {
readIndex = 0;
writeIndex = 0;
full = false;
}
/**
* @brief Check if the buffer is empty
* @return true if the buffer is empty, false otherwise
*/
bool isEmpty() const {
return !full && (readIndex == writeIndex);
}
/**
* @brief Check if the buffer is full
* @return true if the buffer is full, false otherwise
*/
bool isFull() const {
return full;
}
/**
* @brief Get the number of bytes that can be written without blocking
* @return Number of bytes available for writing
*/
int availableForWrite() override {
if (full) {
return 0;
}
if (readIndex > writeIndex) {
return readIndex - writeIndex;
} else {
return maxSize - (writeIndex - readIndex);
}
}
/**
* @brief Get the total capacity of the buffer
* @return Total buffer capacity in bytes
*/
size_t size() const {
return maxSize;
}
/**
* @brief Get the number of bytes currently in the buffer
* @return Number of bytes in the buffer
*/
size_t used() const {
return available();
}
/**
* @brief Get the number of bytes still available in the buffer
* @return Number of free bytes in the buffer
*/
size_t free() const {
return maxSize - available();
}
/**
* @brief Read multiple bytes from the buffer
* @param buffer Buffer to store the read data
* @param size Maximum number of bytes to read
* @return Number of bytes actually read
*/
size_t readBytes(char* buffer, size_t size) override {
size_t bytesRead = 0;
for (size_t i = 0; i < size; i++) {
int value = read();
if (value >= 0) {
buffer[i] = (char)value;
bytesRead++;
} else {
break;
}
}
return bytesRead;
}
/**
* @brief Read multiple bytes from the buffer
* @param buffer Buffer to store the read data
* @param size Maximum number of bytes to read
* @return Number of bytes actually read
*/
size_t readBytes(uint8_t* buffer, size_t size) {
return readBytes(reinterpret_cast<char*>(buffer), size);
}
/**
* @brief Get direct access to the underlying vector
* @return Reference to the underlying vector
*/
VectorType& getVector() {
return buffer;
}
/**
* @brief Get const access to the underlying vector
* @return Const reference to the underlying vector
*/
const VectorType& getVector() const {
return buffer;
}
};
/**
* @brief Type alias for a RingBufferStream that uses PSRAM-backed vector storage
*/
using RingBufferStreamPSRAM = RingBufferStream<VectorPSRAM<uint8_t>>;
/**
* @brief Type alias for a RingBufferStream that uses HIMEM-backed vector storage
*/
using RingBufferStreamHIMEM = RingBufferStream<VectorHIMEM<uint8_t>>;
/**
* @brief Type alias for a RingBufferStream that uses std::vector storage
*/
using RingBufferStreamRAM = RingBufferStream<std::vector<uint8_t>>;
} // namespace esp32_psram

View File

@@ -1,227 +0,0 @@
#pragma once
#include <Arduino.h>
#include <vector>
#include "VectorPSRAM.h"
#include "VectorHIMEM.h"
namespace esp32_psram {
/**
* @class TypedRingBuffer
* @brief A generic ring buffer implementation for any data type
* @tparam T The data type to store in the buffer
* @tparam VectorType The vector type to use as underlying storage
*
* This class implements a ring buffer (circular buffer) that uses a vector container
* for storage. Unlike the Stream-based RingBuffer, this can store any data type.
*/
template <typename T, typename VectorType>
class TypedRingBuffer {
private:
VectorType buffer;
size_t readIndex = 0;
size_t writeIndex = 0;
bool full = false;
size_t maxSize;
public:
/**
* @brief Constructor with specified buffer capacity
* @param capacity The maximum number of elements the buffer can hold
*/
TypedRingBuffer(size_t capacity) : maxSize(capacity) {
buffer.resize(capacity);
}
/**
* @brief Push an element to the buffer
* @param value The value to add
* @return true if the element was added, false if the buffer is full
*/
bool push(const T& value) {
if (full) {
return false;
}
buffer[writeIndex] = value;
advanceWriteIndex();
return true;
}
/**
* @brief Push an element to the buffer, overwriting oldest data if full
* @param value The value to add
* @return true if an old element was overwritten, false otherwise
*/
bool pushOverwrite(const T& value) {
bool overwritten = full;
buffer[writeIndex] = value;
advanceWriteIndex();
return overwritten;
}
/**
* @brief Pop an element from the buffer
* @param value Reference to store the popped value
* @return true if an element was popped, false if the buffer is empty
*/
bool pop(T& value) {
if (isEmpty()) {
return false;
}
value = buffer[readIndex];
advanceReadIndex();
return true;
}
/**
* @brief Peek at the next element without removing it
* @param value Reference to store the peeked value
* @return true if an element was peeked, false if the buffer is empty
*/
bool peek(T& value) const {
if (isEmpty()) {
return false;
}
value = buffer[readIndex];
return true;
}
/**
* @brief Get the element at a specific index relative to the read position
* @param index The relative index from current read position
* @param value Reference to store the value
* @return true if the element exists, false otherwise
*/
bool peekAt(size_t index, T& value) const {
if (isEmpty() || index >= available()) {
return false;
}
size_t actualIndex = (readIndex + index) % maxSize;
value = buffer[actualIndex];
return true;
}
/**
* @brief Clear the buffer, removing all content
*/
void clear() {
readIndex = 0;
writeIndex = 0;
full = false;
}
/**
* @brief Check if the buffer is empty
* @return true if the buffer is empty, false otherwise
*/
bool isEmpty() const {
return !full && (readIndex == writeIndex);
}
/**
* @brief Check if the buffer is full
* @return true if the buffer is full, false otherwise
*/
bool isFull() const {
return full;
}
/**
* @brief Get the number of elements in the buffer
* @return Number of elements in the buffer
*/
size_t available() const {
if (full) {
return maxSize;
}
if (writeIndex >= readIndex) {
return writeIndex - readIndex;
} else {
return maxSize - (readIndex - writeIndex);
}
}
/**
* @brief Get the number of empty slots in the buffer
* @return Number of empty slots
*/
size_t availableForWrite() const {
return maxSize - available();
}
/**
* @brief Get the total capacity of the buffer
* @return Total buffer capacity
*/
size_t capacity() const {
return maxSize;
}
/**
* @brief Get direct access to the underlying vector
* @return Reference to the underlying vector
*/
VectorType& getVector() {
return buffer;
}
/**
* @brief Get const access to the underlying vector
* @return Const reference to the underlying vector
*/
const VectorType& getVector() const {
return buffer;
}
private:
/**
* @brief Advance the write index
*/
void advanceWriteIndex() {
writeIndex = (writeIndex + 1) % maxSize;
if (writeIndex == readIndex) {
full = true;
}
}
/**
* @brief Advance the read index
*/
void advanceReadIndex() {
readIndex = (readIndex + 1) % maxSize;
full = false;
}
};
/**
* @brief Type alias for a typed ring buffer that uses std::vector (in RAM)
*/
template<typename T>
using TypedRingBufferRAM = TypedRingBuffer<T, std::vector<T>>;
/**
* @brief Type alias for a typed ring buffer that uses HIMEM-backed vector storage
*/
template<typename T>
using TypedRingBufferHIMEM = TypedRingBuffer<T, VectorHIMEM<T>>;
/**
* @brief Type alias for a typed ring buffer that uses PSRAM-backed vector storage
*/
template<typename T>
using TypedRingBufferPSRAM = TypedRingBuffer<T, VectorPSRAM<T>>;
/**
* @brief Type alias for a typed ring buffer that uses HIMEM-backed vector storage
*/
// template<typename T>
// using TypedRingBufferHIMEM = TypedRingBuffer<T, VectorHIMEM<T>>;
} // namespace esp32_psram

View File

@@ -1,529 +0,0 @@
#pragma once
#include "HimemBlock.h"
namespace esp32_psram {
/**
* @class VectorHIMEM
* @brief Vector implementation that uses ESP32's high memory (himem) for
* storage
* @tparam T Type of elements stored in the vector
*/
template <typename T>
class VectorHIMEM {
public:
// Type definitions
using value_type = T;
using reference = T&;
using const_reference = const T&;
using pointer = T*;
using const_pointer = const T*;
using size_type = size_t;
using difference_type = std::ptrdiff_t;
/**
* @brief Default constructor - creates an empty vector
*/
VectorHIMEM() = default;
/**
* @brief Constructs a vector with the given number of default-initialized
* elements
* @param count The size of the vector
*/
explicit VectorHIMEM(size_type count) { resize(count); }
/**
* @brief Constructs a vector with the given number of copies of a value
* @param count The size of the vector
* @param value The value to initialize elements with
*/
VectorHIMEM(size_type count, const T& value) { resize(count, value); }
/**
* @brief Copy constructor
* @param other The vector to copy from
*/
VectorHIMEM(const VectorHIMEM& other) {
if (other.element_count > 0) {
if (reallocate(other.element_count)) {
T temp;
VectorHIMEM& other_ = const_cast<VectorHIMEM&>(other);
for (size_t i = 0; i < other.element_count; ++i) {
other_.memory.read((void*)&temp, i * sizeof(T), sizeof(T));
memory.write((void*)&temp, i * sizeof(T), sizeof(T));
}
element_count = other.element_count;
}
}
}
/**
* @brief Move constructor
* @param other The vector to move from
*/
VectorHIMEM(VectorHIMEM&& other) noexcept
: memory(std::move(other.memory)),
element_count(other.element_count),
element_capacity(other.element_capacity) {
other.element_count = 0;
other.element_capacity = 0;
}
/**
* @brief Initializer list constructor
* @param init The initializer list to copy from
*/
VectorHIMEM(std::initializer_list<T> init) {
if (init.size() > 0) {
if (reallocate(init.size())) {
size_t i = 0;
for (const auto& item : init) {
memory.write(&item, i * sizeof(T), sizeof(T));
++i;
}
element_count = init.size();
}
}
}
/**
* @brief Destructor - ensures all elements are properly destroyed
*/
~VectorHIMEM() { clear(); }
/**
* @brief Copy assignment operator
* @param other The vector to copy from
* @return Reference to this vector
*/
VectorHIMEM& operator=(const VectorHIMEM& other) {
if (this != &other) {
clear();
if (other.element_count > 0) {
if (reallocate(other.element_count)) {
T temp;
for (size_t i = 0; i < other.element_count; ++i) {
const_cast<esp32_psram::HimemBlock*>(&other.memory)->read(&temp, i * sizeof(T), sizeof(T));
memory.write(&temp, i * sizeof(T), sizeof(T));
}
element_count = other.element_count;
}
}
}
return *this;
}
/**
* @brief Move assignment operator
* @param other The vector to move from
* @return Reference to this vector
*/
VectorHIMEM& operator=(VectorHIMEM&& other) noexcept {
if (this != &other) {
clear();
memory = std::move(other.memory);
element_count = other.element_count;
element_capacity = other.element_capacity;
other.element_count = 0;
other.element_capacity = 0;
}
return *this;
}
/**
* @brief Initializer list assignment operator
* @param ilist The initializer list to copy from
* @return Reference to this vector
*/
VectorHIMEM& operator=(std::initializer_list<T> ilist) {
clear();
if (ilist.size() > 0) {
if (reallocate(ilist.size())) {
size_t i = 0;
for (const auto& item : ilist) {
memory.write(&item, i * sizeof(T), sizeof(T));
++i;
}
element_count = ilist.size();
}
}
return *this;
}
/**
* @brief Access element with bounds checking
* @param pos The position of the element
* @return Reference to the element at position pos
* @throws std::out_of_range if pos is not within the range of the vector
*/
reference at(size_type pos) {
if (pos >= element_count) {
throw std::out_of_range("VectorHIMEM: index out of range");
}
static T temp;
memory.read(&temp, pos * sizeof(T), sizeof(T));
return temp;
}
/**
* @brief Access element with bounds checking (const version)
* @param pos The position of the element
* @return Const reference to the element at position pos
* @throws std::out_of_range if pos is not within the range of the vector
*/
const_reference at(size_type pos) const {
if (pos >= element_count) {
throw std::out_of_range("VectorHIMEM: index out of range");
}
static T temp;
memory.read(&temp, pos * sizeof(T), sizeof(T));
return temp;
}
/**
* @brief Access element without bounds checking
* @param pos The position of the element
* @return Reference to the element at position pos
*/
reference operator[](size_type pos) {
static T temp;
memory.read(&temp, pos * sizeof(T), sizeof(T));
return temp;
}
// Add const version of operator[]
const_reference operator[](size_type pos) const {
static T result;
// Need to cast away const for the read operation since it doesn't modify content
HimemBlock& non_const_memory = const_cast<HimemBlock&>(memory);
non_const_memory.read(&result, pos * sizeof(T), sizeof(T));
return result;
}
/**
* @brief Access the first element
* @return Reference to the first element
*/
reference front() {
static T temp;
memory.read(&temp, 0, sizeof(T));
return temp;
}
/**
* @brief Access the first element (const version)
* @return Const reference to the first element
*/
const_reference front() const {
static T temp;
memory.read(&temp, 0, sizeof(T));
return temp;
}
/**
* @brief Access the last element
* @return Reference to the last element
*/
reference back() {
static T temp;
memory.read(&temp, (element_count - 1) * sizeof(T), sizeof(T));
return temp;
}
/**
* @brief Access the last element (const version)
* @return Const reference to the last element
*/
const_reference back() const {
static T temp;
memory.read(&temp, (element_count - 1) * sizeof(T), sizeof(T));
return temp;
}
/**
* @brief Check if the vector is empty
* @return true if the vector is empty, false otherwise
*/
bool empty() const { return element_count == 0; }
/**
* @brief Get the number of elements
* @return The number of elements in the vector
*/
size_type size() const { return element_count; }
/**
* @brief Get the maximum possible number of elements
* @return The maximum possible number of elements the vector can hold
*/
size_type max_size() const {
return std::numeric_limits<size_type>::max() / sizeof(T);
}
/**
* @brief Reserve storage
* @param new_cap The new capacity of the vector
*/
void reserve(size_type new_cap) {
if (new_cap > element_capacity) {
reallocate(new_cap);
}
}
/**
* @brief Get the number of elements that can be held in current storage
* @return The capacity of the vector
*/
size_type capacity() const { return element_capacity; }
/**
* @brief Clear the contents
*/
void clear() {
// We're using plain memory so no destructors to call
element_count = 0;
}
/**
* @brief Add an element to the end
* @param value The value to append
*/
void push_back(const T& value) {
if (element_count >= element_capacity) {
size_t new_capacity =
element_capacity == 0 ? min_elements : element_capacity * 2;
if (!reallocate(new_capacity)) {
ESP_LOGE(TAG, "Failed to reallocate for push_back");
return;
}
}
// Write the new element at the end
memory.write(&value, element_count * sizeof(T), sizeof(T));
++element_count;
}
/**
* @brief Add an element to the end by moving it
* @param value The value to append
*/
void push_back(T&& value) {
// For POD types, this is the same as the const& version
push_back(static_cast<const T&>(value));
}
/**
* @brief Remove the last element
*/
void pop_back() {
if (element_count > 0) {
--element_count;
}
}
/**
* @brief Change the number of elements stored
* @param count The new size of the vector
*/
void resize(size_type count) {
if (count > element_capacity) {
if (!reallocate(count)) {
return;
}
}
element_count = count;
}
/**
* @brief Change the number of elements stored
* @param count The new size of the vector
* @param value The value to initialize new elements with
*/
void resize(size_type count, const value_type& value) {
size_t old_size = element_count;
if (count > element_count) {
// Need to add elements
if (count > element_capacity) {
if (!reallocate(count)) {
return;
}
}
// Initialize new elements with value
for (size_t i = old_size; i < count; ++i) {
memory.write(&value, i * sizeof(T), sizeof(T));
}
}
element_count = count;
}
/**
* @brief Erase an element
* @param pos Index of the element to erase
*/
void erase(size_type pos) {
if (pos >= element_count) {
return;
}
// Move each element down by one, overwriting the erased element
T temp;
for (size_t i = pos + 1; i < element_count; ++i) {
memory.read(&temp, i * sizeof(T), sizeof(T));
memory.write(&temp, (i - 1) * sizeof(T), sizeof(T));
}
--element_count;
}
/**
* @brief Insert an element at a specific position
* @param pos Position where the element should be inserted
* @param value The value to insert
*/
void insert(size_type pos, const T& value) {
if (pos > element_count) {
return;
}
if (element_count >= element_capacity) {
size_t new_capacity =
element_capacity == 0 ? min_elements : element_capacity * 2;
if (!reallocate(new_capacity)) {
return;
}
}
// Move elements up to make space
T temp;
for (size_t i = element_count; i > pos; --i) {
memory.read(&temp, (i - 1) * sizeof(T), sizeof(T));
memory.write(&temp, i * sizeof(T), sizeof(T));
}
// Insert new element
memory.write(&value, pos * sizeof(T), sizeof(T));
++element_count;
}
/**
* @brief Swap the contents of this vector with another
* @param other Vector to swap with
*/
void swap(VectorHIMEM& other) noexcept {
std::swap(memory, other.memory);
std::swap(element_count, other.element_count);
std::swap(element_capacity, other.element_capacity);
}
protected:
HimemBlock memory;
size_t element_count = 0;
size_t element_capacity = 0;
static constexpr size_t min_elements = 16; // Minimum allocation size
/**
* @brief Calculate required memory size in bytes for a given number of
* elements
* @param count Number of elements
* @return Size in bytes
*/
static size_t calculate_size_bytes(size_t count) { return count * sizeof(T); }
/**
* @brief Reallocate memory with a new capacity
* @param new_capacity The new capacity to allocate
* @return true if reallocation was successful, false otherwise
*/
bool reallocate(size_t new_capacity) {
if (new_capacity <= element_capacity) {
return true; // No need to reallocate
}
// Calculate new size (at least min_elements)
new_capacity = std::max(new_capacity, min_elements);
// Create a new memory block
HimemBlock new_memory;
element_capacity = new_memory.allocate(calculate_size_bytes(new_capacity)) / sizeof(T);
if (element_capacity == 0) {
ESP_LOGE(TAG, "Failed to allocate new memory block");
return false;
}
// Copy existing elements if any
if (element_count > 0) {
T temp;
for (size_t i = 0; i < element_count; ++i) {
// Read from old memory
memory.read(&temp, i * sizeof(T), sizeof(T));
// Write to new memory
new_memory.write(&temp, i * sizeof(T), sizeof(T));
}
}
// Swap the memory blocks
memory = std::move(new_memory);
return true;
}
};
/**
* @brief Equality comparison operator
* @tparam T Type of elements in the vectors
* @param lhs First vector
* @param rhs Second vector
* @return true if the vectors are equal, false otherwise
*/
template <typename T>
bool operator==(const VectorHIMEM<T>& lhs, const VectorHIMEM<T>& rhs) {
if (lhs.size() != rhs.size()) {
return false;
}
T lhs_val, rhs_val;
for (size_t i = 0; i < lhs.size(); ++i) {
lhs_val = lhs[i]; // Uses operator[] which calls read()
rhs_val = rhs[i];
if (!(lhs_val == rhs_val)) {
return false;
}
}
return true;
}
/**
* @brief Inequality comparison operator
* @tparam T Type of elements in the vectors
* @param lhs First vector
* @param rhs Second vector
* @return true if the vectors are not equal, false otherwise
*/
template <typename T>
bool operator!=(const VectorHIMEM<T>& lhs, const VectorHIMEM<T>& rhs) {
return !(lhs == rhs);
}
/**
* @brief Swap the contents of two vectors
* @tparam T Type of elements in the vectors
* @param lhs First vector
* @param rhs Second vector
*/
template <typename T>
void swap(VectorHIMEM<T>& lhs, VectorHIMEM<T>& rhs) noexcept {
lhs.swap(rhs);
}
} // namespace esp32_psram

View File

@@ -1,521 +0,0 @@
#pragma once
#include <vector>
#include <memory>
#include <limits>
#include <algorithm>
#include "AllocatorPSRAM.h"
/**
* @namespace esp32_psram
* @brief Namespace containing ESP32 PSRAM-specific implementations
*/
namespace esp32_psram {
/**
* @brief Equality comparison operator for allocators
* @tparam T Type of first allocator
* @tparam U Type of second allocator
* @return Always true since all instances are equivalent
*/
template <typename T, typename U>
bool operator==(const AllocatorPSRAM<T>&, const AllocatorPSRAM<U>&) noexcept {
return true;
}
/**
* @brief Inequality comparison operator for allocators
* @tparam T Type of first allocator
* @tparam U Type of second allocator
* @return Always false since all instances are equivalent
*/
template <typename T, typename U>
bool operator!=(const AllocatorPSRAM<T>&, const AllocatorPSRAM<U>&) noexcept {
return false;
}
/**
* @class VectorPSRAM
* @brief Vector implementation that uses ESP32's PSRAM for storage
* @tparam T Type of elements stored in the vector
*
* This class provides an interface identical to std::vector but allocates
* all memory in ESP32's PSRAM, which helps preserve the limited internal RAM.
* It wraps std::vector with a custom allocator that uses PSRAM.
*/
template <typename T>
class VectorPSRAM {
private:
using vector_type = std::vector<T, AllocatorPSRAM<T>>;
vector_type vec;
public:
// Type definitions
using value_type = typename vector_type::value_type;
using allocator_type = typename vector_type::allocator_type;
using size_type = typename vector_type::size_type;
using difference_type = typename vector_type::difference_type;
using reference = typename vector_type::reference;
using const_reference = typename vector_type::const_reference;
using pointer = typename vector_type::pointer;
using const_pointer = typename vector_type::const_pointer;
using iterator = typename vector_type::iterator;
using const_iterator = typename vector_type::const_iterator;
using reverse_iterator = typename vector_type::reverse_iterator;
using const_reverse_iterator = typename vector_type::const_reverse_iterator;
/**
* @brief Default constructor - creates an empty vector
*/
VectorPSRAM() : vec(AllocatorPSRAM<T>()) {}
/**
* @brief Constructs a vector with the given number of default-initialized elements
* @param count The size of the vector
*/
explicit VectorPSRAM(size_type count) : vec(count, AllocatorPSRAM<T>()) {}
/**
* @brief Constructs a vector with the given number of copies of a value
* @param count The size of the vector
* @param value The value to initialize elements with
*/
VectorPSRAM(size_type count, const T& value) : vec(count, value, AllocatorPSRAM<T>()) {}
/**
* @brief Constructs a vector with the contents of the range [first, last)
* @tparam InputIt Input iterator type
* @param first Iterator to the first element in the range
* @param last Iterator to one past the last element in the range
*/
template <typename InputIt>
VectorPSRAM(InputIt first, InputIt last) : vec(first, last, AllocatorPSRAM<T>()) {}
/**
* @brief Copy constructor
* @param other The vector to copy from
*/
VectorPSRAM(const VectorPSRAM& other) : vec(other.vec) {}
/**
* @brief Move constructor
* @param other The vector to move from
*/
VectorPSRAM(VectorPSRAM&& other) noexcept : vec(std::move(other.vec)) {}
/**
* @brief Initializer list constructor
* @param init The initializer list to copy from
*/
VectorPSRAM(std::initializer_list<T> init) : vec(init, AllocatorPSRAM<T>()) {}
/**
* @brief Copy assignment operator
* @param other The vector to copy from
* @return Reference to this vector
*/
VectorPSRAM& operator=(const VectorPSRAM& other) {
vec = other.vec;
return *this;
}
/**
* @brief Move assignment operator
* @param other The vector to move from
* @return Reference to this vector
*/
VectorPSRAM& operator=(VectorPSRAM&& other) noexcept {
vec = std::move(other.vec);
return *this;
}
/**
* @brief Initializer list assignment operator
* @param ilist The initializer list to copy from
* @return Reference to this vector
*/
VectorPSRAM& operator=(std::initializer_list<T> ilist) {
vec = ilist;
return *this;
}
/**
* @brief Access element with bounds checking
* @param pos The position of the element
* @return Reference to the element at position pos
* @throws std::out_of_range if pos is not within the range of the vector
*/
reference at(size_type pos) { return vec.at(pos); }
/**
* @brief Access element with bounds checking (const version)
* @param pos The position of the element
* @return Const reference to the element at position pos
* @throws std::out_of_range if pos is not within the range of the vector
*/
const_reference at(size_type pos) const { return vec.at(pos); }
/**
* @brief Access element without bounds checking
* @param pos The position of the element
* @return Reference to the element at position pos
*/
reference operator[](size_type pos) { return vec[pos]; }
/**
* @brief Access element without bounds checking (const version)
* @param pos The position of the element
* @return Const reference to the element at position pos
*/
const_reference operator[](size_type pos) const { return vec[pos]; }
/**
* @brief Access the first element
* @return Reference to the first element
*/
reference front() { return vec.front(); }
/**
* @brief Access the first element (const version)
* @return Const reference to the first element
*/
const_reference front() const { return vec.front(); }
/**
* @brief Access the last element
* @return Reference to the last element
*/
reference back() { return vec.back(); }
/**
* @brief Access the last element (const version)
* @return Const reference to the last element
*/
const_reference back() const { return vec.back(); }
/**
* @brief Get pointer to the underlying array
* @return Pointer to the underlying array
*/
T* data() noexcept { return vec.data(); }
/**
* @brief Get pointer to the underlying array (const version)
* @return Const pointer to the underlying array
*/
const T* data() const noexcept { return vec.data(); }
/**
* @brief Get iterator to the beginning
* @return Iterator to the first element
*/
iterator begin() noexcept { return vec.begin(); }
/**
* @brief Get const iterator to the beginning
* @return Const iterator to the first element
*/
const_iterator begin() const noexcept { return vec.begin(); }
/**
* @brief Get const iterator to the beginning
* @return Const iterator to the first element
*/
const_iterator cbegin() const noexcept { return vec.cbegin(); }
/**
* @brief Get iterator to the end
* @return Iterator to one past the last element
*/
iterator end() noexcept { return vec.end(); }
/**
* @brief Get const iterator to the end
* @return Const iterator to one past the last element
*/
const_iterator end() const noexcept { return vec.end(); }
/**
* @brief Get const iterator to the end
* @return Const iterator to one past the last element
*/
const_iterator cend() const noexcept { return vec.cend(); }
/**
* @brief Get reverse iterator to the beginning
* @return Reverse iterator to the first element
*/
reverse_iterator rbegin() noexcept { return vec.rbegin(); }
/**
* @brief Get const reverse iterator to the beginning
* @return Const reverse iterator to the first element
*/
const_reverse_iterator rbegin() const noexcept { return vec.rbegin(); }
/**
* @brief Get const reverse iterator to the beginning
* @return Const reverse iterator to the first element
*/
const_reverse_iterator crbegin() const noexcept { return vec.crbegin(); }
/**
* @brief Get reverse iterator to the end
* @return Reverse iterator to one past the last element
*/
reverse_iterator rend() noexcept { return vec.rend(); }
/**
* @brief Get const reverse iterator to the end
* @return Const reverse iterator to one past the last element
*/
const_reverse_iterator rend() const noexcept { return vec.rend(); }
/**
* @brief Get const reverse iterator to the end
* @return Const reverse iterator to one past the last element
*/
const_reverse_iterator crend() const noexcept { return vec.crend(); }
/**
* @brief Check if the vector is empty
* @return true if the vector is empty, false otherwise
*/
bool empty() const noexcept { return vec.empty(); }
/**
* @brief Get the number of elements
* @return The number of elements in the vector
*/
size_type size() const noexcept { return vec.size(); }
/**
* @brief Get the maximum possible number of elements
* @return The maximum possible number of elements the vector can hold
*/
size_type max_size() const noexcept { return vec.max_size(); }
/**
* @brief Reserve storage
* @param new_cap The new capacity of the vector
* @throws std::length_error if new_cap > max_size()
*/
void reserve(size_type new_cap) { vec.reserve(new_cap); }
/**
* @brief Get the number of elements that can be held in current storage
* @return The capacity of the vector
*/
size_type capacity() const noexcept { return vec.capacity(); }
/**
* @brief Reduce memory usage by freeing unused memory
*/
void shrink_to_fit() { vec.shrink_to_fit(); }
/**
* @brief Clear the contents
*/
void clear() noexcept { vec.clear(); }
/**
* @brief Insert an element
* @param pos Iterator to the position before which the element will be inserted
* @param value The value to insert
* @return Iterator to the inserted element
*/
iterator insert(const_iterator pos, const T& value) { return vec.insert(pos, value); }
/**
* @brief Insert an element by moving it
* @param pos Iterator to the position before which the element will be inserted
* @param value The value to insert
* @return Iterator to the inserted element
*/
iterator insert(const_iterator pos, T&& value) { return vec.insert(pos, std::move(value)); }
/**
* @brief Insert multiple copies of an element
* @param pos Iterator to the position before which the elements will be inserted
* @param count Number of copies to insert
* @param value The value to insert
* @return Iterator to the first inserted element
*/
iterator insert(const_iterator pos, size_type count, const T& value) { return vec.insert(pos, count, value); }
/**
* @brief Insert elements from a range
* @tparam InputIt Input iterator type
* @param pos Iterator to the position before which the elements will be inserted
* @param first Iterator to the first element in the range
* @param last Iterator to one past the last element in the range
* @return Iterator to the first inserted element
*/
template <typename InputIt>
iterator insert(const_iterator pos, InputIt first, InputIt last) { return vec.insert(pos, first, last); }
/**
* @brief Insert elements from an initializer list
* @param pos Iterator to the position before which the elements will be inserted
* @param ilist The initializer list to insert from
* @return Iterator to the first inserted element
*/
iterator insert(const_iterator pos, std::initializer_list<T> ilist) { return vec.insert(pos, ilist); }
/**
* @brief Construct an element in-place
* @tparam Args Types of arguments to forward to the constructor
* @param pos Iterator to the position before which the element will be constructed
* @param args Arguments to forward to the constructor
* @return Iterator to the inserted element
*/
template <typename... Args>
iterator emplace(const_iterator pos, Args&&... args) { return vec.emplace(pos, std::forward<Args>(args)...); }
/**
* @brief Erase an element
* @param pos Iterator to the element to erase
* @return Iterator to the element after the erased element
*/
iterator erase(const_iterator pos) { return vec.erase(pos); }
/**
* @brief Erase a range of elements
* @param first Iterator to the first element to erase
* @param last Iterator to one past the last element to erase
* @return Iterator to the element after the erased range
*/
iterator erase(const_iterator first, const_iterator last) { return vec.erase(first, last); }
/**
* @brief Add an element to the end
* @param value The value to append
*/
void push_back(const T& value) { vec.push_back(value); }
/**
* @brief Add an element to the end by moving it
* @param value The value to append
*/
void push_back(T&& value) { vec.push_back(std::move(value)); }
/**
* @brief Construct an element in-place at the end
* @tparam Args Types of arguments to forward to the constructor
* @param args Arguments to forward to the constructor
* @return Reference to the inserted element
*/
template <typename... Args>
reference emplace_back(Args&&... args) { return vec.emplace_back(std::forward<Args>(args)...); }
/**
* @brief Remove the last element
*/
void pop_back() { vec.pop_back(); }
/**
* @brief Change the number of elements stored
* @param count The new size of the vector
*/
void resize(size_type count) { vec.resize(count); }
/**
* @brief Change the number of elements stored
* @param count The new size of the vector
* @param value The value to initialize new elements with
*/
void resize(size_type count, const value_type& value) { vec.resize(count, value); }
/**
* @brief Swap the contents
* @param other Vector to swap with
*/
void swap(VectorPSRAM& other) noexcept { vec.swap(other.vec); }
};
/**
* @brief Equality comparison operator
* @tparam T Type of elements in the vectors
* @param lhs First vector
* @param rhs Second vector
* @return true if the vectors are equal, false otherwise
*/
template <typename T>
bool operator==(const VectorPSRAM<T>& lhs, const VectorPSRAM<T>& rhs) {
return std::equal(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
}
/**
* @brief Inequality comparison operator
* @tparam T Type of elements in the vectors
* @param lhs First vector
* @param rhs Second vector
* @return true if the vectors are not equal, false otherwise
*/
template <typename T>
bool operator!=(const VectorPSRAM<T>& lhs, const VectorPSRAM<T>& rhs) {
return !(lhs == rhs);
}
/**
* @brief Less than comparison operator
* @tparam T Type of elements in the vectors
* @param lhs First vector
* @param rhs Second vector
* @return true if lhs is lexicographically less than rhs, false otherwise
*/
template <typename T>
bool operator<(const VectorPSRAM<T>& lhs, const VectorPSRAM<T>& rhs) {
return std::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
}
/**
* @brief Less than or equal comparison operator
* @tparam T Type of elements in the vectors
* @param lhs First vector
* @param rhs Second vector
* @return true if lhs is lexicographically less than or equal to rhs, false otherwise
*/
template <typename T>
bool operator<=(const VectorPSRAM<T>& lhs, const VectorPSRAM<T>& rhs) {
return !(rhs < lhs);
}
/**
* @brief Greater than comparison operator
* @tparam T Type of elements in the vectors
* @param lhs First vector
* @param rhs Second vector
* @return true if lhs is lexicographically greater than rhs, false otherwise
*/
template <typename T>
bool operator>(const VectorPSRAM<T>& lhs, const VectorPSRAM<T>& rhs) {
return rhs < lhs;
}
/**
* @brief Greater than or equal comparison operator
* @tparam T Type of elements in the vectors
* @param lhs First vector
* @param rhs Second vector
* @return true if lhs is lexicographically greater than or equal to rhs, false otherwise
*/
template <typename T>
bool operator>=(const VectorPSRAM<T>& lhs, const VectorPSRAM<T>& rhs) {
return !(lhs < rhs);
}
/**
* @brief Swap the contents of two vectors
* @tparam T Type of elements in the vectors
* @param lhs First vector
* @param rhs Second vector
*/
template <typename T>
void swap(VectorPSRAM<T>& lhs, VectorPSRAM<T>& rhs) noexcept {
lhs.swap(rhs);
}
} // namespace esp32_psram

View File

@@ -50,7 +50,7 @@ inline Transition mkx(const char c, Parser_state p, State_transition_hook pth) {
}
inline void Parse_error(const std::string & s) {
// EMSESP::logger().err("parse error: %s", s.c_str());
// emsesp::EMSESP::logger().err("parse error: %s", s.c_str());
}
/// Advance parser state machine by a single step.

View File

@@ -346,6 +346,7 @@ void SyslogService::loop() {
}
bool SyslogService::can_transmit() {
// TODO this should be checked also for Eth
if (!host_.empty() && (uint32_t)ip_ == 0) {
WiFi.hostByName(host_.c_str(), ip_);
}

View File

@@ -59,8 +59,6 @@ typedef double double_t;
#define snprintf snprintf_P // to keep backwards compatibility
#define IRAM_ATTR
void pinMode(uint8_t pin, uint8_t mode);
void digitalWrite(uint8_t pin, uint8_t value);
int digitalRead(uint8_t pin);

View File

@@ -26,7 +26,7 @@ class DummySettings {
public:
// SYSTEM
bool bandwidth20 = false;
bool nosleep = true;
bool nosleep = false;
// MQTT
uint16_t publish_time = 10;

View File

@@ -1,6 +1,6 @@
/*
* EMS-ESP - https://github.com/emsesp/EMS-ESP
* Copyright 2020-2025 emsesp.org - proddy, MichaelDvP
* Copyright 2020-2024 emsesp.org - proddy, MichaelDvP
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@@ -1,6 +1,6 @@
/*
* EMS-ESP - https://github.com/emsesp/EMS-ESP
* Copyright 2020-2025 emsesp.org - proddy, MichaelDvP
* Copyright 2020-2024 emsesp.org - proddy, MichaelDvP
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@@ -12,8 +12,8 @@ class Preferences {
bool _readOnly;
public:
Preferences() {};
~Preferences() {};
Preferences(){};
~Preferences(){};
bool begin(const char * name, bool readOnly = false, const char * partition_label = NULL) {
return true;
@@ -26,49 +26,44 @@ class Preferences {
return true;
}
int getChar(const char * key, uint8_t defaultValue = 0) {
return 0;
}
size_t putChar(const char * key, int8_t value) {
return 0;
}
uint8_t getUChar(const char * key, uint8_t defaultValue = 0) {
return 0;
}
size_t putUChar(const char * key, uint8_t value) {
return 0;
}
double getDouble(const char * key, double defaultValue = NAN) {
return 0;
}
size_t putDouble(const char * key, double value) {
return 0;
}
bool getBool(const char * key, bool defaultValue = false) {
return true;
}
size_t putBool(const char * key, bool value) {
uint8_t getUChar(const char * key, uint8_t defaultValue = 0) {
return 0;
}
String getString(const char * key, String defaultValue = String()) {
return "";
int getChar(const char * key, uint8_t defaultValue = 0) {
return 0;
}
double getDouble(const char * key, double defaultValue = NAN) {
return 0;
}
size_t putString(const char * key, const char * value) {
return 0;
}
size_t getString(const char * key, char * value, size_t maxLen) {
return 0;
}
size_t putString(const char * key, String value) {
return 0;
}
// unused....
size_t getString(const char * key, char * value, size_t maxLen) {
return 0;
}
String getString(const char * key, String defaultValue = String()) {
return "";
}
// unused
// void end();
// bool clear();

View File

@@ -1,6 +1,6 @@
/*
* EMS-ESP - https://github.com/emsesp/EMS-ESP
* Copyright 2020-2025 emsesp.org - proddy, MichaelDvP
* Copyright 2020-2024 emsesp.org - proddy, MichaelDvP
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@@ -1,6 +1,6 @@
/*
* EMS-ESP - https://github.com/emsesp/EMS-ESP
* Copyright 2020-2025 emsesp.org - proddy, MichaelDvP
* Copyright 2020-2024 emsesp.org - proddy, MichaelDvP
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -21,12 +21,6 @@
#include "Arduino.h"
#define EMS_TXMODE_OFF 0
#define EMS_TXMODE_DEFAULT 1
#define EMS_TXMODE_EMSPLUS 2
#define EMS_TXMODE_HT3 3
#define EMS_TXMODE_HW 4
namespace emsesp {
#define EMS_TX_STATUS_ERR 0

View File

@@ -1,4 +0,0 @@
#pragma once
#define stringPSRAM std::string
#define AllocatorPSRAM std::allocator

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 KiB

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Some files were not shown because too many files have changed in this diff Show More