1409 Commits

Author SHA1 Message Date
Proddy
6f8581f989 Merge pull request #1533 from proddy/https_36
keeping branch update. still memory and performance issues
2024-01-03 11:34:10 +01:00
Proddy
4c60a88221 remove bogus folder 2024-01-02 17:06:52 +01:00
Proddy
d093886571 json is always chunked 2024-01-02 17:06:15 +01:00
Proddy
9e251fd3de lolin default 2024-01-02 17:06:00 +01:00
Proddy
89fd16d48f header updates 2024-01-02 17:05:49 +01:00
Proddy
75fc8c201a formatting 2024-01-02 17:05:19 +01:00
Proddy
f1a3bf0e6a vite chunk optimizations 2024-01-02 17:05:11 +01:00
Proddy
86afa20470 add eventsource for log 2024-01-01 17:00:14 +01:00
Proddy
32e3f69961 add comments 2024-01-01 17:00:06 +01:00
Proddy
1b7d999fc4 add comments 2024-01-01 16:59:52 +01:00
Proddy
6e6023cfd1 comment out 2024-01-01 16:59:45 +01:00
Proddy
e64a374174 force WiFi.mode 2024-01-01 16:59:36 +01:00
Proddy
400100759a commented out, not using 2024-01-01 16:59:12 +01:00
Proddy
3e49dc113e Merge pull request #1532 from proddy/https_36
Https 36
2023-12-31 13:58:41 +01:00
Proddy
7b96baa9b8 updates 2023-12-31 13:57:43 +01:00
Proddy
8bdd01f73f latest updates 2023-12-30 21:33:42 +01:00
Proddy
b36477cc8a remove [this] 2023-12-29 12:06:11 +01:00
Proddy
ebfc4a64e2 package update 2023-12-29 12:05:54 +01:00
Proddy
fd48fb63d8 optimized 2023-12-29 12:05:47 +01:00
Proddy
20d747330c remove comments, fix get* 2023-12-29 12:05:39 +01:00
Proddy
781fb67a4e use local logger 2023-12-29 12:05:08 +01:00
Proddy
2b44155869 bump version 2023-12-29 12:04:48 +01:00
Proddy
9ca0782ae7 change api to api/system 2023-12-29 12:04:40 +01:00
Proddy
4b831e864c remove comment 2023-12-29 12:04:10 +01:00
Proddy
16dc82da1c polish translations from dev.7 2023-12-28 14:38:55 +01:00
Proddy
8cd0a9a761 API updates 2023-12-28 14:25:39 +01:00
proddy
b928ad89d9 fix erase line 2023-12-28 10:32:59 +01:00
proddy
12671f7ed3 add test for build date/time 2023-12-28 10:32:48 +01:00
proddy
22184f13f2 add back deps so compiles on OSX 2023-12-28 10:32:32 +01:00
Proddy
778bbe3b81 some standalone compile updates for testing 2023-12-27 22:41:19 +01:00
Proddy
23d4f608c5 minor uodates to routing 2023-12-26 15:52:46 +01:00
Proddy
73a51ae4ad first commit using PsychicHttp 2023-12-25 13:27:02 +01:00
Proddy
68cb94547e Merge pull request #1499 from MichaelDvP/dev
latest entities
2023-12-13 11:51:58 +01:00
MichaelDvP
ee584375c5 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2023-12-13 07:15:52 +01:00
Proddy
ac288b794f Merge pull request #1493 from proddy/dev
update standalone server to bun and itty-router, add back router paths, add support download button
2023-12-12 22:37:56 +01:00
Proddy
a1f296b2ae upercase Remember 2023-12-12 22:37:48 +01:00
Proddy
9b1e399730 fixes #1494 2023-12-12 22:35:10 +01:00
Proddy
dd6b435417 merge latest change from official repo 2023-12-12 22:34:34 +01:00
Proddy
3d5c08118c package update 2023-12-12 22:34:18 +01:00
MichaelDvP
d78d4aed9d Merge branch 'dev' of https://github.com/proddy/EMS-ESP32 into dev 2023-12-12 14:40:38 +01:00
MichaelDvP
9f34531956 fix dhw comfort mode, #1495 2023-12-12 10:11:52 +01:00
MichaelDvP
d1f3ead8b9 fix mqtt::on_message, #1494 2023-12-12 10:09:02 +01:00
Proddy
a33f17932f support info downloaded as txt 2023-12-11 16:18:11 +01:00
Proddy
eb05b83009 package update 2023-12-11 16:17:57 +01:00
Proddy
367c022e6c updated vscode 2023-12-11 16:17:45 +01:00
MichaelDvP
b9af4325c9 set curBurnPower for 3.party burners, #1483 2023-12-11 10:57:17 +01:00
MichaelDvP
1ae2a624f7 add back lowres dewtemp, #1491 2023-12-11 09:12:23 +01:00
MichaelDvP
d4c9a3c846 Merge branch 'dev' of https://github.com/proddy/EMS-ESP32 into dev 2023-12-11 09:05:58 +01:00
Proddy
0b481a44a1 experiment with path args (for future change) 2023-12-10 14:58:33 +01:00
Proddy
513d0e982e replace express with itty router - its 2x faster 2023-12-10 14:52:15 +01:00
Proddy
2629471a56 package update 2023-12-10 14:51:33 +01:00
Proddy
c1ce4f1b73 tidy up support download - https://github.com/emsesp/EMS-ESP32/discussions/1489 2023-12-10 14:51:20 +01:00
Proddy
faa21abe54 revert back to absolute routing 2023-12-10 14:50:34 +01:00
MichaelDvP
c9f5b0a2c1 fix wwCurFlow #1334, fix active state #1483, dev.4 2023-12-09 15:39:10 +01:00
MichaelDvP
ed060a400d update packages 2023-12-08 19:15:15 +01:00
MichaelDvP
6c3e5d976c console tx_mode without reboot 2023-12-08 19:15:05 +01:00
MichaelDvP
443050ae28 fix syspress for ems+ 2023-12-08 19:14:29 +01:00
Proddy
c9ca395e6d Merge branch 'emsesp:dev' into dev 2023-12-04 17:39:07 +01:00
Proddy
c3ac215493 Merge pull request #1481 from MichaelDvP/dev
add hpMaxPower #1475
2023-12-04 17:38:54 +01:00
MichaelDvP
10cabd032b update packages, formatting, changelog 2023-12-04 17:27:07 +01:00
MichaelDvP
7b9a04ede1 add hpMaxPower fix #1475 2023-12-04 17:17:23 +01:00
Proddy
9375fb4d2d Merge branch 'emsesp:dev' into dev 2023-12-03 21:28:42 +01:00
Proddy
f9b8ac6f30 Merge pull request #1478 from MichaelDvP/dev
fixes for #1474 and #1477
2023-12-03 21:28:23 +01:00
MichaelDvP
42ba93bdc1 add checkbox for MQTT-TLS, fix #1474 2023-12-03 18:07:30 +01:00
MichaelDvP
fd5f5d49b7 add back boil2hyst, fix #1477 2023-12-03 17:23:02 +01:00
proddy
80f4e63850 adjust help text 2023-12-02 12:26:11 +01:00
Proddy
7efa8ffbe0 Merge pull request #1473 from proddy/dev
roll back dom-router changes
2023-12-02 11:06:46 +01:00
Proddy
85016d6582 Merge branch 'emsesp:dev' into dev 2023-12-02 11:06:06 +01:00
Proddy
06bf2f3427 rollback dom router changes - https://github.com/emsesp/EMS-ESP32/pull/1465 2023-12-02 11:05:17 +01:00
Proddy
c38832ef06 fix warning 2023-12-02 11:04:45 +01:00
Proddy
c1fa5c42c4 Merge pull request #1471 from MichaelDvP/dev
Some new/fixed entities
2023-11-29 20:55:14 +01:00
MichaelDvP
2faa78bc32 version 3.6.5-dev.2, changelog 2023-11-29 13:12:22 +01:00
MichaelDvP
b5633cd579 add texts 2023-11-29 13:02:43 +01:00
MichaelDvP
4275d144ca add boiler pumpmode and HP heat meter 2023-11-29 12:32:42 +01:00
MichaelDvP
7f794f35a6 add thermostat heatdelays, instantstart and boost 2023-11-29 12:32:04 +01:00
MichaelDvP
8d778f902f add heatpump energy meters 2023-11-29 12:31:05 +01:00
MichaelDvP
f83f22a6fb send step as string to avoid js-rounding issue for 0.1 2023-11-29 12:06:56 +01:00
MichaelDvP
03b6ebd861 fix exhaust temperature #1467 2023-11-29 12:05:46 +01:00
Proddy
306baee94d Merge pull request #1470 from proddy/dev
HA don't set entity_category to Diagnostic/Configuration for EMS entities
2023-11-28 20:54:20 +01:00
Proddy
cb1989b2ea HA don't set entity_category to Diagnostic/Configuration for EMS entities 2023-11-28 20:52:59 +01:00
Proddy
7ce99cb1fb 3.6.5-dev.1 2023-11-28 20:52:44 +01:00
Proddy
3a36663d94 package update 2023-11-28 20:52:27 +01:00
Proddy
ba21293c42 Merge pull request #1465 from proddy/dev
fix router loops
2023-11-26 18:44:35 +01:00
Proddy
8574b44d4e react-router-dom 6.20.0 minimal 2023-11-26 18:44:15 +01:00
Proddy
76901d97d2 fix router 2023-11-26 15:56:46 +01:00
Proddy
1cbfc91912 remove tab from help page 2023-11-26 15:56:30 +01:00
Proddy
c81f579464 Merge pull request #1464 from MichaelDvP/dev
revert to react-router-dom 6.18.0 to bring blue tab line back
2023-11-26 09:58:35 +01:00
MichaelDvP
8898ec9419 revert to react-router-dom 6.18.0 to bring blue tab line back 2023-11-26 08:59:32 +01:00
Proddy
b60127c3ba Merge pull request #1461 from MichaelDvP/dev
revert to react-router-dom 6.19.0 to fix tab-routing-issue
2023-11-25 10:08:17 +01:00
MichaelDvP
095255b9b7 revert to react-router-dom 6.19.0 to fix tab-routing-issue 2023-11-24 13:36:55 +01:00
Proddy
d36246d4d1 Merge pull request #1458 from proddy/dev
3.6.5-dev.0
2023-11-24 07:41:46 +01:00
Proddy
19094d47aa 3.6.5-dev.0 2023-11-24 07:41:23 +01:00
Proddy
24cca67625 Merge pull request #1457 from proddy/dev
update packages
2023-11-24 07:28:52 +01:00
Proddy
41443d4efe update packages 2023-11-24 07:28:29 +01:00
Proddy
6e08356ff7 Merge pull request #1455 from MichaelDvP/dev
fix boiler commands to ems telegrams
2023-11-23 19:07:13 +01:00
MichaelDvP
751410ca58 fix boiler commands to ems telegrams 2023-11-23 18:27:03 +01:00
Proddy
01a15a5c85 Merge pull request #1451 from MichaelDvP/dev
next fix RC300 mode
2023-11-22 08:24:25 +01:00
MichaelDvP
1e15f65b0d get mode for seltemp, fix #1450 2023-11-22 07:50:50 +01:00
MichaelDvP
0818728c25 update packages 2023-11-22 07:50:21 +01:00
Proddy
5ad03facce Merge pull request #1445 from proddy/dev
patch for 3.6.3 with fixes #1440 #1442
2023-11-21 10:43:08 +01:00
Proddy
ad3bf294d8 Merge branch 'emsesp:dev' into dev 2023-11-21 10:42:39 +01:00
Proddy
6dba452aea patch for 3.6.3 with fixes #1440 #1442 2023-11-21 10:42:19 +01:00
Proddy
cff5b8c949 Merge pull request #1444 from MichaelDvP/dev
set/read thermostat mode for RC100-RC300, fix #1440 and fix #1442
2023-11-21 10:33:46 +01:00
MichaelDvP
aed45968db set/read thermostat mode for RC100-RC300, fix #1440 2023-11-20 07:47:01 +01:00
Proddy
2de855e044 Merge pull request #1439 from proddy/dev
prepare another 3.6.3 build with board profile fixed
2023-11-19 21:19:10 +01:00
Proddy
dfd9fe4d01 add EMSESP_DEFAULT_BOARD_PROFILE to CI builds 2023-11-19 21:18:15 +01:00
Proddy
049f956131 minor cleanup 2023-11-19 21:17:54 +01:00
Proddy
b503e2bb90 package update 2023-11-19 21:17:43 +01:00
Proddy
b300181d33 add hosted target 2023-11-19 21:17:36 +01:00
Proddy
905b52e39d Merge pull request #1438 from MichaelDvP/dev
fix crash on wrong thermostat mode command (if not using HA)
2023-11-18 14:05:54 +01:00
MichaelDvP
8fcfb3d8f7 fix crash on wrong thermostat mode command (if not using HA) 2023-11-18 13:55:28 +01:00
Proddy
64d46fe8f7 Merge pull request #1437 from proddy/dev
update changelog
2023-11-18 13:43:27 +01:00
Proddy
7962af0872 update changelog 2023-11-18 13:42:50 +01:00
Proddy
873b75240c Merge pull request #1436 from proddy/dev
3.6.4-dev-0
2023-11-18 13:38:20 +01:00
Proddy
9e405c5a5a 3.6.4-dev-0 2023-11-18 13:37:55 +01:00
Proddy
e20434da88 Merge pull request #1435 from proddy/dev
prepare for 3.6.3 release
2023-11-18 13:19:27 +01:00
Proddy
9c8677acb9 prepare for 3.6.3 release 2023-11-18 13:19:02 +01:00
Proddy
1c3bc98bbb Merge pull request #1434 from proddy/dev
fix web building with vite 5
2023-11-17 12:11:28 +01:00
Proddy
02616696dc move JS to ES module 2023-11-17 12:09:38 +01:00
Proddy
00d66c1c4e package update 2023-11-17 11:26:30 +01:00
Proddy
8cfc540670 Merge pull request #1432 from proddy/dev
fix building on osx, some package updates again
2023-11-16 22:44:23 +01:00
proddy
a4062f5d84 package update 2023-11-16 22:07:47 +01:00
proddy
edee463ade replace unstable_useBlocker 2023-11-16 22:07:42 +01:00
proddy
64471e4c0e dev.10 2023-11-16 22:07:00 +01:00
proddy
28a7ceb6aa fix build on osx - see https://docs.platformio.org/en/latest/projectconf/sections/env/options/build/build_flags.html#stringification 2023-11-16 22:06:43 +01:00
Proddy
e4a899912c Merge pull request #1430 from proddy/dev
fix for export_values and new command_allvalues()
2023-11-16 07:41:26 +01:00
proddy
cc9819b56b fix lint compile warnings 2023-11-15 21:40:49 +01:00
proddy
29f86c9ab9 make standalone work 2023-11-15 21:40:38 +01:00
proddy
722ca34a18 rollback and fix https://github.com/emsesp/EMS-ESP32/pull/1426 2023-11-15 21:40:23 +01:00
Proddy
bc39b738e2 auto formatting 2023-11-15 17:56:23 +01:00
Proddy
1ada18ec9a 3.6.3-dev.9 2023-11-15 17:56:15 +01:00
Proddy
6b9dadc0d9 Merge pull request #1428 from MichaelDvP/dev2x
latest changes
2023-11-15 12:08:18 +01:00
MichaelDvP
cf89a06437 do not remove fetches 2023-11-15 11:48:18 +01:00
MichaelDvP
4a1ea99ee7 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev2x 2023-11-15 11:31:58 +01:00
MichaelDvP
3dbf8a0fd1 fix crash on wrong input for switchtime 2023-11-15 11:31:51 +01:00
Proddy
7b5a37a85d Merge pull request #1426 from proddy/dev
fix bug when traversing ems devices when using cmd allvalues
2023-11-15 09:50:40 +01:00
Proddy
0b5a7b9f2a fix bug when traversing ems devices when using cmd allvalues 2023-11-14 22:24:32 +01:00
Proddy
0f99415bbf add comments 2023-11-14 22:24:09 +01:00
Proddy
c9775c1edd Merge pull request #1425 from proddy/dev
only send command and value to backend write service
2023-11-14 21:41:59 +01:00
Proddy
1f1b571e91 update packages 2023-11-14 18:51:35 +01:00
Proddy
21e28e970c only send command and value to backend write service 2023-11-14 18:51:20 +01:00
MichaelDvP
4f1ef297c7 thermostat RC300 mode 2023-11-14 10:53:27 +01:00
MichaelDvP
3b30083e7c fix extension module 2023-11-14 10:52:39 +01:00
MichaelDvP
50590f4924 console api_data 2023-11-14 10:52:23 +01:00
MichaelDvP
fae876d7d2 Merge branch 'dev2' of https://github.com/emsesp/EMS-ESP32 into dev2x 2023-11-14 10:12:11 +01:00
MichaelDvP
c1dabddf21 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev2x 2023-11-14 10:12:02 +01:00
Proddy
a8ea6ef4a8 Merge pull request #1422 from ellepdesk/options-invert-pullup
Add options to invert RX and TX and to enable pullup on RX
2023-11-13 17:02:31 +01:00
Proddy
196e98b3bd Merge pull request #1418 from proddy/dev
show UOM in console when 'show values'. And added a new system command called 'values' which dumps the same to JSON
2023-11-13 17:00:33 +01:00
Proddy
a0f1f51cca rename system values -> allvalues 2023-11-13 16:58:32 +01:00
Proddy
d717b72a9e have its own show_values function 2023-11-13 16:58:20 +01:00
Proddy
eccece7207 minor code optimization 2023-11-13 16:57:35 +01:00
Proddy
499ff0d31e include (HS1) for standalone testing 2023-11-13 16:57:20 +01:00
Proddy
ae0599d13d optionally render with UOM attached 2023-11-13 16:56:48 +01:00
Proddy
1a9cf4ebdc added more space for longer names 2023-11-13 16:56:25 +01:00
Proddy
386082b747 update for vscode 2023-11-13 16:55:52 +01:00
Proddy
fc02721815 package update 2023-11-13 16:55:10 +01:00
Pelle van der Heide
529970fb19 remove option for RX_PULLUP, this is enabled by default in esp-idf 2023-11-13 14:30:42 +01:00
MichaelDvP
752ce333ec RC300/BC400 mode setting 2023-11-13 14:04:55 +01:00
MichaelDvP
8e844550bf sort HIU entities 2023-11-13 13:53:35 +01:00
Pelle van der Heide
dfd2a017c2 Add options to invert RX and TX and to enable pullup on RX
These option can be individually enabled at compile time by the
following defines:

EMSUART_RX_INVERT
EMSUART_TX_INVERT
EMSUART_RX_PULLUP
2023-11-13 12:00:56 +01:00
Proddy
c40a11504c Merge pull request #1417 from MichaelDvP/dev2x
uptime, inputs, output EA0, HIU entities
2023-11-12 16:05:52 +01:00
Proddy
fd81299da1 3.6.3-dev.8 2023-11-12 16:00:52 +01:00
Proddy
9993a7c739 fix UOM not showing in console - and added new command 'system values' 2023-11-12 15:59:29 +01:00
Proddy
ea38011085 add text to remind people about su command 2023-11-12 15:59:02 +01:00
Proddy
2079b7e602 formatting 2023-11-12 15:58:35 +01:00
Proddy
101159b9f6 add sensors to generic test 2023-11-12 15:58:22 +01:00
Proddy
1442568790 uppercase ems 2023-11-12 15:58:06 +01:00
MichaelDvP
1b27fae844 fix tag of hpEA0 2023-11-12 14:31:42 +01:00
MichaelDvP
4b6b89f1a0 add uptimetotal, #1416 2023-11-12 13:46:33 +01:00
MichaelDvP
a2422e1f6a add hpEA0, heatnigpump for all boilers/hps/hiu, remove input-state 2023-11-12 11:41:49 +01:00
Proddy
8ba40003e4 Merge pull request #1411 from proddy/dev
fix HA warnings - add a device name - #1393
2023-11-11 18:02:46 +01:00
Proddy
ac0fb52ce9 fix HA warnings - add a device name - #1393 2023-11-11 18:01:52 +01:00
Proddy
031c97a162 3.6.3-dev.7 2023-11-11 18:01:19 +01:00
Proddy
f7d3939c72 update packages 2023-11-11 18:01:09 +01:00
Proddy
20f32db8bc Merge pull request #1409 from MichaelDvP/dev2x
fix `retTemp`, #1334
2023-11-11 14:43:35 +01:00
MichaelDvP
4d5f8cc96a fix retTemp, #1334 2023-11-11 14:34:35 +01:00
Proddy
981d62dc2c Merge pull request #1384 from WiktorBuczko/patch-1
Update and fix translation
2023-11-11 10:56:53 +01:00
Proddy
ffcf0bf2d7 Merge pull request #1408 from proddy/dev
update gh actions
2023-11-11 10:18:18 +01:00
Proddy
7997544fb8 update gh actions 2023-11-11 10:17:48 +01:00
Proddy
7e1f16c865 Merge pull request #1407 from proddy/dev
remove set command (with no args)
2023-11-11 09:43:14 +01:00
proddy
765e6bcd69 remove set command (with no args) 2023-11-11 09:41:50 +01:00
Proddy
81b654cc41 Merge pull request #1405 from proddy/dev2
fix standalone compiling
2023-11-10 11:55:26 +01:00
Proddy
3fc36b5e50 fix standalone compiling 2023-11-10 11:54:41 +01:00
Proddy
52077cbd07 Merge pull request #1402 from proddy/dev2
package sync with dev
2023-11-09 23:47:11 +01:00
proddy
a45f1badba package update 2023-11-09 23:41:45 +01:00
proddy
f38f4bc85a package sync with dev 2023-11-09 23:38:57 +01:00
Proddy
8c03592157 Merge pull request #1400 from MichaelDvP/dev2x
Small change from my Dev2
2023-11-09 23:30:36 +01:00
Proddy
e7254bc7f4 Merge pull request #1395 from proddy/dev
fix MQTT base with paths not working in HA [#1393]
2023-11-09 23:29:43 +01:00
MichaelDvP
5d0242b47c sync & cleanup 2023-11-08 15:27:17 +01:00
MichaelDvP
5997dd1491 fix double publish scheduler 2023-11-08 15:05:40 +01:00
MichaelDvP
31a5216ae8 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev2x 2023-11-08 15:02:20 +01:00
MichaelDvP
5c0c0675a2 boiler: sort entities, remove hpactivity-states, add 4-way-valve, input-states, eco+ 2023-11-08 14:53:56 +01:00
MichaelDvP
ba9f16da00 publish schedule 2023-11-08 14:51:37 +01:00
MichaelDvP
110ee59cd1 temperaturesensor -> F_(temperaturesensor), analog/temperature mqtt-base() 2023-11-08 14:51:07 +01:00
MichaelDvP
555bf8cb2f pl entity translations 2023-11-08 14:50:09 +01:00
MichaelDvP
5f1dddf7e4 enlarge uart-tx-queue, warn overflow 2023-11-08 14:49:45 +01:00
Proddy
bf5b40ccf4 fix MQTT base with paths not working in HA [#1393] 2023-11-06 21:51:05 +01:00
Proddy
58cbfbc0df update packages 2023-11-06 21:50:49 +01:00
Proddy
06f5e1226f Merge pull request #1391 from proddy/dev2
sync with latest dev
2023-11-05 17:15:20 +01:00
Proddy
af57af46b0 Merge pull request #1390 from proddy/dev
update changelog and bump version
2023-11-05 17:13:33 +01:00
Proddy
3f91377751 added notes on MQTT changes 2023-11-05 17:12:43 +01:00
Proddy
c4c9ed739f 3.6.3-dev.6 2023-11-05 17:12:35 +01:00
Proddy
2a8d3b8cd6 package update 2023-11-05 17:12:21 +01:00
Proddy
af1292caa0 update with notes from dev branch 2023-11-05 17:10:47 +01:00
Proddy
44afa1a30f auto formatting 2023-11-05 17:09:36 +01:00
Proddy
fa184a8f94 sync latest MQTT changes from dev 2023-11-05 17:09:26 +01:00
Proddy
387c2eebcd package update 2023-11-05 17:09:10 +01:00
Proddy
cd6a0da9f0 change version to 3.6.3-test.6 so not mistaken with dev builds 2023-11-05 17:09:00 +01:00
Wiktor
c10ecb097e Update and fix translation 2023-11-04 19:16:08 +01:00
Proddy
207953e8d1 Merge pull request #1383 from proddy/dev
no commands for nrgheat & nrgww - #1382
2023-11-04 14:11:13 +01:00
Proddy
a449ebd0ea improvements to #1382 2023-11-04 13:13:52 +01:00
Proddy
2afe50fc9e Merge pull request #1381 from MichaelDvP/dev2
Dev2: relais, fix exhausttemp, fix RC20 remote
2023-11-04 11:53:46 +01:00
Proddy
cd564f0c54 no commands for nrgheat & nrgww - #1382 2023-11-04 11:46:42 +01:00
Proddy
8eba09fea6 package update 2023-11-04 11:46:16 +01:00
MichaelDvP
6c17d61baf set energy entities to HA-category diagnostic (metioned on discord) 2023-11-03 20:00:16 +01:00
MichaelDvP
6df1f2850f analog: store only if needed 2023-11-03 16:08:45 +01:00
MichaelDvP
288d9b70b7 fix relais command 2023-11-03 14:43:23 +01:00
MichaelDvP
8307b0920c digital_out, settings #1375, dev.5b 2023-11-02 19:14:10 +01:00
MichaelDvP
1097b519ae do not overwrite mqtt-json items 2023-11-02 07:34:57 +01:00
MichaelDvP
e7b7002883 check RC20 master/remote thermostat, #1378 2023-11-02 07:34:18 +01:00
MichaelDvP
c934b9e8d9 fix gh build 2023-11-01 19:37:18 +01:00
MichaelDvP
0838d06ec4 Test for fixing #1378 2023-11-01 18:20:32 +01:00
MichaelDvP
41666458d9 merge mqttClinet PR 115 from BertMelis 2023-11-01 18:18:56 +01:00
MichaelDvP
b02207a0d7 set EMSESP_DEFAULT_BOARD_PROFILE nd store to NVS 2023-11-01 18:17:05 +01:00
MichaelDvP
faafd51e40 add optional exhausttemp from telegram E5 2023-11-01 18:16:21 +01:00
MichaelDvP
94cf81c164 Merge branch 'dev2' of https://github.com/emsesp/EMS-ESP32 into dev2 2023-11-01 17:24:18 +01:00
MichaelDvP
1cd97cf1ee E32V2 button to 34, publish alert module 2023-11-01 17:23:45 +01:00
Proddy
6f097e4613 Merge pull request #1377 from proddy/dev
small updates
2023-10-31 22:09:04 +01:00
Proddy
90af88f36d Merge pull request #1376 from proddy/dev2
Dev2
2023-10-31 22:07:48 +01:00
proddy
862cc2545b group order of board profiles 2023-10-31 22:07:12 +01:00
proddy
74c6e54dc5 uppercase Value 2023-10-31 22:07:01 +01:00
proddy
33ac89e202 uppercase Value 2023-10-31 21:58:19 +01:00
proddy
89d591500c support HA writable text fields 2023-10-31 21:58:07 +01:00
proddy
9bf56b2e6d package update 2023-10-31 21:57:38 +01:00
proddy
7c3dac3da7 order board profiles in menu 2023-10-31 21:57:28 +01:00
Proddy
6853651c8b Merge pull request #1374 from proddy/dev2
Dev2
2023-10-31 18:09:45 +01:00
Proddy
16a9bc4fae package updates 2023-10-31 18:08:49 +01:00
Proddy
70d4bcf097 support String entities in Home Assistant #1373 2023-10-31 18:08:43 +01:00
Proddy
1991ca4128 Merge pull request #1372 from proddy/dev
shower duration in sec
2023-10-31 12:34:18 +01:00
Proddy
879df338e3 Merge pull request #1371 from proddy/dev2
small things
2023-10-31 12:33:53 +01:00
Proddy
29c1169b33 shower duration in sec 2023-10-31 12:32:57 +01:00
Proddy
362b6a1394 GNU++11 and not GNU++17 2023-10-31 12:32:12 +01:00
Proddy
f5f5901ad9 package update 2023-10-31 12:31:48 +01:00
Proddy
757bf58992 show duration in sec 2023-10-31 12:31:35 +01:00
Proddy
af8e77029e Merge pull request #1369 from MichaelDvP/dev2
Testbuild
2023-10-30 16:43:33 +01:00
Proddy
94519179df Merge pull request #1368 from proddy/dev
use DEBUG logging for commands with json output - #1364
2023-10-30 13:10:58 +01:00
Proddy
527dd870a2 change shower log message if using NTP 2023-10-30 13:10:03 +01:00
Proddy
b9e57414ce #1364 2023-10-30 13:01:43 +01:00
Proddy
e3a644182e switch back to C++11 2023-10-30 13:00:31 +01:00
MichaelDvP
caadb506d8 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev2 2023-10-29 17:57:10 +01:00
MichaelDvP
597f0b147d logging commands 2023-10-29 17:10:54 +01:00
MichaelDvP
0b9a2483b2 add HIU entities #1334, fix hp nrgheat/ww offsets #1349 2023-10-29 17:10:26 +01:00
Proddy
6a221e84cc Merge pull request #1365 from proddy/dev
3.6.3-dev.5
2023-10-29 13:44:42 +01:00
Proddy
7ea7a4b25a Merge branch 'emsesp:dev' into dev 2023-10-29 13:44:17 +01:00
Proddy
c494627867 package updates 2023-10-29 13:43:54 +01:00
Proddy
5032c37f63 added 3.6.3-dev.5 2023-10-29 13:43:45 +01:00
Proddy
f5cd92d567 added comments 2023-10-29 13:43:33 +01:00
Proddy
240b7dad32 API commands logged at log level INFO - #1364 2023-10-29 13:43:24 +01:00
MichaelDvP
2bac805ebf update packages 2023-10-27 17:19:08 +02:00
MichaelDvP
b1a3d6ea20 update alert module 2023-10-27 15:58:12 +02:00
MichaelDvP
77cfad9ff0 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev2 2023-10-27 13:04:11 +02:00
MichaelDvP
2dc1bd71ee changelog, dev.4g 2023-10-27 10:29:46 +02:00
MichaelDvP
fcdc4314e3 Wifi AP start after 10 sec, stay if not connected 2023-10-27 10:28:59 +02:00
MichaelDvP
900112a967 update packages 2023-10-27 10:27:22 +02:00
MichaelDvP
114a8af467 mqtt publish extension module 2023-10-27 10:27:08 +02:00
MichaelDvP
e2c2a12a2b Extension outPower UOM percent 2023-10-27 10:26:47 +02:00
Proddy
222f853616 Merge pull request #1362 from proddy/dev
messing with yarn again (bored)
2023-10-26 12:17:15 -07:00
proddy
450f5a465c messing with yarn again (bored) 2023-10-26 21:16:32 +02:00
MichaelDvP
ba106eecc0 AsyncTCP settings per DEFINE, prio 5 2023-10-26 16:54:05 +02:00
MichaelDvP
374bd7c5c2 extension module instead of pumpp module 2023-10-26 15:08:24 +02:00
MichaelDvP
31b2005320 Remove Wifi-all-channel-scan, it induces connect issues. dev.4f 2023-10-26 14:58:37 +02:00
MichaelDvP
8ae5570c70 NTP do not configure disconnect if already disconnected 2023-10-26 14:55:47 +02:00
MichaelDvP
96fe9aeb31 dont queue mqtt if not connected, dev.4e 2023-10-25 17:45:40 +02:00
MichaelDvP
4a7d69c797 add energy and meters #1359, #1350 2023-10-25 17:43:35 +02:00
MichaelDvP
7dca77450c Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev2 2023-10-25 17:23:34 +02:00
Proddy
9bb157bbe6 yarn 4.0 2023-10-25 15:31:29 +02:00
Proddy
6c7787b2ae Merge pull request #1358 from owenvoke/feature/tls-typo
chore: fix typos of TLS
2023-10-25 06:22:16 -07:00
Owen Voke
ec5b5ef79d chore: fix typos of TLS 2023-10-25 11:19:15 +01:00
MichaelDvP
6abd56c7e2 update packages, add psram, dev.4d 2023-10-24 22:11:32 +02:00
MichaelDvP
1fdeaf8b24 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev2 2023-10-24 21:56:09 +02:00
MichaelDvP
ad51870d2c no wifi disconnect until reboot on ssid cleared 2023-10-24 21:54:57 +02:00
Proddy
8929e15e00 Merge pull request #1356 from proddy/dev
show options and range in export - #1342
2023-10-23 07:12:04 -07:00
Proddy
3f31e636ec show options and range in export - #1342 2023-10-23 16:10:08 +02:00
MichaelDvP
5e7e1c30ca show writable in web export, dev.4c 2023-10-23 14:53:43 +02:00
MichaelDvP
5cf0d8d204 board_profile name in NVS after autodetect 2023-10-23 14:53:12 +02:00
MichaelDvP
dbbd475934 do not set forceheatingoff if not in settings 2023-10-23 14:46:39 +02:00
MichaelDvP
bf9877b528 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev2 2023-10-22 18:25:40 +02:00
MichaelDvP
5e6b0f64bd add E32V2 board profile, fix autodetect and GPIOs 2023-10-22 17:40:38 +02:00
MichaelDvP
509d213536 add TA4/TW1, fix decimal, add EM100 values, update 2023-10-22 17:39:53 +02:00
Proddy
4c789a656b Merge pull request #1355 from proddy/dev
minor changes
2023-10-22 07:54:24 -07:00
Proddy
2f6edfd505 typo 2023-10-22 16:53:33 +02:00
Proddy
9c2d861b93 rename scan devices to just one scan command, and add more devices 2023-10-22 16:48:13 +02:00
Proddy
2c0d4fdcef suppress MQTT warnings on standalone 2023-10-22 16:47:52 +02:00
Proddy
be93627ec0 Merge pull request #1353 from proddy/dev
minor changes plus Michael's updated AsyncTCP library
2023-10-22 03:43:15 -07:00
Proddy
c6c7754735 added WSW196i to UI800 description 2023-10-22 12:41:39 +02:00
Proddy
07bdf28350 added Michael's AsyncTCP fixes for testing 2023-10-22 12:41:16 +02:00
Proddy
fd49f0372a add DIV10 for WS170 - #1334 2023-10-22 12:40:55 +02:00
Proddy
36ca7e09ca Merge pull request #1352 from proddy/dev
quick link from device entities to custom entities page (the list icon)
2023-10-21 07:15:47 -07:00
Proddy
7a36c5e8cb quick link from device entities to custom entities page (the list icon) 2023-10-21 16:14:25 +02:00
Proddy
15b97515bb replace useNavigate hook with redirect 2023-10-21 16:14:02 +02:00
Proddy
4048f58856 package update 2023-10-21 16:13:42 +02:00
Proddy
b0ea3184a4 fix custom entities endpoint 2023-10-21 16:13:31 +02:00
MichaelDvP
6ab2cc60e7 AsyncTCP reduce stack, include some PRs 2023-10-20 18:54:52 +02:00
MichaelDvP
237d631e2c remove double WiFi.disconnect 2023-10-20 17:08:38 +02:00
MichaelDvP
0ed46679e2 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev2 2023-10-20 16:51:45 +02:00
Proddy
1fded64f2e Merge pull request #1343 from proddy/dev
show entity count in device list, remove type
2023-10-20 07:42:02 -07:00
MichaelDvP
161f782904 fix flodding bus with forceHeatingOff messages, dev3b 2023-10-20 14:39:38 +02:00
MichaelDvP
3fe9296139 EM100 to Alert, add first telegrams 2023-10-20 14:32:30 +02:00
Proddy
9698e787b2 remove dialog from upload as C++ code does restart immediately 2023-10-19 21:37:46 +02:00
Proddy
eb274a94c3 move system info to download page, add a restart warning on upload 2023-10-18 23:15:42 +02:00
Proddy
18be921c1b package update 2023-10-18 23:15:13 +02:00
Proddy
fddfa47b51 layout changes 2023-10-18 15:40:55 +02:00
MichaelDvP
c533e91643 heatburnpower does not count similar with wwburnpow, #1335 2023-10-18 11:22:53 +02:00
MichaelDvP
de2792ffdd add back esp32-s3 SSL for mqtt 2023-10-18 10:34:21 +02:00
MichaelDvP
97de23f521 add WLW176i to boilers 2023-10-18 07:56:08 +02:00
MichaelDvP
c212520f4f remove double dhw texts 2023-10-18 07:55:48 +02:00
MichaelDvP
dc739b97ab forceHeatingOff in E5 check telegram length 2023-10-18 07:55:19 +02:00
MichaelDvP
2583da8714 platform asdev, revert mqtt client changes, uart-isr to flash to save ram 2023-10-18 07:54:36 +02:00
MichaelDvP
ddfc9f9dd0 mqtt use main task again 2023-10-18 07:12:44 +02:00
MichaelDvP
7d855326d0 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev2 2023-10-18 07:11:11 +02:00
Proddy
a1bb49359f show entity count in device list, remove type 2023-10-17 22:55:47 +02:00
Proddy
f9a176e09c Merge pull request #1341 from proddy/dev
fixes from previous checkin
2023-10-17 12:21:19 -07:00
Proddy
24d5ac7656 default test is general 2023-10-17 21:20:43 +02:00
Proddy
558fa20283 remove left over debug comments 2023-10-17 21:20:08 +02:00
Proddy
c42ead995e fix rollup mangle that prevented table clicks 2023-10-17 21:18:23 +02:00
Proddy
8584901229 Merge pull request #1340 from proddy/dev
add missing 'yarn webUI'
2023-10-17 11:29:14 -07:00
Proddy
a17f8db035 add missing 'yarn webUI' 2023-10-17 17:58:56 +02:00
Proddy
6783d5b3e8 fix typo in package 2023-10-17 16:57:56 +02:00
Proddy
9223a00270 Merge pull request #1339 from proddy/dev
update web building
2023-10-17 07:19:21 -07:00
Proddy
c150c578a6 update web building 2023-10-17 16:06:32 +02:00
proddy
5be1482c20 tidy up package builds 2023-10-17 13:35:25 +02:00
Proddy
20e301594c Update github-releases-to-discord.yml 2023-10-16 15:01:30 +02:00
Proddy
f90f4279d7 Create github-releases-to-discord.yml 2023-10-16 14:58:08 +02:00
Proddy
9962f16d62 Merge pull request #1336 from proddy/dev
fixed helper text in entity dialog for numeric values
2023-10-16 04:16:32 -07:00
proddy
cb10663735 updated 2023-10-16 13:15:30 +02:00
proddy
2ab247131f added WS170 - #1334 2023-10-16 13:13:13 +02:00
proddy
c0a3d03a09 fix formatting for ranges not showing 2023-10-16 12:17:00 +02:00
proddy
baa180cc79 added comments 2023-10-16 12:16:37 +02:00
proddy
dbc59b7c8c remove < and > from template texts 2023-10-16 12:16:25 +02:00
proddy
c4d1058133 add rootCA for testing 2023-10-16 12:16:04 +02:00
proddy
3a8495ca54 lowercase Optional 2023-10-16 12:15:42 +02:00
proddy
dad62613f6 update packages 2023-10-16 12:12:08 +02:00
Proddy
9641adce1c Merge pull request #1333 from proddy/dev
added timestamp to shower_data, add HA's ent_cat discovery to all sensors
2023-10-15 10:33:05 -07:00
Proddy
67693364cc Add entity category to HA Discovery topics - #1323 2023-10-15 17:03:59 +02:00
Proddy
d37a5c5713 bump 3.6.3-dev.2 2023-10-15 17:03:32 +02:00
Proddy
a881431010 auto formatting 2023-10-15 17:03:18 +02:00
Proddy
2866862730 add timestamp - #1329 2023-10-15 17:03:10 +02:00
Proddy
c234e70a87 use previous tasmota platform 2023-10-15 17:02:50 +02:00
Proddy
61296896bd update packages, use latest yarn 2023-10-15 17:02:37 +02:00
MichaelDvP
2acb45db47 send_info_mqtt called from main, not from ntp task 2023-10-15 14:55:42 +02:00
MichaelDvP
abe0d793d6 test mqtt with own task, dev.2i 2023-10-15 12:56:36 +02:00
MichaelDvP
654403ca3d shower time with timezone 2023-10-15 12:53:43 +02:00
MichaelDvP
b111e4762a remove SSL from S3 build 2023-10-15 10:25:32 +02:00
MichaelDvP
8bd796b772 add CS6800i boiler 2023-10-15 10:23:20 +02:00
MichaelDvP
84b6611ffd set ci builds without extends, S3 use arduino 2.0.13 2023-10-15 10:01:13 +02:00
MichaelDvP
58b3f309bd changelog, dev.2h 2023-10-14 18:31:53 +02:00
MichaelDvP
0bd4330881 shower time 2023-10-14 18:31:39 +02:00
MichaelDvP
68feb0fa30 exhausttemp only from E4/31, fetch 0x14 again 2023-10-14 18:31:24 +02:00
MichaelDvP
b4e266f128 mqtt secure only for S3 (avoid conflict with tasmota platform esp32) 2023-10-14 18:31:06 +02:00
MichaelDvP
855794dbe8 no command for remoteseltemp 2023-10-13 16:05:42 +02:00
MichaelDvP
2a38981c67 add some limits, ignore zero for exhausttemp, syspress, rettemp, errormessage check 2023-10-13 12:29:32 +02:00
MichaelDvP
63b4a62fac update packages 2023-10-13 12:25:58 +02:00
MichaelDvP
710fd1bc79 add control setting for RC300 2023-10-12 09:15:42 +02:00
MichaelDvP
f5ab7510b4 disable remote dew if temp or humidity are missing, v3.6.3-dev.2d 2023-10-11 10:36:59 +02:00
MichaelDvP
ecd37223e8 update packages 2023-10-11 10:35:07 +02:00
MichaelDvP
99992db9ac check more states for wifi reconnect 2023-10-10 13:24:59 +02:00
MichaelDvP
3ecea985ad check length for roomctrl response, dev.2c 2023-10-10 09:49:07 +02:00
MichaelDvP
ae1b6fc67b Weblog json dynamic 2023-10-10 09:48:11 +02:00
MichaelDvP
020bb628d6 no mqtt disconnect on GOT_IP if already connected 2023-10-10 09:47:27 +02:00
MichaelDvP
22a4338e7a fix buffer 2023-10-09 16:39:26 +02:00
MichaelDvP
1f089ec6f9 log commands as debug 2023-10-09 11:31:16 +02:00
MichaelDvP
0f78d4f34d fix remote humidity and calc dewpoint, dev.2b 2023-10-08 19:31:41 +02:00
Proddy
8395983106 Merge pull request #1319 from MichaelDvP/dev
add forceheatingoff #1262 and header/heatblock #1317
2023-10-08 12:19:22 +01:00
MichaelDvP
87ce1a6d9b add remotetemp to RC3xx 2023-10-08 12:06:06 +02:00
MichaelDvP
ac4eba5b72 add forceheatingoff 2023-10-07 15:19:04 +02:00
MichaelDvP
5e53689a81 add temperatures for low loss header and heatblock, add names BC400/GB192i, #1317 2023-10-05 18:00:06 +02:00
MichaelDvP
895eddd8d2 update packages 2023-10-05 17:50:49 +02:00
Proddy
a8c7b2bca4 Merge pull request #1318 from proddy/dev
fix shower duration
2023-10-03 22:08:55 +01:00
proddy
6f46382806 fix shower duration 2023-10-03 22:06:44 +01:00
proddy
b8af3e235f update packages 2023-10-03 22:06:34 +01:00
proddy
531c2e7b5d 3.6.3-dev.1 2023-10-03 22:06:23 +01:00
Proddy
f76e6b56b1 Merge pull request #1316 from MichaelDvP/dev
arduino 2.0.13 and 3.0.0 ready
2023-10-03 21:35:47 +01:00
MichaelDvP
c388b31b22 standalone compile 2023-10-03 16:13:36 +02:00
MichaelDvP
cbb6fa9fec update changelog 2023-10-03 15:34:00 +02:00
MichaelDvP
a3300e94a7 compiles for 2.0.13/idf4.4.6 and 3.0.0/idf5.1 (see pio_local.example) 2023-10-03 15:28:27 +02:00
MichaelDvP
3c8a00be09 merge and update changes from jason2866, tasmota platform 2.0.13 2023-10-03 15:26:34 +02:00
MichaelDvP
36ae55e543 update packages 2023-10-03 14:04:13 +02:00
MichaelDvP
8b5d893977 RC100H RF thermostat 2023-10-03 14:04:01 +02:00
MichaelDvP
bd851f9005 use nvs partition label 2023-10-03 10:59:27 +02:00
MichaelDvP
208be85304 lan only supported by esp32 2023-10-03 10:58:44 +02:00
MichaelDvP
9dd613394c add humidity to ventialtion 2023-10-03 10:57:41 +02:00
MichaelDvP
62eeca944b make NTP arduino3 ready 2023-10-03 10:57:20 +02:00
MichaelDvP
17d7487423 use arduino neopixel instead of adafruit lib 2023-10-03 10:54:17 +02:00
MichaelDvP
ae589c745b use onewire from tasmota, arduino3 ready 2023-10-03 10:53:04 +02:00
Proddy
4b41180785 Merge pull request #1312 from proddy/dev
preparing for 3.6.3
2023-10-01 17:50:27 +02:00
Proddy
7748f67b9a preparing for 3.6.3 2023-10-01 17:50:09 +02:00
Proddy
20d8b6400f Merge pull request #1311 from proddy/dev
minor changes
2023-10-01 17:32:50 +02:00
Proddy
d3b086a675 added more API tests 2023-10-01 17:32:16 +02:00
Proddy
e1ee83b907 update with 3.6.2 2023-10-01 17:31:43 +02:00
Proddy
763a2eaab1 bump version 2023-10-01 17:31:31 +02:00
Proddy
5d78f1c814 Reset command renamed to reset 2023-10-01 17:31:24 +02:00
Proddy
3f99806ddd sending dash/- to reset command doesn't error 2023-10-01 17:31:11 +02:00
Proddy
bc0a90ee41 update packages 2023-10-01 17:30:54 +02:00
Proddy
3900b8fc94 log API call 2023-10-01 17:30:47 +02:00
Proddy
f9a53cf320 Merge pull request #1309 from MichaelDvP/dev
Some small corrections
2023-09-29 11:18:24 +02:00
MichaelDvP
99467558b4 check each single nvs values before writing it 2023-09-29 10:21:20 +02:00
MichaelDvP
2e25e46f6f temperaturesensor commands only if enabled (gpio != 0) 2023-09-29 10:20:17 +02:00
MichaelDvP
3a1b7cae67 avoid possible div-zero 2023-09-29 10:19:34 +02:00
Proddy
5bc3bd23e2 Merge pull request #1306 from proddy/dev
small changes
2023-09-25 09:15:44 +02:00
Proddy
a04f4d784b fix standalone build and make - ignore warning when comparing signed/unsigned ints 2023-09-25 09:15:10 +02:00
Proddy
9c423dc886 remove comment 2023-09-25 09:14:40 +02:00
Proddy
1b0f840d18 update script 2023-09-25 09:14:29 +02:00
Proddy
21eaf70181 package update 2023-09-25 09:14:21 +02:00
Proddy
14f2cd4bee package update 2023-09-25 09:14:04 +02:00
Proddy
917e268ac9 add TODO on possible memory out-of-bounds error 2023-09-23 18:41:54 +02:00
Proddy
41228e894a lint warning work-around 2023-09-23 18:41:37 +02:00
Proddy
365c95991b revert default test to general 2023-09-23 18:41:11 +02:00
Proddy
ba4ebe221c make compile standalone on linux 2023-09-23 18:40:58 +02:00
Proddy
3ab5946e38 package updates 2023-09-23 18:40:37 +02:00
Proddy
f427288c06 minor changes to sonar checks 2023-09-23 18:40:29 +02:00
Proddy
398cbadb64 Merge pull request #1304 from MichaelDvP/dev
burner settings use min/max from telegram 4, fix max for values < 0
2023-09-21 20:31:06 +02:00
MichaelDvP
38a1c9e9d7 Merge branch 'emsesp:dev' into dev 2023-09-21 18:56:42 +02:00
MichaelDvP
5abfdf1177 burner settings use min/max from telegram 4, fix max for values < 0 2023-09-21 16:56:45 +02:00
Proddy
385d2377db Merge pull request #1303 from proddy/dev
disabled entity values shown in white text in web
2023-09-20 23:10:41 +02:00
proddy
6655035561 autoformatting 2023-09-20 23:09:29 +02:00
proddy
755408e6aa standalone build works 2023-09-20 23:09:21 +02:00
proddy
df70ed0062 remove comments 2023-09-20 23:09:10 +02:00
proddy
b893290b62 disabled entity values shown in white text 2023-09-20 23:09:02 +02:00
Proddy
96ff5ed123 Merge pull request #1302 from MichaelDvP/dev2
network connection and powerentities
2023-09-20 20:08:22 +02:00
MichaelDvP
dcdd8d9e44 cleanup, adapt comments, packages 2023-09-20 17:56:39 +02:00
MichaelDvP
5c484d58dc allow empty response in webAPI 2023-09-20 16:03:05 +02:00
MichaelDvP
96bf1a32ee v3.6.2-dev.2, changelog 2023-09-20 12:30:09 +02:00
MichaelDvP
ad81f84c02 tag more boiler dhw values 2023-09-20 12:25:49 +02:00
MichaelDvP
529b46d776 update packages needs changed svg handling 2023-09-20 12:18:32 +02:00
MichaelDvP
bbc5bc8585 sync mqtt client with origin 2023-09-20 12:17:24 +02:00
MichaelDvP
9c33b5cb8b limit mqtt queue to 300 2023-09-20 12:16:36 +02:00
MichaelDvP
ba7ceca798 Network, reconnect without waiting 2023-09-20 12:16:15 +02:00
MichaelDvP
4824152ae5 empty json instead of "no entries" 2023-09-19 19:46:46 +02:00
Proddy
af935d8124 Merge pull request #1298 from proddy/dev
some refactoring and change #1297
2023-09-19 16:47:30 +02:00
MichaelDvP
951e706fee add custom to "show devices" 2023-09-19 16:17:21 +02:00
MichaelDvP
9f1002df9a remove channel from networkSettings 2023-09-19 15:19:45 +02:00
MichaelDvP
6ab2135cea show commands always include internal devices. 2023-09-19 14:40:59 +02:00
MichaelDvP
e6bcdede73 Merge branch 'dev' of https://github.com/proddy/EMS-ESP32 into dev 2023-09-19 14:31:25 +02:00
MichaelDvP
8b136ddefe "no entries" is valid command execution 2023-09-19 14:22:38 +02:00
Proddy
ca9ac86fde package updates 2023-09-19 07:52:12 +02:00
MichaelDvP
42a4c792ad dont queue publish on change if not connected, keep flag 2023-09-18 16:24:24 +02:00
MichaelDvP
a6b0c74f5f add message "no entries" to analog/temperature/custom/sccheduler 2023-09-18 16:21:58 +02:00
MichaelDvP
09e2945c15 add BSSID and Channel to network settings, full_scan 2023-09-18 12:29:01 +02:00
Proddy
a3f05cb08b /api/custom show {} if no Custom Entities configured instead of an error #1297 2023-09-17 14:27:33 +02:00
Proddy
0ab573225d fix typos 2023-09-17 14:27:15 +02:00
Proddy
4c8fd45908 add test for custom entities 2023-09-17 14:27:04 +02:00
Proddy
8bb703fafe package update 2023-09-17 14:26:53 +02:00
Proddy
9cdeb7c07a refactor custom vs customizations 2023-09-17 14:26:24 +02:00
MichaelDvP
8d4b43e9f6 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev2 2023-09-17 09:35:44 +02:00
MichaelDvP
d8c298f6fe network init 2023-09-17 09:27:08 +02:00
MichaelDvP
8a16566f53 translations 2023-09-17 09:22:57 +02:00
MichaelDvP
9d3456cb3a show scheduler/custom always 2023-09-17 09:22:25 +02:00
MichaelDvP
7310db6426 update packages 2023-09-17 09:21:47 +02:00
Proddy
ac08bb6037 add +x to execute scripts 2023-09-16 09:40:09 +02:00
Proddy
776f72650f update dump_entities.csv 2023-09-16 09:39:57 +02:00
Proddy
0eb96e764c Merge pull request #1296 from proddy/dev
3.6.2-dev-0
2023-09-16 09:27:09 +02:00
Proddy
ec939dfc2e rename 3.6.2-dev-0 2023-09-16 09:26:36 +02:00
Proddy
809b6be79c update packages 2023-09-16 09:26:14 +02:00
Proddy
34f87a0a21 Merge pull request #1292 from proddy/dev
use espressif core 2.0.12 via Tasmota for 4MB build
2023-09-10 13:18:46 +02:00
Proddy
bc4418755e use espressif core 2.0.12 via Tasmota for 4MB build 2023-09-10 13:18:12 +02:00
Proddy
d24742facd package update 2023-09-10 13:17:53 +02:00
MichaelDvP
9c16e2008e revert 'topic' to 't' 2023-09-09 18:11:58 +02:00
MichaelDvP
6a7a9636ac set esp32s2, esp32c3 to tasmota platform 2023-09-09 16:49:42 +02:00
MichaelDvP
5e76bfa210 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev2 2023-09-09 16:46:53 +02:00
Proddy
4da45a7240 Merge pull request #1291 from proddy/dev
preparing 3.7.0
2023-09-09 15:02:12 +02:00
Proddy
3c84a1ced1 preparing 3.7.0 2023-09-09 15:00:09 +02:00
Proddy
677f6c5a6e Merge pull request #1290 from proddy/dev
#1280 sample value is a string for enums
2023-09-09 13:43:09 +02:00
Proddy
3ce67b8e6e Merge branch 'dev' of https://github.com/proddy/EMS-ESP32 into dev 2023-09-09 13:42:29 +02:00
Proddy
aad9c12a7e fixes MQTT enum index option leads to error in HA #1280 2023-09-09 13:42:28 +02:00
Proddy
877d60f46f Merge pull request #1289 from MichaelDvP/dev
Fixes from testbuild
2023-09-09 12:32:57 +02:00
MichaelDvP
bf02b0ad1c Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2023-09-09 12:29:01 +02:00
MichaelDvP
2f5b7cd0aa add back process dest, fixes #1275 2023-09-09 12:25:18 +02:00
MichaelDvP
4bec32ea56 HA register all values from custom and scheduler 2023-09-09 12:11:30 +02:00
Proddy
33ea1c6863 Merge pull request #1288 from proddy/dev
fix for MQTT enum index option leads to error in HA #1280
2023-09-09 10:26:25 +02:00
Proddy
09ff892b91 fix for MQTT enum index option leads to error in HA #1280 2023-09-09 10:25:14 +02:00
Proddy
f462afb547 update pacakges 2023-09-09 10:25:05 +02:00
Proddy
83211e0ef8 Merge pull request #1286 from MichaelDvP/dev
show color wifi-quality in network selector
2023-09-08 15:26:05 +02:00
MichaelDvP
b7b3cb177f show wifi-quality in network selector 2023-09-08 10:35:39 +02:00
MichaelDvP
10c8c2b4a7 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev2 2023-09-08 10:31:34 +02:00
MichaelDvP
c19345c345 color wifiicon in selector 2023-09-08 10:29:24 +02:00
Proddy
04fd04b2ab Merge pull request #1285 from proddy/dev
mqtt fix
2023-09-08 09:26:50 +02:00
Proddy
6e3c2b2ec9 update example for debug 2023-09-08 08:34:19 +02:00
Proddy
98e29516b0 fix mqtt enum in discovery #1280 2023-09-08 08:30:51 +02:00
Proddy
6db5058e3d updated to 3.6.1-dev.2 2023-09-08 08:30:24 +02:00
Proddy
b3ada4a01f 3.6.1-dev.2 2023-09-08 08:30:17 +02:00
Proddy
f38e0abf73 package updates 2023-09-08 08:30:05 +02:00
MichaelDvP
6376ed2361 platform: esp32 use tasmota w/o tsl, S3 use development 2023-09-06 13:18:49 +02:00
MichaelDvP
04e43d5d41 nomPower is always editable 2023-09-06 12:46:38 +02:00
MichaelDvP
0ba5d8e2bd update packages 2023-09-06 12:25:31 +02:00
MichaelDvP
95b8e79624 use tasmota modified platform, v3.6.1-dev.1a 2023-09-06 12:05:26 +02:00
MichaelDvP
e9c3f8c6da Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev2 2023-09-06 12:04:39 +02:00
Proddy
27aa72eda1 Merge pull request #1284 from MichaelDvP/dev
fix for espressif@6.4.0
2023-09-06 10:59:49 +02:00
MichaelDvP
01f6024776 color network antenna icon for wifi quality 2023-09-06 10:33:58 +02:00
MichaelDvP
aa5730c683 stay on platform 6.3.2 for esp32 until heap issue is solved 2023-09-06 09:20:31 +02:00
MichaelDvP
fcc2a48192 Update to espressif32@6.4.0, v3.6.1-dev.1 2023-09-06 08:05:45 +02:00
MichaelDvP
1c4da53e75 publish energy in api/mqtt with 2 digits 2023-09-05 11:37:26 +02:00
MichaelDvP
09a15727c7 change ha-mqtt tto topic 2023-09-04 19:01:52 +02:00
MichaelDvP
f1034f4230 energy values as HA sensors with classes, v3.6.1-dev0e 2023-09-04 16:37:58 +02:00
MichaelDvP
06e9b8d303 round energy values to full kWh 2023-09-04 13:17:21 +02:00
MichaelDvP
b912779ef9 fix max for ULONG values, save counters every hour, 3.6.1-dev0c 2023-09-04 12:21:53 +02:00
MichaelDvP
ced63a6eb0 v3.6.1-dev0b, changelog 2023-09-03 17:54:39 +02:00
MichaelDvP
a5f5d36871 analogsensor counter store to nvs 2023-09-03 17:54:08 +02:00
MichaelDvP
bd92345793 boiler energy counter, stored in nvs 2023-09-03 17:53:48 +02:00
MichaelDvP
4c1b66279d update packages 2023-09-03 17:25:30 +02:00
MichaelDvP
fcf16eec4f HA register all entities for Custom and Scheduler 2023-09-03 17:25:14 +02:00
MichaelDvP
508f18c29b Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev2 2023-09-03 16:07:30 +02:00
MichaelDvP
b165e1c20c fix read int from webpage 2023-09-03 16:07:21 +02:00
Proddy
9ebcfe38bc Merge pull request #1279 from proddy/dev
add missing translations and show value type in table
2023-09-02 13:41:58 +02:00
Proddy
57a585741d addd missing translations and show value type in table 2023-09-02 13:40:33 +02:00
MichaelDvP
6173e94cc0 add back process dest, fixes #1275, v3.6.1-dev0a 2023-09-02 12:29:26 +02:00
Proddy
243aec37fd Merge pull request #1277 from proddy/dev
minor changes
2023-09-02 11:14:30 +02:00
Proddy
fb44e020fc fix standalone build 2023-09-02 11:12:52 +02:00
Proddy
81842e544b auto formatting with clang 2023-09-02 11:10:32 +02:00
Proddy
6babdab8de change 3.7.0 to 3.6.1 as we need a critical patch soon 2023-09-02 11:10:16 +02:00
Proddy
93d50bbee1 update for 3.6.1 2023-09-02 11:09:55 +02:00
Proddy
e6f0ecce62 show green/red circles if active 2023-09-02 11:00:00 +02:00
Proddy
aba597aa6a searches both custom name and shortname, show writable 2023-09-02 10:54:13 +02:00
Proddy
7444fdceff package update 2023-09-02 10:53:31 +02:00
Proddy
f60197e9bf Merge pull request #1273 from MichaelDvP/dev
update Mqtt Client
2023-08-31 12:12:08 +02:00
MichaelDvP
4778206e3a changelog 2023-08-31 12:09:17 +02:00
MichaelDvP
005463c41f update espMqttClient 2023-08-31 11:50:31 +02:00
MichaelDvP
ae1bf1cbfb merge mqtt changes from bertmelis, dev2 2023-08-31 09:47:07 +02:00
MichaelDvP
bde06621bd add log message for mqtt low memory 2023-08-31 08:29:08 +02:00
MichaelDvP
647acf6a68 show rssi in networkstatus 2023-08-31 08:19:24 +02:00
MichaelDvP
120c0b5ca2 update espMqttClient, add own mqtt limit, fix queue display, 3.7.0-dev1d 2023-08-31 08:09:54 +02:00
MichaelDvP
7e45c89fcd add missing subscribes 2023-08-31 08:07:06 +02:00
MichaelDvP
b7611c67bb Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2023-08-31 07:51:36 +02:00
Proddy
d6ae55218f Merge pull request #1272 from proddy/dev 2023-08-30 22:35:49 +02:00
MichaelDvP
d17582d697 mqtt check 60k free heap (not maxalloc), dev1c 2023-08-30 13:39:19 +02:00
MichaelDvP
c3227a6352 mqtt:min alloc to 45k, fix memcheck for PSRAM, dev1b 2023-08-30 12:38:29 +02:00
MichaelDvP
d0c368f6a0 dont allow not_connected_publish, fix mqtt success/fail counters, v3.7.0-dev1a 2023-08-30 12:19:55 +02:00
Proddy
9aa9cc46e9 bump version 3.7.0-dev1 2023-08-29 22:34:09 +02:00
Proddy
4ee045b84e formatting and adding a t command in debug/standalone 2023-08-29 22:33:50 +02:00
Proddy
2fe18c14c7 text changes and formatting 2023-08-29 22:33:26 +02:00
Proddy
f46b002c5a API call for shower coldshot - #1267 2023-08-29 22:32:36 +02:00
Proddy
65ea11b48b formatting only 2023-08-29 22:31:35 +02:00
Proddy
b2113add02 update API tests from VSC 2023-08-29 22:31:18 +02:00
Proddy
152e6ce1b9 don't spell check C files 2023-08-29 22:31:05 +02:00
Proddy
78a5166e48 update packages 2023-08-29 22:30:48 +02:00
MichaelDvP
f6a4da0584 mqtt free mem to 40k, v3.7.0-dev1 2023-08-29 12:40:10 +02:00
MichaelDvP
1818057c4c update packages 2023-08-29 12:39:14 +02:00
Proddy
9c946b9808 Merge branch 'dev' of https://github.com/proddy/EMS-ESP32 into dev 2023-08-20 16:55:15 +02:00
Proddy
c703106058 update packages 2023-08-20 16:55:14 +02:00
Proddy
1bc70f09c5 remove polling 2023-08-20 16:55:05 +02:00
Proddy
d049572239 Merge pull request #1266 from proddy/dev
update web packages
2023-08-19 10:07:50 +02:00
Proddy
0feaed8869 update web packages 2023-08-19 10:07:14 +02:00
Proddy
7496f482ab remove zipfs 2023-08-19 10:07:07 +02:00
Proddy
f6faad7255 Merge pull request #1263 from proddy/dev
build s3
2023-08-15 18:54:36 +02:00
Proddy
757757fa3f package update 2023-08-15 18:51:04 +02:00
Proddy
1fd3c11e12 build s3 2023-08-15 18:50:58 +02:00
Proddy
b1f2273bb5 Merge pull request #1261 from proddy/dev
prepare for 3.7.0
2023-08-13 14:40:29 +02:00
Proddy
e9cf3f5ab5 prepare for 3.7.0 2023-08-13 14:40:03 +02:00
Proddy
f6c34ee2c9 Merge pull request #1258 from proddy/dev
minor updates
2023-08-11 21:19:31 +02:00
Proddy
b500076f32 bump version to v18 with Michael's upgrade fix 2023-08-11 21:19:00 +02:00
Proddy
e87ea67435 update packages 2023-08-11 21:18:23 +02:00
Proddy
86c965b94d move prettier - so "yarn run format" works 2023-08-11 21:18:16 +02:00
Proddy
faec42ac71 Merge pull request #1257 from MichaelDvP/dev 2023-08-11 20:43:49 +02:00
MichaelDvP
86737fb38a also Network 2023-08-11 19:33:06 +02:00
MichaelDvP
c8e64668e9 fix upload settings file #1256 2023-08-11 19:14:52 +02:00
MichaelDvP
89b7eaac1c fix MM10 pump command 2023-08-11 19:14:23 +02:00
Proddy
ac889d921f Merge pull request #1254 from MichaelDvP/dev
nl translations from BBQKees
2023-08-10 21:05:12 +02:00
MichaelDvP
a652a3a0c3 nl translations 2023-08-10 16:18:09 +02:00
Proddy
0f88b7cfbc Merge pull request #1253 from proddy/dev
update sonar scanner
2023-08-09 13:51:43 +02:00
Proddy
8bb2157cd9 update sonar scanner 2023-08-09 13:51:13 +02:00
Proddy
b96cede131 Merge pull request #1252 from proddy/dev
rename EMS-ESP Status to System Status so HA doesn't complain (fixes #1243)
2023-08-09 09:16:20 +02:00
Proddy
b2590fc9e0 Merge branch 'emsesp:dev' into dev 2023-08-09 09:15:15 +02:00
Proddy
8dfff29389 fixes #1243 2023-08-09 09:03:52 +02:00
Proddy
0ab081c135 package update 2023-08-09 09:03:44 +02:00
Proddy
7a3aca1220 Merge pull request #1251 from MichaelDvP/dev
Fix HM200 compressor speed
2023-08-08 17:09:56 +02:00
MichaelDvP
1360a5d35b Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2023-08-08 16:28:13 +02:00
Proddy
9226e5b303 Merge pull request #1250 from proddy/dev
small changes
2023-08-08 15:53:52 +02:00
Proddy
4e4cc93092 Merge branch 'emsesp:dev' into dev 2023-08-08 15:49:24 +02:00
Proddy
faa3479f0a make progmem work again 2023-08-08 15:49:08 +02:00
Proddy
0924f441cb update packages 2023-08-08 15:48:54 +02:00
Proddy
f39deefbb4 add vscode extensions 2023-08-08 15:48:45 +02:00
MichaelDvP
461f1bb102 Merge branch 'dev' of https://github.com/proddy/EMS-ESP32 into dev 2023-08-08 12:28:54 +02:00
MichaelDvP
1d1aaef291 add back progmem generation 2023-08-08 12:06:24 +02:00
Proddy
3c51e80408 remove translation for Heatbeat 2023-08-08 10:36:14 +02:00
Proddy
ff68d23642 add style to Dialog boxes 2023-08-08 10:35:55 +02:00
Proddy
643b42469e hardcode colours 2023-08-08 10:34:45 +02:00
Proddy
a996d00f70 remove aria labels 2023-08-08 10:34:10 +02:00
MichaelDvP
6ccab21791 fix HM200 compressor speed, #1247 2023-08-08 09:07:09 +02:00
Proddy
b5b965e339 fix typo 2023-08-08 09:02:21 +02:00
Proddy
2b54db255e update prettier for windows 2023-08-08 09:02:14 +02:00
Proddy
45fc13f7a0 Merge pull request #1249 from proddy/dev
hardcode links to release notes
2023-08-08 07:59:04 +02:00
Proddy
94407e5192 Merge branch 'emsesp:dev' into dev 2023-08-08 07:58:13 +02:00
proddy
7e791e56ce hardcode links to release notes 2023-08-08 07:57:51 +02:00
Proddy
2698116c63 Merge pull request #1245 from proddy/dev
Enhance version check to differentiate between ESP32 and ESP32-S3 bin versions #1240
2023-08-08 07:51:20 +02:00
proddy
e17f709fe1 increase size of username/password fields 2023-08-08 07:50:03 +02:00
proddy
c4ec535a82 update packages 2023-08-08 07:49:50 +02:00
proddy
7efc7616f8 fix platform to espressif32@6.3.2 2023-08-08 07:49:37 +02:00
Proddy
9468248995 fix ci_s3 2023-08-06 22:57:29 +02:00
Proddy
a72cbe9c0c bump version 2023-08-06 22:57:25 +02:00
Proddy
171df2c5b7 hardcode "platform = espressif32@6.3.1" for all targets 2023-08-06 18:48:28 +02:00
proddy
ca2bb4ba6f language menu in login page 2023-08-06 18:33:01 +02:00
proddy
9b92bfa81c Enhance version check to differentiate between ESP32 and ESP32-S3 bin versions #1240 2023-08-04 16:42:37 +02:00
proddy
0cc14215e6 dev.15 2023-08-01 22:02:53 +02:00
proddy
2e1e294baf update packages 2023-08-01 22:02:30 +02:00
proddy
6cee81aeb0 README.md: Fix link to supported devices #1239 2023-08-01 21:54:33 +02:00
Proddy
6e653eea7e Merge pull request #1237 from MichaelDvP/dev
more tr translations #1076
2023-07-31 14:53:15 +02:00
MichaelDvP
f788be691f more tr translations 2023-07-31 08:17:27 +02:00
Proddy
c167aa90bc Merge pull request #1236 from proddy/dev
merge dev2
2023-07-30 22:38:25 +02:00
proddy
657056d774 bump version 2023-07-30 22:32:43 +02:00
proddy
1d979cc894 Merge remote-tracking branch 'origin/dev2' into dev 2023-07-30 22:26:15 +02:00
Proddy
dda2d6316d Merge pull request #1235 from MichaelDvP/dev2
tr translation (part), response api
2023-07-30 14:54:27 +02:00
MichaelDvP
cac7ddd6bb log_trace for response 2023-07-30 08:29:01 +02:00
MichaelDvP
f677616b22 notice telegram log only for read, not for response 2023-07-29 17:11:11 +02:00
MichaelDvP
26daf548ff update packages 2023-07-29 16:51:05 +02:00
MichaelDvP
d92974dd88 read all telegram parts in one poll 2023-07-29 16:40:39 +02:00
MichaelDvP
52de833b19 response error messages 2023-07-29 16:39:37 +02:00
MichaelDvP
bb39e8bd4c update tr translation 2023-07-29 11:43:38 +02:00
Proddy
4295b2d114 Merge pull request #1234 from MichaelDvP/dev2
add cooling state, make mqtt on_message more clear
2023-07-24 21:11:07 +01:00
MichaelDvP
01060574ab mqtt on_message: make char * conversion more clear 2023-07-24 19:56:07 +02:00
MichaelDvP
2e829b560d thermostat cooling state 2023-07-24 19:03:44 +02:00
MichaelDvP
a2f0cafc5c update packages 2023-07-24 19:02:16 +02:00
Proddy
6a675736eb Merge pull request #1232 from proddy/dev2
upgrade arduinojson 6.21.3 and other minor formatting
2023-07-24 08:37:58 +01:00
proddy
c8466df61d exclude arduinojson with Todo Tree 2023-07-24 08:31:49 +01:00
proddy
ded26feeb6 upgrade arduinojson 6.21.3 2023-07-24 08:16:37 +01:00
proddy
b2482b092c bump version 2023-07-24 08:16:08 +01:00
proddy
67397dc345 auto format 2023-07-24 08:15:56 +01:00
Proddy
4a11147467 Merge pull request #1231 from MichaelDvP/dev2
fix mqtt `on_message`
2023-07-24 08:03:39 +01:00
MichaelDvP
962131592f fix mqtt on_message 2023-07-23 13:51:40 +02:00
Proddy
168a31d331 Merge pull request #1230 from proddy/dev2
Dev2
2023-07-21 23:49:12 +02:00
proddy
00f08951db mention preact 2023-07-21 22:48:17 +01:00
proddy
96d7069e8d make standalone compile 2023-07-21 22:44:27 +01:00
proddy
a4ddacb29c package update 2023-07-21 22:44:16 +01:00
proddy
93bbf2570e terser package update 2023-07-21 22:44:08 +01:00
Proddy
ba409b808d Merge pull request #1229 from MichaelDvP/dev2
api/response, Gateway S3, small fixes
2023-07-21 23:33:47 +02:00
MichaelDvP
207d92be64 scheduler value info 2023-07-21 21:18:51 +02:00
MichaelDvP
e3c775d0dd Add BBQKees Gateway S3, update changelog 2023-07-21 12:02:13 +02:00
MichaelDvP
2bd7e04d18 update packages 2023-07-21 10:31:39 +02:00
MichaelDvP
8b58282bde Merge branch 'dev2' of https://github.com/emsesp/EMS-ESP32 into dev2 2023-07-21 09:16:51 +02:00
Proddy
ad6be2d5ef Merge pull request #1227 from proddy/dev2
standalone compiling and some formatting
2023-07-19 07:25:19 +02:00
MichaelDvP
c47414dad5 response show combined telegram 2023-07-17 09:53:40 +02:00
proddy
d84a555171 make standalone compile on osx 2023-07-15 12:42:54 +02:00
MichaelDvP
7a5f13bcad respond all telegram parts if request length >= 32 2023-07-15 12:27:48 +02:00
Proddy
1b6e3b89b6 formatting 2023-07-15 11:40:35 +02:00
Proddy
ed694f4ec5 formatting 2023-07-15 11:36:18 +02:00
Proddy
b659218d13 use original formatting 2023-07-15 11:34:57 +02:00
Proddy
cbecebd80a formatting 2023-07-15 11:34:46 +02:00
Proddy
7bb6427ec9 updated comments 2023-07-15 11:34:38 +02:00
Proddy
37724814be changes to compile standalone 2023-07-15 11:33:38 +02:00
Proddy
98dd25c5bb make EMS-ESP compile standalone on osx/darwin and linux 2023-07-15 11:00:04 +02:00
proddy
ccd69c2c3a compile on mac osx 2023-07-15 10:24:43 +02:00
MichaelDvP
6d0bd099e1 Merge branch 'dev2' of https://github.com/emsesp/EMS-ESP32 into dev2 2023-07-14 19:15:28 +02:00
MichaelDvP
660a715893 4M asym partitions for usb flash 2023-07-14 19:11:59 +02:00
Proddy
981cdaecf1 Merge pull request #1226 from proddy/dev2
dev2 - minor changes
2023-07-14 17:25:37 +02:00
Proddy
18e4c3aa88 fix odd spelling mistakes 2023-07-14 16:45:58 +02:00
Proddy
116c51443e dev.13d 2023-07-14 16:45:52 +02:00
Proddy
66799d0c6c update packages 2023-07-14 16:45:38 +02:00
Proddy
9ad9bc5536 default esp32_4M 2023-07-14 16:45:27 +02:00
Proddy
d1ebf378dc update example 2023-07-14 16:45:14 +02:00
Proddy
4730389668 remove log line 2023-07-14 16:45:01 +02:00
Proddy
7881abaca2 run make from vsc 2023-07-14 12:12:53 +02:00
Proddy
f3d3a386ee get standadlone working with espMqttClient 2023-07-14 12:11:48 +02:00
Proddy
1b623014c1 added log message 2023-07-14 12:11:22 +02:00
Proddy
af3ed871af text change 2023-07-14 12:10:29 +02:00
Proddy
2a9be94f6e package cleanup 2023-07-14 12:10:19 +02:00
MichaelDvP
08a5437210 packages, custom entiie small fixes 2023-07-14 08:52:06 +02:00
Proddy
9ff8d01e93 make standalone compile 2023-07-13 21:50:34 +02:00
Proddy
0afda87092 update packages 2023-07-13 21:50:26 +02:00
MichaelDvP
18d32de483 fix custom entity value info 2023-07-13 18:23:04 +02:00
MichaelDvP
d9ad835fbc Merge branch 'dev2' of https://github.com/emsesp/EMS-ESP32 into dev2 2023-07-13 12:42:30 +02:00
MichaelDvP
afad1d7b95 small updates 2023-07-13 12:42:07 +02:00
Proddy
e2f5124db9 Merge branch 'dev' of https://github.com/proddy/EMS-ESP32 into dev 2023-07-13 12:13:42 +02:00
Proddy
875507d7a9 Merge pull request #1225 from proddy/dev2
replace react with preact #1224
2023-07-13 12:10:48 +02:00
MichaelDvP
17b4964b01 test response and custom entity raw, #1212 2023-07-13 11:09:42 +02:00
Proddy
5af1f932bd Merge branch 'emsesp:dev2' into dev2 2023-07-13 08:28:22 +02:00
MichaelDvP
25ff2bd150 Merge branch 'dev2' of https://github.com/proddy/EMS-ESP32 into dev2 2023-07-12 19:17:16 +02:00
Proddy
3654003577 replace react with preact #1224 2023-07-12 13:26:47 +02:00
Proddy
ac96ea5308 Merge pull request #1223 from proddy/dev2
update changelog & version
2023-07-12 08:22:54 +02:00
Proddy
dde270a84c package update 2023-07-12 08:22:08 +02:00
Proddy
52c3153123 update changelog 2023-07-12 08:22:03 +02:00
Proddy
8557fec581 Merge pull request #1222 from MichaelDvP/dev2
MqttSecure, see #1178
2023-07-12 08:02:23 +02:00
MichaelDvP
b8e36eb13b Merge branch 'dev2' of https://github.com/emsesp/EMS-ESP32 into dev2 2023-07-12 07:11:10 +02:00
Proddy
39624dcfcc Merge pull request #1219 from proddy/dev2
Add endpoint to read firmware capabilities #1218
2023-07-11 21:33:08 +02:00
Proddy
156d5a02d3 update text - bea0922ee8 2023-07-11 21:30:50 +02:00
Proddy
eb7ed0c524 don't render until we have a GET value 2023-07-11 21:28:19 +02:00
Proddy
0415ade906 show version on signin 2023-07-11 21:14:19 +02:00
Proddy
bf6c522918 remove features 2023-07-11 21:14:05 +02:00
Proddy
5f8f13e1a5 update lint & packages 2023-07-11 21:13:52 +02:00
Proddy
d92cd4ea2c Add endpoint to read firmware capabilities #1218 2023-07-11 13:28:29 +02:00
MichaelDvP
2c19b9369a Change MqttClient without restart, use secureClient for port >8800 2023-07-11 11:35:54 +02:00
MichaelDvP
78403adeb4 mqtt tls only for esp32-S3, certificate input strips header/footer/CR/LF 2023-07-11 07:50:13 +02:00
MichaelDvP
5374127d56 show WPA3 in networkselector 2023-07-11 07:08:30 +02:00
MichaelDvP
87f28e7804 adapt limits #1215, #1190 2023-07-11 07:07:45 +02:00
MichaelDvP
1e8adfb34f activate setInsecure to make tsl work 2023-07-10 15:22:33 +02:00
MichaelDvP
d3175e3d64 update packages 2023-07-10 12:44:27 +02:00
MichaelDvP
1b832b541a Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev2 2023-07-10 12:38:56 +02:00
MichaelDvP
29557d764a Merge branch 'dev2' of https://github.com/emsesp/EMS-ESP32 into dev2 2023-07-10 12:38:29 +02:00
MichaelDvP
ae46f40fce fix secure mqtt 2023-07-10 12:36:59 +02:00
Proddy
362d837baa Merge pull request #1211 from proddy/dev2
report on invalid extension - fixes #1210
2023-07-10 08:36:57 +02:00
MichaelDvP
2db7174068 fix cutting output of large numbers #1213 2023-07-10 07:57:24 +02:00
Proddy
1360ffaec0 remove bogus import 2023-07-09 20:08:03 +02:00
Proddy
91e0a29494 autoscroll in system log 2023-07-09 18:07:11 +02:00
Proddy
99b2da752f package update 2023-07-09 18:07:03 +02:00
Proddy
32884da60d Merge branch 'emsesp:dev2' into dev2 2023-07-09 17:43:38 +02:00
Proddy
d537247ead package updates 2023-07-09 10:55:30 +02:00
Proddy
d8364c5df2 close only on 406 2023-07-09 10:55:25 +02:00
MichaelDvP
f62b5548a3 add missing \n in certificate 2023-07-09 08:40:22 +02:00
MichaelDvP
443fe640b3 add optional secure mqtt 2023-07-08 16:24:44 +02:00
Proddy
365d246a89 fix prettier in vscode 2023-07-08 15:53:44 +02:00
Proddy
bea0922ee8 report on invalid extension - Validate file name extension on file upload #1210 2023-07-08 14:10:33 +02:00
Proddy
eb6e8d0c93 comments 2023-07-08 14:10:08 +02:00
Proddy
1b27ccf70e formatting 2023-07-08 14:08:25 +02:00
Proddy
3aa806ca65 formatting 2023-07-08 14:08:13 +02:00
Proddy
f99735921c package update, fixing lint 2023-07-08 14:07:58 +02:00
Proddy
c934e6617c some textual cleanup 2023-07-08 14:07:38 +02:00
Proddy
67ce23337f remove mention of scan devices 2023-07-08 14:07:25 +02:00
Proddy
b57bc11070 Merge pull request #1209 from proddy/dev2
add timeout so Wifi Scan works
2023-07-07 17:07:45 +02:00
Proddy
f3d1ed5596 add timeout so Wifi Scan works 2023-07-07 17:06:48 +02:00
Proddy
5112bf9e08 package update 2023-07-07 17:06:39 +02:00
Proddy
60594ff4b7 Merge pull request #1208 from proddy/dev2
refresh change log with all 3.6.0 updates
2023-07-07 14:43:14 +02:00
Proddy
dc3467e7fc package update 2023-07-06 20:37:37 +02:00
Proddy
bb87d064a5 formatting 2023-07-06 20:37:31 +02:00
Proddy
30388da021 refresh change log with all 3.6.0 updates 2023-07-06 20:37:25 +02:00
Proddy
1f7ddcec55 Merge pull request #1207 from MichaelDvP/dev2 2023-07-05 15:16:03 +02:00
MichaelDvP
942eba868a fix offsets for #1187 2023-07-05 15:13:30 +02:00
Proddy
d6e7b136a8 Merge pull request #1206 from proddy/dev2
order languages alphabetically
2023-07-05 09:39:38 +02:00
Proddy
55c33ef51f order languages alphabetically 2023-07-05 09:38:51 +02:00
Proddy
d33a554ab1 package update 2023-07-05 09:38:41 +02:00
Proddy
cbbe6ac589 Merge pull request #1205 from MichaelDvP/dev2
update it translations, etc
2023-07-03 21:32:42 +02:00
MichaelDvP
84b8fa8ff5 update it translations 2023-07-03 21:11:05 +02:00
MichaelDvP
3a7eb634de update packages 2023-07-03 21:10:20 +02:00
MichaelDvP
5977b0585d update mqtClient 2023-07-03 21:09:56 +02:00
Proddy
7b0d73e275 Merge pull request #1203 from MichaelDvP/dev2
reset dirty when saving
2023-07-03 13:15:38 +02:00
MichaelDvP
143ce8c80f Merge branch 'dev2' of https://github.com/emsesp/EMS-ESP32 into dev2 2023-07-03 12:43:57 +02:00
MichaelDvP
4e736a4ff1 reset dirty when saving 2023-07-03 12:38:31 +02:00
Proddy
d2523fc5d2 upgrade ArduinoJson to 6.21.2 2023-07-03 11:44:37 +02:00
Proddy
ab4f8d46ad fix standalone build 2023-07-03 11:44:23 +02:00
Proddy
75defd0858 always add dump_entities for reference 2023-07-03 11:44:13 +02:00
Proddy
e52f0954cd fix build standalone 2023-07-03 11:43:50 +02:00
Proddy
98e9b62c85 fix lint warning 2023-07-03 10:18:52 +02:00
Proddy
40737ea552 fix typo 2023-07-03 10:02:30 +02:00
Proddy
523f501bd0 added yarn 2023-07-03 10:00:34 +02:00
Proddy
905c496fa3 ignore uploaded files 2023-07-03 10:00:03 +02:00
Proddy
2ad375884f add back json body parsing 2023-07-03 09:59:52 +02:00
Proddy
50b8db0c96 remove divider after EN. All countries are equals! 2023-07-03 09:59:34 +02:00
Proddy
36f88c772f increase timeout to 3 seconds 2023-07-03 09:59:12 +02:00
Proddy
7086358ebc fix for alova multi-cancel 2023-07-03 09:58:58 +02:00
Proddy
51769011be autoformatting 2023-07-03 08:56:08 +02:00
Proddy
d15de88065 Merge pull request #1202 from MichaelDvP/dev2
github action
2023-07-03 08:48:24 +02:00
Proddy
f909b32db8 remove todo 2023-07-02 23:45:01 +02:00
Proddy
e8e3fc5fb6 remove todo 2023-07-02 23:44:51 +02:00
Proddy
90a1bdd5d9 add back signon endpoint 2023-07-02 23:44:38 +02:00
Proddy
0b6eba294e add dutch translations 2023-07-02 23:44:21 +02:00
MichaelDvP
98b2a3a6e1 Merge branch 'dev2' of https://github.com/emsesp/EMS-ESP32 into dev2 2023-07-02 22:10:45 +02:00
MichaelDvP
3bd21d4486 try to fix standalone 2023-07-02 22:10:34 +02:00
MichaelDvP
2094d42c3b readme 2023-07-02 22:09:52 +02:00
MichaelDvP
0156dd4956 test release 2023-07-02 22:02:43 +02:00
Proddy
da3e118444 fix restart monitor 2023-07-02 21:56:31 +02:00
Proddy
2663bc15f4 Merge pull request #1201 from MichaelDvP/dev2
Merge dev2
2023-07-02 15:43:16 +02:00
MichaelDvP
50939c1077 changelog 2023-07-02 13:57:34 +02:00
MichaelDvP
b0fc26b6eb remove unused async-mqtt-client-lib 2023-07-02 13:57:26 +02:00
MichaelDvP
476f84be77 Merge branch 'dev2' of https://github.com/emsesp/EMS-ESP32 into dev2 2023-07-02 13:56:47 +02:00
Proddy
449bb4055c Merge pull request #1200 from proddy/dev-alova
Dev alova - #1112
2023-07-02 13:09:01 +02:00
Proddy
86daa13426 fix for cancel upload 2023-07-02 12:38:05 +02:00
MichaelDvP
09aea280b5 add it-translations 2023-07-02 12:09:14 +02:00
Proddy
34113c3698 fix progress bar when uploading 2023-07-02 10:12:31 +02:00
Proddy
9b21607da5 show EMS-ESP welcome message first 2023-07-02 10:12:17 +02:00
Proddy
985da48947 fix upload, except cancel 2023-07-01 17:01:08 +02:00
MichaelDvP
32f3c646f8 fix translation cooling 2023-07-01 15:51:26 +02:00
MichaelDvP
d27ef2530d fix crash on min/max check 2023-07-01 09:08:27 +02:00
proddy
fb41606e43 alova upload experiments 2023-06-30 14:25:01 +02:00
MichaelDvP
cbb7d46ede add cooling #1198, fix min limit of noreducetemp 2023-06-30 10:00:04 +02:00
MichaelDvP
3efe16c840 fix min/max adaption 2023-06-30 09:58:24 +02:00
MichaelDvP
8b800ded21 update packages 2023-06-30 09:57:49 +02:00
MichaelDvP
31220b3fde fix webEntity commands 2023-06-25 08:54:11 +02:00
MichaelDvP
f4cae5027e update packages 2023-06-25 08:53:20 +02:00
MichaelDvP
d17705db6c thermostat hpmodes 2023-06-25 08:52:55 +02:00
proddy
d6c5c87412 fix Cancel 2023-06-24 16:51:04 +02:00
proddy
89f14f1dba add comments 2023-06-24 16:50:59 +02:00
proddy
5fddb08330 increase timeout to 3 secs 2023-06-24 16:50:49 +02:00
proddy
f61c447ea5 add duplicate name check 2023-06-24 16:50:38 +02:00
Proddy
8b8b023665 update with 1196 2023-06-24 14:51:58 +02:00
Proddy
158617f56b fixes #1196 - use basename as ids in HA to support multiple EMS-ESP's 2023-06-24 13:28:48 +02:00
Proddy
27b9aa6ddd fix timeout 2023-06-24 09:09:34 +02:00
proddy
e615274f83 package updates 2023-06-23 19:12:29 +02:00
proddy
2b24f2585f optimize restart using alova lib 2023-06-21 23:15:38 +02:00
Proddy
0e52deae7b package updates 2023-06-20 22:52:16 +02:00
Proddy
bc6b48bd07 fix signin 2023-06-18 17:12:43 +02:00
Proddy
ce1b9f22cb alova - add interceptor 2023-06-18 16:35:32 +02:00
Proddy
b1d666d7b9 alova - refactor wifi scan 2023-06-18 10:46:50 +02:00
Proddy
ed55a96b80 more alova ports 2023-06-17 13:06:31 +02:00
proddy
2ae45ecd6e merging to sync - still need to fix system.ts 2023-06-16 06:44:49 +02:00
proddy
f58dbf6ec1 alova - update comments 2023-06-15 16:08:25 +02:00
proddy
adc4760b5f alova - implementing UpdateState 2023-06-14 23:30:52 +02:00
proddy
c44903e1b0 update #6 2023-06-13 23:36:50 +02:00
proddy
8e081ce04f alova update #6 2023-06-11 20:31:23 +02:00
proddy
5c6d704a48 alova updates #4 2023-06-08 16:50:40 +02:00
proddy
e11d5bed9d fix truncate of long device names in data box 2023-06-08 16:50:29 +02:00
proddy
5784bf744e added blur 2023-06-08 16:50:04 +02:00
Proddy
85716bc6bc update #4 - more alova 2023-06-05 22:40:21 +02:00
MichaelDvP
81e5ee8364 fix typo ventMode 2023-06-05 19:16:43 +02:00
Proddy
52d4505410 updates #3 2023-06-05 18:09:02 +02:00
MichaelDvP
b28865a283 use only espMqttClient queue 2023-06-05 10:06:19 +02:00
MichaelDvP
d2ff44e1cf Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2023-06-04 17:25:19 +02:00
MichaelDvP
9a34b2dd81 force mqtt disconnect on wifi disconnect 2023-06-04 17:24:03 +02:00
Proddy
43dc177a6d Merge pull request #1189 from emsesp/dev_fix 2023-06-04 16:41:39 +02:00
MichaelDvP
34046795b7 fix #1188 2023-06-04 16:40:42 +02:00
MichaelDvP
2c132a86b0 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2023-06-04 15:40:10 +02:00
MichaelDvP
759fe69909 fix prefix of customizations 2023-06-04 15:39:57 +02:00
MichaelDvP
181b672c1a add ventilation bypass 2023-06-04 15:32:43 +02:00
proddy
2e63d60273 alova implementation, testing 2023-06-04 15:22:09 +02:00
Proddy
46578dbe69 Update roboto.css - fix typo 2023-06-04 12:18:05 +02:00
MichaelDvP
cbc9607b26 apply changes/blocker for manage users 2023-06-03 17:46:26 +02:00
MichaelDvP
7865ddc51f use espMqttClient, qos2 fixed 2023-06-03 16:36:53 +02:00
Proddy
d9c2fe0fb9 Merge pull request #1186 from proddy/dev
suppress lint warning with make
2023-06-03 11:12:51 +04:00
proddy
02c386d76f supress lint warning wirh make 2023-06-03 09:11:43 +02:00
Proddy
ee0e6ed29f Merge pull request #1185 from proddy/dev
minor updates
2023-06-03 10:09:59 +04:00
Proddy
e858596658 package update 2023-06-03 08:09:23 +02:00
Proddy
b4519b40eb minor updates 2023-06-03 08:06:36 +02:00
Proddy
a0bc5fed35 update packages 2023-06-02 14:37:31 +02:00
Proddy
2a7bd7e963 remove DEBUG 2023-06-02 14:37:25 +02:00
Proddy
26b873da9e Merge pull request #1184 from emsesp/dev-fix
fix #1182
2023-05-31 23:18:48 +04:00
MichaelDvP
82a8f0481e fix #1182 2023-05-31 19:13:53 +02:00
Proddy
53c8d9372e Merge pull request #1180 from pswid/dev 2023-05-30 23:04:58 +04:00
Proddy
d314e1d050 Merge pull request #1181 from emsesp/dev-fix 2023-05-30 23:03:13 +04:00
MichaelDvP
e4a0799163 3 retrys on rejected tx, fixes #1179
please delete branch after merge. My dev branch contains the mqtt lib, so i edit on github directly.
2023-05-30 09:41:26 +02:00
pswid
685f987a8e automatic (some) columns expansion to avoid truncation 2023-05-29 12:54:58 +02:00
pswid
b57fff13eb Polish translation fixes 2023-05-29 12:43:55 +02:00
Proddy
4a3201f194 Merge pull request #1177 from proddy/dev
formatting
2023-05-27 09:43:41 +02:00
Proddy
8b948bc521 don't build web on pio clean target 2023-05-27 09:42:50 +02:00
Proddy
91f0da84d2 clang auto formatting 2023-05-27 09:42:33 +02:00
Proddy
551b2d900e package update 2023-05-27 09:42:21 +02:00
Proddy
06e3c0a41f Merge pull request #1176 from MichaelDvP/dev
AM20, HIU, Ventilation and other
2023-05-27 08:39:48 +02:00
MichaelDvP
ac3d16b2b4 version dev.12, update changelog 2023-05-26 10:48:30 +02:00
MichaelDvP
c8c4a3d450 build s3 bin 2023-05-26 10:26:25 +02:00
MichaelDvP
6aaccf4f90 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2023-05-26 09:46:16 +02:00
Proddy
2d70f637c9 Merge pull request #1175 from proddy/dev
Table sizes
2023-05-25 20:20:52 +02:00
Proddy
cf042271c3 Merge branch 'emsesp:dev' into dev 2023-05-25 20:20:26 +02:00
proddy
7330ca20f8 condensed table for entity data 2023-05-25 20:16:19 +02:00
MichaelDvP
b5ccf79f70 ventilation temperatures div10 2023-05-25 12:27:58 +02:00
MichaelDvP
9a2303ab73 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2023-05-25 10:17:41 +02:00
MichaelDvP
07102e0279 add ventilation air temperatures 2023-05-25 09:46:34 +02:00
Proddy
0c1042abc9 Merge pull request #1162 from proddy/dev
web render update - #1116
2023-05-24 20:42:36 +02:00
proddy
2571f5e5e6 package update 2023-05-24 20:41:01 +02:00
Proddy
c9a968c1a5 package update 2023-05-23 22:51:35 +02:00
Proddy
b74e56974e package update 2023-05-14 10:57:03 +02:00
Proddy
fabaa230de shorten greenstar 2023-05-14 10:56:58 +02:00
Proddy
c224abfc61 layout improvements 2023-05-13 16:55:49 +02:00
Proddy
26f5c9debf improvements to #1169 2023-05-13 10:51:18 +02:00
Proddy
ae9a86e796 remove comments 2023-05-13 10:51:06 +02:00
Proddy
c57a5c04d6 pacakge update 2023-05-12 08:26:08 +02:00
Proddy
d1df21cb8e add refresh to device data 2023-05-12 08:25:45 +02:00
Proddy
ff59276387 table formatting 2023-05-11 21:51:15 +02:00
Proddy
0e0ec7a7c7 improve layout 2023-05-11 21:37:24 +02:00
Proddy
3ecaeffec0 improve mobile layout 2023-05-11 21:26:41 +02:00
Proddy
4f8d3d27ba updates to data view 2023-05-11 18:19:47 +02:00
Proddy
6575e1d790 escape key closes data window 2023-05-11 00:23:35 +02:00
Proddy
b255b65dc4 experiment with a pop up device data table 2023-05-11 00:16:03 +02:00
Proddy
b1b15eef4c package update 2023-05-11 00:15:44 +02:00
MichaelDvP
2f5e5535c8 connect wifi or eth, only one 2023-05-10 18:48:36 +02:00
MichaelDvP
5abe9530d7 update packages 2023-05-10 18:48:00 +02:00
MichaelDvP
a5113eb90d add HIU 2023-05-10 18:47:39 +02:00
MichaelDvP
e6f839b554 Merge branch 'dev11' into dev 2023-05-10 18:47:07 +02:00
MichaelDvP
b2ad600de2 add ventilation device class 2023-05-10 16:55:03 +02:00
Proddy
ea71b43f78 package update 2023-05-08 17:59:49 +02:00
Proddy
d939795b8c fix pio for 6.1.7 2023-05-08 17:59:44 +02:00
Proddy
db9b9992d6 make menu pane less wide 2023-05-07 17:49:58 +02:00
Proddy
c8fd8c4928 replace msgpack with msgpackr - https://github.com/emsesp/EMS-ESP32/issues/1112 2023-05-07 17:34:13 +02:00
Proddy
a5fae64db6 fix typo 2023-05-07 17:28:10 +02:00
Proddy
5767d83c85 add notes about fonts 2023-05-07 14:26:34 +02:00
Proddy
7910893529 rename reset 2023-05-07 14:26:23 +02:00
proddy
3c003657b9 move device types to types.ts 2023-05-07 09:47:13 +02:00
proddy
348ffcd077 remove obsolete import 2023-05-07 09:46:52 +02:00
proddy
09ea35e340 add comment 2023-05-06 17:11:57 +02:00
proddy
fcac70a2ca update test data - Need fresh test data #1168 2023-05-06 17:11:48 +02:00
proddy
b5b890beaa package update 2023-05-06 17:11:26 +02:00
Proddy
ca964c13a7 fix row unselect 2023-05-05 20:37:48 +02:00
Proddy
979503256a package update 2023-05-05 20:25:59 +02:00
MichaelDvP
c9ab6b23ea fix #600, read telegram 486 2023-05-05 09:32:57 +02:00
Proddy
e84a3bc99a improve dv validation, add back ugly step 2023-05-03 08:54:57 +02:00
Proddy
310bb53985 package update 2023-05-03 08:54:36 +02:00
Proddy
5b87e74be8 update comment 2023-05-03 08:54:27 +02:00
Proddy
8aa7cd166b experiment showing only 1 device 2023-05-01 22:13:53 +02:00
Proddy
72f530b969 export setOrigData needed for systemlog 2023-05-01 22:13:39 +02:00
Proddy
b027ce0d91 remember old settings 2023-05-01 22:13:17 +02:00
Proddy
ff5247eaf5 update eslint 2023-05-01 22:13:00 +02:00
proddy
148e35ea53 improve device value helper text 2023-05-01 13:39:12 +02:00
Proddy
8a01a1e471 merge changes from Michael for #600 2023-04-30 20:35:29 +02:00
Proddy
c34208c3df fix logo on mobile devices 2023-04-30 20:25:04 +02:00
Proddy
bf5c11156a reduce margins so data fills plane 2023-04-30 20:24:50 +02:00
Proddy
6e3b36c070 update for 3.6.0-dev-11 2023-04-30 16:36:50 +02:00
Proddy
dc4bd64aff fixes PlatformIO 6.2.0 breaks compilation #1166 (thanks Michael) 2023-04-30 16:22:51 +02:00
proddy
0d9cd64619 rename upload finished to successful 2023-04-30 15:51:15 +02:00
proddy
cc10c494c6 version release text changes 2023-04-30 15:47:59 +02:00
Proddy
3ef3f561b9 text changes 2023-04-30 10:41:23 +02:00
Proddy
2d9627373c ignore internationl number settings when changing value 2023-04-30 10:41:01 +02:00
proddy
d618d09bdf min, max and step are sent as Numbers to the webUI 2023-04-30 09:57:25 +02:00
proddy
8a02f2a27a add check for min/max when sending device values 2023-04-30 09:53:10 +02:00
proddy
ceb63fa09f rename lint 2023-04-30 09:52:47 +02:00
proddy
a256d2573c remove unused lib 2023-04-30 09:52:35 +02:00
Proddy
5fe9049537 but device data in scrollable body 2023-04-29 16:26:20 +02:00
Proddy
6f681aa451 remove useWindowSize 2023-04-29 16:26:07 +02:00
Proddy
63d105437f comment change 2023-04-29 16:25:55 +02:00
Proddy
2254bf9c16 fix eslint warnings 2023-04-29 15:35:54 +02:00
Proddy
90a719561b remove comment 2023-04-29 15:35:33 +02:00
proddy
d06dc3e2cf fic dialog deviceentities 2023-04-29 14:34:56 +02:00
proddy
ff058b06a1 changed comment 2023-04-29 14:34:48 +02:00
proddy
26b0c67d13 update packages, but not router as it breaks 2023-04-29 14:34:34 +02:00
proddy
ab24695371 use blocker from main lib 2023-04-29 14:34:19 +02:00
Proddy
1861365124 removed SAVE 2023-04-28 21:03:29 +02:00
Proddy
321558c583 minor optimizations 2023-04-28 15:46:45 +02:00
Proddy
dd25900af4 make icon bigger 2023-04-28 15:46:37 +02:00
Proddy
28252b987b added missing analog_enabled 2023-04-28 15:46:24 +02:00
Proddy
b823366a82 fixed changing log settings - https://github.com/emsesp/EMS-ESP32/pull/1162#issuecomment-1525877550 2023-04-28 15:46:07 +02:00
MichaelDvP
90ce8bc8ce HP inputs #600, custom entity bool display 2023-04-28 14:36:35 +02:00
Proddy
1362976508 disable changing gpio 2023-04-28 14:13:09 +02:00
Proddy
cfe8c410ae Optimize WebUI rendering when using Dialog Boxes #1116 2023-04-28 12:46:59 +02:00
MichaelDvP
5f87718deb heatpump inputs, fix #600 2023-04-27 09:12:53 +02:00
MichaelDvP
f15fb9a5d1 custom entities: bool write, dashboard show and count 2023-04-27 09:07:38 +02:00
MichaelDvP
57cc39c087 Add Worcester Comfort RF Thermostat emsesp#1163 2023-04-25 18:17:32 +02:00
Proddy
b9402d3a01 remove unused libs 2023-04-24 21:56:40 +02:00
Proddy
b59c76df3b replace void with await 2023-04-24 21:39:30 +02:00
Proddy
7d526196a0 don't show uptime if disconnected 2023-04-24 21:39:16 +02:00
Proddy
f1b3cb9646 added test for bus disconnect 2023-04-24 21:38:52 +02:00
Proddy
67de1c6a47 add one more line to box so it fits 'patch' 2023-04-24 21:38:35 +02:00
Proddy
41b2a67f09 remove hidden spaces 2023-04-24 21:38:21 +02:00
Proddy
f2636d42a4 updated packages 2023-04-24 21:38:03 +02:00
Proddy
0c0ef80025 rename 'Tx issues - check Tx Mode' 2023-04-24 21:37:47 +02:00
Proddy
bcd0c5ac52 only show Update when changes made - https://github.com/emsesp/EMS-ESP32/pull/1162 2023-04-24 17:42:44 +02:00
Proddy
005485188f updates to https://github.com/emsesp/EMS-ESP32/pull/1162 2023-04-24 16:50:28 +02:00
Proddy
9553161b07 remove force from check_active() 2023-04-24 16:50:05 +02:00
Proddy
71e7887da3 replace MUI Slider, saves 5KB 2023-04-23 11:02:10 +02:00
Proddy
300fe721a1 tidy up files 2023-04-23 10:14:35 +02:00
Proddy
047eae2d40 package update 2023-04-23 09:45:12 +02:00
Proddy
c3e5e8d6d1 Merge branch 'dev' into dev 2023-04-23 01:05:36 +02:00
Proddy
466e9ec6fe rename endpoint to entities to be consistent 2023-04-22 21:20:00 +02:00
Proddy
74c88caa19 add empty entity test 2023-04-22 21:19:48 +02:00
Proddy
71d086a8db device_id and type_id as numbers 2023-04-22 21:04:54 +02:00
Proddy
728e15772f bump version 2023-04-22 21:04:37 +02:00
Proddy
e1ffd8860d optimize Settings Customization for rendering 2023-04-22 21:02:11 +02:00
Proddy
4b9bddd565 add comment 2023-04-22 21:01:39 +02:00
Proddy
f53921d068 device entity min/max as numbers 2023-04-22 21:01:19 +02:00
Proddy
445618d232 add min/max for entity customization 2023-04-22 21:01:04 +02:00
Proddy
b035e27bc8 device entity min/max sent as numbers 2023-04-22 21:00:43 +02:00
Proddy
cecbb25857 device_id and type_id sent as numbers 2023-04-22 21:00:29 +02:00
Proddy
c2823a5ed6 add SHOWING and SEARCH 2023-04-22 21:00:12 +02:00
MichaelDvP
3dba97239d AM200 with device-id 08 2023-04-22 16:49:03 +02:00
Proddy
209afc87bb fix lint warnings 2023-04-22 10:05:13 +02:00
Proddy
19e8e4a7a1 initial lint cleanup 2023-04-22 09:47:29 +02:00
Proddy
d8ff088231 formatting 2023-04-22 09:47:03 +02:00
Proddy
6f14fcb6e8 id no longer needed 2023-04-22 09:46:41 +02:00
Proddy
56e95d1d85 updated for custom entities 2023-04-22 09:46:11 +02:00
Proddy
e12083e3ba added more eslint rules 2023-04-22 09:45:54 +02:00
Proddy
fa263918ba updated packages 2023-04-22 09:45:37 +02:00
Proddy
e81b1b9277 rename entities_saved to updated 2023-04-22 09:45:12 +02:00
Proddy
84635ac889 autoformat 2023-04-22 09:44:39 +02:00
Proddy
f80764d72b refactor diallogs 2023-04-22 09:44:24 +02:00
Proddy
04dd9eef09 Polish translation update #1156 2023-04-22 08:46:13 +02:00
Proddy
6bd744f12e refactor dialog to prevent multiple parent renders 2023-04-18 22:04:00 +02:00
Proddy
6f155fab0b Merge pull request #1159 from MichaelDvP/dev
add writeable setting to custom entities
2023-04-15 18:32:50 +02:00
MichaelDvP
a54f3f7085 add writeable checkbox to custom entities 2023-04-15 10:45:41 +02:00
MichaelDvP
d86153a08e add custom entity with empty strings 2023-04-14 14:59:57 +02:00
Proddy
8eb7793cd0 update libs 2023-04-11 18:30:45 +02:00
Proddy
79bff902e1 Merge pull request #1154 from proddy/dev
standalone compile issues
2023-04-06 21:20:42 +02:00
proddy
825e33c3ea standalone compile issues 2023-04-06 21:19:24 +02:00
Proddy
0c8a7d51a8 Merge pull request #1151 from MichaelDvP/dev
Custom telegram handler #1079
2023-04-06 21:08:28 +02:00
Proddy
05e1bbf86b Merge branch 'dev' into dev 2023-04-06 21:08:18 +02:00
Proddy
004ec92d68 Merge pull request #1153 from proddy/dev
minor updates, can't remember what
2023-04-06 20:56:53 +02:00
proddy
f00502863f update packages 2023-04-06 20:55:18 +02:00
proddy
fe8aa8f727 don't use yarn pnp 2023-04-04 11:27:02 +02:00
Proddy
24eccf1e04 Merge branch 'emsesp:dev' into dev 2023-04-02 16:14:01 +02:00
proddy
5ef494b702 tsx config 2023-04-02 16:08:42 +02:00
Proddy
1673acd537 Merge pull request #1149 from pswid/dev
fixed PL and NO translation of "haclimate"
2023-04-02 10:57:48 +02:00
Proddy
d993b356f9 Merge pull request #1150 from minusdreidb/dev
Fix #1147 - Exhaust temperature always zero on GB125/MC110/RC310
2023-04-02 10:43:35 +02:00
marcel
e2fec03a21 Use exhaust temperature from 0xe4, remove from 0xe5 until verified, closes #1147. 2023-04-01 19:15:54 +02:00
MichaelDvP
5e2d97c0b9 Typo, fix string-compare standalone 2023-03-31 17:35:31 +02:00
MichaelDvP
594e79be5d update changelog, version dev.9 2023-03-31 16:52:23 +02:00
MichaelDvP
fa50846a05 add own entities read from ems-bus with free factor 2023-03-31 16:51:28 +02:00
MichaelDvP
36d5df65b8 env for asymetric partitions (loader) 2023-03-31 16:49:30 +02:00
MichaelDvP
486b365f9b update packages 2023-03-31 16:48:08 +02:00
marcel
5c59a20714 Accept exhaustTemp_ update from telegram 0xE5 if value is unequal zero. 2023-03-27 21:57:31 +02:00
pswid
1c10d8015c fixed PL and NO translation of "haclimate" 2023-03-27 09:55:30 +02:00
Proddy
d2d29afcbe update es build 2023-03-26 22:56:43 +02:00
marcel
982a43b8d4 Fix Exhaust Temperature for Logano plus GB125 with Logamatic MC110.
Exhaust Temperature was always zero prior to fix. On the setup

- Logano plus GB125 with Logamatic MM110 (SW-Version 02.10)
- Logamatic RC310 (SW-Version 74.03)
- MM100 (SW-Version 24.05)

the exhaust temperature ist found in telegram type 0xe4 at offset 31.
The original location in telegram 0xe5, offset 6 is always zero.
2023-03-26 17:49:01 +02:00
Proddy
17b108597e Merge pull request #1145 from MichaelDvP/dev
revert another wrong translation
2023-03-25 11:12:33 +01:00
MichaelDvP
28e42b7920 revert another wrong translation 2023-03-25 08:25:04 +01:00
Proddy
904403f8fa Merge pull request #1142 from MichaelDvP/dev
fixes
2023-03-24 20:32:16 +01:00
MichaelDvP
84e8eaf33c Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2023-03-24 14:17:52 +01:00
MichaelDvP
959e09f6c1 add missing german translation, add back //TODO translate 2023-03-24 13:41:40 +01:00
MichaelDvP
c8c4b36ebd Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2023-03-24 13:38:59 +01:00
Proddy
ddad1bbe09 Merge pull request #1141 from proddy/dev
minor fixes
2023-03-24 13:36:26 +01:00
Proddy
a2fc137ebe bump version with new NO translations 2023-03-24 13:35:11 +01:00
Proddy
936d887394 fix lint error 2023-03-24 13:34:47 +01:00
Proddy
a396d0335f formatting 2023-03-24 13:32:09 +01:00
Proddy
d575f3b3c2 package update 2023-03-24 13:32:03 +01:00
Proddy
0674426d29 Merge pull request #1139 from proddy/dev
use number as table id's - #1126
2023-03-24 12:14:17 +01:00
Proddy
80ec86361a Merge pull request #1138 from Vikingn/dev
Norwegian translations added again
2023-03-24 12:13:56 +01:00
Vikingn
1ebd38bf03 Norwegian Index.ts translated 2023-03-23 22:09:03 +01:00
Proddy
274855a19e Merge branch 'emsesp:dev' into dev 2023-03-23 20:40:15 +01:00
Proddy
d26d2ae556 Merge pull request #1137 from pswid/dev
improve view of settings pages (app and mqtt)
2023-03-23 20:37:06 +01:00
proddy
0a7e1f629e use number as table id's - #1126 2023-03-23 20:29:01 +01:00
MichaelDvP
a84e9e0923 update packages 2023-03-22 18:09:55 +01:00
MichaelDvP
aea2277e26 fix up/download scheduler files 2023-03-22 17:33:34 +01:00
MichaelDvP
a5d2beb3e7 missing translations 2023-03-22 17:31:55 +01:00
Vikingn
729832ae76 Norwegian fixed line 271-275 2023-03-22 17:22:53 +01:00
Vikingn
21f746d1fa Norwegian translation 2023-03-22 16:23:18 +01:00
Vikingn
d83de8bd15 Norwegian translations added again 2023-03-22 15:36:38 +01:00
pswid
12da8f9b67 improve view of app and mqtt settings pages
The appearance of the configuration pages has been unified. Additionally on very narrow screens (e.g. smartphones) only one parameter per row is displayed (on wider screens up to three per row).
2023-03-22 13:31:53 +01:00
MichaelDvP
70550a4866 enlarge uart stack to 2,5k, 2023-03-22 11:04:04 +01:00
MichaelDvP
789a4e1340 formatting 2023-03-22 11:03:18 +01:00
MichaelDvP
35c999e2fd fix fullname #1136 2023-03-22 07:19:55 +01:00
MichaelDvP
bfdffc14c5 package update 2023-03-20 15:05:12 +01:00
MichaelDvP
e74d3d4cd5 mqtt resend timeout from 10 min to 10 sec 2023-03-20 12:17:27 +01:00
MichaelDvP
514a96c8e4 merge "NO" translations from Vikingn 2023-03-20 09:34:25 +01:00
MichaelDvP
210181feef fix recreate HA config on language change (from discord) 2023-03-20 09:28:43 +01:00
MichaelDvP
942de63b83 fix heartbeat interval, #1131 2023-03-20 09:27:26 +01:00
Proddy
93d68996b4 Merge pull request #1128 from MichaelDvP/dev 2023-03-18 14:17:19 +01:00
MichaelDvP
369c7554f2 fix updating of board profile 2023-03-18 13:53:13 +01:00
MichaelDvP
c92d9123a0 fix enum order of nofrostmode 2023-03-18 10:18:48 +01:00
MichaelDvP
f0be8cf581 add boiler Greenstar HIU, #1127 2023-03-18 10:18:18 +01:00
MichaelDvP
bb85255ef1 add tr characters to css 2023-03-18 10:17:48 +01:00
Proddy
e46c5263d9 Merge pull request #1124 from MichaelDvP/dev
fix device icons in dashboard
2023-03-15 12:36:08 +01:00
MichaelDvP
e7372922d7 fix device icons in dashboard 2023-03-15 10:41:05 +01:00
Proddy
0c9c15f854 Merge pull request #1123 from MichaelDvP/dev
fix translations for EMSESP_EN_ONLY, EMSESP_DE_ONLY
2023-03-15 08:22:09 +01:00
MichaelDvP
216e7e5307 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2023-03-15 07:16:34 +01:00
MichaelDvP
a92474bf37 fix EMSESSP_EN_ONLY and EMSESP_DE_ONLY 2023-03-15 07:13:23 +01:00
Proddy
432220dc86 Merge pull request #1122 from proddy/dev
update ArduinoJson to 6.21.0
2023-03-14 22:06:17 +01:00
Proddy
a921b4c7b4 3.6.0-dev.7 2023-03-14 22:04:17 +01:00
Proddy
d1348f2be4 formatting 2023-03-14 22:03:28 +01:00
Proddy
f191f1c81d Merge branch 'dev' of https://github.com/proddy/EMS-ESP32 into dev 2023-03-14 21:59:41 +01:00
Proddy
3dfd34b7bf upgrade 6.21.0 2023-03-14 21:59:40 +01:00
Proddy
ada142ff29 add comment 2023-03-14 21:59:31 +01:00
Proddy
ec8b55c1e8 package updates 2023-03-14 21:59:25 +01:00
Proddy
70eb9e6b08 fix no web translations 2023-03-14 21:59:07 +01:00
Proddy
7eef95f57c lint warning fix 2023-03-14 21:58:54 +01:00
Proddy
bac266eadc Merge pull request #1121 from MichaelDvP/dev
some small fixes
2023-03-14 18:17:37 +01:00
MichaelDvP
4ba9f6f330 names for entityFormat and discoveryType 2023-03-14 15:17:16 +01:00
MichaelDvP
0b0ae2fbc2 fix update on S3 SOC 2023-03-14 15:16:16 +01:00
MichaelDvP
50bf7932a0 fix download settings and schedules 2023-03-14 15:05:23 +01:00
MichaelDvP
d3615d2961 fix stack overflow in lwip task 2023-03-14 15:04:48 +01:00
Proddy
2c572f8099 Merge pull request #1119 from pswid/dev
fix: tags in names in HA were not translated
2023-03-14 09:12:15 +01:00
pswid
944aa861f8 make 'eco+ switch_off' enity unique in v.3.4 format
HA ignores characters '+' in uniq_id/obj_id, so to make the entity 'eco+ switch_off' different from 'eco switch_off', it will be renamed to 'eco2 switch_off'.
2023-03-12 21:24:03 +01:00
pswid
62c3c91665 fixed entity id format v.3.4 2023-03-12 20:02:07 +01:00
pswid
ecafda86f1 fix: tags in names in HA were not translated 2023-03-12 19:14:28 +01:00
Proddy
354741a81d Merge pull request #1117 from proddy/dev
add EMSESP_EN_ONLY and EMSESP_DE_ONLY to be safe
2023-03-12 11:15:57 +01:00
proddy
63e6752bd1 add EMSESP_EN_ONLY and EMSESP_DE_ONLY to be safe 2023-03-12 11:14:03 +01:00
Proddy
1e1baa9781 Update sonar_check.yml 2023-03-12 10:59:22 +01:00
Proddy
94678a6726 Merge pull request #1114 from proddy/dev
#1112 - web optimizations
2023-03-12 08:49:45 +01:00
proddy
64b202225a rollback changes 2023-03-12 08:48:56 +01:00
Proddy
0d81dcde10 don't bold row selection 2023-03-11 17:42:02 +01:00
Proddy
d0ccbc2963 typo in table header height 2023-03-11 17:38:08 +01:00
Proddy
8b29c1973d DEMSESP_EN_ONLY 2023-03-11 17:31:33 +01:00
Proddy
c960db5180 added compile flag -DEMSESP_DE_ONLY 2023-03-11 17:23:41 +01:00
Proddy
dc3c6cad05 success toast after upload 2023-03-11 15:41:46 +01:00
Proddy
77798085ce upgraded sonar 2023-03-11 15:32:14 +01:00
Proddy
3c03f4b18f test new sonar 2023-03-11 15:22:43 +01:00
Proddy
955c8b4346 remove minify 2023-03-11 13:45:05 +01:00
Proddy
a3759b1959 add minify and use terser 2023-03-11 11:31:33 +01:00
Proddy
00e87dc3b0 fix table not showing on edit 2023-03-11 11:09:27 +01:00
Proddy
13211249c9 toast styling 2023-03-11 11:09:14 +01:00
Proddy
c677fed916 cleanup 2023-03-11 11:08:56 +01:00
proddy
cc5a28ca14 remove bold font and replace notistack to save flash 2023-03-11 09:22:55 +01:00
Proddy
8cbae88dc3 replace notistack 2023-03-10 20:28:43 +01:00
Proddy
ae890dab37 Merge pull request #1113 from proddy/dev
rollback notistack to 2.0.8 so it fits flash
2023-03-10 17:25:57 +05:30
Proddy
45ec315252 3.6.0-dev.5 2023-03-10 12:54:55 +01:00
Proddy
d27cd392f6 rollback notistack to 2.0.8 so it fits flash 2023-03-10 12:54:29 +01:00
Proddy
751008dcf2 cleanup platforms 2023-03-10 12:54:05 +01:00
Proddy
c16b9968e1 Merge pull request #1108 from proddy/dev
fix standalone
2023-03-08 12:01:24 +05:30
proddy
ab798bee12 package updates, formatting 2023-03-08 11:59:47 +05:30
proddy
30561411e1 fix compile standalone 2023-03-08 11:58:46 +05:30
Proddy
e1e8c1064a Merge pull request #1107 from MichaelDvP/dev
add thermostat names, missing turk locale
2023-03-08 11:49:36 +05:30
Proddy
94ff01bf2c Merge pull request #1106 from pswid/dev
Polish translation update
2023-03-08 11:48:57 +05:30
MichaelDvP
4b1b0e74df add thermostat names, missing turk locale 2023-03-07 17:46:33 +01:00
pswid
78205d77f3 fix typo 2023-03-07 12:38:41 +01:00
pswid
53a0a41a02 Polish translation update 2023-03-07 12:37:30 +01:00
Proddy
8d437c31ce Merge pull request #1105 from MichaelDvP/dev
scheduler and fixes
2023-03-06 19:45:52 +01:00
MichaelDvP
6f396087d2 fix climate publish 2023-03-06 19:12:02 +01:00
MichaelDvP
a6cd5d2ddb Merge branch 'dev' of https://github.com/MichaelDvP/EMS-ESP32 into dev 2023-03-06 18:49:38 +01:00
MichaelDvP
261cfe3911 remove dallas/analo domoticz test 2023-03-06 18:48:57 +01:00
MichaelDvP
bafe23431e fix avty 2023-03-06 18:43:46 +01:00
MichaelDvP
5759012914 fix avty 2023-03-06 18:36:27 +01:00
MichaelDvP
c9dbf282f6 add scheduler api commands/info/value 2023-03-06 16:26:52 +01:00
MichaelDvP
db1a335509 Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev 2023-03-06 16:15:28 +01:00
Proddy
cdb64a4c15 Merge pull request #1103 from proddy/dev
#701 scheduler web dialog updates
2023-03-05 18:28:33 +01:00
proddy
fd7cbdbdc4 green ticky circle thingy 2023-03-05 18:28:01 +01:00
proddy
bcbfc09bf4 yet another package update 2023-03-05 18:27:51 +01:00
MichaelDvP
5f3212afc4 fix domoticz setting (was ignored) 2023-03-05 18:17:57 +01:00
MichaelDvP
af7d072486 Test for domoticz discovery 2023-03-05 17:54:04 +01:00
MichaelDvP
a93fd314ec fix typo and text size 2023-03-05 15:32:45 +01:00
proddy
501f4a856a minor updates 2023-03-05 14:34:35 +01:00
proddy
55af79dfeb name message updated 2023-03-05 14:33:37 +01:00
proddy
607a725395 add type cast so compiles standalone 2023-03-05 14:33:01 +01:00
proddy
ef602ca70b remove TODO 2023-03-05 14:32:27 +01:00
proddy
50d489d3c1 use safer strcmp() instead of comparing pointers 2023-03-05 14:32:20 +01:00
proddy
3c10d750f0 add TODO for translations 2023-03-05 14:31:48 +01:00
proddy
cab93b16b6 id uses counter 2023-03-05 14:31:38 +01:00
proddy
d3d2270f80 typo 2023-03-05 14:31:27 +01:00
proddy
9b3b758be7 update TODOs 2023-03-05 14:31:14 +01:00
MichaelDvP
dfdaf596bc domoticz setting, analog boolformat, dallas discovery 2023-03-05 12:03:47 +01:00
proddy
8ee8998381 Scheduler #701 updates to dialog 2023-03-05 10:08:26 +01:00
proddy
de59434d95 vscode setup 2023-03-05 09:44:50 +01:00
Proddy
e6f9d9b3c8 scheduler dialog changes 2023-03-04 22:16:10 +01:00
Proddy
a41dc71965 test 2023-03-04 19:14:25 +01:00
Proddy
dd200f6d34 Merge pull request #1101 from MichaelDvP/dev
some case and nullptr checks
2023-03-04 18:43:08 +01:00
MichaelDvP
b1c42b8d8f some case and nullptr checks 2023-03-04 17:42:14 +01:00
Proddy
aba870f0ba Merge pull request #1099 from MichaelDvP/dev
mqtt/commands for scheduler
2023-03-04 16:03:34 +01:00
MichaelDvP
0380fe1fff mqtt/commands for scheduler 2023-03-04 14:10:32 +01:00
Proddy
78c4a646d2 Merge pull request #1097 from emsesp/fix_RC35Monitor
fix RC35Monitor active detection
2023-03-04 11:23:41 +01:00
MichaelDvP
44056318fd fix RC35Monitor active detection
editied direct on github, delete branch after merge.
2023-03-04 11:09:14 +01:00
Proddy
f1bb2c75a6 Merge pull request #1095 from proddy/dev
fix routing issue
2023-03-03 18:09:52 +01:00
Proddy
dd0489596e fix routing issue 2023-03-03 12:41:48 +01:00
Proddy
8389e06aae lint optimizations 2023-03-03 12:41:42 +01:00
Proddy
afbb670c78 package update 2023-03-03 12:41:21 +01:00
Proddy
666da8d4e3 Merge pull request #1094 from proddy/dev
edit name from dialog
2023-03-02 17:15:54 +01:00
Proddy
8bb42addc0 Merge branch 'dev' of https://github.com/proddy/EMS-ESP32 into dev 2023-03-02 17:14:44 +01:00
Proddy
0dfd32412e edit name from dialog 2023-03-02 17:13:29 +01:00
Proddy
54eee7ca9f package update 2023-03-02 17:13:04 +01:00
Proddy
ad936c7f6c Merge pull request #1093 from proddy/dev
add name as unique id - #701
2023-03-01 21:50:35 +01:00
Proddy
ee5ec1b7d1 add name as unique id - #701 2023-03-01 21:49:17 +01:00
Proddy
d2c5ae8aa9 Merge pull request #1090 from proddy/dev
remove project router, make everything from root
2023-02-28 18:52:01 +01:00
Proddy
9e3c4134e1 remove project router, make everything from root 2023-02-28 18:48:00 +01:00
Proddy
c8ea1d0c8a Merge pull request #1088 from proddy/dev
show name not number in device dialog info box
2023-02-28 17:52:32 +01:00
Proddy
bba5c5472c fix device type name in pop up info dialog 2023-02-28 17:51:39 +01:00
Proddy
29c3923a52 package update 2023-02-28 17:51:22 +01:00
Proddy
1c20929886 package updates 2023-02-28 09:16:29 +01:00
Proddy
0078a2ef8e formatting 2023-02-28 09:16:24 +01:00
Proddy
ee1c70f608 remove obsolete defaults 2023-02-28 08:47:07 +01:00
Proddy
e29bc4e56a Merge pull request #1085 from MichaelDvP/dev
add TR (some translations still missing) #907
2023-02-28 08:43:12 +01:00
MichaelDvP
e1595daeb9 Merge branch 'tech-upgrade' into dev 2023-02-28 07:17:22 +01:00
Proddy
77e85f02de Merge pull request #1084 from proddy/dev
merge with tech-upgrade
2023-02-27 16:44:50 +01:00
Proddy
557892bbc7 updates for 3.6.0-dev-0 2023-02-27 16:38:56 +01:00
Proddy
f3bfc6f126 Merge remote-tracking branch 'origin/tech-upgrade' into dev 2023-02-27 16:38:38 +01:00
MichaelDvP
5937a0e3b2 Merge branch 'tech-upgrade' of https://github.com/emsesp/EMS-ESP32 into tech-upgrade 2023-02-27 15:22:26 +01:00
MichaelDvP
94749e4615 Add TR language (some still missing) #907 2023-02-27 15:22:17 +01:00
Proddy
ea093844b4 minor update 2023-02-27 14:35:43 +01:00
Proddy
4d496de488 Merge pull request #1082 from MichaelDvP/tech-upgrade
schedule commands timing, retry
2023-02-27 13:53:49 +01:00
Proddy
31bfc5388c Merge branch 'tech-upgrade' into tech-upgrade 2023-02-27 13:49:02 +01:00
MichaelDvP
e9cc86e072 scheduler-command: use const char*, publish response for queries 2023-02-27 12:04:41 +01:00
proddy
9ed32307d3 fix lint warnings 2023-02-27 10:51:41 +01:00
proddy
23cfdb95f2 update package 2023-02-27 10:51:33 +01:00
proddy
71ff695290 update packages 2023-02-27 10:51:00 +01:00
MichaelDvP
f48aeb0917 schedule commands timing, retry 2023-02-27 09:16:41 +01:00
Proddy
84c90dd587 align timing with EMS-ESP 2023-02-26 20:59:03 +01:00
Proddy
4c186606bd hide MAC and IPs 2023-02-26 19:16:53 +01:00
Proddy
2ffa5fbe36 fix system log in standalone 2023-02-26 16:43:56 +01:00
Proddy
471d18f7fa add automatic id so table renders 2023-02-26 15:20:55 +01:00
Proddy
0985cea3d3 add writeback for scheduler 2023-02-26 15:20:28 +01:00
Proddy
f0509ae333 remove ntp message 2023-02-26 15:20:18 +01:00
Proddy
127a20b29c update eslint 2023-02-26 13:45:07 +01:00
Proddy
f179030d6c replace deprecated JS substr() 2023-02-26 13:44:51 +01:00
Proddy
76db7b3d21 back-end implementation 2023-02-26 12:58:49 +01:00
Proddy
00a3d67707 calling backend services 2023-02-26 12:58:37 +01:00
Proddy
a165dd51c4 remove ntp, dow starts on Sun to match tm_weekday in C's time library 2023-02-26 12:58:11 +01:00
Proddy
05eaa3ce54 fix schedule endpoints typo 2023-02-26 12:57:19 +01:00
Proddy
d652bca32d package update 2023-02-26 12:57:03 +01:00
Proddy
0464030544 schedule upload & download feature 2023-02-26 12:56:48 +01:00
Proddy
5927781a6b added stub for webSchedulerService 2023-02-25 22:24:11 +01:00
Proddy
763efaf4af bump 2023-02-25 22:23:50 +01:00
Proddy
d9f4ce7347 added string2minutes() 2023-02-25 22:23:41 +01:00
Proddy
218cab3935 updated 2023-02-25 22:23:22 +01:00
Proddy
81c6351c93 added tester for minutes conversion 2023-02-25 22:23:11 +01:00
Proddy
dce29857d3 added test to convert HH:MM to minutes for scheduler 2023-02-25 22:22:59 +01:00
Proddy
3b9da0ecfd GET and POST now same for scheduler 2023-02-25 22:22:41 +01:00
Proddy
a728a4d779 minor improvements to add dialog 2023-02-25 18:40:31 +01:00
Proddy
9bae82592f add ADD and put in a validator as cmd can't be empty 2023-02-25 18:11:37 +01:00
Proddy
50400459ee add NTP check to scheduler 2023-02-25 16:13:47 +01:00
Proddy
2ede730cfb Scheduler #701 2023-02-25 14:06:40 +01:00
proddy
45609e30ea fix axios include 2023-02-24 12:13:26 +01:00
Proddy
20f817410f default OTA disabled, saves 1.5KB heap 2023-02-23 21:38:44 +01:00
Proddy
e276025d60 change imports suggested by lint 2023-02-23 20:15:29 +01:00
Proddy
a89a7b5430 fix uniq_id for HA sensors 2023-02-23 19:57:35 +01:00
Proddy
044807accb bump version 2023-02-23 19:57:21 +01:00
Proddy
3e9f63a913 cleanup 2023-02-23 19:29:38 +01:00
Proddy
c80470d8f5 cleanup unused variables 2023-02-23 19:28:32 +01:00
Proddy
55d19bbc2d comment 2023-02-23 19:28:11 +01:00
Proddy
a3f4376d8f removed DV_HA_CONFIG_RECREATE 2023-02-23 19:27:59 +01:00
Proddy
2466df0c3d climate renamed to haclimate and given a shortname 2023-02-23 19:27:25 +01:00
Proddy
425cf33f74 added back MAX_MQTT_MESSAGES 2023-02-23 19:26:58 +01:00
Proddy
077a9937fe comment 2023-02-23 19:26:45 +01:00
Proddy
e6d41f6697 added Michael's changes 2023-02-23 19:26:25 +01:00
Proddy
59791cdaa5 added Michael's changes 2023-02-23 19:25:40 +01:00
Proddy
c7a76f90ea updated tests for mqtt 2023-02-23 19:25:28 +01:00
Proddy
605e3c26d7 formatting 2023-02-23 19:25:08 +01:00
Proddy
a59fc3f3e7 copied in Michael's change 2023-02-23 19:24:53 +01:00
Proddy
b5667c17d3 package update 2023-02-23 19:24:37 +01:00
Proddy
bc80aaea63 rename publish functions to queue_* because that is what they do 2023-02-22 20:54:38 +01:00
Proddy
6746c9a2d3 updated comments, remove DV_HA_CONFIG_RECREATE 2023-02-22 19:45:56 +01:00
Proddy
11ad4d8a0f merge with https://github.com/emsesp/EMS-ESP32/pull/1077 2023-02-22 19:01:58 +01:00
Proddy
752f0177cf make it compile standalone 2023-02-22 13:16:20 +01:00
Proddy
2078305ff4 use heap check instead of message queue - https://github.com/emsesp/EMS-ESP32/issues/1067 2023-02-22 13:08:53 +01:00
Proddy
924502113e functions don't need to return std::shared_ptr<const MqttMessage> 2023-02-22 13:08:07 +01:00
Proddy
c95e804733 add brands as flash strings 2023-02-22 13:07:24 +01:00
proddy
6a356d4a45 show how to override platform 2023-02-22 09:38:48 +01:00
proddy
2bfcbd8fb1 added comments 2023-02-22 09:36:59 +01:00
proddy
19bfcea412 EMSESP_TEST uses EN language only 2023-02-22 09:36:51 +01:00
proddy
0d7a013bba update elint 2023-02-22 09:36:34 +01:00
Proddy
931b153290 now I know why michael shortened the names ! 2023-02-21 22:21:30 +01:00
Proddy
9f91fffcab bump version 2023-02-21 21:55:04 +01:00
Proddy
6aea27e30f tidy up EMSESP_DEBUG and EMSESP_TEST 2023-02-21 21:49:21 +01:00
Proddy
134f2671fb compiling with EMSESP_DEBUG only sends to DEBUG log 2023-02-21 21:28:49 +01:00
Proddy
6438d1ee57 compile with EMSESP_TEST to run tests (not DEBUG) 2023-02-21 21:28:19 +01:00
Proddy
a6a1d44204 Merge pull request #1075 from MichaelDvP/tech-upgrade
HA config recreate #1067
2023-02-21 15:37:42 +01:00
MichaelDvP
cf97c7eb59 HA config recreate #1067 2023-02-21 14:00:43 +01:00
Proddy
e8713ff260 go back to espressif 5.2.0 2023-02-21 12:56:30 +01:00
Proddy
993724d945 use en only in debug 2023-02-21 12:53:31 +01:00
Proddy
8c89fdec95 package update 2023-02-21 12:53:31 +01:00
proddy
a49bfec7d9 fix write back on standalone 2023-02-21 09:27:14 +01:00
Proddy
050ecd9290 Merge pull request #1069 from MichaelDvP/tech-upgrade
fix for #1067 and ems-esp restarting
2023-02-20 19:03:43 +01:00
MichaelDvP
395bd604ce fix for #1067 and ems-esp restarting 2023-02-20 18:30:56 +01:00
Proddy
4f91c78b4f Merge pull request #1068 from MichaelDvP/tech-upgrade
fix for #1067
2023-02-20 18:10:20 +01:00
Proddy
20405ae9ab updated comment 2023-02-20 18:09:39 +01:00
Proddy
c18640eab0 brand_to_string to brand_to_char. use const char * where possible 2023-02-20 18:09:32 +01:00
Proddy
854584138b update memory test 2023-02-20 18:08:41 +01:00
MichaelDvP
2d129f6233 recreate instaed of remove/recreate HA config when mqtt reconnecs #1067 2023-02-20 17:30:12 +01:00
MichaelDvP
4aa3e27880 fix appfree display for asymmetric partitions. 2023-02-20 17:27:51 +01:00
Proddy
094387335d minor package updates again 2023-02-20 14:25:03 +01:00
Proddy
ff1cf12e0c Merge pull request #1038 from proddy/dev
3.5.1
2023-02-19 11:29:46 +01:00
Proddy
2f44beccc2 typesafe-i18@5.24.1 2023-02-19 11:29:03 +01:00
Proddy
558e48f671 update gh issue template 2023-02-19 11:28:08 +01:00
Proddy
e60048f5fb v3.5.1 2023-02-19 11:27:58 +01:00
Proddy
6ad1dd1a77 update packages 2023-02-19 11:27:49 +01:00
Proddy
4bfbdf31e4 gh issue template update 2023-02-19 11:23:42 +01:00
Proddy
71c2b4b7e8 package updates 2023-02-19 11:23:31 +01:00
Proddy
4630e4f4a0 #911 2023-02-18 13:13:00 +01:00
Proddy
d872ce0ab6 fix apply updates after change #911 2023-02-18 10:49:18 +01:00
Proddy
c04b032abf update packages 2023-02-18 10:48:54 +01:00
proddy
b218bf1d2e hardcode espressif 6.0.1 2023-02-13 22:46:03 +01:00
proddy
18f787703a update packages 2023-02-13 22:45:52 +01:00
proddy
a3719b12e5 fix mqtt enabled check 2023-02-13 22:45:35 +01:00
Proddy
8c91311c1e use node v18 2023-02-12 16:27:46 +01:00
proddy
096336042e minor changes to yarn 2023-02-12 15:35:51 +01:00
Proddy
4ca25fcfc2 experiment with moving from npm to yarn 2023-02-12 14:14:08 +01:00
proddy
12b4bd3795 Workaround for better Domoticz MQTT intergration? #904 2023-02-11 23:26:15 +01:00
proddy
ba96d587ab update 2023-02-11 23:25:30 +01:00
proddy
411f3be3aa fix native compiling on OSX 2023-02-11 20:53:46 +01:00
Proddy
ffacefb792 update copyright year 2023-02-11 19:06:02 +01:00
Proddy
2d1689b79a make syslog work again 2023-02-11 19:05:43 +01:00
Proddy
78e0d30687 add publish command to mqtt code 2023-02-11 18:46:25 +01:00
Proddy
deb0952266 fix syslog 2023-02-11 18:46:10 +01:00
Proddy
9f77cfd0bf formatting 2023-02-11 18:45:41 +01:00
Proddy
767c6da325 move log command to main context 2023-02-11 18:45:20 +01:00
Proddy
f034d908b6 add comment 2023-02-11 18:45:05 +01:00
Proddy
bc391d014e update packages 2023-02-11 18:43:46 +01:00
Proddy
d42cd8ebf9 remove comment 2023-02-11 18:43:38 +01:00
Proddy
ac5635b671 F2 calls 'show values' 2023-02-11 12:23:56 +01:00
Proddy
c76b250c3b fix warning when building native on windows 2023-02-11 12:14:46 +01:00
Proddy
4630287924 fix warning when building native on windows 2023-02-11 12:14:28 +01:00
proddy
d3cae8ec52 update packages 2023-02-11 10:40:15 +01:00
proddy
149fa72566 remove extra brackets 2023-02-11 10:40:09 +01:00
Proddy
a0d13df033 fix react-virtualized-auto-sizer to "1.0.7" 2023-02-10 20:33:24 +01:00
Proddy
c9a3fad9eb updates 2023-02-10 20:30:35 +01:00
Proddy
eeb96199f9 6.20.1 2023-02-10 20:27:45 +01:00
Proddy
765b1a1b39 esp32s3 2023-02-10 20:27:23 +01:00
Proddy
78eef7cb9d cleanup 2023-02-10 20:27:13 +01:00
Proddy
1ad9f8d9cf use descriptive telegrams when watching 2023-02-10 20:27:05 +01:00
Proddy
36734a4768 change version 2023-02-09 22:41:53 +01:00
Proddy
d0f91c5f43 add hosted for online demo 2023-02-09 22:41:47 +01:00
Proddy
1cd980f46a use espressif 6.0.1 and c+17 for testing 2023-02-09 20:38:35 +01:00
Proddy
74162ab4e7 bump to tec-3 2023-02-09 20:38:21 +01:00
Proddy
0ef5579540 update package 2023-02-09 20:38:14 +01:00
Proddy
9501f02aa2 replace React bunder based on webpack with Vite #952 2023-02-09 20:23:31 +01:00
Proddy
ea8850f8bd update packages 2023-02-07 21:30:30 +01:00
Proddy
949842118b add BundleAnalyzerPlugin (optional) 2023-02-07 21:30:22 +01:00
Proddy
a4d31711a0 use lodash-es to save space 2023-02-07 21:29:50 +01:00
Proddy
94f0d040ea smaller icon.png to save space 2023-02-07 21:29:28 +01:00
Proddy
bb6e2b9336 Update CHANGELOG_LATEST.md 2023-02-06 22:34:08 +01:00
Proddy
d0166f7f12 Update CHANGELOG.md 2023-02-06 22:33:16 +01:00
Proddy
3cef6d7a65 merge PR 944 - https://github.com/emsesp/EMS-ESP32/pull/947/files 2023-02-06 22:27:55 +01:00
Proddy
6a1bc00f04 Merge pull request #949 from proddy/dev
3.6.0-dev.0
2023-02-06 22:17:12 +01:00
Proddy
bee4b3970d 3.6.0-dev.0 2023-02-06 22:16:45 +01:00
proddy
2ac3640760 fix package conflicts 2023-02-05 22:12:27 +01:00
proddy
71de48fd32 Warn user in WebUI of unsaved changes #911 2023-02-05 18:53:13 +01:00
Proddy
834eceab16 update packages 2023-02-05 11:13:55 +01:00
Proddy
20de1734d1 formatting 2023-02-05 10:58:48 +01:00
Proddy
63e734b0aa in EMSESP_DEBUG only use EN language to save space 2023-02-05 10:58:32 +01:00
Proddy
cf53c56ac7 add listDir to debug too 2023-02-05 10:58:01 +01:00
Proddy
e82433c530 formatting 2023-02-05 10:57:28 +01:00
Proddy
3a4e6aa852 only publish if MQTT is enabled 2023-02-05 10:57:20 +01:00
Proddy
6c46770330 merge PR 940 - https://github.com/emsesp/EMS-ESP32/pull/940 2023-02-04 14:25:29 +01:00
Proddy
6dc63907f1 merge PR https://github.com/emsesp/EMS-ESP32/pull/939 2023-01-30 20:21:28 +01:00
proddy
e2f149caf9 package update 2023-01-30 19:01:50 +01:00
proddy
da94fc052d fix compile errors on OSX for standalone 2023-01-30 19:01:43 +01:00
Proddy
77a6304fc3 merge PR https://github.com/emsesp/EMS-ESP32/pull/936 2023-01-30 17:14:53 +01:00
Proddy
7c44f22c45 add comment 2023-01-30 17:04:44 +01:00
Proddy
d39d62c2f8 show mqtt disconnect error in log, on first connect only 2023-01-30 17:04:33 +01:00
Proddy
8f68163f90 fix exit not exiting in standalone mode 2023-01-30 17:04:10 +01:00
Proddy
7a2038e124 uptime should be a string 2023-01-29 12:09:54 +01:00
Proddy
e98d84efdb update packages 2023-01-29 12:09:35 +01:00
Proddy
7faffafd8a remove duplicate cmdfunction_p 2023-01-29 12:09:27 +01:00
Proddy
bedfd3ee30 revert back to 5.2.0 2023-01-28 16:20:28 +01:00
Proddy
94473bdeaa merge PL translation update - https://github.com/emsesp/EMS-ESP32/pull/929 2023-01-28 16:20:16 +01:00
Proddy
59af1fd62a use espressif32 6.0.0 2023-01-28 12:19:28 +01:00
Proddy
55ae0bec93 Show MAC address without connecting to network #933 2023-01-28 12:19:13 +01:00
Proddy
64cb509d3b show MAC for ETH always 2023-01-27 18:00:52 +01:00
Proddy
9d67a56f29 ignore web build analysis files 2023-01-27 17:57:36 +01:00
Proddy
b5ee7100f4 remove showing MAC 2023-01-27 17:57:20 +01:00
Proddy
ee1515d787 testing brotlin compression 2023-01-27 17:57:05 +01:00
Proddy
6f0e98b1a1 testing brotlin compression 2023-01-27 17:56:50 +01:00
Proddy
b8e4430a14 testing with brotlin compression 2023-01-27 17:56:36 +01:00
Proddy
65e3187418 package updates 2023-01-27 17:56:19 +01:00
Proddy
ea48cf3722 show MAC address on startup, before connection 2023-01-25 21:37:29 +01:00
Proddy
2c0ad1a4cc minor changes to script 2023-01-25 21:28:07 +01:00
Proddy
7de8fd8b53 update packages 2023-01-25 21:22:18 +01:00
Proddy
7eddf4882c change help string 2023-01-25 21:22:07 +01:00
Proddy
58e95610e8 show MAC address if SSID is empty or ethernet present but not connected 2023-01-25 21:10:06 +01:00
Proddy
0dcc953100 add timing 2023-01-23 23:21:07 +01:00
Proddy
38fffd4932 add debug line to show we're using dummy entity values 2023-01-23 23:20:44 +01:00
Proddy
17c7ae7d7c fix syslog starting 2023-01-23 23:20:27 +01:00
Proddy
15760117ee add comment so we remember the reserve functions 2023-01-23 23:20:16 +01:00
Proddy
1cd5e0781d rename Saved to Updated 2023-01-23 18:52:10 +01:00
Proddy
f64fbd1040 added ping test 2023-01-23 15:59:54 +01:00
Proddy
ceb9246cf2 reset dirtyflags after successful save 2023-01-23 15:59:43 +01:00
proddy
ff14fab492 add missing sv translations 2023-01-22 22:04:23 +01:00
Proddy
df66d0441c merge PR #926 - Additional SV translations#2 2023-01-22 21:20:20 +01:00
proddy
4edfa4d244 HA - use box for numbers 2023-01-22 19:11:27 +01:00
Proddy
bb24da92e4 merge PR #923 - fixes and the tested heatpump/heatsource entities by mvdp 2023-01-22 17:08:17 +01:00
Proddy
7f5e3d3b4c merge PR #901 - added dhw alternating operation 2023-01-22 12:17:39 +01:00
Proddy
66d5d3db8c default back to c+11 2023-01-22 12:16:49 +01:00
proddy
71d22f6768 default to arduino/espressif core 6.0.0 2023-01-19 16:24:43 +01:00
proddy
b68e9dfd4b formatting 2023-01-19 16:14:32 +01:00
Proddy
b4362a4539 Merge pull request #909 from MichaelDvP/tech-upgrade
weblog send queue one by one, no json buffer needed
2023-01-19 16:06:36 +01:00
proddy
4e783d414c merge PR #909 (weblog send queue one by one, no json buffer needed #909) 2023-01-19 16:05:43 +01:00
proddy
9fe6b9d0e5 fix customizations Warn user in WebUI of unsaved changes #911 2023-01-19 15:51:27 +01:00
proddy
665c33d1a9 updated packages 2023-01-19 09:22:37 +01:00
proddy
0ed3bfff4a rename SAVE to APPLY, show number of updates - #911 2023-01-19 09:11:59 +01:00
proddy
9ba0c6df37 add missing items 2023-01-19 09:11:30 +01:00
proddy
312b0d4665 update package 2023-01-19 09:11:12 +01:00
proddy
7acbda4cda un-used, saving for later 2023-01-19 09:10:59 +01:00
proddy
247fc6be8e remove unused colormode 2023-01-19 09:10:40 +01:00
proddy
1407a61f7a remove unused functions 2023-01-19 09:10:03 +01:00
proddy
a3c302176b formatting 2023-01-19 09:09:46 +01:00
proddy
03130d3de2 formatting 2023-01-19 09:09:34 +01:00
proddy
80d42d92db show number of edits on screen 2023-01-19 09:09:10 +01:00
proddy
115a596c1e remove import React 2023-01-19 09:08:33 +01:00
proddy
ab5815a944 remove import react 2023-01-19 09:05:01 +01:00
Proddy
0946254764 adjustments to syslog (still not 100% working) 2023-01-13 18:17:54 +01:00
Proddy
316dfd02e4 fix telnet not starting 2023-01-13 18:17:31 +01:00
Proddy
c35833fab1 moved dummy entity values to consts 2023-01-13 18:17:19 +01:00
MichaelDvP
81cd6ed764 weblog send queue one by one, no json buffer needed 2023-01-13 13:44:16 +01:00
proddy
63ff517b30 show Not Enabled like in MQTT instead of 'disabled' 2023-01-12 23:09:02 +01:00
proddy
30a2a9aa2a updated test runner 2023-01-12 23:08:37 +01:00
Proddy
cfc8570dca formatting 2023-01-12 17:48:12 +01:00
Proddy
7841b44b43 formatting 2023-01-12 17:41:24 +01:00
Proddy
e3f51b34b5 added comments 2023-01-12 17:40:18 +01:00
Proddy
dcedced8fe rename "HA climate config creation" to describe the entity name 2023-01-12 17:40:07 +01:00
Proddy
e437597ef4 typo 2023-01-12 17:39:36 +01:00
Proddy
6d3f768e92 in debug, don't show empty payloads 2023-01-12 17:39:24 +01:00
Proddy
c114581400 formatting 2023-01-12 17:39:14 +01:00
Proddy
fbfd792416 add back TZ to syslog 2023-01-12 17:39:07 +01:00
Proddy
755f1d17d6 added FS libs 2023-01-12 17:38:57 +01:00
Proddy
3e4f7fdc17 error handling in tests 2023-01-12 17:38:50 +01:00
Proddy
754f4e8244 add arguments for test runner 2023-01-12 11:33:51 +01:00
Proddy
a2925011ed update test runner 2023-01-12 11:04:24 +01:00
Proddy
9b7b5ebfa8 exclude most of tests when not in standalone 2023-01-11 23:35:31 +01:00
Proddy
b54777bccb add debug comment 2023-01-11 23:34:52 +01:00
Proddy
17b9b8ec3a script to perform memory test 2023-01-11 23:34:41 +01:00
Proddy
3dc2ab54ac systematically fetch heap mem settings, before allocating buffers so console and web show same results 2023-01-11 23:34:27 +01:00
proddy
97451d2b7a enable API for test 2023-01-11 20:47:36 +01:00
Proddy
c99aaf1e7d add debug 2023-01-10 22:19:20 +01:00
Proddy
7e87dc9de6 add back climate 2023-01-10 22:19:13 +01:00
Proddy
f556fb61ca include shortname in console show values 2023-01-10 22:19:04 +01:00
Proddy
84dca5e794 add back climate config creation 2023-01-10 22:18:34 +01:00
Proddy
60d4997985 optimize tests for ESP32 2023-01-10 22:18:19 +01:00
Proddy
d2900c347a typo/text changes 2023-01-10 22:18:09 +01:00
proddy
3627f884c3 file updates 2023-01-09 22:03:07 +01:00
proddy
e89260b8b0 added 'set mqtt on|off' for easier debugging 2023-01-09 21:49:59 +01:00
proddy
ab6267e122 update packages 2023-01-09 21:49:40 +01:00
Proddy
731ec684f0 loads 1 boiler/160 entities, crash with MQTT (no Discovery) 2023-01-08 21:44:04 +01:00
Proddy
bbf43a0744 updates packages 2023-01-08 21:43:32 +01:00
Proddy
ae51189953 minor changes 2023-01-08 19:51:36 +01:00
Proddy
9b54c1aa04 minor changes 2023-01-08 19:51:30 +01:00
Proddy
da04a0d161 remove logout and t command 2023-01-08 15:16:54 +01:00
Proddy
9351b6c44a remove logout 2023-01-08 15:16:34 +01:00
Proddy
5d6231f51c removed unused strings 2023-01-08 15:16:24 +01:00
Proddy
945697c538 add max alloc 2023-01-08 15:16:11 +01:00
proddy
687c76703b standalone test for memory optimizations (200+ entities) 2023-01-08 09:42:48 +01:00
proddy
e5558f7fa9 remove Serial 2023-01-07 21:28:42 +01:00
proddy
60b424705d replace STANDALONE_DUMP with a parameter set during tests call test_test_set_all_active 2023-01-07 21:28:33 +01:00
proddy
6ed378086b remove Serial 2023-01-07 21:26:23 +01:00
proddy
66d7dde79e rename Customizaton to Customizations 2023-01-07 18:30:22 +01:00
proddy
c7628ac07f NUM_TAGS is used to check of overflow 2023-01-07 14:39:30 +01:00
proddy
8cd08fa765 comment 2023-01-07 14:38:58 +01:00
proddy
1f493b208c replace std::string with const char #869 2023-01-07 14:38:49 +01:00
proddy
3e8d175242 rename num_languages 2023-01-07 14:38:02 +01:00
proddy
360240ee58 fixes to num_entities 2023-01-07 14:37:46 +01:00
proddy
95c5fb7391 merge with MichaelDvP's PR 870 - https://github.com/emsesp/EMS-ESP32/pull/870 2023-01-06 21:51:17 +01:00
proddy
fcd221a9b0 ignore vscode 2023-01-06 19:38:24 +01:00
proddy
397522292c change default_envs 2023-01-06 19:38:17 +01:00
Proddy
fbf799e4c4 use pio native to build standalone 2023-01-06 14:14:03 +01:00
Proddy
ad2dbd6fc5 formatting 2023-01-05 15:14:26 +01:00
Proddy
a51bc276b5 use new SIZES 2023-01-05 15:11:34 +01:00
Proddy
132acaf758 updated console based on latest uuid::console 2023-01-05 15:11:15 +01:00
Proddy
cd807cd035 move shell to main app, check for thread safe 2023-01-05 15:10:22 +01:00
Proddy
df547de5f6 adjusted comment 2023-01-05 15:09:55 +01:00
Proddy
e1ed362d7b optimize for uuid 2023-01-05 15:09:43 +01:00
Proddy
4cbf7e2a2d added max_alloc to heartbeat, use new SIZE names 2023-01-05 15:09:32 +01:00
Proddy
1ec00bceed use new SIZES and optimize for new uuid 2023-01-05 15:09:07 +01:00
Proddy
68ebe55ca4 remove console, remove syslog destination(host) 2023-01-05 15:08:24 +01:00
Proddy
be854ec14c 3.5.0-tec.0 2023-01-05 15:07:32 +01:00
Proddy
ca8647578b current version is 3.5.0-dev 2023-01-05 15:07:22 +01:00
Proddy
c90a1ca9ea add comment on translations 2023-01-05 15:07:10 +01:00
Proddy
45734d52af added word console 2023-01-05 15:06:49 +01:00
Proddy
da0850124c new console library handling multiple streams 2023-01-05 15:06:39 +01:00
Proddy
3eb86fd6c3 add C++17 and optional espressif 5.3.0 libs 2023-01-05 15:06:23 +01:00
Proddy
df2a0f6ec4 remove loop() from testing 2023-01-05 15:06:02 +01:00
Proddy
3b196fc90d updated uuid libs 2023-01-05 15:05:30 +01:00
Proddy
6370296c53 add comment for EMS-ESP testing 2023-01-05 15:05:12 +01:00
Proddy
6ffb0d9676 update package 2023-01-05 15:04:47 +01:00
Proddy
0e85b54cba remove PROGMEM 2023-01-05 15:04:27 +01:00
Proddy
d1b948aa56 typo 2023-01-05 15:04:18 +01:00
Proddy
5e85c4f8ec standalone optimization 2023-01-05 15:04:05 +01:00
705 changed files with 55372 additions and 53213 deletions

View File

@@ -1,35 +1,50 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
name: Problem Report
about: Create a Report to help us improve
---
*Before creating a new issue please check that you have:*
<!-- Thanks for reporting a problem for this project. READ THIS FIRST:
* *searched the existing [issues](https://github.com/emsesp/EMS-ESP32/issues) (both open and closed)*
* *searched the [documentation help section](https://emsesp.github.io/docs)*
Please DO NOT OPEN AN ISSUE if your EMS-ESP version is not the latest from the dev branch, please update your device before submitting your issue. Your problem might already be solved. The latest precompiled binaries of EMS-ESP can be downloaded from https://github.com/emsesp/EMS-ESP32/releases/tag/latest
*Completing this template will help developers and contributors to address the issue. Try to be as specific and extensive as possible. If the information provided is not enough the issue will likely be closed.*
Please take a few minutes to complete the requested information below.
*You can now remove this line and the above ones. Text in italic is meant to be replaced by your own words. If any of the sections below are not relevant to the issue (for instance, the screenshots) then you can delete them.*
-->
**Bug description**
*A clear and concise description of what the bug is. Mention which EMS-ESP version you're using.*
### PROBLEM DESCRIPTION
**Steps to reproduce**
*Steps to reproduce the behavior.*
_A clear and concise description of what the problem is._
**Expected behavior**
*A clear and concise description of what you expected to happen.*
### REQUESTED INFORMATION
**Screenshots**
*If applicable, add screenshots to help explain your problem.*
_Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!_
**Device information**
*Copy-paste here the information as it is outputted by the device. You can get this information by from http://ems-esp.local/api/system*
- [ ] Searched the problem in [issues](https://github.com/emsesp/EMS-ESP32/issues)
- [ ] Searched the problem in [discussions](https://github.com/emsesp/EMS-ESP32/discussions)
- [ ] Searched the problem in the [docs](https://emsesp.github.io/docs/Troubleshooting/)
- [ ] Searched the problem in the [chat](https://discord.gg/3J3GgnzpyT)
- [ ] Provide the output of http://ems-esp.local/api/system :
**Additional context**
*Add any other context about the problem here.*
```lua
System information output here:
```
### TO REPRODUCE
_Steps to reproduce the behavior:_
### EXPECTED BEHAVIOUR
_A clear and concise description of what you expected to happen._
### SCREENSHOTS
_If applicable, add screenshots to help explain your problem._
### ADDITIONAL CONTEXT
_Add any other context about the problem here._
**(Please, remember to close the issue when the problem has been addressed)**

11
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: EMS-ESP Docs
url: https://emsesp.github.io/docs/
about: All the information related to EMS-ESP.
- name: EMS-ESP Discussions and Support
url: https://github.com/emsesp/EMS-ESP32/discussions
about: EMS-ESP usage Questions, Feature Requests and Projects.
- name: EMS-ESP Users Chat
url: https://discord.gg/3J3GgnzpyT
about: Chat for feedback, questions and troubleshooting.

View File

@@ -1,26 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---
*Before creating a new feature request please check that you have searched the existing [issues](https://github.com/emsesp/EMS-ESP32/issues) (both open and closed)*
*Completing this template will help developers and contributors evaluating the feature. If the information provided is not enough the issue will likely be closed.*
*You can now remove this line and the above ones. Text in italic is meant to be replaced by your own words. If any of the sections below are not relevant to the request then you can delete them.*
**Is your feature request related to a problem? Please describe.**
*A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]*
**Describe the solution you'd like**
*A clear and concise description of what you want to happen.*
**Describe alternatives you've considered**
*A clear and concise description of any alternative solutions or features you've considered.*
**Additional context**
*Add any other context or screenshots about the feature request here.*

View File

@@ -1,29 +0,0 @@
---
name: Questions & Troubleshooting
about: Anything not a bug or feature request
title: ''
labels: question
assignees: ''
---
*Before creating a new issue please check that you have:*
* *searched the existing [issues](https://github.com/emsesp/EMS-ESP32/issues) (both open and closed)*
* *searched the [documentation help section](https://emsesp.github.io/docs)*
*Completing this template will help developers and contributors help you. Try to be as specific and extensive as possible. If the information provided is not enough the issue will likely be closed.*
*You can now remove this line and the above ones. Text in italic is meant to be replaced by your own words. If any of the sections below are not relevant to the issue (for instance, the screenshots) then you can delete them.*
**Question**
*A clear and concise description of what the problem/doubt is.*
**Screenshots**
*If applicable, add screenshots to help explain your problem.*
**Device information**
*Copy-paste here the information as it is outputted by the device. You can get this information from http://ems-esp.local/api/system*
**Additional context**
*Add any other context about the problem here.*

View File

@@ -0,0 +1,23 @@
name: 'github-releases-to-discord'
on:
release:
types: [published]
jobs:
github-releases-to-discord:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Github Releases To Discord
uses: SethCohen/github-releases-to-discord@v1.13.1
with:
webhook_url: ${{ secrets.WEBHOOK_URL }}
color: '2105893'
username: 'Release Changelog'
avatar_url: 'https://cdn.discordapp.com/icons/816637840644505620/0b14718532d855c452903851b4f0c9a2.png'
content: '||@everyone||'
footer_title: 'Changelog'
footer_icon_url: 'https://cdn.discordapp.com/icons/816637840644505620/0b14718532d855c452903851b4f0c9a2.png'
footer_timestamp: true

View File

@@ -1,24 +1,24 @@
name: "pre-release"
name: 'pre-release'
on:
workflow_dispatch:
push:
branches:
- "dev"
- 'dev'
jobs:
pre-release:
name: "Automatic pre-release build"
name: 'Automatic pre-release build'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '18'
- name: Get EMS-ESP source code and version
id: build_info
@@ -34,24 +34,28 @@ jobs:
- name: Build WebUI
run: |
cd interface
npm ci
npx typesafe-i18n --no-watch
yarn install
yarn typesafe-i18n --no-watch
sed -i "s/= 'pl'/= 'en'/" ./src/i18n/i18n-util.ts
npm run build
yarn build
yarn webUI
- name: Build firmware
run: |
platformio run -e ci
- name: Build S3 firmware
run: |
platformio run -e ci_s3
- name: Create a GH Release
id: "automatic_releases"
uses: "marvinpinto/action-automatic-releases@latest"
id: 'automatic_releases'
uses: 'marvinpinto/action-automatic-releases@latest'
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
repo_token: '${{ secrets.GITHUB_TOKEN }}'
title: Development Build v${{steps.build_info.outputs.VERSION}}
automatic_release_tag: "latest"
automatic_release_tag: 'latest'
prerelease: true
files: |
CHANGELOG_LATEST.md
./build/firmware/*.*

View File

@@ -7,51 +7,24 @@ on:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build
name: Build and analyze
runs-on: ubuntu-latest
if: github.repository_owner == 'emsesp'
# if: github.repository_owner == 'emsesp'
# if: github.repository == 'emsesp/EMS-ESP32'
env:
# https://binaries.sonarsource.com/?prefix=Distribution/sonar-scanner-cli/
SONAR_SCANNER_VERSION: 4.7.0.2747
SONAR_SERVER_URL: "https://sonarcloud.io"
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory
BUILD_WRAPPER_OUT_DIR: bw-output
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Download and set up sonar-scanner
env:
SONAR_SCANNER_DOWNLOAD_URL: https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${{ env.SONAR_SCANNER_VERSION }}-linux.zip
run: |
mkdir -p $HOME/.sonar
curl -sSLo $HOME/.sonar/sonar-scanner.zip ${{ env.SONAR_SCANNER_DOWNLOAD_URL }}
unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
echo "$HOME/.sonar/sonar-scanner-${{ env.SONAR_SCANNER_VERSION }}-linux/bin" >> $GITHUB_PATH
- name: Download and set up build-wrapper
env:
BUILD_WRAPPER_DOWNLOAD_URL: ${{ env.SONAR_SERVER_URL }}/static/cpp/build-wrapper-linux-x86.zip
run: |
curl -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip ${{ env.BUILD_WRAPPER_DOWNLOAD_URL }}
unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/
echo "$HOME/.sonar/build-wrapper-linux-x86" >> $GITHUB_PATH
- name: Install sonar-scanner and build-wrapper
uses: SonarSource/sonarcloud-github-c-cpp@v2
- name: Run build-wrapper
run: |
make clean
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} make clean all
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} make all
- name: Run sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
sonar-scanner
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}"

View File

@@ -1,23 +1,23 @@
name: "tagged-release"
name: 'tagged-release'
on:
push:
tags:
- "v*"
- 'v*'
jobs:
tagged-release:
name: "Tagged Release"
name: 'Tagged Release'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
node-version: '16'
python-version: '3.11'
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install PlatformIO
run: |
@@ -29,19 +29,24 @@ jobs:
- name: Build WebUI
run: |
cd interface
npm ci
npx typesafe-i18n --no-watch
yarn install
yarn typesafe-i18n --no-watch
sed -i "s/= 'pl'/= 'en'/" ./src/i18n/i18n-util.ts
npm run build
yarn build
yarn webUI
- name: Build firmware
run: |
platformio run -e ci
- name: Build S3 firmware
run: |
platformio run -e ci_s3
- name: Release
uses: "marvinpinto/action-automatic-releases@latest"
uses: 'marvinpinto/action-automatic-releases@latest'
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
repo_token: '${{ secrets.GITHUB_TOKEN }}'
prerelease: false
files: |
CHANGELOG.md

61
.github/workflows/test_release.yml vendored Normal file
View File

@@ -0,0 +1,61 @@
name: 'test-release'
on:
workflow_dispatch:
push:
branches:
- 'dev2'
jobs:
pre-release:
name: 'Automatic test-release build'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Get EMS-ESP source code and version
id: build_info
run: |
version=`grep -E '^#define EMSESP_APP_VERSION' ./src/version.h | awk -F'"' '{print $2}'`
echo "VERSION=$version" >> $GITHUB_OUTPUT
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install -U platformio
- name: Build WebUI
run: |
cd interface
yarn install
yarn typesafe-i18n --no-watch
sed -i "s/= 'pl'/= 'en'/" ./src/i18n/i18n-util.ts
yarn build
yarn webUI
- name: Build firmware
run: |
platformio run -e ci
- name: Build S3 firmware
run: |
platformio run -e ci_s3
- name: Create a GH Release
id: 'automatic_releases'
uses: 'marvinpinto/action-automatic-releases@latest'
with:
repo_token: '${{ secrets.GITHUB_TOKEN }}'
title: Test Build v${{steps.build_info.outputs.VERSION}}
automatic_release_tag: 'test'
prerelease: true
files: |
CHANGELOG_LATEST.md
./build/firmware/*.*

43
.gitignore vendored
View File

@@ -1,12 +1,13 @@
# vscode
.vscode
.vscode/c_cpp_properties.json
.vscode/extensions.json
.vscode/launch.json
# .vscode/settings.json
# build
build/
# c++ compiling
.clang_complete
.gcc-flags.json
cppcheck.out.xml
debug.log
# platformio
.pio
@@ -15,18 +16,34 @@ pio_local.ini
# OS specific
.DS_Store
*Thumbs.db
# project specfic
/scripts/stackdmp.txt
emsesp
# web specfic
build/
dist/
/data/www
/lib/framework/WWWData.h
/interface/build
node_modules
/interface/.eslintcache
stats.html
*.sln
*.sw?
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
yarn.lock
interface/analyse.html
# scripts
test.sh
scripts/run.sh
scripts/__pycache__
.temp
/scripts/stackdmp.txt
# i18n generated files
interface/src/i18n/i18n-react.tsx
@@ -38,8 +55,10 @@ interface/src/i18n/i18n-util.async.ts
# sonar
.scannerwork/
sonar/
build_wrapper_output_directory/
bw-output/
# other build files
dump_entities.csv
dump_entities.xls*
# entity dump results
# dump_entities.csv
# dump_entities.xls*
benchmark/*.log

View File

@@ -1,6 +1,8 @@
{
"singleQuote": true,
"semi": true,
"trailingComma": "none",
"printWidth": 120
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"printWidth": 120,
"bracketSpacing": true
}

12
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,12 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"platformio.platformio-ide"
],
"unwantedRecommendations": [
"ms-vscode.cpptools-extension-pack"
]
}

88
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,88 @@
{
"search.exclude": {
"**/.yarn": true,
"**/.pnp.*": true
},
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
"eslint.nodePath": "interface/.yarn/sdks",
"eslint.workingDirectories": ["interface"],
"prettier.prettierPath": "",
"typescript.enablePromptUseWorkspaceTsdk": true,
"files.associations": {
"*.tsx": "typescriptreact",
"*.tcc": "cpp",
"optional": "cpp",
"istream": "cpp",
"ostream": "cpp",
"ratio": "cpp",
"system_error": "cpp",
"array": "cpp",
"functional": "cpp",
"regex": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"string": "cpp",
"string_view": "cpp",
"atomic": "cpp",
"bitset": "cpp",
"cctype": "cpp",
"chrono": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"condition_variable": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"list": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"iterator": "cpp",
"map": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"random": "cpp",
"set": "cpp",
"fstream": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"limits": "cpp",
"mutex": "cpp",
"new": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"thread": "cpp",
"cinttypes": "cpp",
"typeinfo": "cpp"
},
"todo-tree.filtering.excludeGlobs": [
"**/vendor/**",
"**/node_modules/**",
"**/dist/**",
"**/bower_components/**",
"**/build/**",
"**/.vscode/**",
"**/.github/**",
"**/_output/**",
"**/*.min.*",
"**/*.map",
"**/ArduinoJson/**"
],
"cSpell.enableFiletypes": ["!cpp"]
}

18
.vscode/tasks.json vendored Normal file
View File

@@ -0,0 +1,18 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "build standalone emsesp",
"command": "make",
"args": [],
"problemMatcher": ["$gcc"],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}

View File

@@ -5,6 +5,218 @@ 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.6.4] November 24 2023
## **IMPORTANT! BREAKING CHANGES**
Writeable Text entities have moved from type `sensor` to `text` in Home Assistant to make them also editable within an HA dashboard. Examples are `datetime`, `holidays`, `switchtime`, `vacations`, `maintenancedate`... You will need to manually remove any old discovery topics from your MQTT broker using an application like MQTT Explorer.
## Added
- humidity for ventilation devices
- telegrams for RC100H, hc2, etc. (seen on discord, not tested)
- names for BC400, GB192i.2, read temperatures for low loss header and heatblock [#1317](https://github.com/emsesp/EMS-ESP32/discussions/1317)
- option for `forceheatingoff` [#1262](https://github.com/emsesp/EMS-ESP32/issues/1262)
- remote thermostat emulation RC100H for RC3xx [#1278](https://github.com/emsesp/EMS-ESP32/discussions/1278)
- shower_data MQTT payload contains the timestamp [#1329](https://github.com/emsesp/EMS-ESP32/issues/1329)
- HA discovery for writeable text entities [#1337](https://github.com/emsesp/EMS-ESP32/pull/1377)
- autodetect board_profile, store in nvs, add telnet command option, add E32V2
- heat pump high res energy counters [#1348, #1349. #1350](https://github.com/emsesp/EMS-ESP32/issues/1348)
- optional bssid in network settings
- extension module EM100 [#1315](https://github.com/emsesp/EMS-ESP32/discussions/1315)
- digital_out with new options for polarity and startup state
- added 'system allvalues' command that dumps all the EMS device values, plus sensors and any custom entities
## Fixed
- remove command `remoteseltemp`, thermostat accept it only from remote thermostat
- shower_data MQTT payload contains the timestamp [#1329](https://github.com/emsesp/EMS-ESP32/issues/1329)
- fixed helper text in Web Device Entity dialog box for numerical ranges
- MQTT base with paths not working in HA [#1393](https://github.com/emsesp/EMS-ESP32/issues/1393)
- set/read thermostat mode for RC100-RC300, [#1440](https://github.com/emsesp/EMS-ESP32/issues/1440) [#1442](https://github.com/emsesp/EMS-ESP32/issues/1442)
- some setting commands for ems-boiler have used wrong ems+ telegram in 3.6.3
## Changed
- update to platform 6.4.0, arduino 2.0.14 / idf 4.4.6
- small changes for arduino 3.0.0 / idf 5.1 compatibility (not backward compatible to platform 6.3.2 and before)
- AP start after 10 sec, stay until station/eth connected
- tested wifi-all-channel-scan (3.6.3-dev4 a-e), removed again because of connect issues
- mqtt disconnect stops queue
## [3.6.2] October 1 2023
## **IMPORTANT! BREAKING CHANGES**
## Added
- Power entities
- Optional input of BSSID for AP connection
- Return empty json if no entries in scheduler/custom/analogsensor/temperaturesensor
## Fixed
- Wifi full scan to get strongest AP
- Add missing dhw tags
- Sending a dash/- to the Reset command doesn't return an error [#1308](https://github.com/emsesp/EMS-ESP32/discussions/1308)
## Changed
- MQTT queue max 300 messages, check heap and maxAlloc
- API call commands are logged as WARN in the log
- Reset Command renamed to 'reset' in lowercase in EN
## [3.6.1] September 9 2023
## **IMPORTANT! BREAKING CHANGES**
- `shower_data` MQTT topic shows duration is seconds (was previously a full english sentence)
## Added
- Show WiFi rssi in Network Status Page, show quality as color
## Fixed
- Issue in espMqttClient causing a memory leak when MQTT broker is disconnected due to network unavailability [#1264](https://github.com/emsesp/EMS-ESP32/issues/1264)
- Using MQTT enum values correctly formatted in MQTT Discovery [#1280](https://github.com/emsesp/EMS-ESP32/issues/1280)
## Changed
- MQTT free mem check set to 60 kb
- Small cosmetic changes to Searching in Customization web page
- Updated to espressif32@6.4.0
# [3.6.0] August 13 2023
## **IMPORTANT! BREAKING CHANGES**
There are breaking changes between 3.5.x and earlier versions of 3.6.0. Please read carefully before applying the update.
- The sensors have been renamed. `dallassensor` is now `temperaturesensor` in the MQTT topic and named `ts` in the Customizations file. Likewise `analogs` is now `analogsensor` in MQTT and called `as` in the Customizations file. If you have previous customizations you will need to manually update by downloading, changing the JSON file and uploading. It's also recommended cleaning up any old MQTT topics from your broker using an application like MQTTExplorer.
## Added
- Workaround for better Domoticz MQTT integration? [#904](https://github.com/emsesp/EMS-ESP32/issues/904)
- Show MAC address without connecting to network enhancement [#933](https://github.com/emsesp/EMS-ESP32/issues/933)
- Warn user in WebUI of unsaved changes [#911](https://github.com/emsesp/EMS-ESP32/issues/911)
- Detect old Tado thermostat, device-id 0x19, no entities
- Some more HM200 entities [#500](https://github.com/emsesp/EMS-ESP32/issues/500)
- Added Scheduler [#701](https://github.com/emsesp/EMS-ESP32/issues/701)
- Added Custom Entities read/write from EMS bus
- Build S3 binary with github actions
- Greenstar HIU [#1158](https://github.com/emsesp/EMS-ESP32/issues/1158)
- AM200 code 10 [#1161](https://github.com/emsesp/EMS-ESP32/issues/1161)
- Ventilation device (Logavent HRV176) [#1172](https://github.com/emsesp/EMS-ESP32/issues/1172)
- Turn ETH off on wifi connect [#1167](https://github.com/emsesp/EMS-ESP32/issues/1167)
- Support for multiple EMS-ESPs with HA [#1196](https://github.com/emsesp/EMS-ESP32/issues/1196)
- Italian translation [#1199](https://github.com/emsesp/EMS-ESP32/issues/1199)
- Turkish language support [#1076](https://github.com/emsesp/EMS-ESP32/issues/1076)
- Buderus GB182 - HC1 mode change not work bug [#1193](https://github.com/emsesp/EMS-ESP32/issues/1193)
- Minimal flow temperature enhancement [#1192](https://github.com/emsesp/EMS-ESP32/issues/1192)
- Roomtemperature Switching Difference enhancement [#1191](https://github.com/emsesp/EMS-ESP32/issues/1191)
- Dew Point Temperature Difference enhancement [#1190](https://github.com/emsesp/EMS-ESP32/issues/1190)
- Control of heating circuit mode enhancement [#1187](https://github.com/emsesp/EMS-ESP32/issues/1187)
- Warn user in WebUI of unsaved changes enhancement [#911](https://github.com/emsesp/EMS-ESP32/issues/911)
- Create safebuild app to fit into factory partition to give ESP32 more flash memory enhancement [#608](https://github.com/emsesp/EMS-ESP32/issues/608)
- Support ESP32 S2, C3 mini and S3 [#605](https://github.com/emsesp/EMS-ESP32/issues/605)
- Support Buderus AM200 [#1161](https://github.com/emsesp/EMS-ESP32/issues/1161)
- Custom telegram handler [#1155](https://github.com/emsesp/EMS-ESP32/issues/1155)
- Added support for TLS in MQTT (ESP32-S3 only) [#1178](https://github.com/emsesp/EMS-ESP32/issues/1178)
- Boardprofile BBQKees Gateway S3
- Custom entity type RAW [#1212](https://github.com/emsesp/EMS-ESP32/discussions/1212)
- API command response [#1212](https://github.com/emsesp/EMS-ESP32/discussions/1212)
## Fixed
- HA-discovery for analog sensor commands [#1035](https://github.com/emsesp/EMS-ESP32/issues/1035)
- Enum order of RC3x nofrost mode
- Heartbeat interval
- Exhaust temperature always zero on GB125/MC110/RC310 bug [#1147](https://github.com/emsesp/EMS-ESP32/issues/1147)
- thermostat modetype is not changing when mode changes (e.g. to night) bugSomething isn't working [#1098](https://github.com/emsesp/EMS-ESP32/issues/1098)
- NTP: cant apply changed timezone [#1182](https://github.com/emsesp/EMS-ESP32/issues/1182)
- Missing Status of VS1 for Buderus SM200 enhancement [#1034](https://github.com/emsesp/EMS-ESP32/issues/1034)
- Allowed gpios for S3
## Changed
- Optional upgrade to platform-espressif32 6.3.0 (after 5.3.0) [#862](https://github.com/emsesp/EMS-ESP32/issues/862)
- Use byte 3 for detection RC30 active heatingcircuit [#786](https://github.com/emsesp/EMS-ESP32/issues/786)
- Write repeated selflowtemp if tx-queue is empty without verify [#954](https://github.com/emsesp/EMS-ESP32/issues/954)
- HA discovery recreate after disconnect by device [#1067](https://github.com/emsesp/EMS-ESP32/issues/1067)
- File upload: check flash size (overflow) instead of filesize
- Improved HA Discovery so previous configs no longer need to be removed when starting [#1077](https://github.com/emsesp/EMS-ESP32/pull/1077) (thanks @pswid)
- Enlarge UART-Stack to 2,5k
- Retry timeout for Mqtt-QOS1/2 10seconds
- Optimize WebUI rendering when using Dialog Boxes [#1116](https://github.com/emsesp/EMS-ESP32/issues/1116)
- Optimize Web libraries to reduce bundle size (3.6.x) [#1112](https://github.com/emsesp/EMS-ESP32/issues/1112)
- Use [espMqttClient](https://github.com/bertmelis/espMqttClient) with integrated queue [#1178](https://github.com/emsesp/EMS-ESP32/issues/1178)
- Move Sensors from Web dashboard to it's own tab enhancement [#1170](https://github.com/emsesp/EMS-ESP32/issues/1170)
- Optimize WebUI dashboard data [#1169](https://github.com/emsesp/EMS-ESP32/issues/1169)
- Replace React core library with Preact to save on memory footprint
- Response to `system/send` raw reads gives combined data for telegrams with more parts
# [3.5.0] February 6 2023
## **IMPORTANT! BREAKING CHANGES**
- When upgrading to v3.5 for the first time from v3.4 on a BBQKees Gateway board you will need to use the [EMS-EPS Flasher](https://github.com/emsesp/EMS-ESP-Flasher/releases) to correctly re-partition the flash. Make sure you backup the settings and customizations from the WebUI (System->Upload/Download) and restore after the upgrade.
## Added
- Translations in Web UI and all device entity names (DE, NL, SV, PL, NO, FR) [#22](https://github.com/emsesp/EMS-ESP32/issues/22)
- Add support for Lolin C3 mini [#620](https://github.com/emsesp/EMS-ESP32/pull/620)
- Add support for ESP32-S2 [#667](https://github.com/emsesp/EMS-ESP32/pull/667)
- Add devices: Greenstar 30Ri boiler, Junkers FW500 thermostat, Buderus BC30 controller
- Add program memory info
- Add mqtt queue and connection infos
- Adapt min/max if ems-value is not in this range
- Add heat pump settings for inputs and limits [#600](https://github.com/emsesp/EMS-ESP32/issues/600)
- Add hybrid heatpump [#500](https://github.com/emsesp/EMS-ESP32/issues/500)
- Add translated tags
- Add min/max to customization table [#686](https://github.com/emsesp/EMS-ESP32/issues/686)
- Add MD5 check [#637](https://github.com/emsesp/EMS-ESP32/issues/637)
- Add more bus-ids [#673](https://github.com/emsesp/EMS-ESP32/issues/673)
- Use HA connectivity device class for Status, added boot time [#751](https://github.com/emsesp/EMS-ESP32/issues/751)
- Add commands for analog sensors outputs
- Support for multiple EMS-ESPs with MQTT and HA [[#759](https://github.com/emsesp/EMS-ESP32/issues/759)]
- Settings for heatpump silent mode and additional heater [[#802](https://github.com/emsesp/EMS-ESP32/issues/802)] [[#803](https://github.com/emsesp/EMS-ESP32/issues/803)]
- Zone module MZ100 [#826](https://github.com/emsesp/EMS-ESP32/issues/826)
- Default MQTT hostname is blank [#829](https://github.com/emsesp/EMS-ESP32/issues/829)
- wwCurFlow for ems+ devices [#829](https://github.com/emsesp/EMS-ESP32/issues/829)
- Add Rego 3000, TR120RF thermostats [#917](https://github.com/emsesp/EMS-ESP32/issues/917)
- Add config for ESP32-S3
- Add heatpump silent mode and other entities [#896](https://github.com/emsesp/EMS-ESP32/issues/896)
- Allow reboot to other partition (factory or asymetric OTA)
- Blacklist entities to remove from memory [#891](https://github.com/emsesp/EMS-ESP32/issues/891)
- Add boiler pump operating mode [#944](https://github.com/emsesp/EMS-ESP32/issues/944)
## Fixed
- Factory Reset not working [#628](https://github.com/emsesp/EMS-ESP32/issues/628)
- Valid 4 byte values [#820](https://github.com/emsesp/EMS-ESP32/issues/820)
- Commands for multiple thermostats [#826](https://github.com/emsesp/EMS-ESP32/issues/826)
- API queries for multiple devices [#865](https://github.com/emsesp/EMS-ESP32/issues/865)
- Console crash when using call with command `hcx` only. [#841](https://github.com/emsesp/EMS-ESP32/issues/841)
- `heatingPump2Mod` was wrong, changed to absBurnPow [[#908](https://github.com/emsesp/EMS-ESP32/issues/908)
- Rounding of web input values
- Analog sensor with single gpio number [#915](https://github.com/emsesp/EMS-ESP32/issues/915)
- HA dallas and analog configs: remove/rebuild on change [#888](https://github.com/emsesp/EMS-ESP32/issues/888)
- Modes and set seltemp for RC30 and RC20 [#932](https://github.com/emsesp/EMS-ESP32/issues/932)
## Changed
- Discovery in HomeAssistant don't work with custom base topic. [#596](https://github.com/emsesp/EMS-ESP32/issues/596) Base topic containing `/` are changed to `_`
- RF room temperature sensor are shown as thermostat
- Render mqtt float json values with trailing zero
- Removed flash strings, to increase available heap memory
- Reload page after restart button is pressed
- Analog/dallas values command as list like ems-devices
- Analog/dallas HA-entities based on id
- MQTT Base is a mandatory field. Removed MQTT topic length from settings
- HA duration class for time entities [[#822](https://github.com/emsesp/EMS-ESP32/issues/822)
- AM200 alternative heatsource as class heatsource [[#857](https://github.com/emsesp/EMS-ESP32/issues/857)
# [3.4.2] September 18 2022
## Added
@@ -51,7 +263,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- WebUI optimizations, updated look&feel and better performance [#124](https://github.com/emsesp/EMS-ESP32/issues/124)
- Auto refresh of WebUI after successful firmware upload [#178](https://github.com/emsesp/EMS-ESP32/issues/178)
- New Customization Service in WebUI. First feature is the ability to enable/disabled Enitites (device values) from EMS devices [#206](https://github.com/emsesp/EMS-ESP32/issues/206)
- New Customization Service in WebUI. First feature is the ability to enable/disabled Entities (device values) from EMS devices [#206](https://github.com/emsesp/EMS-ESP32/issues/206)
- Option to disable Telnet Console [#209](https://github.com/emsesp/EMS-ESP32/issues/209)
- Added Hide SSID, Max Clients and Preferred Channel to Access Point
- Merged in MichaelDvP's changes like Fahrenheit conversion, publish single (for IOBroker) and a few other critical optimizations
@@ -151,7 +363,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added pool data to telegrams 0x494 & 0x495 [#102](https://github.com/emsesp/EMS-ESP32/issues/102)
- Add RC300 second summermode telegram [#108](https://github.com/emsesp/EMS-ESP32/issues/108)
- Add support for the RC25 thermostat [#106](https://github.com/emsesp/EMS-ESP32/issues/106)
- Add new command 'entities' for a device, e.g. http://ems-esp/api/boiler/entities to show the shortname, description and HA Entity name (if HA enabled) [#116](https://github.com/emsesp/EMS-ESP32/issues/116)
- Add new command 'entities' for a device, e.g. <http://ems-esp/api/boiler/entities> to show the shortname, description and HA Entity name (if HA enabled) [#116](https://github.com/emsesp/EMS-ESP32/issues/116)
- Support for Junkers program and remote (fb10/fb110) temperature
- Home Assistant `state_class` attribute for Wh, kWh, W and KW [#129](https://github.com/emsesp/EMS-ESP32/issues/129)
- Add current room influence for RC300 [#136](https://github.com/emsesp/EMS-ESP32/issues/136)
@@ -373,4 +585,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- some names of mqtt-tags like in v2.2.1
- new ESP32 partition side to allow for smoother OTA and fallback
- Network Gateway IP is optional (#682)emsesp/EMS-ESP
- moved to a new GitHub repo https://github.com/emsesp/EMS-ESP32
- moved to a new GitHub repo <https://github.com/emsesp/EMS-ESP32>

View File

@@ -1,63 +1,24 @@
# Changelog
# [3.5.0]
## [3.6.5]
## **IMPORTANT! BREAKING CHANGES**
- When upgrading to v3.5 for the first time from v3.4 on a BBQKees Gateway board you will need to use the [EMS-EPS Flasher](https://github.com/emsesp/EMS-ESP-Flasher/releases) to correctly re-partition the flash. Make sure you backup the settings and customizations from the WebUI (System->Upload/Download) and restore after the upgrade.
- Support for multiple EMS-ESPs [#759] has been added as an optional setting for MQTT. When enabled, which is now the default, all MQTT Discovery Entity IDs will include the MQTT base name and the shortname of the EMS-ESP device entity. For example what was previously `sensor.boiler_actual_boiler_temperature` will now become `sensor.ems_esp_boiler_boiltemp`. If you still want to use the old format and retain the history and script compatibility in Home Assistant then set this back to the old format.
## Added
- Translations in Web UI and all device entity names (DE, NL, SV, PL, NO, FR) [#22](https://github.com/emsesp/EMS-ESP32/issues/22)
- Add support for Lolin C3 mini [#620](https://github.com/emsesp/EMS-ESP32/pull/620)
- Add support for ESP32-S2 [#667](https://github.com/emsesp/EMS-ESP32/pull/667)
- Add devices: Greenstar 30Ri boiler, Junkers FW500 thermostat, Buderus BC30 controller
- Add program memory info
- Add mqtt queue and connection infos
- Adapt min/max if ems-value is not in this range
- Add heat pump settings for inputs and limits [#600](https://github.com/emsesp/EMS-ESP32/issues/600)
- Add hybrid heatpump [#500](https://github.com/emsesp/EMS-ESP32/issues/500)
- Add translated tags
- Add min/max to customization table [#686](https://github.com/emsesp/EMS-ESP32/issues/686)
- Add MD5 check [#637](https://github.com/emsesp/EMS-ESP32/issues/637)
- Add more bus-ids [#673](https://github.com/emsesp/EMS-ESP32/issues/673)
- Use HA connectivity device class for Status, added boot time [#751](https://github.com/emsesp/EMS-ESP32/issues/751)
- Add commands for analog sensors outputs
- Support for multiple EMS-ESPs with MQTT and HA [[#759](https://github.com/emsesp/EMS-ESP32/issues/759)]
- Settings for heatpump silent mode and additional heater [[#802](https://github.com/emsesp/EMS-ESP32/issues/802)] [[#803](https://github.com/emsesp/EMS-ESP32/issues/803)]
- Zone module MZ100 [#826](https://github.com/emsesp/EMS-ESP32/issues/826)
- Default MQTT hostname is blank [#829](https://github.com/emsesp/EMS-ESP32/issues/829)
- wwCurFlow for ems+ devices [#829](https://github.com/emsesp/EMS-ESP32/issues/829)
- Add Rego 3000, TR120RF thermostats [#917](https://github.com/emsesp/EMS-ESP32/issues/917)
- Add config for ESP32-S3
- Add heatpump silent mode and other entities [#896](https://github.com/emsesp/EMS-ESP32/issues/896)
- Allow reboot to other partition (factory or asymetric OTA)
- Blacklist entities to remove from memory [#891](https://github.com/emsesp/EMS-ESP32/issues/891)
- Add boiler pump operating mode [#944](https://github.com/emsesp/EMS-ESP32/issues/944)
- thermostat boost mode and boost time [#1446](https://github.com/emsesp/EMS-ESP32/issues/1446)
- heatpump energy meters [#1463](https://github.com/emsesp/EMS-ESP32/issues/1463)
- heatpump max power [#1475](https://github.com/emsesp/EMS-ESP32/issues/1475)
- checkbox for MQTT-TLS enable [#1474](https://github.com/emsesp/EMS-ESP32/issues/1474)
- added SK (Slovencina) language. Thanks @misa1515
- CPU info [#1497](https://github.com/emsesp/EMS-ESP32/pull/1497)
## Fixed
- Factory Reset not working [#628](https://github.com/emsesp/EMS-ESP32/issues/628)
- Valid 4 byte values [#820](https://github.com/emsesp/EMS-ESP32/issues/820)
- Commands for multiple thermostats [#826](https://github.com/emsesp/EMS-ESP32/issues/826)
- API queries for multiple devices [#865](https://github.com/emsesp/EMS-ESP32/issues/865)
- Console crash when using call with command `hcx` only. [#841](https://github.com/emsesp/EMS-ESP32/issues/841)
- `heatingPump2Mod` was wrong, changed to absBurnPow [[#908](https://github.com/emsesp/EMS-ESP32/issues/908)
- Rounding of web input values
- Analog sensor with single gpio number [#915](https://github.com/emsesp/EMS-ESP32/issues/915)
- HA dallas and analog configs: remove/rebuild on change [#888](https://github.com/emsesp/EMS-ESP32/issues/888)
- Modes and set seltemp for RC30 and RC20 [#932](https://github.com/emsesp/EMS-ESP32/issues/932)
- exhaust temperature for some boilers
- add back boil2hyst [#1477](https://github.com/emsesp/EMS-ESP32/issues/1477)
- subscribed MQTT topics not detecting changes by EMS-ESP [#1494](https://github.com/emsesp/EMS-ESP32/issues/1494)
## Changed
- Discovery in HomeAssistant don't work with custom base topic. [#596](https://github.com/emsesp/EMS-ESP32/issues/596) Base topic containing `/` are changed to `_`
- RF room temperature sensor are shown as thermostat
- Render mqtt float json values with trailing zero
- Removed flash strings, to increase available heap memory
- Reload page after restart button is pressed
- Analog/dallas values command as list like ems-devices
- Analog/dallas HA-entities based on id
- MQTT Base is a mandatory field. Removed MQTT topic length from settings
- HA duration class for time entities [[#822](https://github.com/emsesp/EMS-ESP32/issues/822)
- AM200 alternative heatsource as class heatsource [[#857](https://github.com/emsesp/EMS-ESP32/issues/857)
- HA don't set entity_category to Diagnostic/Configuration for EMS entities [#1459](https://github.com/emsesp/EMS-ESP32/discussions/1459)

View File

@@ -17,8 +17,8 @@ MAKEFLAGS+="j "
#TARGET := $(notdir $(CURDIR))
TARGET := emsesp
BUILD := build
SOURCES := src src/* lib_standalone lib/uuid-common/src lib/uuid-console/src lib/uuid-log/src src/devices lib/ArduinoJson/src lib/PButton lib/semver
INCLUDES := src lib_standalone lib/ArduinoJson/src lib/uuid-common/src lib/uuid-console/src lib/uuid-log/src lib/uuid-telnet/src lib/uuid-syslog/src lib/semver lib/* src/devices
SOURCES := src src/* lib_standalone lib/uuid-common/src lib/uuid-console/src lib/uuid-log/src src/devices lib/ArduinoJson/src lib/PButton lib/semver lib/espMqttClient/src lib/espMqttClient/src/*
INCLUDES := src lib_standalone 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 lib/semver lib/* src/devices
LIBRARIES :=
CPPCHECK = cppcheck
@@ -28,19 +28,21 @@ CHECKFLAGS = -q --force --std=c++11
#----------------------------------------------------------------------
# Languages Standard
#----------------------------------------------------------------------
# C_STANDARD := -std=c17
C_STANDARD := -std=c17
# CXX_STANDARD := -std=c++17
C_STANDARD := -std=c11
CXX_STANDARD := -std=c++11
CXX_STANDARD := -std=gnu++11
# C_STANDARD := -std=c11
# CXX_STANDARD := -std=c++11
#----------------------------------------------------------------------
# Defined Symbols
#----------------------------------------------------------------------
DEFINES += -DARDUINOJSON_ENABLE_STD_STRING=1 -DARDUINOJSON_ENABLE_PROGMEM=1 -DARDUINOJSON_ENABLE_ARDUINO_STRING -DARDUINOJSON_USE_DOUBLE=0
DEFINES += -DEMSESP_DEBUG -DEMSESP_STANDALONE -DEMSESP_USE_SERIAL
DEFINES += -DEMSESP_DEBUG -DEMSESP_STANDALONE -DEMSESP_TEST -D__linux__ -DEMC_RX_BUFFER_SIZE=1500
DEFINES += $(ARGS)
DEFAULTS = -DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.5.0b11\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32\"
DEFAULTS = -DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.6.4-dev\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32\"
#----------------------------------------------------------------------
# Sources & Files
@@ -79,9 +81,7 @@ CPPFLAGS += -g3
CPPFLAGS += -Os
CFLAGS += $(CPPFLAGS)
CFLAGS += -Wall
CFLAGS += -Wextra
CFLAGS += -Wno-unused-parameter
CFLAGS += -Wall -Wextra -Werror -Wswitch-enum -Wno-unused-parameter -Wno-inconsistent-missing-override -Wno-missing-braces -Wno-unused-lambda-capture -Wno-sign-compare
CXXFLAGS += $(CFLAGS) -MMD

View File

@@ -21,7 +21,7 @@
- Native support for Home Assistant, Domoticz and openHAB via [MQTT Discovery](https://www.home-assistant.io/docs/mqtt/discovery/)
- Can run standalone as an independent WiFi Access Point or join an existing WiFi network
- Easy first-time configuration via a web Captive Portal
- Support for more than [110 EMS devices](https://emsesp.github.io/docs/#/Supported-EMS-Devices) (boilers, thermostats, solar modules, mixer modules, heat pumps, gateways, switches, heat sources)
- Support for more than [110+ EMS devices](https://emsesp.github.io/docs/All-Devices/) (boilers, thermostats, solar modules, mixer modules, heat pumps, gateways, switches, heat sources)
## **Documentation**
@@ -46,8 +46,7 @@ EMS-ESP is a project owned and maintained by [proddy](https://github.com/proddy)
- [esp8266-react](https://github.com/rjwats/esp8266-react) by @rjwats for the framework that provides the core of the Web UI
- [uuid-\*](https://github.com/nomis/mcu-uuid-console) from @nomis. The console, syslog, telnet and logging are based off these open source libraries
- [ArduinoJson](https://github.com/bblanchon/ArduinoJson) for all the JSON
- [AsyncMqttClient](https://github.com/marvinroger/async-mqtt-client) for the MQTT client, with custom modifications from @bertmelis and @proddy
- ESPAsyncWebServer and AsyncTCP for the Web server and TCP backends, with custom modifications for performance
- [espMqttClient](https://github.com/bertmelis/espMqttClient) for the MQTT client, with custom modifications from @MichaelDvP and @proddy
## **License**

View File

@@ -1,5 +0,0 @@
# ![logo](https://github.com/emsesp/EMS-ESP32/blob/main/media/EMS-ESP_logo_dark.png)
# Firmware Installation
Follow the instructions in the [documentation](https://emsesp.github.io/docs) on how to install the firmware binaries in the Assets below.

View File

@@ -1,7 +0,0 @@
# ![logo](https://github.com/emsesp/EMS-ESP32/blob/main/media/EMS-ESP_logo_dark.png)
This is a snapshot of the current "beta" development code and firmware binaries for the ESP32. It has all the latest features and fixes but please be aware that this is still experimental firmware used for testing and thus may contain the odd bug. Use at your own risk and remember to report an issue if you find something unusual.
# Firmware Installation
Follow the instructions in the [documentation](https://emsesp.github.io/docs) on how to install the firmware binaries in the Assets below.

39
benchmark/http-client-test.js Executable file
View File

@@ -0,0 +1,39 @@
#!/usr/bin/env node
const axios = require('axios');
const url = 'http://10.10.10.135/api/system/commands';
const queryParams = {
entity: 'commands',
id: 0
};
const totalRequests = 1000000;
const requestsPerCount = 100;
let requestCount = 0;
function fetchData() {
axios
.get(url, { params: queryParams })
.then((response) => {
requestCount++;
if (requestCount % requestsPerCount === 0) {
console.log(`Requests completed: ${requestCount}`);
}
if (requestCount < totalRequests) {
fetchData();
} else {
console.log('All requests completed.');
}
})
.catch((error) => {
console.error('Error making request:', error.message);
});
}
// Start making requests
console.log(`Starting test`);
fetchData();

38
benchmark/loadtest-http.sh Executable file
View File

@@ -0,0 +1,38 @@
#!/usr/bin/env bash
# Install:
# npm install -g autocannon
# yarn global add autocannon
#
# or run https://github.com/nearform/autocannon-ui
TEST_IP="10.10.10.135"
TEST_TIME=60
LOG_FILE=http-loadtest.log
TIMEOUT=10000
PROTOCOL=http
#PROTOCOL=https
if test -f "$LOG_FILE"; then
rm $LOG_FILE
fi
# for CONCURRENCY in 1 2 3 4 5 6 7 8 9 10 15 20
for CONCURRENCY in 1
#for CONCURRENCY in 20
do
printf "\n\nCLIENTS: *** $CONCURRENCY ***\n\n" >> $LOG_FILE
echo "Testing $CONCURRENCY clients on $PROTOCOL://$TEST_IP/"
autocannon -c $CONCURRENCY -w 1 -d $TEST_TIME --renderStatusCodes "$PROTOCOL://$TEST_IP/" >> $LOG_FILE 2>&1
printf "\n\n----------------\n\n" >> $LOG_FILE
sleep 1
echo "Testing $CONCURRENCY clients on $PROTOCOL://$TEST_IP/api/system/commands"
autocannon -c $CONCURRENCY -w 1 -d $TEST_TIME --renderStatusCodes "$PROTOCOL://$TEST_IP/api/system/commands" >> $LOG_FILE 2>&1
printf "\n\n----------------\n\n" >> $LOG_FILE
sleep 1
echo "Testing $CONCURRENCY clients on $PROTOCOL://$TEST_IP/app/icon.png"
autocannon -c $CONCURRENCY -w 1 -d $TEST_TIME --renderStatusCodes "$PROTOCOL://$TEST_IP/app/icon.png" >> $LOG_FILE 2>&1
printf "\n\n----------------\n\n" >> $LOG_FILE
sleep 1
done

8
benchmark/package.json Normal file
View File

@@ -0,0 +1,8 @@
{
"dependencies": {
"autocannon": "^7.14.0",
"axios": "^1.6.2",
"eventsource": "^2.0.2",
"ws": "^8.14.2"
}
}

4341
dump_entities.csv Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, , 0x2000,
app0, app, ota_0, , 0x2A0000,
app1, app, ota_1, , 0x140000,
spiffs, data, spiffs, , 64K,
1 # Name Type SubType Offset Size Flags
2 nvs data nvs 0x9000 0x5000
3 otadata data ota 0x2000
4 app0 app ota_0 0x2A0000
5 app1 app ota_1 0x140000
6 spiffs data spiffs 64K

View File

@@ -1,8 +0,0 @@
# This enables lint extensions
EXTEND_ESLINT=true
# This is the name of your project. It appears on the sign-in page and in the menu bar.
REACT_APP_PROJECT_NAME=EMS-ESP
# This is the url path your project will be exposed under.
REACT_APP_PROJECT_PATH=ems-esp

View File

@@ -0,0 +1,2 @@
VITE_ALOVA_TIPS=0
REACT_APP_ALOVA_TIPS=0

View File

@@ -1,3 +0,0 @@
GENERATE_SOURCEMAP=false
REACT_APP_HOSTED=true

View File

@@ -1 +0,0 @@
GENERATE_SOURCEMAP=false

12
interface/.eslintignore Normal file
View File

@@ -0,0 +1,12 @@
node_modules/
build/
dist/
.yarn/
.prettierrc
.eslintrc*
env.d.ts
progmem-generator.js
unpack.ts
vite.config.ts
package.json

108
interface/.eslintrc.json Normal file
View File

@@ -0,0 +1,108 @@
{
"env": {
"browser": true,
"es6": true
},
"extends": [
"eslint:recommended",
"airbnb/hooks",
"airbnb-typescript",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:prettier/recommended",
"plugin:import/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module",
"tsconfigRootDir": ".",
"project": ["tsconfig.json"]
},
"plugins": ["react", "@typescript-eslint", "autofix", "react-hooks"],
"settings": {
"import/resolver": {
"typescript": {
"project": "./tsconfig.json"
}
},
"react": {
"version": "18.x"
}
},
"rules": {
"object-shorthand": "error",
"no-console": "warn",
"@typescript-eslint/consistent-type-definitions": ["off", "type"],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-enum-comparison": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/restrict-plus-operands": "off",
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/no-implied-eval": "off",
"@typescript-eslint/no-misused-promises": "off",
"arrow-body-style": ["error", "as-needed"],
"react-hooks/exhaustive-deps": "warn",
"@typescript-eslint/consistent-type-imports": [
"error",
{
"prefer": "type-imports"
}
],
"import/order": [
"warn",
{
"groups": ["builtin", "external", "parent", "sibling", "index", "object", "type"],
"pathGroups": [
{
"pattern": "@/**/**",
"group": "parent",
"position": "before"
}
],
"alphabetize": { "order": "asc" }
}
],
// "autofix/no-unused-vars": [
// "error",
// {
// "argsIgnorePattern": "^_",
// "ignoreRestSiblings": true,
// "destructuredArrayIgnorePattern": "^_"
// }
// ],
"react/self-closing-comp": [
"error",
{
"component": true,
"html": true
}
],
"@typescript-eslint/ban-types": [
"error",
{
"extendDefaults": true,
"types": {
"{}": false
}
}
],
"prettier/prettier": [
"error",
{
"endOfLine": "auto"
}
]
}
}

7
interface/.gitignore vendored Normal file
View File

@@ -0,0 +1,7 @@
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

View File

@@ -0,0 +1,6 @@
node_modules/
build/
dist/
.prettierrc
.yarn/
.typesafe-i18n.json

View File

@@ -1,5 +1,5 @@
{
"adapter": "react",
"baseLocale": "pl",
"$schema": "https://unpkg.com/typesafe-i18n@5.24.0/schema/typesafe-i18n.json"
"adapter": "react",
"baseLocale": "pl",
"$schema": "https://unpkg.com/typesafe-i18n@5.26.2/schema/typesafe-i18n.json"
}

893
interface/.yarn/releases/yarn-4.0.2.cjs vendored Executable file

File diff suppressed because one or more lines are too long

7
interface/.yarnrc.yml Normal file
View File

@@ -0,0 +1,7 @@
compressionLevel: mixed
enableGlobalCache: false
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-4.0.2.cjs

View File

@@ -1,30 +0,0 @@
const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const ProgmemGenerator = require('./progmem-generator.js');
const TerserPlugin = require('terser-webpack-plugin');
module.exports = function override(config, env) {
const hosted = process.env.REACT_APP_HOSTED;
if (env === 'production' && !hosted) {
// rename the ouput file, we need it's path to be short, for embedded FS
config.output.filename = 'js/[id].[chunkhash:4].js';
config.output.chunkFilename = 'js/[id].[chunkhash:4].js';
// take out the manifest plugin
config.plugins = config.plugins.filter((plugin) => !(plugin instanceof WebpackManifestPlugin));
// shorten css filenames
const miniCssExtractPlugin = config.plugins.find((plugin) => plugin instanceof MiniCssExtractPlugin);
miniCssExtractPlugin.options.filename = 'css/[id].[contenthash:4].css';
miniCssExtractPlugin.options.chunkFilename = 'css/[id].[contenthash:4].c.css';
// don't emit license file
const terserPlugin = config.optimization.minimizer.find((plugin) => plugin instanceof TerserPlugin);
terserPlugin.options.extractComments = false;
// build progmem data files
config.plugins.push(new ProgmemGenerator({ outputPath: '../lib/framework/WWWData.h', bytesPerLine: 20 }));
}
return config;
};

14
interface/index.html Normal file
View File

@@ -0,0 +1,14 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="stylesheet" href="/css/roboto.css" />
<link rel="manifest" href="/app/manifest.json" />
<title>EMS-ESP</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>

17983
interface/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,104 +1,78 @@
{
"name": "EMS-ESP",
"version": "3.5.0",
"version": "3.6.5",
"description": "build EMS-ESP WebUI",
"homepage": "https://emsesp.github.io/docs",
"author": "proddy",
"license": "MIT",
"private": true,
"proxy": "http://localhost:3080",
"dependencies": {
"@emotion/react": "^11.10.5",
"@emotion/styled": "^11.10.5",
"@msgpack/msgpack": "^2.8.0",
"@mui/icons-material": "^5.11.0",
"@mui/material": "^5.11.7",
"@table-library/react-table-library": "4.0.24",
"@types/lodash": "^4.14.191",
"@types/node": "^18.11.19",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"@types/react-router-dom": "^5.3.3",
"async-validator": "^4.2.5",
"axios": "^1.3.2",
"jwt-decode": "^3.1.2",
"lodash": "^4.17.21",
"notistack": "^2.0.8",
"react": "^18.2.0",
"react-app-rewired": "^2.2.1",
"react-dom": "^18.2.0",
"react-dropzone": "^14.2.3",
"react-icons": "^4.7.1",
"react-router-dom": "^6.8.1",
"react-scripts": "5.0.1",
"sockette": "^2.0.6",
"typesafe-i18n": "^5.24.0",
"typescript": "^4.9.5"
},
"type": "module",
"scripts": {
"start": "react-app-rewired start",
"build": "react-app-rewired build",
"test": "react-app-rewired test",
"eject": "react-scripts eject",
"build": "vite build",
"preview": "vite preview",
"build-hosted": "typesafe-i18n --no-watch && vite build --mode hosted",
"preview-standalone": "typesafe-i18n --no-watch && vite build && concurrently -c \"auto\" \"npm:mock-api\" \"vite preview\"",
"mock-api": "bun --watch ../mock-api/server.ts",
"standalone": "concurrently -c \"auto\" \"typesafe-i18n\" \"npm:mock-api\" \"vite\"",
"typesafe-i18n": "typesafe-i18n --no-watch",
"webUI": "node progmem-generator.js",
"format": "prettier --write '**/*.{ts,tsx,js,css,json,md}'",
"build-hosted": "env-cmd -f .env.hosted npm run build",
"build-localhost": "PUBLIC_URL=/ react-app-rewired build",
"mock-api": "nodemon --watch ../mock-api ../mock-api/server.js",
"standalone": "npm-run-all -p start typesafe-i18n mock-api",
"lint": "eslint . --ext .ts,.tsx",
"typesafe-i18n": "typesafe-i18n"
"lint": "eslint . --cache --fix"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
],
"rules": {
"eol-last": 1,
"react/jsx-closing-bracket-location": 1,
"react/jsx-closing-tag-location": 1,
"react/jsx-wrap-multilines": 1,
"react/jsx-curly-newline": 1,
"no-multiple-empty-lines": [
1,
{
"max": 1
}
],
"no-trailing-spaces": 1,
"semi": 1,
"no-extra-semi": 1,
"react/jsx-max-props-per-line": [
1,
{
"when": "multiline"
}
],
"react/jsx-first-prop-new-line": [
1,
"multiline"
],
"@typescript-eslint/no-shadow": 1,
"max-len": [
1,
{
"code": 220
}
],
"arrow-parens": 1
}
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
"dependencies": {
"@alova/adapter-xhr": "^1.0.2",
"@babel/core": "^7.23.7",
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.15.2",
"@mui/material": "^5.15.2",
"@table-library/react-table-library": "4.1.7",
"@types/imagemin": "^8.0.5",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.10.6",
"@types/react": "^18.2.46",
"@types/react-dom": "^18.2.18",
"@types/react-router-dom": "^5.3.3",
"alova": "^2.16.2",
"async-validator": "^4.2.5",
"history": "^5.3.0",
"jwt-decode": "^4.0.0",
"lodash-es": "^4.17.21",
"mime-types": "^2.1.35",
"react": "latest",
"react-dom": "latest",
"react-dropzone": "^14.2.3",
"react-icons": "^4.12.0",
"react-router-dom": "^6.21.1",
"react-toastify": "^9.1.3",
"sockette": "^2.0.6",
"typesafe-i18n": "^5.26.2",
"typescript": "^5.3.3"
},
"devDependencies": {
"nodemon": "^2.0.20",
"npm-run-all": "^4.1.5",
"http-proxy-middleware": "^2.0.6"
}
"@preact/compat": "^17.1.2",
"@preact/preset-vite": "^2.7.0",
"@typescript-eslint/eslint-plugin": "^6.17.0",
"@typescript-eslint/parser": "^6.17.0",
"concurrently": "^8.2.2",
"eslint": "^8.56.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-autofix": "^1.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-prettier": "alpha",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"preact": "^10.19.3",
"prettier": "^3.1.1",
"rollup-plugin-visualizer": "^5.12.0",
"terser": "^5.26.0",
"vite": "^5.0.10",
"vite-plugin-imagemin": "^0.6.1",
"vite-tsconfig-paths": "^4.2.3"
},
"packageManager": "yarn@4.0.2"
}

View File

@@ -1,9 +1,28 @@
const { resolve, relative, sep } = require('path');
const { readdirSync, existsSync, unlinkSync, readFileSync, createWriteStream } = require('fs');
var zlib = require('zlib');
var mime = require('mime-types');
import { readdirSync, existsSync, unlinkSync, readFileSync, createWriteStream } from 'fs';
import { resolve, relative, sep } from 'path';
import zlib from 'zlib';
import mime from 'mime-types';
const ARDUINO_INCLUDES = '#include <Arduino.h>\n\n';
const INDENT = ' ';
const outputPath = '../lib/framework/WWWData.h';
const sourcePath = './dist';
const bytesPerLine = 20;
var totalSize = 0;
const generateWWWClass = () =>
`typedef std::function<void(const String &, const String & contentType, const uint8_t * content, size_t len)> RouteRegistrationHandler;
// Total size is ${totalSize} bytes
class WWWData {
${indent}public:
${indent.repeat(2)}static void registerRoutes(RouteRegistrationHandler handler) {
${fileInfo
.map((file) => `${indent.repeat(3)}handler("${file.uri}", "${file.mimeType}", ${file.variable}, ${file.size});`)
.join('\n')}
${indent.repeat(2)}}
};
`;
function getFilesSync(dir, files = []) {
readdirSync(dir, { withFileTypes: true }).forEach((entry) => {
@@ -17,10 +36,6 @@ function getFilesSync(dir, files = []) {
return files;
}
function coherseToBuffer(input) {
return Buffer.isBuffer(input) ? input : Buffer.from(input);
}
function cleanAndOpen(path) {
if (existsSync(path)) {
unlinkSync(path);
@@ -28,94 +43,58 @@ function cleanAndOpen(path) {
return createWriteStream(path, { flags: 'w+' });
}
class ProgmemGenerator {
constructor(options = {}) {
const { outputPath, bytesPerLine = 20, indent = ' ', includes = ARDUINO_INCLUDES } = options;
this.options = { outputPath, bytesPerLine, indent, includes };
const writeFile = (relativeFilePath, buffer) => {
const variable = 'ESP_REACT_DATA_' + fileInfo.length;
const mimeType = mime.lookup(relativeFilePath);
var size = 0;
writeStream.write('const uint8_t ' + variable + '[] = {');
// const zipBuffer = zlib.brotliCompressSync(buffer, { quality: 1 });
const zipBuffer = zlib.gzipSync(buffer, { level: 9 });
zipBuffer.forEach((b) => {
if (!(size % bytesPerLine)) {
writeStream.write('\n');
writeStream.write(indent);
}
writeStream.write('0x' + ('00' + b.toString(16).toUpperCase()).slice(-2) + ',');
size++;
});
if (size % bytesPerLine) {
writeStream.write('\n');
}
writeStream.write('};\n\n');
fileInfo.push({
uri: '/' + relativeFilePath.replace(sep, '/'),
mimeType,
variable,
size
});
apply(compiler) {
compiler.hooks.emit.tapAsync({ name: 'ProgmemGenerator' }, (compilation, callback) => {
const { outputPath, bytesPerLine, indent, includes } = this.options;
const fileInfo = [];
const writeStream = cleanAndOpen(resolve(compilation.options.context, outputPath));
try {
const writeIncludes = () => {
writeStream.write(includes);
};
const writeFile = (relativeFilePath, buffer) => {
const variable = 'ESP_REACT_DATA_' + fileInfo.length;
const mimeType = mime.lookup(relativeFilePath);
var size = 0;
writeStream.write('const uint8_t ' + variable + '[] PROGMEM = {');
const zipBuffer = zlib.gzipSync(buffer);
zipBuffer.forEach((b) => {
if (!(size % bytesPerLine)) {
writeStream.write('\n');
writeStream.write(indent);
}
writeStream.write('0x' + ('00' + b.toString(16).toUpperCase()).substr(-2) + ',');
size++;
});
if (size % bytesPerLine) {
writeStream.write('\n');
}
writeStream.write('};\n\n');
fileInfo.push({
uri: '/' + relativeFilePath.replace(sep, '/'),
mimeType,
variable,
size
});
};
const writeFiles = () => {
// process static files
const buildPath = compilation.options.output.path;
for (const filePath of getFilesSync(buildPath)) {
const readStream = readFileSync(filePath);
const relativeFilePath = relative(buildPath, filePath);
writeFile(relativeFilePath, readStream);
}
// process assets
const { assets } = compilation;
Object.keys(assets).forEach((relativeFilePath) => {
writeFile(relativeFilePath, coherseToBuffer(assets[relativeFilePath].source()));
});
};
const generateWWWClass = () => {
// eslint-disable-next-line max-len
return `typedef std::function<void(const String& uri, const String& contentType, const uint8_t * content, size_t len)> RouteRegistrationHandler;
class WWWData {
${indent}public:
${indent.repeat(2)}static void registerRoutes(RouteRegistrationHandler handler) {
${fileInfo
.map((file) => `${indent.repeat(3)}handler("${file.uri}", "${file.mimeType}", ${file.variable}, ${file.size});`)
.join('\n')}
${indent.repeat(2)}}
// console.log(relativeFilePath + ' (size ' + size + ' bytes)');
totalSize += size;
};
`;
};
const writeWWWClass = () => {
writeStream.write(generateWWWClass());
};
// start
console.log('Generating ' + outputPath + ' from ' + sourcePath);
const includes = ARDUINO_INCLUDES;
const indent = INDENT;
const fileInfo = [];
const writeStream = cleanAndOpen(resolve(outputPath));
writeIncludes();
writeFiles();
writeWWWClass();
// includes
writeStream.write(includes);
writeStream.on('finish', () => {
callback();
});
} finally {
writeStream.end();
}
});
}
// process static files
const buildPath = resolve(sourcePath);
for (const filePath of getFilesSync(buildPath)) {
const readStream = readFileSync(filePath);
const relativeFilePath = relative(buildPath, filePath);
writeFile(relativeFilePath, readStream);
}
module.exports = ProgmemGenerator;
// add class
writeStream.write(generateWWWClass());
// end
writeStream.end();
console.log('Total size: ' + totalSize / 1000 + ' KB');

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

@@ -1,26 +1,18 @@
/*
* Just supporting latin due to size constrains on the esp chip
*
* The framework only makes use of 400 (regular) + 500 (medium) weight fonts.
*
* If using light or strong typography variants you will need to add additional fonts.
* Uses font-size 400 (normal) only and Latin (plus extra unicode chars) to keep flash memory to a minimum
* View fonts on https://fonts.google.com/
* Download woff2 using e.g. https://fonts.googleapis.com/css2?family=Lato or https://fonts.googleapis.com/css2?family=Roboto
*/
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(../fonts/re.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0104-0107, U+0118-0119, U+0131, U+0141-0144, U+0152-0153, U+015A-015B, U+0179-017C,
U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
U+FFFD;
}
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
src: local('Roboto Medium'), local('Roboto-Medium'), url(../fonts/md.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0104-0107, U+0118-0119, U+0131, U+0141-0144, U+0152-0153, U+015A-015B, U+0179-017C,
U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
U+FFFD;
/* src: url(https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu4mxK.woff2) format('woff2'); */
src:
local('Roboto'),
local('Roboto-Regular'),
url(../fonts/re.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0104-0107, U+0118-0119, U+011E-011F, U+0130-0131, U+0141-0144, U+0152-0153, U+015A-015B,
U+015E-015F, U+0179-017C, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193,
U+2212, U+2215, U+FEFF, U+FFFD;
}

Binary file not shown.

Binary file not shown.

View File

@@ -1,17 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, user-scalable=0, maximum-scale=1, minimum-scale=1"
/>
<link rel="stylesheet" href="%PUBLIC_URL%/css/roboto.css" />
<link rel="manifest" href="%PUBLIC_URL%/app/manifest.json" />
<title>EMS-ESP</title>
</head>
<body>
<noscript> You need to enable JavaScript to run this app. </noscript>
<div id="root"></div>
</body>
</html>

View File

@@ -1,61 +1,51 @@
import { FC, createRef, createContext, useContext, useEffect, useState, RefObject } from 'react';
import { SnackbarProvider } from 'notistack';
import { useEffect, useState } from 'react';
import { ToastContainer, Slide } from 'react-toastify';
import { IconButton } from '@mui/material';
import CloseIcon from '@mui/icons-material/Close';
import { FeaturesLoader } from './contexts/features';
import CustomTheme from './CustomTheme';
import AppRouting from './AppRouting';
import 'react-toastify/dist/ReactToastify.min.css';
import { localStorageDetector } from 'typesafe-i18n/detectors';
import TypesafeI18n from './i18n/i18n-react';
import { detectLocale } from './i18n/i18n-util';
import { loadLocaleAsync } from './i18n/i18n-util.async';
import { FeaturesLoader } from './contexts/features';
import type { FC } from 'react';
import AppRouting from 'AppRouting';
import CustomTheme from 'CustomTheme';
import TypesafeI18n from 'i18n/i18n-react';
import { detectLocale } from 'i18n/i18n-util';
import { loadLocaleAsync } from 'i18n/i18n-util.async';
const detectedLocale = detectLocale(localStorageDetector);
const App: FC = () => {
const notistackRef: RefObject<any> = createRef();
const onClickDismiss = (key: string | number | undefined) => () => {
notistackRef.current.closeSnackbar(key);
};
const ColorModeContext = createContext({ toggleColorMode: () => {} });
const colorMode = useContext(ColorModeContext);
const [wasLoaded, setWasLoaded] = useState(false);
useEffect(() => {
loadLocaleAsync(detectedLocale).then(() => setWasLoaded(true));
void loadLocaleAsync(detectedLocale).then(() => setWasLoaded(true));
}, []);
if (!wasLoaded) return null;
return (
<ColorModeContext.Provider value={colorMode}>
<TypesafeI18n locale={detectedLocale}>
<CustomTheme>
<SnackbarProvider
maxSnack={3}
anchorOrigin={{ vertical: 'bottom', horizontal: 'left' }}
ref={notistackRef}
action={(key) => (
<IconButton onClick={onClickDismiss(key)} size="small">
<CloseIcon />
</IconButton>
)}
>
<FeaturesLoader>
<AppRouting />
</FeaturesLoader>
</SnackbarProvider>
</CustomTheme>
</TypesafeI18n>
</ColorModeContext.Provider>
<TypesafeI18n locale={detectedLocale}>
<CustomTheme>
<FeaturesLoader>
<AppRouting />
</FeaturesLoader>
<ToastContainer
position="bottom-left"
autoClose={3000}
hideProgressBar={false}
newestOnTop={false}
closeOnClick={true}
rtl={false}
pauseOnFocusLoss={false}
draggable={false}
pauseOnHover={false}
transition={Slide}
closeButton={false}
theme="light"
/>
</CustomTheme>
</TypesafeI18n>
);
};

View File

@@ -1,29 +1,28 @@
import { FC, useContext, useEffect } from 'react';
import { Navigate, Routes, Route, useLocation } from 'react-router-dom';
import { useSnackbar, VariantType } from 'notistack';
import { useContext, useEffect } from 'react';
import { useI18nContext } from './i18n/i18n-react';
import { Route, Routes, Navigate, useLocation } from 'react-router-dom';
import { Authentication, AuthenticationContext } from './contexts/authentication';
import { FeaturesContext } from './contexts/features';
import { RequireAuthenticated, RequireUnauthenticated } from './components';
import { toast } from 'react-toastify';
import type { FC } from 'react';
import SignIn from './SignIn';
import AuthenticatedRouting from './AuthenticatedRouting';
import AuthenticatedRouting from 'AuthenticatedRouting';
import SignIn from 'SignIn';
import { RequireAuthenticated, RequireUnauthenticated } from 'components';
import { Authentication, AuthenticationContext } from 'contexts/authentication';
import { useI18nContext } from 'i18n/i18n-react';
interface SecurityRedirectProps {
message: string;
variant?: VariantType;
signOut?: boolean;
}
const RootRedirect: FC<SecurityRedirectProps> = ({ message, variant, signOut }) => {
const RootRedirect: FC<SecurityRedirectProps> = ({ message, signOut }) => {
const authenticationContext = useContext(AuthenticationContext);
const { enqueueSnackbar } = useSnackbar();
useEffect(() => {
signOut && authenticationContext.signOut(false);
enqueueSnackbar(message, { variant });
}, [message, variant, signOut, authenticationContext, enqueueSnackbar]);
toast.success(message);
}, [message, signOut, authenticationContext]);
return <Navigate to="/" />;
};
@@ -42,7 +41,6 @@ export const RemoveTrailingSlashes = () => {
};
const AppRouting: FC = () => {
const { features } = useContext(FeaturesContext);
const { LL } = useI18nContext();
return (
@@ -50,17 +48,15 @@ const AppRouting: FC = () => {
<RemoveTrailingSlashes />
<Routes>
<Route path="/unauthorized" element={<RootRedirect message={LL.PLEASE_SIGNIN()} signOut />} />
<Route path="/fileUpdated" element={<RootRedirect message={LL.UPLOAD_SUCCESSFUL()} variant="success" />} />
{features.security && (
<Route
path="/"
element={
<RequireUnauthenticated>
<SignIn />
</RequireUnauthenticated>
}
/>
)}
<Route path="/fileUpdated" element={<RootRedirect message={LL.UPLOAD_SUCCESSFUL()} />} />
<Route
path="/"
element={
<RequireUnauthenticated>
<SignIn />
</RequireUnauthenticated>
}
/>
<Route
path="/*"
element={

View File

@@ -1,66 +1,64 @@
import { FC, useCallback, useContext, useEffect } from 'react';
import { Navigate, Routes, Route, useNavigate, useLocation } from 'react-router-dom';
import { AxiosError } from 'axios';
import { Navigate, Routes, Route } from 'react-router-dom';
import Dashboard from './project/Dashboard';
import Help from './project/Help';
import Settings from './project/Settings';
import type { FC } from 'react';
import { FeaturesContext } from './contexts/features';
import * as AuthenticationApi from './api/authentication';
import { PROJECT_PATH } from './api/env';
import { AXIOS } from './api/endpoints';
import { Layout, RequireAdmin } from './components';
import { Layout, RequireAdmin } from 'components';
import AccessPoint from 'framework/ap/AccessPoint';
import Mqtt from 'framework/mqtt/Mqtt';
import NetworkConnection from 'framework/network/NetworkConnection';
import NetworkTime from 'framework/ntp/NetworkTime';
import Security from 'framework/security/Security';
import System from 'framework/system/System';
import ProjectRouting from './project/ProjectRouting';
const AuthenticatedRouting: FC = () => (
// const location = useLocation();
// const navigate = useNavigate();
// const handleApiResponseError = useCallback(
// (error: AxiosError) => {
// if (error.response && error.response.status === 401) {
// AuthenticationApi.storeLoginRedirect(location);
// navigate('/unauthorized');
// }
// return Promise.reject(error);
// },
// [location, navigate]
// );
// useEffect(() => {
// const axiosHandlerId = AXIOS.interceptors.response.use((response) => response, handleApiResponseError);
// return () => AXIOS.interceptors.response.eject(axiosHandlerId);
// }, [handleApiResponseError]);
import NetworkConnection from './framework/network/NetworkConnection';
import AccessPoint from './framework/ap/AccessPoint';
import NetworkTime from './framework/ntp/NetworkTime';
import Mqtt from './framework/mqtt/Mqtt';
import System from './framework/system/System';
import Security from './framework/security/Security';
<Layout>
<Routes>
<Route path="/dashboard/*" element={<Dashboard />} />
<Route
path="/settings/*"
element={
<RequireAdmin>
<Settings />
</RequireAdmin>
}
/>
<Route path="/help/*" element={<Help />} />
const AuthenticatedRouting: FC = () => {
const { features } = useContext(FeaturesContext);
const location = useLocation();
const navigate = useNavigate();
const handleApiResponseError = useCallback(
(error: AxiosError) => {
if (error.response && error.response.status === 401) {
AuthenticationApi.storeLoginRedirect(location);
navigate('/unauthorized');
}
return Promise.reject(error);
},
[location, navigate]
);
useEffect(() => {
const axiosHandlerId = AXIOS.interceptors.response.use((response) => response, handleApiResponseError);
return () => AXIOS.interceptors.response.eject(axiosHandlerId);
}, [handleApiResponseError]);
return (
<Layout>
<Routes>
{features.project && <Route path={`/${PROJECT_PATH}/*`} element={<ProjectRouting />} />}
<Route path="/network/*" element={<NetworkConnection />} />
<Route path="/ap/*" element={<AccessPoint />} />
{features.ntp && <Route path="/ntp/*" element={<NetworkTime />} />}
{features.mqtt && <Route path="/mqtt/*" element={<Mqtt />} />}
{features.security && (
<Route
path="/security/*"
element={
<RequireAdmin>
<Security />
</RequireAdmin>
}
/>
)}
<Route path="/system/*" element={<System />} />
<Route path="/*" element={<Navigate to={AuthenticationApi.getDefaultRoute(features)} />} />
</Routes>
</Layout>
);
};
<Route path="/network/*" element={<NetworkConnection />} />
<Route path="/ap/*" element={<AccessPoint />} />
<Route path="/ntp/*" element={<NetworkTime />} />
<Route path="/mqtt/*" element={<Mqtt />} />
<Route
path="/security/*"
element={
<RequireAdmin>
<Security />
</RequireAdmin>
}
/>
<Route path="/system/*" element={<System />} />
<Route path="/*" element={<Navigate to="/" />} />
</Routes>
</Layout>
);
export default AuthenticatedRouting;

View File

@@ -1,10 +1,18 @@
import { FC } from 'react';
import { CssBaseline } from '@mui/material';
import { createTheme, responsiveFontSizes, ThemeProvider } from '@mui/material/styles';
import { blueGrey, blue } from '@mui/material/colors';
import type { FC } from 'react';
import { RequiredChildrenProps } from './utils';
import type { RequiredChildrenProps } from 'utils';
export const dialogStyle = {
'& .MuiDialog-paper': {
borderRadius: '8px',
borderColor: '#565656',
borderStyle: 'solid',
borderWidth: '1px'
},
backdropFilter: 'blur(1px)'
};
const theme = responsiveFontSizes(
createTheme({
@@ -14,10 +22,13 @@ const theme = responsiveFontSizes(
palette: {
mode: 'dark',
secondary: {
main: blue[500]
main: '#2196f3' // blue[500]
},
info: {
main: blueGrey[500]
main: '#607d8b' // blueGrey[500]
},
text: {
disabled: '#eee' // white
}
}
})

View File

@@ -1,34 +1,41 @@
import { FC, useContext, useState } from 'react';
import { ValidateFieldsError } from 'async-validator';
import { useSnackbar } from 'notistack';
import { Box, Fab, Paper, Typography, Button } from '@mui/material';
import ForwardIcon from '@mui/icons-material/Forward';
import { Box, Paper, Typography, MenuItem, TextField, Button } from '@mui/material';
import { useRequest } from 'alova';
import { useContext, useState } from 'react';
import { toast } from 'react-toastify';
import { FeaturesContext } from './contexts/features';
import type { ValidateFieldsError } from 'async-validator';
import * as AuthenticationApi from './api/authentication';
import { PROJECT_NAME } from './api/env';
import { AuthenticationContext } from './contexts/authentication';
import type { Locales } from 'i18n/i18n-types';
import type { ChangeEventHandler, FC } from 'react';
import type { SignInRequest } from 'types';
import * as AuthenticationApi from 'api/authentication';
import { PROJECT_NAME } from 'api/env';
import { extractErrorMessage, onEnterCallback, updateValue } from './utils';
import { SignInRequest } from './types';
import { ValidatedTextField } from './components';
import { SIGN_IN_REQUEST_VALIDATOR, validate } from './validators';
import { ValidatedPasswordField, ValidatedTextField } from 'components';
import { AuthenticationContext } from 'contexts/authentication';
import { I18nContext } from './i18n/i18n-react';
import type { Locales } from './i18n/i18n-types';
import { loadLocaleAsync } from './i18n/i18n-util.async';
import { ReactComponent as NLflag } from './i18n/NL.svg';
import { ReactComponent as DEflag } from './i18n/DE.svg';
import { ReactComponent as GBflag } from './i18n/GB.svg';
import { ReactComponent as SVflag } from './i18n/SV.svg';
import { ReactComponent as PLflag } from './i18n/PL.svg';
import { ReactComponent as NOflag } from './i18n/NO.svg';
import { ReactComponent as FRflag } from './i18n/FR.svg';
import DEflag from 'i18n/DE.svg';
import FRflag from 'i18n/FR.svg';
import GBflag from 'i18n/GB.svg';
import ITflag from 'i18n/IT.svg';
import NLflag from 'i18n/NL.svg';
import NOflag from 'i18n/NO.svg';
import PLflag from 'i18n/PL.svg';
import SKflag from 'i18n/SK.svg';
import SVflag from 'i18n/SV.svg';
import TRflag from 'i18n/TR.svg';
import { I18nContext } from 'i18n/i18n-react';
import { loadLocaleAsync } from 'i18n/i18n-util.async';
import { onEnterCallback, updateValue } from 'utils';
import { SIGN_IN_REQUEST_VALIDATOR, validate } from 'validators';
const SignIn: FC = () => {
const authenticationContext = useContext(AuthenticationContext);
const { enqueueSnackbar } = useSnackbar();
const { LL, setLocale, locale } = useContext(I18nContext);
const { features } = useContext(FeaturesContext);
const [signInRequest, setSignInRequest] = useState<SignInRequest>({
username: '',
@@ -37,8 +44,29 @@ const SignIn: FC = () => {
const [processing, setProcessing] = useState<boolean>(false);
const [fieldErrors, setFieldErrors] = useState<ValidateFieldsError>();
const { send: callSignIn, onSuccess } = useRequest((request: SignInRequest) => AuthenticationApi.signIn(request), {
immediate: false
});
onSuccess((response) => {
if (response.data) {
authenticationContext.signIn(response.data.access_token);
}
});
const updateLoginRequestValue = updateValue(setSignInRequest);
const signIn = async () => {
await callSignIn(signInRequest).catch((event) => {
if (event.message === 'Unauthorized') {
toast.warning(LL.INVALID_LOGIN());
} else {
toast.error(LL.ERROR() + ' ' + event.message);
}
setProcessing(false);
});
};
const validateAndSignIn = async () => {
setProcessing(true);
SIGN_IN_REQUEST_VALIDATOR.messages({
@@ -46,34 +74,17 @@ const SignIn: FC = () => {
});
try {
await validate(SIGN_IN_REQUEST_VALIDATOR, signInRequest);
signIn();
await signIn();
} catch (errors: any) {
setFieldErrors(errors);
setProcessing(false);
}
};
const signIn = async () => {
try {
const { data: loginResponse } = await AuthenticationApi.signIn(signInRequest);
authenticationContext.signIn(loginResponse.access_token);
} catch (error) {
if (error.response) {
if (error.response?.status === 401) {
enqueueSnackbar(LL.INVALID_LOGIN(), { variant: 'warning' });
}
} else {
enqueueSnackbar(extractErrorMessage(error, LL.ERROR()), { variant: 'error' });
}
setProcessing(false);
}
};
const submitOnEnter = onEnterCallback(signIn);
const { LL, setLocale, locale } = useContext(I18nContext);
const selectLocale = async (loc: Locales) => {
const onLocaleSelected: ChangeEventHandler<HTMLInputElement> = async ({ target }) => {
const loc = target.value as Locales;
localStorage.setItem('lang', loc);
await loadLocaleAsync(loc);
setLocale(loc);
@@ -93,81 +104,92 @@ const SignIn: FC = () => {
sx={(theme) => ({
textAlign: 'center',
padding: theme.spacing(2),
paddingTop: '200px',
paddingTop: '172px',
backgroundImage: 'url("/app/icon.png")',
backgroundRepeat: 'no-repeat',
backgroundPosition: '50% ' + theme.spacing(2),
backgroundSize: 'auto 150px',
width: '100%'
})}
>
<Typography variant="h4">{PROJECT_NAME}</Typography>
<Box
sx={{
'& button, & a, & .MuiCard-root': {
mt: 0.5,
mx: 0.5
}
}}
>
<Button size="small" variant={locale === 'en' ? 'contained' : 'outlined'} onClick={() => selectLocale('en')}>
<GBflag style={{ width: 24 }} />
&nbsp;EN
</Button>
<Button size="small" variant={locale === 'de' ? 'contained' : 'outlined'} onClick={() => selectLocale('de')}>
<DEflag style={{ width: 24 }} />
<Typography variant="subtitle2">{features.version}</Typography>
<TextField name="locale" variant="outlined" value={locale} onChange={onLocaleSelected} size="small" select>
<MenuItem key="de" value="de">
<img src={DEflag} style={{ width: 16, verticalAlign: 'middle' }} />
&nbsp;DE
</Button>
<Button size="small" variant={locale === 'fr' ? 'contained' : 'outlined'} onClick={() => selectLocale('fr')}>
<FRflag style={{ width: 24 }} />
</MenuItem>
<MenuItem key="en" value="en">
<img src={GBflag} style={{ width: 16, verticalAlign: 'middle' }} />
&nbsp;EN
</MenuItem>
<MenuItem key="fr" value="fr">
<img src={FRflag} style={{ width: 16, verticalAlign: 'middle' }} />
&nbsp;FR
</Button>
<Button size="small" variant={locale === 'nl' ? 'contained' : 'outlined'} onClick={() => selectLocale('nl')}>
<NLflag style={{ width: 24 }} />
</MenuItem>
<MenuItem key="it" value="it">
<img src={ITflag} style={{ width: 16, verticalAlign: 'middle' }} />
&nbsp;IT
</MenuItem>
<MenuItem key="nl" value="nl">
<img src={NLflag} style={{ width: 16, verticalAlign: 'middle' }} />
&nbsp;NL
</Button>
<Button size="small" variant={locale === 'no' ? 'contained' : 'outlined'} onClick={() => selectLocale('no')}>
<NOflag style={{ width: 24 }} />
</MenuItem>
<MenuItem key="no" value="no">
<img src={NOflag} style={{ width: 16, verticalAlign: 'middle' }} />
&nbsp;NO
</Button>
<Button size="small" variant={locale === 'pl' ? 'contained' : 'outlined'} onClick={() => selectLocale('pl')}>
<PLflag style={{ width: 24 }} />
</MenuItem>
<MenuItem key="pl" value="pl">
<img src={PLflag} style={{ width: 16, verticalAlign: 'middle' }} />
&nbsp;PL
</Button>
<Button size="small" variant={locale === 'sv' ? 'contained' : 'outlined'} onClick={() => selectLocale('sv')}>
<SVflag style={{ width: 24 }} />
</MenuItem>
<MenuItem key="sk" value="sk">
<img src={SKflag} style={{ width: 16, verticalAlign: 'middle' }} />
&nbsp;SK
</MenuItem>
<MenuItem key="sv" value="sv">
<img src={SVflag} style={{ width: 16, verticalAlign: 'middle' }} />
&nbsp;SV
</Button>
</MenuItem>
<MenuItem key="tr" value="tr">
<img src={TRflag} style={{ width: 16, verticalAlign: 'middle' }} />
&nbsp;TR
</MenuItem>
</TextField>
<Box display="flex" flexDirection="column" alignItems="center">
<ValidatedTextField
fieldErrors={fieldErrors}
disabled={processing}
sx={{
width: 240
}}
name="username"
label={LL.USERNAME(0)}
value={signInRequest.username}
onChange={updateLoginRequestValue}
margin="normal"
variant="outlined"
/>
<ValidatedPasswordField
fieldErrors={fieldErrors}
disabled={processing}
sx={{
width: 240
}}
name="password"
label={LL.PASSWORD()}
value={signInRequest.password}
onChange={updateLoginRequestValue}
onKeyDown={submitOnEnter}
variant="outlined"
/>
</Box>
<ValidatedTextField
fieldErrors={fieldErrors}
disabled={processing}
name="username"
label={LL.USERNAME(0)}
value={signInRequest.username}
onChange={updateLoginRequestValue}
margin="normal"
variant="outlined"
fullWidth
/>
<ValidatedTextField
fieldErrors={fieldErrors}
disabled={processing}
type="password"
name="password"
label={LL.PASSWORD()}
value={signInRequest.password}
onChange={updateLoginRequestValue}
onKeyDown={submitOnEnter}
margin="normal"
variant="outlined"
fullWidth
/>
<Fab variant="extended" color="primary" sx={{ mt: 2 }} onClick={validateAndSignIn} disabled={processing}>
<Button variant="contained" color="primary" sx={{ mt: 2 }} onClick={validateAndSignIn} disabled={processing}>
<ForwardIcon sx={{ mr: 1 }} />
{LL.SIGN_IN()}
</Fab>
</Button>
</Paper>
</Box>
);

View File

@@ -1,16 +1,7 @@
import { AxiosPromise } from 'axios';
import { alovaInstance } from './endpoints';
import { APSettings, APStatus } from '../types';
import { AXIOS } from './endpoints';
import type { APSettings, APStatus } from 'types';
export function readAPStatus(): AxiosPromise<APStatus> {
return AXIOS.get('/apStatus');
}
export function readAPSettings(): AxiosPromise<APSettings> {
return AXIOS.get('/apSettings');
}
export function updateAPSettings(apSettings: APSettings): AxiosPromise<APSettings> {
return AXIOS.post('/apSettings', apSettings);
}
export const readAPStatus = () => alovaInstance.Get<APStatus>('/rest/apStatus');
export const readAPSettings = () => alovaInstance.Get<APSettings>('/rest/apSettings');
export const updateAPSettings = (data: APSettings) => alovaInstance.Post<APSettings>('/rest/apSettings', data);

View File

@@ -1,29 +1,16 @@
import { AxiosPromise } from 'axios';
import * as H from 'history';
import jwtDecode from 'jwt-decode';
import { Path } from 'react-router-dom';
import { jwtDecode } from 'jwt-decode';
import { ACCESS_TOKEN, alovaInstance } from './endpoints';
import type * as H from 'history';
import type { Path } from 'react-router-dom';
import { Features, Me, SignInRequest, SignInResponse } from '../types';
import { ACCESS_TOKEN, AXIOS } from './endpoints';
import { PROJECT_PATH } from './env';
import type { Me, SignInRequest, SignInResponse } from 'types';
export const SIGN_IN_PATHNAME = 'loginPathname';
export const SIGN_IN_SEARCH = 'loginSearch';
export const getDefaultRoute = (features: Features) => (features.project ? `/${PROJECT_PATH}` : '/wifi');
export const verifyAuthorization = () => alovaInstance.Get('/rest/verifyAuthorization');
export const signIn = (request: SignInRequest) => alovaInstance.Post<SignInResponse>('/rest/signIn', request);
export function verifyAuthorization(): AxiosPromise<void> {
return AXIOS.get('/verifyAuthorization');
}
export function signIn(request: SignInRequest): AxiosPromise<SignInResponse> {
return AXIOS.post('/signIn', request);
}
/**
* Fallback to sessionStorage if localStorage is absent. WebView may not have local storage enabled.
*/
export function getStorage() {
return localStorage || sessionStorage;
}
@@ -40,18 +27,18 @@ export function clearLoginRedirect() {
getStorage().removeItem(SIGN_IN_SEARCH);
}
export function fetchLoginRedirect(features: Features): Partial<Path> {
export function fetchLoginRedirect(): Partial<Path> {
const signInPathname = getStorage().getItem(SIGN_IN_PATHNAME);
const signInSearch = getStorage().getItem(SIGN_IN_SEARCH);
clearLoginRedirect();
return {
pathname: signInPathname || getDefaultRoute(features),
pathname: signInPathname || `/dashboard`,
search: (signInPathname && signInSearch) || undefined
};
}
export const clearAccessToken = () => localStorage.removeItem(ACCESS_TOKEN);
export const decodeMeJWT = (accessToken: string): Me => jwtDecode(accessToken) as Me;
export const decodeMeJWT = (accessToken: string): Me => jwtDecode(accessToken);
export function addAccessTokenParameter(url: string) {
const accessToken = getStorage().getItem(ACCESS_TOKEN);

View File

@@ -1,105 +1,60 @@
import axios, { AxiosPromise, CancelToken, AxiosProgressEvent } from 'axios';
import { xhrRequestAdapter } from '@alova/adapter-xhr';
import { createAlova } from 'alova';
import ReactHook from 'alova/react';
import { unpack } from '../api/unpack';
import { decode } from '@msgpack/msgpack';
export const WS_BASE_URL = '/ws/';
export const API_BASE_URL = '/rest/';
export const ES_BASE_URL = '/es/';
export const EMSESP_API_BASE_URL = '/api/';
export const ACCESS_TOKEN = 'access_token';
export const WEB_SOCKET_ROOT = calculateWebSocketRoot(WS_BASE_URL);
export const EVENT_SOURCE_ROOT = calculateEventSourceRoot(ES_BASE_URL);
export const AXIOS = axios.create({
baseURL: API_BASE_URL,
headers: {
'Content-Type': 'application/json'
},
transformRequest: [
(data, headers) => {
if (headers) {
if (localStorage.getItem(ACCESS_TOKEN)) {
headers.Authorization = 'Bearer ' + localStorage.getItem(ACCESS_TOKEN);
}
if (headers['Content-Type'] !== 'application/json') {
return data;
}
}
return JSON.stringify(data);
const host = window.location.host;
export const WEB_SOCKET_ROOT = 'ws://' + host + '/ws/';
export const EVENT_SOURCE_ROOT = 'http://' + host + '/es/';
export const alovaInstance = createAlova({
statesHook: ReactHook,
timeout: 3000, // 3 seconds but throwing a timeout error
localCache: null,
// localCache: {
// GET: {
// mode: 'placeholder', // see https://alova.js.org/learning/response-cache/#cache-replaceholder-mode
// expire: 2000
// }
// },
requestAdapter: xhrRequestAdapter(),
beforeRequest(method) {
if (localStorage.getItem(ACCESS_TOKEN)) {
method.config.headers.Authorization = 'Bearer ' + localStorage.getItem(ACCESS_TOKEN);
}
]
},
responded: {
onSuccess: async (response) => {
// if (response.status === 202) {
// throw new Error('Wait'); // wifi scan in progress
// } else
if (response.status === 205) {
throw new Error('Reboot required');
} else if (response.status === 400) {
throw new Error('Request Failed');
} else if (response.status >= 400) {
throw new Error(response.statusText);
}
const data = await response.data;
if (response.data instanceof ArrayBuffer) {
return unpack(data);
}
return data;
}
// Interceptor for request failure. This interceptor will be entered when the request is wrong.
// http errors like 401 (unauthorized) are handled either in the methods or AuthenticatedRouting()
// onError: (error, method) => {
// alert(error.message);
// }
}
});
export const AXIOS_API = axios.create({
baseURL: EMSESP_API_BASE_URL,
headers: {
'Content-Type': 'application/json'
},
transformRequest: [
(data, headers) => {
if (headers) {
if (localStorage.getItem(ACCESS_TOKEN)) {
headers.Authorization = 'Bearer ' + localStorage.getItem(ACCESS_TOKEN);
}
if (headers['Content-Type'] !== 'application/json') {
return data;
}
}
return JSON.stringify(data);
}
]
export const alovaInstanceGH = createAlova({
baseURL: 'https://api.github.com/repos/emsesp/EMS-ESP32/releases',
statesHook: ReactHook,
requestAdapter: xhrRequestAdapter()
});
export const AXIOS_BIN = axios.create({
baseURL: API_BASE_URL,
headers: {
'Content-Type': 'application/json'
},
responseType: 'arraybuffer',
transformRequest: [
(data, headers) => {
if (headers) {
if (localStorage.getItem(ACCESS_TOKEN)) {
headers.Authorization = 'Bearer ' + localStorage.getItem(ACCESS_TOKEN);
}
if (headers['Content-Type'] !== 'application/json') {
return data;
}
}
return JSON.stringify(data);
}
],
transformResponse: [
(data) => {
return decode(data);
}
]
});
function calculateWebSocketRoot(webSocketPath: string) {
const location = window.location;
const webProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
return webProtocol + '//' + location.host + webSocketPath;
}
function calculateEventSourceRoot(endpointPath: string) {
const location = window.location;
return location.protocol + '//' + location.host + endpointPath;
}
export interface FileUploadConfig {
cancelToken?: CancelToken;
onUploadProgress?: (progressEvent: AxiosProgressEvent) => void;
}
export const startUploadFile = (url: string, file: File, config?: FileUploadConfig): AxiosPromise<void> => {
const formData = new FormData();
formData.append('file', file);
return AXIOS.post(url, formData, {
headers: {
'Content-Type': 'multipart/form-data'
},
...(config || {})
});
};

View File

@@ -1,2 +1 @@
export const PROJECT_NAME = process.env.REACT_APP_PROJECT_NAME || 'EMS-ESP';
export const PROJECT_PATH = process.env.REACT_APP_PROJECT_PATH || 'project';
export const PROJECT_NAME = 'EMS-ESP';

View File

@@ -1,9 +1,5 @@
import { AxiosPromise } from 'axios';
import { alovaInstance } from './endpoints';
import { Features } from '../types';
import type { Features } from 'types';
import { AXIOS } from './endpoints';
export function readFeatures(): AxiosPromise<Features> {
return AXIOS.get('/features');
}
export const readFeatures = () => alovaInstance.Get<Features>('/rest/features');

View File

@@ -1,16 +1,6 @@
import { AxiosPromise } from 'axios';
import { MqttSettings, MqttStatus } from '../types';
import { alovaInstance } from './endpoints';
import type { MqttSettings, MqttStatus } from 'types';
import { AXIOS } from './endpoints';
export function readMqttStatus(): AxiosPromise<MqttStatus> {
return AXIOS.get('/mqttStatus');
}
export function readMqttSettings(): AxiosPromise<MqttSettings> {
return AXIOS.get('/mqttSettings');
}
export function updateMqttSettings(mqttSettings: MqttSettings): AxiosPromise<MqttSettings> {
return AXIOS.post('/mqttSettings', mqttSettings);
}
export const readMqttStatus = () => alovaInstance.Get<MqttStatus>('/rest/mqttStatus');
export const readMqttSettings = () => alovaInstance.Get<MqttSettings>('/rest/mqttSettings');
export const updateMqttSettings = (data: MqttSettings) => alovaInstance.Post<MqttSettings>('/rest/mqttSettings', data);

View File

@@ -1,25 +1,15 @@
import { AxiosPromise } from 'axios';
import { alovaInstance } from './endpoints';
import { WiFiNetworkList, NetworkSettings, NetworkStatus } from '../types';
import type { WiFiNetworkList, NetworkSettings, NetworkStatus } from 'types';
import { AXIOS } from './endpoints';
export function readNetworkStatus(): AxiosPromise<NetworkStatus> {
return AXIOS.get('/networkStatus');
}
export function scanNetworks(): AxiosPromise<void> {
return AXIOS.get('/scanNetworks');
}
export function listNetworks(): AxiosPromise<WiFiNetworkList> {
return AXIOS.get('/listNetworks');
}
export function readNetworkSettings(): AxiosPromise<NetworkSettings> {
return AXIOS.get('/networkSettings');
}
export function updateNetworkSettings(wifiSettings: NetworkSettings): AxiosPromise<NetworkSettings> {
return AXIOS.post('/networkSettings', wifiSettings);
}
export const readNetworkStatus = () => alovaInstance.Get<NetworkStatus>('/rest/networkStatus');
export const scanNetworks = () => alovaInstance.Get('/rest/scanNetworks');
export const listNetworks = () =>
alovaInstance.Get<WiFiNetworkList>('/rest/listNetworks', {
name: 'listNetworks',
timeout: 20000 // timeout 20 seconds
});
export const readNetworkSettings = () =>
alovaInstance.Get<NetworkSettings>('/rest/networkSettings', { name: 'networkSettings' });
export const updateNetworkSettings = (wifiSettings: NetworkSettings) =>
alovaInstance.Post<NetworkSettings>('/rest/networkSettings', wifiSettings);

View File

@@ -1,20 +1,11 @@
import { AxiosPromise } from 'axios';
import { NTPSettings, NTPStatus, Time } from '../types';
import { alovaInstance } from './endpoints';
import type { NTPSettings, NTPStatus, Time } from 'types';
import { AXIOS } from './endpoints';
export const readNTPStatus = () => alovaInstance.Get<NTPStatus>('/rest/ntpStatus');
export const readNTPSettings = () =>
alovaInstance.Get<NTPSettings>('/rest/ntpSettings', {
name: 'ntpSettings'
});
export const updateNTPSettings = (data: NTPSettings) => alovaInstance.Post<NTPSettings>('/rest/ntpSettings', data);
export function readNTPStatus(): AxiosPromise<NTPStatus> {
return AXIOS.get('/ntpStatus');
}
export function readNTPSettings(): AxiosPromise<NTPSettings> {
return AXIOS.get('/ntpSettings');
}
export function updateNTPSettings(ntpSettings: NTPSettings): AxiosPromise<NTPSettings> {
return AXIOS.post('/ntpSettings', ntpSettings);
}
export function updateTime(time: Time): AxiosPromise<Time> {
return AXIOS.post('/time', time);
}
export const updateTime = (data: Time) => alovaInstance.Post<Time>('/rest/time', data);

View File

@@ -1,17 +1,13 @@
import { AxiosPromise } from 'axios';
import { alovaInstance } from './endpoints';
import { SecuritySettings, Token } from '../types';
import type { SecuritySettings, Token } from 'types';
import { AXIOS } from './endpoints';
export const readSecuritySettings = () => alovaInstance.Get<SecuritySettings>('/rest/securitySettings');
export function readSecuritySettings(): AxiosPromise<SecuritySettings> {
return AXIOS.get('/securitySettings');
}
export const updateSecuritySettings = (securitySettings: SecuritySettings) =>
alovaInstance.Post('/rest/securitySettings', securitySettings);
export function updateSecuritySettings(securitySettings: SecuritySettings): AxiosPromise<SecuritySettings> {
return AXIOS.post('/securitySettings', securitySettings);
}
export function generateToken(username?: string): AxiosPromise<Token> {
return AXIOS.get('/generateToken', { params: { username } });
}
export const generateToken = (username?: string) =>
alovaInstance.Get<Token>('/rest/generateToken', {
params: { username }
});

View File

@@ -1,44 +1,42 @@
import { AxiosPromise } from 'axios';
import { alovaInstance, alovaInstanceGH } from './endpoints';
import type { OTASettings, SystemStatus, LogSettings } from 'types';
import { OTASettings, SystemStatus, LogSettings, LogEntries } from '../types';
// SystemStatus - also used to ping in Restart monitor for pinging
export const readSystemStatus = () => alovaInstance.Get<SystemStatus>('/rest/systemStatus');
import { AXIOS, AXIOS_BIN, FileUploadConfig, startUploadFile } from './endpoints';
// commands
export const restart = () => alovaInstance.Post('/rest/restart');
export const partition = () => alovaInstance.Post('/rest/partition');
export const factoryReset = () => alovaInstance.Post('/rest/factoryReset');
export function readSystemStatus(timeout?: number): AxiosPromise<SystemStatus> {
return AXIOS.get('/systemStatus', { timeout });
}
// OTA
export const readOTASettings = () => alovaInstance.Get<OTASettings>(`/rest/otaSettings`);
export const updateOTASettings = (data: any) => alovaInstance.Post('/rest/otaSettings', data);
export function restart(): AxiosPromise<void> {
return AXIOS.post('/restart');
}
// SystemLog
export const readLogSettings = () => alovaInstance.Get<LogSettings>(`/rest/logSettings`);
export const updateLogSettings = (data: any) => alovaInstance.Post('/rest/logSettings', data);
export const fetchLog = () => alovaInstance.Post('/rest/fetchLog');
export function partition(): AxiosPromise<void> {
return AXIOS.post('/partition');
}
// Get versions from github
export const getStableVersion = () =>
alovaInstanceGH.Get('latest', {
transformData(response: any) {
return response.data.name.substring(1);
}
});
export const getDevVersion = () =>
alovaInstanceGH.Get('tags/latest', {
transformData(response: any) {
return response.data.name.split(/\s+/).splice(-1)[0].substring(1);
}
});
export function factoryReset(): AxiosPromise<void> {
return AXIOS.post('/factoryReset');
}
export function readOTASettings(): AxiosPromise<OTASettings> {
return AXIOS.get('/otaSettings');
}
export function updateOTASettings(otaSettings: OTASettings): AxiosPromise<OTASettings> {
return AXIOS.post('/otaSettings', otaSettings);
}
export const uploadFile = (file: File, config?: FileUploadConfig): AxiosPromise<void> =>
startUploadFile('/uploadFile', file, config);
export function readLogSettings(): AxiosPromise<LogSettings> {
return AXIOS.get('/logSettings');
}
export function updateLogSettings(logSettings: LogSettings): AxiosPromise<LogSettings> {
return AXIOS.post('/logSettings', logSettings);
}
export function readLogEntries(): AxiosPromise<LogEntries> {
return AXIOS_BIN.get('/fetchLog');
}
export const uploadFile = (file: File) => {
const formData = new FormData();
formData.append('file', file);
return alovaInstance.Post('/rest/uploadFile', formData, {
timeout: 60000, // override timeout for uploading firmware - 1 minute
enableUpload: true
});
};

1131
interface/src/api/unpack.ts Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,26 +1,25 @@
import { FC } from 'react';
import { Box, BoxProps } from '@mui/material';
import { Box } from '@mui/material';
import type { BoxProps } from '@mui/material';
import type { FC } from 'react';
const ButtonRow: FC<BoxProps> = ({ children, ...rest }) => {
return (
<Box
sx={{
'& button, & a, & .MuiCard-root': {
mt: 2,
mx: 0.6,
'&:last-child': {
mr: 0
},
'&:first-of-type': {
ml: 0
}
const ButtonRow: FC<BoxProps> = ({ children, ...rest }) => (
<Box
sx={{
'& button, & a, & .MuiCard-root': {
mt: 2,
mx: 0.6,
'&:last-child': {
mr: 0
},
'&:first-of-type': {
ml: 0
}
}}
{...rest}
>
{children}
</Box>
);
};
}
}}
{...rest}
>
{children}
</Box>
);
export default ButtonRow;

View File

@@ -1,11 +1,10 @@
import { FC } from 'react';
import { Box, BoxProps, SvgIconProps, Theme, Typography, useTheme } from '@mui/material';
import CheckCircleOutlineOutlinedIcon from '@mui/icons-material/CheckCircleOutlineOutlined';
import ErrorIcon from '@mui/icons-material/Error';
import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
import ReportProblemOutlinedIcon from '@mui/icons-material/ReportProblemOutlined';
import ErrorIcon from '@mui/icons-material/Error';
import { Box, Typography, useTheme } from '@mui/material';
import type { BoxProps, SvgIconProps, Theme } from '@mui/material';
import type { FC } from 'react';
type MessageBoxLevel = 'warning' | 'success' | 'info' | 'error';

View File

@@ -1,8 +1,7 @@
import { FC } from 'react';
import { Paper, Divider } from '@mui/material';
import type { FC } from 'react';
import { RequiredChildrenProps } from '../utils';
import type { RequiredChildrenProps } from 'utils';
interface SectionContentProps extends RequiredChildrenProps {
title: string;

View File

@@ -6,3 +6,4 @@ export * from './upload';
export { default as SectionContent } from './SectionContent';
export { default as ButtonRow } from './ButtonRow';
export { default as MessageBox } from './MessageBox';
export { default as BlockNavigation } from './routing/BlockNavigation';

View File

@@ -1,5 +1,6 @@
import { FC } from 'react';
import { FormControlLabel, FormControlLabelProps } from '@mui/material';
import { FormControlLabel } from '@mui/material';
import type { FormControlLabelProps } from '@mui/material';
import type { FC } from 'react';
const BlockFormControlLabel: FC<FormControlLabelProps> = (props) => (
<div>

View File

@@ -1,10 +1,11 @@
import { FC, useState } from 'react';
import { IconButton, InputAdornment } from '@mui/material';
import VisibilityIcon from '@mui/icons-material/Visibility';
import VisibilityOffIcon from '@mui/icons-material/VisibilityOff';
import { IconButton, InputAdornment } from '@mui/material';
import { useState } from 'react';
import ValidatedTextField, { ValidatedTextFieldProps } from './ValidatedTextField';
import ValidatedTextField from './ValidatedTextField';
import type { ValidatedTextFieldProps } from './ValidatedTextField';
import type { FC } from 'react';
type ValidatedPasswordFieldProps = Omit<ValidatedTextFieldProps, 'type'>;
@@ -19,11 +20,7 @@ const ValidatedPasswordField: FC<ValidatedPasswordFieldProps> = ({ InputProps, .
...InputProps,
endAdornment: (
<InputAdornment position="end">
<IconButton
aria-label="toggle password visibility"
onClick={() => setShowPassword(!showPassword)}
edge="end"
>
<IconButton onClick={() => setShowPassword(!showPassword)} edge="end">
{showPassword ? <VisibilityIcon /> : <VisibilityOffIcon />}
</IconButton>
</InputAdornment>

View File

@@ -1,7 +1,7 @@
import { FC } from 'react';
import { ValidateFieldsError } from 'async-validator';
import { FormHelperText, TextField, TextFieldProps } from '@mui/material';
import { FormHelperText, TextField } from '@mui/material';
import type { TextFieldProps } from '@mui/material';
import type { ValidateFieldsError } from 'async-validator';
import type { FC } from 'react';
interface ValidatedFieldProps {
fieldErrors?: ValidateFieldsError;

View File

@@ -1,16 +1,15 @@
import { FC, useState, useEffect } from 'react';
import { useLocation } from 'react-router-dom';
import { Box, Toolbar } from '@mui/material';
import { PROJECT_NAME } from '../../api/env';
import { RequiredChildrenProps } from '../../utils';
import LayoutDrawer from './LayoutDrawer';
import { useState, useEffect } from 'react';
import { useLocation } from 'react-router-dom';
import LayoutAppBar from './LayoutAppBar';
import LayoutDrawer from './LayoutDrawer';
import { LayoutContext } from './context';
import type { FC } from 'react';
export const DRAWER_WIDTH = 240;
import type { RequiredChildrenProps } from 'utils';
import { PROJECT_NAME } from 'api/env';
export const DRAWER_WIDTH = 210;
const Layout: FC<RequiredChildrenProps> = ({ children }) => {
const [mobileOpen, setMobileOpen] = useState(false);

View File

@@ -1,50 +1,36 @@
import { FC, useContext } from 'react';
import { AppBar, Box, IconButton, Toolbar, Typography } from '@mui/material';
import MenuIcon from '@mui/icons-material/Menu';
import { AppBar, Box, IconButton, Toolbar, Typography } from '@mui/material';
import LayoutAuthMenu from './LayoutAuthMenu';
import type { FC } from 'react';
import { FeaturesContext } from '../../contexts/features';
export const DRAWER_WIDTH = 240;
export const DRAWER_WIDTH = 210;
interface LayoutAppBarProps {
title: string;
onToggleDrawer: () => void;
}
const LayoutAppBar: FC<LayoutAppBarProps> = ({ title, onToggleDrawer }) => {
const { features } = useContext(FeaturesContext);
return (
<AppBar
position="fixed"
sx={{
width: { md: `calc(100% - ${DRAWER_WIDTH}px)` },
ml: { md: `${DRAWER_WIDTH}px` },
boxShadow: 'none',
backgroundColor: '#2e586a'
}}
>
<Toolbar>
<IconButton
color="inherit"
aria-label="open drawer"
edge="start"
onClick={onToggleDrawer}
sx={{ mr: 2, display: { md: 'none' } }}
>
<MenuIcon />
</IconButton>
<Typography variant="h6" noWrap component="div">
{title}
</Typography>
<Box flexGrow={1} />
{features.security && <LayoutAuthMenu />}
</Toolbar>
</AppBar>
);
};
const LayoutAppBar: FC<LayoutAppBarProps> = ({ title, onToggleDrawer }) => (
<AppBar
position="fixed"
sx={{
width: { md: `calc(100% - ${DRAWER_WIDTH}px)` },
ml: { md: `${DRAWER_WIDTH}px` },
boxShadow: 'none',
backgroundColor: '#2e586a'
}}
>
<Toolbar>
<IconButton color="inherit" edge="start" onClick={onToggleDrawer} sx={{ mr: 2, display: { md: 'none' } }}>
<MenuIcon />
</IconButton>
<Typography variant="h6" noWrap component="div">
{title}
</Typography>
<Box flexGrow={1} />
<LayoutAuthMenu />
</Toolbar>
</AppBar>
);
export default LayoutAppBar;

View File

@@ -1,5 +1,5 @@
import { FC, useState, useContext, ChangeEventHandler } from 'react';
import AccountCircleIcon from '@mui/icons-material/AccountCircle';
import PersonIcon from '@mui/icons-material/Person';
import {
Box,
Button,
@@ -9,27 +9,27 @@ import {
Typography,
Avatar,
styled,
TypographyProps,
MenuItem,
TextField
} from '@mui/material';
import { useState, useContext } from 'react';
import type { TypographyProps } from '@mui/material';
import type { Locales } from 'i18n/i18n-types';
import type { FC, ChangeEventHandler } from 'react';
import { AuthenticatedContext } from 'contexts/authentication';
import DEflag from 'i18n/DE.svg';
import FRflag from 'i18n/FR.svg';
import GBflag from 'i18n/GB.svg';
import ITflag from 'i18n/IT.svg';
import NLflag from 'i18n/NL.svg';
import NOflag from 'i18n/NO.svg';
import PLflag from 'i18n/PL.svg';
import SKflag from 'i18n/SK.svg';
import SVflag from 'i18n/SV.svg';
import TRflag from 'i18n/TR.svg';
import PersonIcon from '@mui/icons-material/Person';
import AccountCircleIcon from '@mui/icons-material/AccountCircle';
import { AuthenticatedContext } from '../../contexts/authentication';
import { I18nContext } from '../../i18n/i18n-react';
import type { Locales } from '../../i18n/i18n-types';
import { loadLocaleAsync } from '../../i18n/i18n-util.async';
import { ReactComponent as NLflag } from '../../i18n/NL.svg';
import { ReactComponent as DEflag } from '../../i18n/DE.svg';
import { ReactComponent as GBflag } from '../../i18n/GB.svg';
import { ReactComponent as SVflag } from '../../i18n/SV.svg';
import { ReactComponent as PLflag } from '../../i18n/PL.svg';
import { ReactComponent as NOflag } from '../../i18n/NO.svg';
import { ReactComponent as FRflag } from '../../i18n/FR.svg';
import { I18nContext } from 'i18n/i18n-react';
import { loadLocaleAsync } from 'i18n/i18n-util.async';
const ItemTypography = styled(Typography)<TypographyProps>({
maxWidth: '250px',
@@ -74,35 +74,46 @@ const LayoutAuthMenu: FC = () => {
size="small"
select
>
<MenuItem key="en" value="en">
<GBflag style={{ width: 16, verticalAlign: 'middle' }} />
&nbsp;EN
</MenuItem>
<Divider />
<MenuItem key="de" value="de">
<DEflag style={{ width: 16, verticalAlign: 'middle' }} />
<img src={DEflag} style={{ width: 16, verticalAlign: 'middle' }} />
&nbsp;DE
</MenuItem>
<MenuItem key="en" value="en">
<img src={GBflag} style={{ width: 16, verticalAlign: 'middle' }} />
&nbsp;EN
</MenuItem>
<MenuItem key="fr" value="fr">
<FRflag style={{ width: 16, verticalAlign: 'middle' }} />
<img src={FRflag} style={{ width: 16, verticalAlign: 'middle' }} />
&nbsp;FR
</MenuItem>
<MenuItem key="it" value="it">
<img src={ITflag} style={{ width: 16, verticalAlign: 'middle' }} />
&nbsp;IT
</MenuItem>
<MenuItem key="nl" value="nl">
<NLflag style={{ width: 16, verticalAlign: 'middle' }} />
<img src={NLflag} style={{ width: 16, verticalAlign: 'middle' }} />
&nbsp;NL
</MenuItem>
<MenuItem key="no" value="no">
<NOflag style={{ width: 16, verticalAlign: 'middle' }} />
<img src={NOflag} style={{ width: 16, verticalAlign: 'middle' }} />
&nbsp;NO
</MenuItem>
<MenuItem key="pl" value="pl">
<PLflag style={{ width: 16, verticalAlign: 'middle' }} />
<img src={PLflag} style={{ width: 16, verticalAlign: 'middle' }} />
&nbsp;PL
</MenuItem>
<MenuItem key="sk" value="sk">
<img src={SKflag} style={{ width: 16, verticalAlign: 'middle' }} />
&nbsp;SK
</MenuItem>
<MenuItem key="sv" value="sv">
<SVflag style={{ width: 16, verticalAlign: 'middle' }} />
<img src={SVflag} style={{ width: 16, verticalAlign: 'middle' }} />
&nbsp;SV
</MenuItem>
<MenuItem key="tr" value="tr">
<img src={TRflag} style={{ width: 16, verticalAlign: 'middle' }} />
&nbsp;TR
</MenuItem>
</TextField>
<IconButton

View File

@@ -1,11 +1,9 @@
import { FC } from 'react';
import { Box, Divider, Drawer, Toolbar, Typography, styled } from '@mui/material';
import { PROJECT_NAME } from '../../api/env';
import LayoutMenu from './LayoutMenu';
import { DRAWER_WIDTH } from './Layout';
import LayoutMenu from './LayoutMenu';
import type { FC } from 'react';
import { PROJECT_NAME } from 'api/env';
const LayoutDrawerLogo = styled('img')(({ theme }) => ({
[theme.breakpoints.down('sm')]: {
@@ -13,7 +11,7 @@ const LayoutDrawerLogo = styled('img')(({ theme }) => ({
marginRight: theme.spacing(2)
},
[theme.breakpoints.up('sm')]: {
height: 36,
height: 38,
marginRight: theme.spacing(2)
}
}));
@@ -29,9 +27,7 @@ const LayoutDrawer: FC<LayoutDrawerProps> = ({ mobileOpen, onClose }) => {
<Toolbar disableGutters>
<Box display="flex" alignItems="center" px={2}>
<LayoutDrawerLogo src="/app/icon.png" alt={PROJECT_NAME} />
<Typography variant="h6" color="textPrimary">
{PROJECT_NAME}
</Typography>
<Typography variant="h6">{PROJECT_NAME}</Typography>
</Box>
<Divider absolute />
</Toolbar>

View File

@@ -1,40 +1,45 @@
import { FC, useContext } from 'react';
import { Divider, List } from '@mui/material';
import SettingsInputAntennaIcon from '@mui/icons-material/SettingsInputAntenna';
import AccessTimeIcon from '@mui/icons-material/AccessTime';
import DashboardIcon from '@mui/icons-material/Dashboard';
import DeviceHubIcon from '@mui/icons-material/DeviceHub';
import SettingsIcon from '@mui/icons-material/Settings';
import InfoIcon from '@mui/icons-material/Info';
import LockIcon from '@mui/icons-material/Lock';
import SettingsIcon from '@mui/icons-material/Settings';
import SettingsEthernetIcon from '@mui/icons-material/SettingsEthernet';
import SettingsInputAntennaIcon from '@mui/icons-material/SettingsInputAntenna';
import TuneIcon from '@mui/icons-material/Tune';
import { Divider, List } from '@mui/material';
import { useContext } from 'react';
import type { FC } from 'react';
import { FeaturesContext } from '../../contexts/features';
import ProjectMenu from '../../project/ProjectMenu';
import LayoutMenuItem from 'components/layout/LayoutMenuItem';
import LayoutMenuItem from './LayoutMenuItem';
import { AuthenticatedContext } from '../../contexts/authentication';
import { AuthenticatedContext } from 'contexts/authentication';
import { useI18nContext } from '../../i18n/i18n-react';
import { useI18nContext } from 'i18n/i18n-react';
const LayoutMenu: FC = () => {
const { features } = useContext(FeaturesContext);
const authenticatedContext = useContext(AuthenticatedContext);
const { LL } = useI18nContext();
return (
<>
{features.project && (
<List disablePadding component="nav">
<ProjectMenu />
<Divider />
</List>
)}
<List disablePadding component="nav">
<LayoutMenuItem icon={DashboardIcon} label={LL.DASHBOARD()} to={`/dashboard`} />
<LayoutMenuItem
icon={TuneIcon}
label={LL.SETTINGS_OF('')}
to={`/settings`}
disabled={!authenticatedContext.me.admin}
/>
<LayoutMenuItem icon={InfoIcon} label={LL.HELP_OF('')} to={`/help`} />
<Divider />
</List>
<List disablePadding component="nav">
<LayoutMenuItem icon={SettingsEthernetIcon} label={LL.NETWORK(0)} to="/network" />
<LayoutMenuItem icon={SettingsInputAntennaIcon} label={LL.ACCESS_POINT(0)} to="/ap" />
{features.ntp && <LayoutMenuItem icon={AccessTimeIcon} label="NTP" to="/ntp" />}
{features.mqtt && <LayoutMenuItem icon={DeviceHubIcon} label="MQTT" to="/mqtt" />}
<LayoutMenuItem icon={AccessTimeIcon} label="NTP" to="/ntp" />
<LayoutMenuItem icon={DeviceHubIcon} label="MQTT" to="/mqtt" />
<LayoutMenuItem
icon={LockIcon}
label={LL.SECURITY(0)}

View File

@@ -1,11 +1,9 @@
import { FC } from 'react';
import { ListItem, ListItemButton, ListItemIcon, ListItemText } from '@mui/material';
import { Link, useLocation } from 'react-router-dom';
import type { SvgIconProps } from '@mui/material';
import type { FC } from 'react';
import { ListItem, ListItemButton, ListItemIcon, ListItemText, SvgIconProps } from '@mui/material';
import { grey } from '@mui/material/colors';
import { routeMatches } from '../../utils';
import { routeMatches } from 'utils';
interface LayoutMenuItemProps {
icon: React.ComponentType<SvgIconProps>;
@@ -17,13 +15,15 @@ interface LayoutMenuItemProps {
const LayoutMenuItem: FC<LayoutMenuItemProps> = ({ icon: Icon, label, to, disabled }) => {
const { pathname } = useLocation();
const selected = routeMatches(to, pathname);
return (
<ListItem disablePadding selected={routeMatches(to, pathname)}>
<ListItemButton component={Link} to={to} disabled={disabled}>
<ListItemIcon sx={{ color: grey[500] }}>
<ListItem disablePadding>
<ListItemButton component={Link} to={to} disabled={disabled} selected={selected}>
<ListItemIcon sx={{ color: selected ? '#90caf9' : '#9e9e9e' }}>
<Icon />
</ListItemIcon>
<ListItemText>{label}</ListItemText>
<ListItemText sx={{ color: selected ? '#90caf9' : '#f5f5f5' }}>{label}</ListItemText>
</ListItemButton>
</ListItem>
);

View File

@@ -1,7 +1,6 @@
import { FC } from 'react';
import { Box, Paper, Typography } from '@mui/material';
import WarningIcon from '@mui/icons-material/Warning';
import { Box, Paper, Typography } from '@mui/material';
import type { FC } from 'react';
interface ApplicationErrorProps {
message?: string;

View File

@@ -1,11 +1,10 @@
import { FC } from 'react';
import { Box, Button, CircularProgress, Typography } from '@mui/material';
import RefreshIcon from '@mui/icons-material/Refresh';
import { Box, Button, CircularProgress, Typography } from '@mui/material';
import type { FC } from 'react';
import { MessageBox } from '..';
import { MessageBox } from 'components';
import { useI18nContext } from '../../i18n/i18n-react';
import { useI18nContext } from 'i18n/i18n-react';
interface FormLoaderProps {
message?: string;

View File

@@ -1,8 +1,8 @@
import { FC } from 'react';
import { CircularProgress, Box, Typography } from '@mui/material';
import type { Theme } from '@mui/material';
import type { FC } from 'react';
import { CircularProgress, Box, Typography, Theme } from '@mui/material';
import { useI18nContext } from '../../i18n/i18n-react';
import { useI18nContext } from 'i18n/i18n-react';
interface LoadingSpinnerProps {
height?: number | string;

View File

@@ -0,0 +1,32 @@
import { Button, Dialog, DialogActions, DialogContent, DialogTitle } from '@mui/material';
import type { FC } from 'react';
import type { unstable_Blocker as Blocker } from 'react-router-dom';
import { dialogStyle } from 'CustomTheme';
import { useI18nContext } from 'i18n/i18n-react';
interface BlockNavigationProps {
blocker: Blocker;
}
const BlockNavigation: FC<BlockNavigationProps> = ({ blocker }) => {
const { LL } = useI18nContext();
return (
<Dialog sx={dialogStyle} open={blocker.state === 'blocked'}>
<DialogTitle>{LL.BLOCK_NAVIGATE_1()}</DialogTitle>
<DialogContent dividers>{LL.BLOCK_NAVIGATE_2()}</DialogContent>
<DialogActions>
<Button variant="outlined" onClick={() => blocker.reset?.()} color="secondary">
{LL.STAY()}
</Button>
<Button variant="contained" onClick={() => blocker.proceed?.()} color="primary">
{LL.LEAVE()}
</Button>
</DialogActions>
</Dialog>
);
};
export default BlockNavigation;

View File

@@ -1,8 +1,9 @@
import { FC, useContext } from 'react';
import { useContext } from 'react';
import { Navigate } from 'react-router-dom';
import type { FC } from 'react';
import { AuthenticatedContext } from '../../contexts/authentication';
import { RequiredChildrenProps } from '../../utils';
import type { RequiredChildrenProps } from 'utils';
import { AuthenticatedContext } from 'contexts/authentication';
const RequireAdmin: FC<RequiredChildrenProps> = ({ children }) => {
const authenticatedContext = useContext(AuthenticatedContext);

View File

@@ -1,14 +1,12 @@
import { FC, useContext, useEffect } from 'react';
import { useContext, useEffect } from 'react';
import { Navigate, useLocation } from 'react-router-dom';
import {
AuthenticatedContext,
AuthenticatedContextValue,
AuthenticationContext
} from '../../contexts/authentication/context';
import { storeLoginRedirect } from '../../api/authentication';
import type { AuthenticatedContextValue } from 'contexts/authentication/context';
import type { FC } from 'react';
import { RequiredChildrenProps } from '../../utils';
import type { RequiredChildrenProps } from 'utils';
import { storeLoginRedirect } from 'api/authentication';
import { AuthenticatedContext, AuthenticationContext } from 'contexts/authentication/context';
const RequireAuthenticated: FC<RequiredChildrenProps> = ({ children }) => {
const authenticationContext = useContext(AuthenticationContext);

View File

@@ -1,16 +1,15 @@
import { FC, useContext } from 'react';
import { useContext } from 'react';
import { Navigate } from 'react-router-dom';
import type { FC } from 'react';
import * as AuthenticationApi from '../../api/authentication';
import { AuthenticationContext } from '../../contexts/authentication';
import { RequiredChildrenProps } from '../../utils';
import { FeaturesContext } from '../../contexts/features';
import type { RequiredChildrenProps } from 'utils';
import * as AuthenticationApi from 'api/authentication';
import { AuthenticationContext } from 'contexts/authentication';
const RequireUnauthenticated: FC<RequiredChildrenProps> = ({ children }) => {
const { features } = useContext(FeaturesContext);
const authenticationContext = useContext(AuthenticationContext);
return authenticationContext.me ? <Navigate to={AuthenticationApi.fetchLoginRedirect(features)} /> : <>{children}</>;
return authenticationContext.me ? <Navigate to={AuthenticationApi.fetchLoginRedirect()} /> : <>{children}</>;
};
export default RequireUnauthenticated;

View File

@@ -1,9 +1,8 @@
import React, { FC } from 'react';
import { useNavigate } from 'react-router-dom';
import { Tabs, useMediaQuery, useTheme } from '@mui/material';
import { useNavigate } from 'react-router-dom';
import type { FC } from 'react';
import { RequiredChildrenProps } from '../../utils';
import type { RequiredChildrenProps } from 'utils';
interface RouterTabsProps extends RequiredChildrenProps {
value: string | false;
@@ -15,7 +14,7 @@ const RouterTabs: FC<RouterTabsProps> = ({ value, children }) => {
const theme = useTheme();
const smallDown = useMediaQuery(theme.breakpoints.down('sm'));
const handleTabChange = (event: React.ChangeEvent<{}>, path: string) => {
const handleTabChange = (_event: any, path: string) => {
navigate(path);
};

View File

@@ -1,9 +1,12 @@
import { useMatch, useResolvedPath } from 'react-router-dom';
import { useLocation } from 'react-router-dom';
export const useRouterTab = () => {
const routerTabPath = useResolvedPath(':tab');
const routerTabPathMatch = useMatch(routerTabPath.pathname);
const loc = useLocation().pathname;
const routerTab = loc.substring(0, loc.lastIndexOf('/')) ? loc : false;
// const routerTabPath = useResolvedPath(':tab');
// const routerTabPathMatch = useMatch(routerTabPath.pathname);
// const routerTab = routerTabPathMatch?.params?.tab || false;
const routerTab = routerTabPathMatch?.params?.tab || false;
return { routerTab } as const;
};

View File

@@ -1,14 +1,14 @@
import { FC, Fragment } from 'react';
import { useDropzone, DropzoneState } from 'react-dropzone';
import { AxiosProgressEvent } from 'axios';
import { Box, Button, LinearProgress, Theme, Typography, useTheme } from '@mui/material';
import CloudUploadIcon from '@mui/icons-material/CloudUpload';
import CancelIcon from '@mui/icons-material/Cancel';
import CloudUploadIcon from '@mui/icons-material/CloudUpload';
import { Box, Button, LinearProgress, Typography, useTheme } from '@mui/material';
import { Fragment } from 'react';
import { useDropzone } from 'react-dropzone';
import type { Theme } from '@mui/material';
import type { Progress } from 'alova';
import type { FC } from 'react';
import type { DropzoneState } from 'react-dropzone';
import { useI18nContext } from '../../i18n/i18n-react';
import { useI18nContext } from 'i18n/i18n-react';
const getBorderColor = (theme: Theme, props: DropzoneState) => {
if (props.isDragAccept) {
@@ -26,11 +26,13 @@ const getBorderColor = (theme: Theme, props: DropzoneState) => {
export interface SingleUploadProps {
onDrop: (acceptedFiles: File[]) => void;
onCancel: () => void;
uploading: boolean;
progress?: AxiosProgressEvent;
isUploading: boolean;
progress: Progress;
}
const SingleUpload: FC<SingleUploadProps> = ({ onDrop, onCancel, uploading, progress }) => {
const SingleUpload: FC<SingleUploadProps> = ({ onDrop, onCancel, isUploading, progress }) => {
const uploading = isUploading && progress.total > 0;
const dropzoneState = useDropzone({
onDrop,
accept: {
@@ -38,20 +40,19 @@ const SingleUpload: FC<SingleUploadProps> = ({ onDrop, onCancel, uploading, prog
'application/json': ['.json'],
'text/plain': ['.md5']
},
disabled: uploading,
disabled: isUploading,
multiple: false
});
const { getRootProps, getInputProps } = dropzoneState;
const theme = useTheme();
const { LL } = useI18nContext();
const progressText = () => {
if (uploading) {
if (progress?.total) {
if (progress.total) {
return LL.UPLOADING() + ': ' + Math.round((progress.loaded * 100) / progress.total) + '%';
}
return LL.UPLOADING() + `\u2026`;
}
return LL.UPLOAD_DROP_TEXT();
};
@@ -81,8 +82,8 @@ const SingleUpload: FC<SingleUploadProps> = ({ onDrop, onCancel, uploading, prog
<Fragment>
<Box width="100%" p={2}>
<LinearProgress
variant={!progress || progress.total ? 'determinate' : 'indeterminate'}
value={!progress ? 0 : progress.total ? Math.round((progress.loaded * 100) / progress.total) : 0}
variant="determinate"
value={progress.total === 0 ? 0 : Math.round((progress.loaded * 100) / progress.total)}
/>
</Box>
<Button startIcon={<CancelIcon />} variant="outlined" color="secondary" onClick={onCancel}>

View File

@@ -1,2 +1 @@
export { default as SingleUpload } from './SingleUpload';
export { default as useFileUpload } from './useFileUpload';

View File

@@ -1,70 +0,0 @@
import { useCallback, useEffect, useState } from 'react';
import axios, { AxiosPromise, CancelTokenSource, AxiosProgressEvent } from 'axios';
import { useSnackbar } from 'notistack';
import { extractErrorMessage } from '../../utils';
import { FileUploadConfig } from '../../api/endpoints';
import { useI18nContext } from '../../i18n/i18n-react';
interface MediaUploadOptions {
upload: (file: File, config?: FileUploadConfig) => AxiosPromise<void>;
}
const useFileUpload = ({ upload }: MediaUploadOptions) => {
const { LL } = useI18nContext();
const { enqueueSnackbar } = useSnackbar();
const [uploading, setUploading] = useState<boolean>(false);
const [md5, setMd5] = useState<string>('');
const [uploadProgress, setUploadProgress] = useState<AxiosProgressEvent>();
const [uploadCancelToken, setUploadCancelToken] = useState<CancelTokenSource>();
const resetUploadingStates = () => {
setUploading(false);
setUploadProgress(undefined);
setUploadCancelToken(undefined);
setMd5('');
};
const cancelUpload = useCallback(() => {
uploadCancelToken?.cancel();
resetUploadingStates();
}, [uploadCancelToken]);
useEffect(() => {
return () => {
uploadCancelToken?.cancel();
};
}, [uploadCancelToken]);
const uploadFile = async (images: File[]) => {
try {
const cancelToken = axios.CancelToken.source();
setUploadCancelToken(cancelToken);
setUploading(true);
const response = await upload(images[0], {
onUploadProgress: setUploadProgress,
cancelToken: cancelToken.token
});
resetUploadingStates();
if (response.status === 200) {
enqueueSnackbar(LL.UPLOAD() + ' ' + LL.SUCCESSFUL(), { variant: 'success' });
} else if (response.status === 201) {
setMd5(String(response.data));
enqueueSnackbar(LL.UPLOAD() + ' MD5 ' + LL.SUCCESSFUL(), { variant: 'success' });
}
} catch (error) {
if (axios.isCancel(error)) {
enqueueSnackbar(LL.UPLOAD() + ' ' + LL.ABORTED(), { variant: 'warning' });
} else {
resetUploadingStates();
enqueueSnackbar(extractErrorMessage(error, LL.UPLOAD() + ' ' + LL.FAILED()), { variant: 'error' });
}
}
};
return [uploadFile, cancelUpload, uploading, uploadProgress, md5] as const;
};
export default useFileUpload;

View File

@@ -1,71 +1,69 @@
import { FC, useCallback, useContext, useEffect, useState } from 'react';
import { useSnackbar } from 'notistack';
import { useNavigate } from 'react-router-dom';
import { useI18nContext } from '../../i18n/i18n-react';
import * as AuthenticationApi from '../../api/authentication';
import { ACCESS_TOKEN } from '../../api/endpoints';
import { RequiredChildrenProps } from '../../utils';
import { LoadingSpinner } from '../../components';
import { Me } from '../../types';
import { FeaturesContext } from '../features';
import { useRequest } from 'alova';
import { useCallback, useEffect, useState } from 'react';
import { redirect } from 'react-router-dom';
import { toast } from 'react-toastify';
import { AuthenticationContext } from './context';
import type { FC } from 'react';
import type { Me } from 'types';
import type { RequiredChildrenProps } from 'utils';
import * as AuthenticationApi from 'api/authentication';
import { ACCESS_TOKEN } from 'api/endpoints';
import { LoadingSpinner } from 'components';
import { useI18nContext } from 'i18n/i18n-react';
const Authentication: FC<RequiredChildrenProps> = ({ children }) => {
const { features } = useContext(FeaturesContext);
const { LL } = useI18nContext();
const navigate = useNavigate();
const { enqueueSnackbar } = useSnackbar();
const [initialized, setInitialized] = useState<boolean>(false);
const [me, setMe] = useState<Me>();
const { send: verifyAuthorization } = useRequest(AuthenticationApi.verifyAuthorization(), {
immediate: false
});
const signIn = (accessToken: string) => {
try {
AuthenticationApi.getStorage().setItem(ACCESS_TOKEN, accessToken);
const decodedMe = AuthenticationApi.decodeMeJWT(accessToken);
setMe(decodedMe);
enqueueSnackbar(LL.LOGGED_IN({ name: decodedMe.username }), { variant: 'success' });
toast.success(LL.LOGGED_IN({ name: decodedMe.username }));
} catch (error) {
setMe(undefined);
throw new Error('Failed to parse JWT');
}
};
const signOut = (redirect: boolean) => {
const signOut = (doRedirect: boolean) => {
AuthenticationApi.clearAccessToken();
setMe(undefined);
if (redirect) {
navigate('/');
if (doRedirect) {
// navigate('/');
redirect('/');
}
};
const refresh = useCallback(async () => {
if (!features.security) {
setMe({ admin: true, username: 'admin' });
setInitialized(true);
return;
}
const accessToken = AuthenticationApi.getStorage().getItem(ACCESS_TOKEN);
if (accessToken) {
try {
await AuthenticationApi.verifyAuthorization();
setMe(AuthenticationApi.decodeMeJWT(accessToken));
setInitialized(true);
} catch (error) {
setMe(undefined);
setInitialized(true);
}
await verifyAuthorization()
.then(() => {
setMe(AuthenticationApi.decodeMeJWT(accessToken));
setInitialized(true);
})
.catch(() => {
setMe(undefined);
setInitialized(true);
});
} else {
setMe(undefined);
setInitialized(true);
}
}, [features]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
useEffect(() => {
refresh();
void refresh();
}, [refresh]);
if (initialized) {

View File

@@ -1,5 +1,5 @@
import { createContext } from 'react';
import { Me } from '../../types';
import type { Me } from 'types';
export interface AuthenticationContextValue {
refresh: () => Promise<void>;

View File

@@ -1,29 +1,13 @@
import { FC, useCallback, useEffect, useState } from 'react';
import * as FeaturesApi from '../../api/features';
import { extractErrorMessage, RequiredChildrenProps } from '../../utils';
import { Features } from '../../types';
import { ApplicationError, LoadingSpinner } from '../../components';
import { useRequest } from 'alova';
import { FeaturesContext } from '.';
import type { FC } from 'react';
import type { RequiredChildrenProps } from 'utils';
import * as FeaturesApi from 'api/features';
const FeaturesLoader: FC<RequiredChildrenProps> = (props) => {
const [errorMessage, setErrorMessage] = useState<string>();
const [features, setFeatures] = useState<Features>();
const loadFeatures = useCallback(async () => {
try {
const response = await FeaturesApi.readFeatures();
setFeatures(response.data);
} catch (error) {
setErrorMessage(extractErrorMessage(error, 'Failed to fetch application details.'));
}
}, []);
useEffect(() => {
loadFeatures();
}, [loadFeatures]);
const { data: features } = useRequest(FeaturesApi.readFeatures);
if (features) {
return (
@@ -36,12 +20,6 @@ const FeaturesLoader: FC<RequiredChildrenProps> = (props) => {
</FeaturesContext.Provider>
);
}
if (errorMessage) {
return <ApplicationError message={errorMessage} />;
}
return <LoadingSpinner height="100vh" />;
};
export default FeaturesLoader;

View File

@@ -1,6 +1,6 @@
import { createContext } from 'react';
import { Features } from '../../types';
import type { Features } from 'types';
export interface FeaturesContextValue {
features: Features;

View File

@@ -1,32 +1,45 @@
import { FC, useState } from 'react';
import { ValidateFieldsError } from 'async-validator';
import { range } from 'lodash';
import CancelIcon from '@mui/icons-material/Cancel';
import WarningIcon from '@mui/icons-material/Warning';
import { Button, Checkbox, MenuItem } from '@mui/material';
import SaveIcon from '@mui/icons-material/Save';
import { range } from 'lodash-es';
import { useState } from 'react';
import type { ValidateFieldsError } from 'async-validator';
import type { FC } from 'react';
import { createAPSettingsValidator, validate } from '../../validators';
import type { APSettings } from 'types';
import * as APApi from 'api/ap';
import {
BlockFormControlLabel,
ButtonRow,
FormLoader,
SectionContent,
ValidatedPasswordField,
ValidatedTextField
} from '../../components';
ValidatedTextField,
BlockNavigation
} from 'components';
import { APProvisionMode, APSettings } from '../../types';
import { numberValue, updateValue, useRest } from '../../utils';
import * as APApi from '../../api/ap';
import { useI18nContext } from 'i18n/i18n-react';
import { APProvisionMode } from 'types';
import { numberValue, updateValueDirty, useRest } from 'utils';
import { useI18nContext } from '../../i18n/i18n-react';
import { createAPSettingsValidator, validate } from 'validators';
export const isAPEnabled = ({ provision_mode }: APSettings) => {
return provision_mode === APProvisionMode.AP_MODE_ALWAYS || provision_mode === APProvisionMode.AP_MODE_DISCONNECTED;
};
export const isAPEnabled = ({ provision_mode }: APSettings) =>
provision_mode === APProvisionMode.AP_MODE_ALWAYS || provision_mode === APProvisionMode.AP_MODE_DISCONNECTED;
const APSettingsForm: FC = () => {
const { loadData, saving, data, setData, saveData, errorMessage } = useRest<APSettings>({
const {
loadData,
saving,
data,
updateDataValue,
origData,
dirtyFlags,
setDirtyFlags,
blocker,
saveData,
errorMessage
} = useRest<APSettings>({
read: APApi.readAPSettings,
update: APApi.updateAPSettings
});
@@ -35,7 +48,7 @@ const APSettingsForm: FC = () => {
const [fieldErrors, setFieldErrors] = useState<ValidateFieldsError>();
const updateFormValue = updateValue(setData);
const updateFormValue = updateValueDirty(origData, dirtyFlags, setDirtyFlags, updateDataValue);
const content = () => {
if (!data) {
@@ -46,7 +59,7 @@ const APSettingsForm: FC = () => {
try {
setFieldErrors(undefined);
await validate(createAPSettingsValidator(data), data);
saveData();
await saveData();
} catch (errors: any) {
setFieldErrors(errors);
}
@@ -163,24 +176,37 @@ const APSettingsForm: FC = () => {
/>
</>
)}
<ButtonRow>
<Button
startIcon={<SaveIcon />}
disabled={saving}
variant="outlined"
color="primary"
type="submit"
onClick={validateAndSubmit}
>
{LL.SAVE()}
</Button>
</ButtonRow>
{dirtyFlags && dirtyFlags.length !== 0 && (
<ButtonRow>
<Button
startIcon={<CancelIcon />}
disabled={saving}
variant="outlined"
color="primary"
type="submit"
onClick={loadData}
>
{LL.CANCEL()}
</Button>
<Button
startIcon={<WarningIcon color="warning" />}
disabled={saving}
variant="contained"
color="info"
type="submit"
onClick={validateAndSubmit}
>
{LL.APPLY_CHANGES(dirtyFlags.length)}
</Button>
</ButtonRow>
)}
</>
);
};
return (
<SectionContent title={LL.SETTINGS_OF(LL.ACCESS_POINT(1))} titleGutter>
{blocker ? <BlockNavigation blocker={blocker} /> : null}
{content()}
</SectionContent>
);

View File

@@ -1,17 +1,18 @@
import { FC } from 'react';
import { Avatar, Button, Divider, List, ListItem, ListItemAvatar, ListItemText, Theme, useTheme } from '@mui/material';
import SettingsInputAntennaIcon from '@mui/icons-material/SettingsInputAntenna';
import DeviceHubIcon from '@mui/icons-material/DeviceHub';
import ComputerIcon from '@mui/icons-material/Computer';
import DeviceHubIcon from '@mui/icons-material/DeviceHub';
import RefreshIcon from '@mui/icons-material/Refresh';
import SettingsInputAntennaIcon from '@mui/icons-material/SettingsInputAntenna';
import { Avatar, Button, Divider, List, ListItem, ListItemAvatar, ListItemText, useTheme } from '@mui/material';
import { useRequest } from 'alova';
import type { Theme } from '@mui/material';
import type { FC } from 'react';
import * as APApi from '../../api/ap';
import { APNetworkStatus, APStatus } from '../../types';
import { ButtonRow, FormLoader, SectionContent } from '../../components';
import { useRest } from '../../utils';
import type { APStatus } from 'types';
import * as APApi from 'api/ap';
import { ButtonRow, FormLoader, SectionContent } from 'components';
import { useI18nContext } from '../../i18n/i18n-react';
import { useI18nContext } from 'i18n/i18n-react';
import { APNetworkStatus } from 'types';
export const apStatusHighlight = ({ status }: APStatus, theme: Theme) => {
switch (status) {
@@ -27,7 +28,7 @@ export const apStatusHighlight = ({ status }: APStatus, theme: Theme) => {
};
const APStatusForm: FC = () => {
const { loadData, data, errorMessage } = useRest<APStatus>({ read: APApi.readAPStatus });
const { data: data, send: loadData, error } = useRequest(APApi.readAPStatus);
const { LL } = useI18nContext();
@@ -48,7 +49,7 @@ const APStatusForm: FC = () => {
const content = () => {
if (!data) {
return <FormLoader onRetry={loadData} errorMessage={errorMessage} />;
return <FormLoader onRetry={loadData} errorMessage={error?.message} />;
}
return (

View File

@@ -1,14 +1,14 @@
import { FC, useContext } from 'react';
import { Tab } from '@mui/material';
import { useContext } from 'react';
import { Navigate, Routes, Route } from 'react-router-dom';
import { Tab } from '@mui/material';
import { AuthenticatedContext } from '../../contexts/authentication';
import APStatusForm from './APStatusForm';
import APSettingsForm from './APSettingsForm';
import { RequireAdmin, RouterTabs, useLayoutTitle, useRouterTab } from '../../components';
import APStatusForm from './APStatusForm';
import type { FC } from 'react';
import { RequireAdmin, RouterTabs, useLayoutTitle, useRouterTab } from 'components';
import { AuthenticatedContext } from 'contexts/authentication';
import { useI18nContext } from '../../i18n/i18n-react';
import { useI18nContext } from 'i18n/i18n-react';
const AccessPoint: FC = () => {
const { LL } = useI18nContext();
@@ -22,11 +22,16 @@ const AccessPoint: FC = () => {
return (
<>
<RouterTabs value={routerTab}>
<Tab value="status" label={LL.STATUS_OF(LL.ACCESS_POINT(1))} />
<Tab value="settings" label={LL.SETTINGS_OF(LL.ACCESS_POINT(1))} disabled={!authenticatedContext.me.admin} />
<Tab value="/ap/status" label={LL.STATUS_OF(LL.ACCESS_POINT(1))} />
<Tab
value="/ap/settings"
label={LL.SETTINGS_OF(LL.ACCESS_POINT(1))}
disabled={!authenticatedContext.me.admin}
/>
</RouterTabs>
<Routes>
<Route path="status" element={<APStatusForm />} />
<Route index element={<Navigate to="status" />} />
<Route
path="settings"
element={
@@ -35,7 +40,7 @@ const AccessPoint: FC = () => {
</RequireAdmin>
}
/>
<Route path="/*" element={<Navigate replace to="status" />} />
<Route path="*" element={<Navigate replace to="/ap/status" />} />
</Routes>
</>
);

View File

@@ -1,15 +1,14 @@
import React, { FC, useContext } from 'react';
import { Navigate, Route, Routes } from 'react-router-dom';
import { Tab } from '@mui/material';
import { RequireAdmin, RouterTabs, useLayoutTitle, useRouterTab } from '../../components';
import { AuthenticatedContext } from '../../contexts/authentication';
import MqttStatusForm from './MqttStatusForm';
import { useContext } from 'react';
import { Navigate, Route, Routes } from 'react-router-dom';
import MqttSettingsForm from './MqttSettingsForm';
import MqttStatusForm from './MqttStatusForm';
import type { FC } from 'react';
import { useI18nContext } from '../../i18n/i18n-react';
import { RequireAdmin, RouterTabs, useLayoutTitle, useRouterTab } from 'components';
import { AuthenticatedContext } from 'contexts/authentication';
import { useI18nContext } from 'i18n/i18n-react';
const Mqtt: FC = () => {
const { LL } = useI18nContext();
@@ -22,8 +21,8 @@ const Mqtt: FC = () => {
return (
<>
<RouterTabs value={routerTab}>
<Tab value="status" label={LL.STATUS_OF('MQTT')} />
<Tab value="settings" label={LL.SETTINGS_OF('MQTT')} disabled={!authenticatedContext.me.admin} />
<Tab value="/mqtt/status" label={LL.STATUS_OF('MQTT')} />
<Tab value="/mqtt/settings" label={LL.SETTINGS_OF('MQTT')} disabled={!authenticatedContext.me.admin} />
</RouterTabs>
<Routes>
<Route path="status" element={<MqttStatusForm />} />
@@ -35,7 +34,7 @@ const Mqtt: FC = () => {
</RequireAdmin>
}
/>
<Route path="/*" element={<Navigate replace to="status" />} />
<Route path="*" element={<Navigate replace to="/mqtt/status" />} />
</Routes>
</>
);

View File

@@ -1,26 +1,39 @@
import { FC, useState } from 'react';
import { ValidateFieldsError } from 'async-validator';
import CancelIcon from '@mui/icons-material/Cancel';
import WarningIcon from '@mui/icons-material/Warning';
import { Button, Checkbox, MenuItem, Grid, Typography, InputAdornment, TextField } from '@mui/material';
import { useState } from 'react';
import type { ValidateFieldsError } from 'async-validator';
import type { FC } from 'react';
import { Button, Checkbox, MenuItem, Grid, Typography, InputAdornment } from '@mui/material';
import SaveIcon from '@mui/icons-material/Save';
import { createMqttSettingsValidator, validate } from '../../validators';
import type { MqttSettings } from 'types';
import * as MqttApi from 'api/mqtt';
import {
BlockFormControlLabel,
ButtonRow,
FormLoader,
SectionContent,
ValidatedPasswordField,
ValidatedTextField
} from '../../components';
import { MqttSettings } from '../../types';
import { numberValue, updateValue, useRest } from '../../utils';
import * as MqttApi from '../../api/mqtt';
ValidatedTextField,
BlockNavigation
} from 'components';
import { useI18nContext } from 'i18n/i18n-react';
import { numberValue, updateValueDirty, useRest } from 'utils';
import { useI18nContext } from '../../i18n/i18n-react';
import { createMqttSettingsValidator, validate } from 'validators';
const MqttSettingsForm: FC = () => {
const { loadData, saving, data, setData, saveData, errorMessage } = useRest<MqttSettings>({
const {
loadData,
saving,
data,
updateDataValue,
origData,
dirtyFlags,
setDirtyFlags,
blocker,
saveData,
errorMessage
} = useRest<MqttSettings>({
read: MqttApi.readMqttSettings,
update: MqttApi.updateMqttSettings
});
@@ -29,7 +42,7 @@ const MqttSettingsForm: FC = () => {
const [fieldErrors, setFieldErrors] = useState<ValidateFieldsError>();
const updateFormValue = updateValue(setData);
const updateFormValue = updateValueDirty(origData, dirtyFlags, setDirtyFlags, updateDataValue);
const content = () => {
if (!data) {
@@ -40,7 +53,7 @@ const MqttSettingsForm: FC = () => {
try {
setFieldErrors(undefined);
await validate(createMqttSettingsValidator(data), data);
saveData();
await saveData();
} catch (errors: any) {
setFieldErrors(errors);
}
@@ -53,7 +66,7 @@ const MqttSettingsForm: FC = () => {
label={LL.ENABLE_MQTT()}
/>
<Grid container spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
<Grid item xs={6}>
<Grid item xs={12} sm={6}>
<ValidatedTextField
fieldErrors={fieldErrors}
name="host"
@@ -65,7 +78,7 @@ const MqttSettingsForm: FC = () => {
margin="normal"
/>
</Grid>
<Grid item xs={6}>
<Grid item xs={12} sm={6}>
<ValidatedTextField
fieldErrors={fieldErrors}
name="port"
@@ -78,9 +91,7 @@ const MqttSettingsForm: FC = () => {
margin="normal"
/>
</Grid>
</Grid>
<Grid container spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
<Grid item xs={6}>
<Grid item xs={12} sm={6}>
<ValidatedTextField
fieldErrors={fieldErrors}
name="base"
@@ -92,8 +103,8 @@ const MqttSettingsForm: FC = () => {
margin="normal"
/>
</Grid>
<Grid item xs={6}>
<ValidatedTextField
<Grid item xs={12} sm={6}>
<TextField
name="client_id"
label={LL.ID_OF(LL.CLIENT()) + ' (' + LL.OPTIONAL() + ')'}
fullWidth
@@ -103,10 +114,8 @@ const MqttSettingsForm: FC = () => {
margin="normal"
/>
</Grid>
</Grid>
<Grid container spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
<Grid item xs={6}>
<ValidatedTextField
<Grid item xs={12} sm={6}>
<TextField
name="username"
label={LL.USERNAME(0)}
fullWidth
@@ -116,7 +125,7 @@ const MqttSettingsForm: FC = () => {
margin="normal"
/>
</Grid>
<Grid item xs={6}>
<Grid item xs={12} sm={6}>
<ValidatedPasswordField
name="password"
label={LL.PASSWORD()}
@@ -127,9 +136,7 @@ const MqttSettingsForm: FC = () => {
margin="normal"
/>
</Grid>
</Grid>
<Grid container spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
<Grid item xs={6}>
<Grid item xs={12} sm={6}>
<ValidatedTextField
fieldErrors={fieldErrors}
name="keep_alive"
@@ -145,8 +152,8 @@ const MqttSettingsForm: FC = () => {
margin="normal"
/>
</Grid>
<Grid item xs={6}>
<ValidatedTextField
<Grid item xs={12} sm={6}>
<TextField
name="mqtt_qos"
label="QoS"
value={data.mqtt_qos}
@@ -159,9 +166,27 @@ const MqttSettingsForm: FC = () => {
<MenuItem value={0}>0</MenuItem>
<MenuItem value={1}>1</MenuItem>
<MenuItem value={2}>2</MenuItem>
</ValidatedTextField>
</TextField>
</Grid>
</Grid>
{data.enableTLS !== undefined && (
<BlockFormControlLabel
control={<Checkbox name="enableTLS" checked={data.enableTLS} onChange={updateFormValue} />}
label={LL.ENABLE_TLS()}
/>
)}
{data.enableTLS === true && (
<ValidatedPasswordField
name="rootCA"
label={LL.CERT()}
fullWidth
variant="outlined"
value={data.rootCA}
onChange={updateFormValue}
margin="normal"
/>
)}
<BlockFormControlLabel
control={<Checkbox name="clean_session" checked={data.clean_session} onChange={updateFormValue} />}
label={LL.MQTT_CLEAN_SESSION()}
@@ -174,7 +199,7 @@ const MqttSettingsForm: FC = () => {
<Typography sx={{ pt: 2 }} variant="h6" color="primary">
{LL.FORMATTING()}
</Typography>
<ValidatedTextField
<TextField
name="nested_format"
label={LL.MQTT_FORMAT()}
value={data.nested_format}
@@ -186,13 +211,20 @@ const MqttSettingsForm: FC = () => {
>
<MenuItem value={1}>{LL.MQTT_NEST_1()}</MenuItem>
<MenuItem value={2}>{LL.MQTT_NEST_2()}</MenuItem>
</ValidatedTextField>
</TextField>
<BlockFormControlLabel
control={<Checkbox name="send_response" checked={data.send_response} onChange={updateFormValue} />}
label={LL.MQTT_RESPONSE()}
/>
{!data.ha_enabled && (
<Grid container spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
<Grid
container
rowSpacing={-1}
spacing={1}
direction="row"
justifyContent="flex-start"
alignItems="flex-start"
>
<Grid item>
<BlockFormControlLabel
control={<Checkbox name="publish_single" checked={data.publish_single} onChange={updateFormValue} />}
@@ -215,43 +247,62 @@ const MqttSettingsForm: FC = () => {
<Grid container spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
<Grid item>
<BlockFormControlLabel
sx={{ pb: 1 }}
control={<Checkbox name="ha_enabled" checked={data.ha_enabled} onChange={updateFormValue} />}
label={LL.MQTT_PUBLISH_TEXT_3()}
/>
</Grid>
{data.ha_enabled && (
<>
<Grid container spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
<Grid item>
<ValidatedTextField
name="discovery_prefix"
label={LL.MQTT_PUBLISH_TEXT_4()}
fullWidth
variant="outlined"
value={data.discovery_prefix}
onChange={updateFormValue}
margin="normal"
/>
</Grid>
<Grid item>
<ValidatedTextField
name="entity_format"
label={LL.MQTT_ENTITY_FORMAT()}
value={data.entity_format}
fullWidth
variant="outlined"
onChange={updateFormValue}
margin="normal"
select
>
<MenuItem value={0}>{LL.MQTT_ENTITY_FORMAT_0()}</MenuItem>
<MenuItem value={1}>{LL.MQTT_ENTITY_FORMAT_1()}</MenuItem>
<MenuItem value={2}>{LL.MQTT_ENTITY_FORMAT_2()}</MenuItem>
</ValidatedTextField>
</Grid>
<Grid
container
sx={{ pl: 1 }}
spacing={1}
direction="row"
justifyContent="flex-start"
alignItems="flex-start"
>
<Grid item xs={12} sm={6} md={4}>
<TextField
name="discovery_type"
label={LL.MQTT_PUBLISH_TEXT_5()}
value={data.discovery_type}
fullWidth
variant="outlined"
onChange={updateFormValue}
margin="normal"
select
>
<MenuItem value={0}>Home Assistant</MenuItem>
<MenuItem value={1}>Domoticz</MenuItem>
</TextField>
</Grid>
</>
<Grid item xs={12} sm={6} md={4}>
<TextField
name="discovery_prefix"
label={LL.MQTT_PUBLISH_TEXT_4()}
fullWidth
variant="outlined"
value={data.discovery_prefix}
onChange={updateFormValue}
margin="normal"
/>
</Grid>
<Grid item xs={12} sm={6} md={4}>
<TextField
name="entity_format"
label={LL.MQTT_ENTITY_FORMAT()}
value={data.entity_format}
fullWidth
variant="outlined"
onChange={updateFormValue}
margin="normal"
select
>
<MenuItem value={0}>{LL.MQTT_ENTITY_FORMAT_0()}</MenuItem>
<MenuItem value={1}>{LL.MQTT_ENTITY_FORMAT_1()}</MenuItem>
<MenuItem value={2}>{LL.MQTT_ENTITY_FORMAT_2()}</MenuItem>
</TextField>
</Grid>
</Grid>
)}
</Grid>
)}
@@ -259,11 +310,11 @@ const MqttSettingsForm: FC = () => {
{LL.MQTT_PUBLISH_INTERVALS()}&nbsp;(0=auto)
</Typography>
<Grid container spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
<Grid item xs={6} sm={4}>
<Grid item xs={12} sm={6} md={4}>
<ValidatedTextField
fieldErrors={fieldErrors}
name="publish_time_heartbeat"
label={LL.MQTT_INT_HEARTBEAT()}
label="Heartbeat"
InputProps={{
endAdornment: <InputAdornment position="end">{LL.SECONDS()}</InputAdornment>
}}
@@ -275,9 +326,8 @@ const MqttSettingsForm: FC = () => {
margin="normal"
/>
</Grid>
<Grid item xs={6} sm={4}>
<ValidatedTextField
fieldErrors={fieldErrors}
<Grid item xs={12} sm={6} md={4}>
<TextField
name="publish_time_boiler"
label={LL.MQTT_INT_BOILER()}
InputProps={{
@@ -291,9 +341,8 @@ const MqttSettingsForm: FC = () => {
margin="normal"
/>
</Grid>
<Grid item xs={6} sm={4}>
<ValidatedTextField
fieldErrors={fieldErrors}
<Grid item xs={12} sm={6} md={4}>
<TextField
name="publish_time_thermostat"
label={LL.MQTT_INT_THERMOSTATS()}
InputProps={{
@@ -307,9 +356,8 @@ const MqttSettingsForm: FC = () => {
margin="normal"
/>
</Grid>
<Grid item xs={6} sm={4}>
<ValidatedTextField
fieldErrors={fieldErrors}
<Grid item xs={12} sm={6} md={4}>
<TextField
name="publish_time_solar"
label={LL.MQTT_INT_SOLAR()}
InputProps={{
@@ -323,9 +371,8 @@ const MqttSettingsForm: FC = () => {
margin="normal"
/>
</Grid>
<Grid item xs={6} sm={4}>
<ValidatedTextField
fieldErrors={fieldErrors}
<Grid item xs={12} sm={6} md={4}>
<TextField
name="publish_time_mixer"
label={LL.MQTT_INT_MIXER()}
InputProps={{
@@ -339,9 +386,8 @@ const MqttSettingsForm: FC = () => {
margin="normal"
/>
</Grid>
<Grid item xs={6} sm={4}>
<ValidatedTextField
fieldErrors={fieldErrors}
<Grid item xs={12} sm={6} md={4}>
<TextField
name="publish_time_sensor"
label={LL.TEMP_SENSORS()}
InputProps={{
@@ -355,9 +401,8 @@ const MqttSettingsForm: FC = () => {
margin="normal"
/>
</Grid>
<Grid item xs={6} sm={4}>
<ValidatedTextField
fieldErrors={fieldErrors}
<Grid item xs={12} sm={6} md={4}>
<TextField
name="publish_time_other"
InputProps={{
endAdornment: <InputAdornment position="end">{LL.SECONDS()}</InputAdornment>
@@ -372,24 +417,38 @@ const MqttSettingsForm: FC = () => {
/>
</Grid>
</Grid>
<ButtonRow>
<Button
startIcon={<SaveIcon />}
disabled={saving}
variant="outlined"
color="primary"
type="submit"
onClick={validateAndSubmit}
>
{LL.SAVE()}
</Button>
</ButtonRow>
{dirtyFlags && dirtyFlags.length !== 0 && (
<ButtonRow>
<Button
startIcon={<CancelIcon />}
disabled={saving}
variant="outlined"
color="primary"
type="submit"
onClick={loadData}
>
{LL.CANCEL()}
</Button>
<Button
startIcon={<WarningIcon color="warning" />}
disabled={saving}
variant="contained"
color="info"
type="submit"
onClick={validateAndSubmit}
>
{LL.APPLY_CHANGES(dirtyFlags.length)}
</Button>
</ButtonRow>
)}
</>
);
};
return (
<SectionContent title={LL.SETTINGS_OF('MQTT')} titleGutter>
{blocker ? <BlockNavigation blocker={blocker} /> : null}
{content()}
</SectionContent>
);

View File

@@ -1,18 +1,18 @@
import { FC } from 'react';
import { Avatar, Button, Divider, List, ListItem, ListItemAvatar, ListItemText, Theme, useTheme } from '@mui/material';
import AutoAwesomeMotionIcon from '@mui/icons-material/AutoAwesomeMotion';
import DeviceHubIcon from '@mui/icons-material/DeviceHub';
import RefreshIcon from '@mui/icons-material/Refresh';
import ReportIcon from '@mui/icons-material/Report';
import SpeakerNotesOffIcon from '@mui/icons-material/SpeakerNotesOff';
import AutoAwesomeMotionIcon from '@mui/icons-material/AutoAwesomeMotion';
import { Avatar, Button, Divider, List, ListItem, ListItemAvatar, ListItemText, useTheme } from '@mui/material';
import { useRequest } from 'alova';
import type { Theme } from '@mui/material';
import type { FC } from 'react';
import { ButtonRow, FormLoader, SectionContent } from '../../components';
import { MqttStatus, MqttDisconnectReason } from '../../types';
import * as MqttApi from '../../api/mqtt';
import { useRest } from '../../utils';
import { useI18nContext } from '../../i18n/i18n-react';
import type { MqttStatus } from 'types';
import * as MqttApi from 'api/mqtt';
import { ButtonRow, FormLoader, SectionContent } from 'components';
import { useI18nContext } from 'i18n/i18n-react';
import { MqttDisconnectReason } from 'types';
export const mqttStatusHighlight = ({ enabled, connected }: MqttStatus, theme: Theme) => {
if (!enabled) {
@@ -26,7 +26,6 @@ export const mqttStatusHighlight = ({ enabled, connected }: MqttStatus, theme: T
export const mqttPublishHighlight = ({ mqtt_fails }: MqttStatus, theme: Theme) => {
if (mqtt_fails === 0) return theme.palette.success.main;
if (mqtt_fails < 10) return theme.palette.warning.main;
return theme.palette.error.main;
@@ -39,7 +38,7 @@ export const mqttQueueHighlight = ({ mqtt_queued }: MqttStatus, theme: Theme) =>
};
const MqttStatusForm: FC = () => {
const { loadData, data, errorMessage } = useRest<MqttStatus>({ read: MqttApi.readMqttStatus });
const { data: data, send: loadData, error } = useRequest(MqttApi.readMqttStatus);
const { LL } = useI18nContext();
@@ -69,10 +68,8 @@ const MqttStatusForm: FC = () => {
return 'Malformed credentials';
case MqttDisconnectReason.MQTT_NOT_AUTHORIZED:
return 'Not authorized';
case MqttDisconnectReason.ESP8266_NOT_ENOUGH_SPACE:
return 'Device out of memory';
case MqttDisconnectReason.TLS_BAD_FINGERPRINT:
return 'Server fingerprint invalid';
return 'TLS fingerprint invalid';
default:
return 'Unknown';
}
@@ -80,53 +77,51 @@ const MqttStatusForm: FC = () => {
const content = () => {
if (!data) {
return <FormLoader onRetry={loadData} errorMessage={errorMessage} />;
return <FormLoader onRetry={loadData} errorMessage={error?.message} />;
}
const renderConnectionStatus = () => {
return (
<>
{!data.connected && (
<>
<ListItem>
<ListItemAvatar>
<Avatar>
<ReportIcon />
</Avatar>
</ListItemAvatar>
<ListItemText primary={LL.DISCONNECT_REASON()} secondary={disconnectReason(data)} />
</ListItem>
<Divider variant="inset" component="li" />
</>
)}
<ListItem>
<ListItemAvatar>
<Avatar>#</Avatar>
</ListItemAvatar>
<ListItemText primary={LL.ID_OF(LL.CLIENT())} secondary={data.client_id} />
</ListItem>
<Divider variant="inset" component="li" />
<ListItem>
<ListItemAvatar>
<Avatar sx={{ bgcolor: mqttQueueHighlight(data, theme) }}>
<AutoAwesomeMotionIcon />
</Avatar>
</ListItemAvatar>
<ListItemText primary={LL.MQTT_QUEUE()} secondary={data.mqtt_queued} />
</ListItem>
<Divider variant="inset" component="li" />
<ListItem>
<ListItemAvatar>
<Avatar sx={{ bgcolor: mqttPublishHighlight(data, theme) }}>
<SpeakerNotesOffIcon />
</Avatar>
</ListItemAvatar>
<ListItemText primary={LL.ERRORS_OF('MQTT')} secondary={data.mqtt_fails} />
</ListItem>
<Divider variant="inset" component="li" />
</>
);
};
const renderConnectionStatus = () => (
<>
{!data.connected && (
<>
<ListItem>
<ListItemAvatar>
<Avatar>
<ReportIcon />
</Avatar>
</ListItemAvatar>
<ListItemText primary={LL.DISCONNECT_REASON()} secondary={disconnectReason(data)} />
</ListItem>
<Divider variant="inset" component="li" />
</>
)}
<ListItem>
<ListItemAvatar>
<Avatar>#</Avatar>
</ListItemAvatar>
<ListItemText primary={LL.ID_OF(LL.CLIENT())} secondary={data.client_id} />
</ListItem>
<Divider variant="inset" component="li" />
<ListItem>
<ListItemAvatar>
<Avatar sx={{ bgcolor: mqttQueueHighlight(data, theme) }}>
<AutoAwesomeMotionIcon />
</Avatar>
</ListItemAvatar>
<ListItemText primary={LL.MQTT_QUEUE()} secondary={data.mqtt_queued} />
</ListItem>
<Divider variant="inset" component="li" />
<ListItem>
<ListItemAvatar>
<Avatar sx={{ bgcolor: mqttPublishHighlight(data, theme) }}>
<SpeakerNotesOffIcon />
</Avatar>
</ListItemAvatar>
<ListItemText primary={LL.ERRORS_OF('MQTT')} secondary={data.mqtt_fails} />
</ListItem>
<Divider variant="inset" component="li" />
</>
);
return (
<>

View File

@@ -1,17 +1,16 @@
import React, { FC, useCallback, useContext, useState } from 'react';
import { Navigate, Routes, Route, useNavigate } from 'react-router-dom';
import { Tab } from '@mui/material';
import { RequireAdmin, RouterTabs, useLayoutTitle, useRouterTab } from '../../components';
import { WiFiNetwork } from '../../types';
import { AuthenticatedContext } from '../../contexts/authentication';
import { WiFiConnectionContext } from './WiFiConnectionContext';
import NetworkStatusForm from './NetworkStatusForm';
import WiFiNetworkScanner from './WiFiNetworkScanner';
import { useCallback, useContext, useState } from 'react';
import { Navigate, Routes, Route, useNavigate } from 'react-router-dom';
import NetworkSettingsForm from './NetworkSettingsForm';
import NetworkStatusForm from './NetworkStatusForm';
import { WiFiConnectionContext } from './WiFiConnectionContext';
import WiFiNetworkScanner from './WiFiNetworkScanner';
import type { FC } from 'react';
import { useI18nContext } from '../../i18n/i18n-react';
import type { WiFiNetwork } from 'types';
import { RequireAdmin, RouterTabs, useLayoutTitle, useRouterTab } from 'components';
import { AuthenticatedContext } from 'contexts/authentication';
import { useI18nContext } from 'i18n/i18n-react';
const NetworkConnection: FC = () => {
const { LL } = useI18nContext();
@@ -45,9 +44,13 @@ const NetworkConnection: FC = () => {
}}
>
<RouterTabs value={routerTab}>
<Tab value="status" label={LL.STATUS_OF(LL.NETWORK(1))} />
<Tab value="scan" label={LL.NETWORK_SCAN()} disabled={!authenticatedContext.me.admin} />
<Tab value="settings" label={LL.SETTINGS_OF(LL.NETWORK(1))} disabled={!authenticatedContext.me.admin} />
<Tab value="/network/status" label={LL.STATUS_OF(LL.NETWORK(1))} />
<Tab value="/network/scan" label={LL.NETWORK_SCAN()} disabled={!authenticatedContext.me.admin} />
<Tab
value="/network/settings"
label={LL.SETTINGS_OF(LL.NETWORK(1))}
disabled={!authenticatedContext.me.admin}
/>
</RouterTabs>
<Routes>
<Route path="status" element={<NetworkStatusForm />} />
@@ -67,7 +70,7 @@ const NetworkConnection: FC = () => {
</RequireAdmin>
}
/>
<Route path="/*" element={<Navigate replace to="status" />} />
<Route path="*" element={<Navigate replace to="/network/status" />} />
</Routes>
</WiFiConnectionContext.Provider>
);

View File

@@ -1,6 +1,9 @@
import { FC, useContext, useEffect, useState } from 'react';
import { useSnackbar } from 'notistack';
import CancelIcon from '@mui/icons-material/Cancel';
import DeleteIcon from '@mui/icons-material/Delete';
import LockIcon from '@mui/icons-material/Lock';
import LockOpenIcon from '@mui/icons-material/LockOpen';
import PowerSettingsNewIcon from '@mui/icons-material/PowerSettingsNew';
import WarningIcon from '@mui/icons-material/Warning';
import {
Avatar,
Button,
@@ -12,15 +15,22 @@ import {
ListItemSecondaryAction,
ListItemText,
Typography,
InputAdornment
InputAdornment,
TextField
} from '@mui/material';
// eslint-disable-next-line import/named
import { updateState, useRequest } from 'alova';
import { useContext, useEffect, useState } from 'react';
import { toast } from 'react-toastify';
import RestartMonitor from '../system/RestartMonitor';
import { WiFiConnectionContext } from './WiFiConnectionContext';
import { isNetworkOpen, networkSecurityMode } from './WiFiNetworkSelector';
import type { ValidateFieldsError } from 'async-validator';
import type { FC } from 'react';
import LockOpenIcon from '@mui/icons-material/LockOpen';
import DeleteIcon from '@mui/icons-material/Delete';
import SaveIcon from '@mui/icons-material/Save';
import LockIcon from '@mui/icons-material/Lock';
import PowerSettingsNewIcon from '@mui/icons-material/PowerSettingsNew';
import type { NetworkSettings } from 'types';
import * as NetworkApi from 'api/network';
import * as SystemApi from 'api/system';
import {
BlockFormControlLabel,
ButtonRow,
@@ -28,42 +38,53 @@ import {
SectionContent,
ValidatedPasswordField,
ValidatedTextField,
MessageBox
} from '../../components';
import { NetworkSettings } from '../../types';
import * as NetworkApi from '../../api/network';
import { numberValue, updateValue, useRest } from '../../utils';
import * as EMSESP from '../../project/api';
MessageBox,
BlockNavigation
} from 'components';
import { useI18nContext } from 'i18n/i18n-react';
import { WiFiConnectionContext } from './WiFiConnectionContext';
import { isNetworkOpen, networkSecurityMode } from './WiFiNetworkSelector';
import { ValidateFieldsError } from 'async-validator';
import { validate } from '../../validators';
import { createNetworkSettingsValidator } from '../../validators/network';
import { numberValue, updateValueDirty, useRest } from 'utils';
import { useI18nContext } from '../../i18n/i18n-react';
import RestartMonitor from '../system/RestartMonitor';
import { validate } from 'validators';
import { createNetworkSettingsValidator } from 'validators/network';
const WiFiSettingsForm: FC = () => {
const { LL } = useI18nContext();
const { enqueueSnackbar } = useSnackbar();
const { selectedNetwork, deselectNetwork } = useContext(WiFiConnectionContext);
const [initialized, setInitialized] = useState(false);
const [restarting, setRestarting] = useState(false);
const { loadData, saving, data, setData, saveData, errorMessage, restartNeeded } = useRest<NetworkSettings>({
const {
loadData,
saving,
data,
updateDataValue,
origData,
dirtyFlags,
setDirtyFlags,
blocker,
saveData,
errorMessage,
restartNeeded
} = useRest<NetworkSettings>({
read: NetworkApi.readNetworkSettings,
update: NetworkApi.updateNetworkSettings
});
const { send: restartCommand } = useRequest(SystemApi.restart(), {
immediate: false
});
useEffect(() => {
if (!initialized && data) {
if (selectedNetwork) {
setData({
updateState('networkSettings', (current_data) => ({
ssid: selectedNetwork.ssid,
password: '',
hostname: data?.hostname,
bssid: selectedNetwork.bssid,
password: current_data ? current_data.password : '',
hostname: current_data?.hostname,
static_ip_config: false,
enableIPv6: false,
bandwidth20: false,
@@ -72,13 +93,13 @@ const WiFiSettingsForm: FC = () => {
enableMDNS: true,
enableCORS: false,
CORSOrigin: '*'
});
}));
}
setInitialized(true);
}
}, [initialized, setInitialized, data, setData, selectedNetwork]);
}, [initialized, setInitialized, data, selectedNetwork]);
const updateFormValue = updateValue(setData);
const updateFormValue = updateValueDirty(origData, dirtyFlags, setDirtyFlags, updateDataValue);
const [fieldErrors, setFieldErrors] = useState<ValidateFieldsError>();
@@ -93,19 +114,23 @@ const WiFiSettingsForm: FC = () => {
try {
setFieldErrors(undefined);
await validate(createNetworkSettingsValidator(data), data);
saveData();
await saveData();
} catch (errors: any) {
setFieldErrors(errors);
}
deselectNetwork();
};
const setCancel = async () => {
deselectNetwork();
await loadData();
};
const restart = async () => {
try {
await EMSESP.restart();
setRestarting(true);
} catch (error) {
enqueueSnackbar(LL.PROBLEM_UPDATING(), { variant: 'error' });
}
await restartCommand().catch((error) => {
toast.error(error.message);
});
setRestarting(true);
};
return (
@@ -121,10 +146,17 @@ const WiFiSettingsForm: FC = () => {
</ListItemAvatar>
<ListItemText
primary={selectedNetwork.ssid}
secondary={'Security: ' + networkSecurityMode(selectedNetwork) + ', Ch: ' + selectedNetwork.channel}
secondary={
'Security: ' +
networkSecurityMode(selectedNetwork) +
', Ch: ' +
selectedNetwork.channel +
', bssid: ' +
selectedNetwork.bssid
}
/>
<ListItemSecondaryAction>
<IconButton aria-label="Manual Config" onClick={deselectNetwork}>
<IconButton onClick={setCancel}>
<DeleteIcon />
</IconButton>
</ListItemSecondaryAction>
@@ -142,6 +174,16 @@ const WiFiSettingsForm: FC = () => {
margin="normal"
/>
)}
<ValidatedTextField
fieldErrors={fieldErrors}
name="bssid"
label={'BSSID (' + LL.NETWORK_BLANK_BSSID() + ')'}
fullWidth
variant="outlined"
value={data.bssid}
onChange={updateFormValue}
margin="normal"
/>
{(!selectedNetwork || !isNetworkOpen(selectedNetwork)) && (
<ValidatedPasswordField
fieldErrors={fieldErrors}
@@ -154,7 +196,6 @@ const WiFiSettingsForm: FC = () => {
margin="normal"
/>
)}
<ValidatedTextField
fieldErrors={fieldErrors}
name="tx_power"
@@ -169,21 +210,17 @@ const WiFiSettingsForm: FC = () => {
type="number"
margin="normal"
/>
<BlockFormControlLabel
control={<Checkbox name="nosleep" checked={data.nosleep} onChange={updateFormValue} />}
label={LL.NETWORK_DISABLE_SLEEP()}
/>
<BlockFormControlLabel
control={<Checkbox name="bandwidth20" checked={data.bandwidth20} onChange={updateFormValue} />}
label={LL.NETWORK_LOW_BAND()}
/>
<Typography sx={{ pt: 2 }} variant="h6" color="primary">
{LL.GENERAL_OPTIONS()}
</Typography>
<ValidatedTextField
fieldErrors={fieldErrors}
name="hostname"
@@ -194,19 +231,16 @@ const WiFiSettingsForm: FC = () => {
onChange={updateFormValue}
margin="normal"
/>
<BlockFormControlLabel
control={<Checkbox name="enableMDNS" checked={data.enableMDNS} onChange={updateFormValue} />}
label={LL.NETWORK_USE_DNS()}
/>
<BlockFormControlLabel
control={<Checkbox name="enableCORS" checked={data.enableCORS} onChange={updateFormValue} />}
label={LL.NETWORK_ENABLE_CORS()}
/>
{data.enableCORS && (
<ValidatedTextField
fieldErrors={fieldErrors}
<TextField
name="CORSOrigin"
label={LL.NETWORK_CORS_ORIGIN()}
fullWidth
@@ -216,12 +250,10 @@ const WiFiSettingsForm: FC = () => {
margin="normal"
/>
)}
<BlockFormControlLabel
control={<Checkbox name="enableIPv6" checked={data.enableIPv6} onChange={updateFormValue} />}
label={LL.NETWORK_ENABLE_IPV6()}
/>
<BlockFormControlLabel
control={<Checkbox name="static_ip_config" checked={data.static_ip_config} onChange={updateFormValue} />}
label={LL.NETWORK_FIXED_IP()}
@@ -281,23 +313,34 @@ const WiFiSettingsForm: FC = () => {
</>
)}
{restartNeeded && (
<MessageBox my={2} level="warning" message={LL.RESTART_TEXT()}>
<MessageBox my={2} level="warning" message={LL.RESTART_TEXT(0)}>
<Button startIcon={<PowerSettingsNewIcon />} variant="contained" color="error" onClick={restart}>
{LL.RESTART()}
</Button>
</MessageBox>
)}
{!restartNeeded && (
{!restartNeeded && (selectedNetwork || (dirtyFlags && dirtyFlags.length !== 0)) && (
<ButtonRow>
<Button
startIcon={<SaveIcon />}
startIcon={<CancelIcon />}
disabled={saving}
variant="outlined"
color="primary"
type="submit"
onClick={loadData}
>
{LL.CANCEL()}
</Button>
<Button
startIcon={<WarningIcon color="warning" />}
disabled={saving}
variant="contained"
color="info"
type="submit"
onClick={validateAndSubmit}
>
{LL.SAVE()}
{LL.APPLY_CHANGES(dirtyFlags.length)}
</Button>
</ButtonRow>
)}
@@ -307,6 +350,7 @@ const WiFiSettingsForm: FC = () => {
return (
<SectionContent title={LL.SETTINGS_OF(LL.NETWORK(1))} titleGutter>
{blocker ? <BlockNavigation blocker={blocker} /> : null}
{restarting ? <RestartMonitor /> : content()}
</SectionContent>
);

View File

@@ -1,20 +1,21 @@
import { FC } from 'react';
import { Avatar, Button, Divider, List, ListItem, ListItemAvatar, ListItemText, Theme, useTheme } from '@mui/material';
import SettingsInputComponentIcon from '@mui/icons-material/SettingsInputComponent';
import SettingsInputAntennaIcon from '@mui/icons-material/SettingsInputAntenna';
import DeviceHubIcon from '@mui/icons-material/DeviceHub';
import WifiIcon from '@mui/icons-material/Wifi';
import DnsIcon from '@mui/icons-material/Dns';
import RefreshIcon from '@mui/icons-material/Refresh';
import RouterIcon from '@mui/icons-material/Router';
import SettingsInputAntennaIcon from '@mui/icons-material/SettingsInputAntenna';
import SettingsInputComponentIcon from '@mui/icons-material/SettingsInputComponent';
import WifiIcon from '@mui/icons-material/Wifi';
import { Avatar, Button, Divider, List, ListItem, ListItemAvatar, ListItemText, useTheme } from '@mui/material';
import { useRequest } from 'alova';
import type { Theme } from '@mui/material';
import type { FC } from 'react';
import { ButtonRow, FormLoader, SectionContent } from '../../components';
import { NetworkConnectionStatus, NetworkStatus } from '../../types';
import * as NetworkApi from '../../api/network';
import { useRest } from '../../utils';
import type { NetworkStatus } from 'types';
import * as NetworkApi from 'api/network';
import { ButtonRow, FormLoader, SectionContent } from 'components';
import { useI18nContext } from '../../i18n/i18n-react';
import { useI18nContext } from 'i18n/i18n-react';
import { NetworkConnectionStatus } from 'types';
const isConnected = ({ status }: NetworkStatus) =>
status === NetworkConnectionStatus.WIFI_STATUS_CONNECTED ||
@@ -37,6 +38,15 @@ const networkStatusHighlight = ({ status }: NetworkStatus, theme: Theme) => {
}
};
const networkQualityHighlight = ({ rssi }: NetworkStatus, theme: Theme) => {
if (rssi <= -85) {
return theme.palette.error.main;
} else if (rssi <= -75) {
return theme.palette.warning.main;
}
return theme.palette.success.main;
};
export const isWiFi = ({ status }: NetworkStatus) => status === NetworkConnectionStatus.WIFI_STATUS_CONNECTED;
export const isEthernet = ({ status }: NetworkStatus) => status === NetworkConnectionStatus.ETHERNET_STATUS_CONNECTED;
@@ -58,7 +68,7 @@ const IPs = (status: NetworkStatus) => {
};
const NetworkStatusForm: FC = () => {
const { loadData, data, errorMessage } = useRest<NetworkStatus>({ read: NetworkApi.readNetworkStatus });
const { data: data, send: loadData, error } = useRequest(NetworkApi.readNetworkStatus);
const { LL } = useI18nContext();
@@ -77,7 +87,7 @@ const NetworkStatusForm: FC = () => {
case NetworkConnectionStatus.ETHERNET_STATUS_CONNECTED:
return LL.CONNECTED(0) + ' (Ethernet)';
case NetworkConnectionStatus.WIFI_STATUS_CONNECT_FAILED:
return LL.CONNECTED(1) + ' ' + LL.FAILED();
return LL.CONNECTED(1) + ' ' + LL.FAILED(0);
case NetworkConnectionStatus.WIFI_STATUS_CONNECTION_LOST:
return LL.CONNECTED(1) + ' ' + LL.LOST();
case NetworkConnectionStatus.WIFI_STATUS_DISCONNECTED:
@@ -89,7 +99,7 @@ const NetworkStatusForm: FC = () => {
const content = () => {
if (!data) {
return <FormLoader onRetry={loadData} errorMessage={errorMessage} />;
return <FormLoader onRetry={loadData} errorMessage={error?.message} />;
}
return (
@@ -109,11 +119,11 @@ const NetworkStatusForm: FC = () => {
<>
<ListItem>
<ListItemAvatar>
<Avatar>
<Avatar sx={{ bgcolor: networkQualityHighlight(data, theme) }}>
<SettingsInputAntennaIcon />
</Avatar>
</ListItemAvatar>
<ListItemText primary="SSID" secondary={data.ssid} />
<ListItemText primary="SSID (RSSI)" secondary={data.ssid + ' (' + data.rssi + ' dBm)'} />
</ListItem>
<Divider variant="inset" component="li" />
</>

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