Commit Graph

294 Commits

Author SHA1 Message Date
Thomas Basler
db130f646e Upgrade ESPAsyncWebServer from 3.4.2 to 3.6.0 2025-01-14 19:14:17 +01:00
Thomas Basler
58382be16c Feature: show hint if device profile missing or not selected 2024-12-14 13:07:31 +01:00
Thomas Basler
33a9b7454c Make function getClientId const 2024-11-10 02:45:42 +01:00
Thomas Basler
74e3947cb2 Merge branch 'pr2360' into dev 2024-11-06 19:55:03 +01:00
Thomas Basler
55c98ef880 Fix: skip BOM in JSON files (pin_mapping and config)
based on #2387
2024-11-01 22:07:48 +01:00
Thomas Basler
70f301941b Feature: Implement language pack support for display texts 2024-10-25 22:38:55 +02:00
Thomas Basler
d259042542 Rewrite display language handling to work with locale strings instead of magic numbers.
This is required to implement further i18n functions using the language packs
2024-10-25 21:43:29 +02:00
Bernhard Kirchen
b1edb13b3c add and use configuration write guard
the configuration write guard is now required when the configuration
struct shall be mutated. the write guards locks multiple writers against
each other and also, more importantly, makes the writes synchronous to
the main loop. all code running in the main loop can now be sure that
(1) reads from the configuration struct are non-preemtive and (2) the
configuration struct as a whole is in a consistent state when reading
from it.

NOTE that acquiring a write guard from within the main loop's task will
immediately cause a deadlock and the watchdog will trigger a reset. if
writing from inside the main loop should ever become necessary, the
write guard must be updated to only lock the mutex but not wait for a
signal.
2024-10-22 20:39:23 +02:00
Thomas Basler
68c87c9217 Move lookup for translation path to separate method 2024-10-21 20:15:56 +02:00
Thomas Basler
e29b86e4dc Add API endpoint to retrieve custom languages and complete language pack 2024-10-21 19:02:50 +02:00
Thomas Basler
16901482d9 Refactor file handling API and add endpoint to delete files 2024-10-19 12:40:43 +02:00
Thomas Basler
aa9f36ee8f Rename config API to file API 2024-10-19 11:07:15 +02:00
LennartF22
6d048ae01d Remove EMAC related code for devices that don't have one 2024-10-06 03:08:58 +02:00
Thomas Basler
7dac96810f Rename NetworkEventCbList_t to DtuNetworkEventCbList_t for further upgrades 2024-10-04 23:02:12 +02:00
Thomas Basler
0c2b6f1a61 Fix: Add state_class to several Home Assistant sensors
state_class was added to yieldtotal, yieldday ac power and temperature for the whole dtu

closes: #2324
2024-10-02 18:13:12 +02:00
mbo18
9df3e30bb2
Remove unused DEVICE_CLASS_TEMP 2024-10-02 11:02:52 +02:00
Thomas Basler
aa5087cc8a Merge branch 'pr2320' into dev 2024-09-30 16:02:58 +02:00
Bernhard Kirchen
ebb225f6c0 Fix: avoid deprecated setAuthentication() to fix memory exhaustion
with ESPAsyncWebServer 3.3.0, the setAuthentication() method became
deprecated and a replacement method was provided which acts as a shim
and uses the new middleware-based approach to setup authentication. in
order to eventually apply a changed "read-only access allowed" setting,
the setAuthentication() method was called periodically. the shim
implementation each time allocates a new AuthenticationMiddleware and
adds it to the chain of middlewares, eventually exhausting the memory.

we now use the new middleware-based approach ourselves and only add the
respective AuthenticatonMiddleware instance once to the respective
websocket server instance.

a regression where enabling unauthenticated read-only access is not
applied until reboot is also fixed. all the AuthenticationMiddleware
instances were never removed from the chain of middlewares when calling
setAuthentication("", "").
2024-09-30 15:16:30 +02:00
LennartF22
251bb7bd89 Add connection check for W5500 before full initialization 2024-09-28 02:26:36 +02:00
Thomas Basler
0fcf6061c1 Added required include to work with IDF 5 2024-09-27 18:30:44 +02:00
Thomas Basler
b43383007a Rename NetworkEventCb to DtuNetworkEventCb to prevent further upgrade issues 2024-09-27 17:32:28 +02:00
Thomas Basler
a18e298cdd Apply automatic code formatting 2024-09-26 19:22:30 +02:00
Thomas Basler
326525c961 Merge branch 'pr2306' into dev 2024-09-26 18:34:07 +02:00
Thomas Basler
155735c828 Embed current branch into building process 2024-09-25 21:46:38 +02:00
Thomas Basler
9b565596d5 Feature: Allow reset of radio statistics via WebApp 2024-09-25 20:18:36 +02:00
LennartF22
851190dbcc Implement W5500 support 2024-09-25 00:37:03 +02:00
Thomas Basler
d3903d8602 MQTT Hass: Implement method to add common metadata to json output 2024-09-24 23:23:08 +02:00
Thomas Basler
2230850201 MQTT Hass: Implement device class as enum instead of String 2024-09-24 22:55:18 +02:00
Thomas Basler
bb4be0bbf7 MQTT Hass: Implement category as enum instead of String 2024-09-24 22:38:52 +02:00
Thomas Basler
2213ad7bce MQTT Hass: Move serialization and allocation check into own method 2024-09-24 21:47:56 +02:00
Thomas Basler
c699f1b487 MQTT Hass: Add device_type and category to publishInverterBinarySensor 2024-09-24 20:45:55 +02:00
Thomas Basler
239a77198d MQTT Hass: Move publishSensor logic into separate method 2024-09-24 20:38:12 +02:00
Thomas Basler
e5ca0ab784 MQTT Hass: Reorder binary sensor methods 2024-09-24 20:06:45 +02:00
Thomas Basler
f46a5017c7 MQTT Hass: Move publishBinarySensor logic into separate method 2024-09-24 20:03:42 +02:00
Thomas Basler
d899ea7364 MQTT Hass: Harmonise parameter names 2024-09-24 19:44:58 +02:00
Thomas Basler
7aca72b8fd MQTT Hass: Change parameter order for publishInverterNumber 2024-09-24 19:39:14 +02:00
Thomas Basler
483c10785b MQTT Hass: Change parameter order for publishInverterButton 2024-09-24 19:30:21 +02:00
Thomas Basler
a7100f238b MQTT Hass: Change parameter order for publishDtuBinarySensor 2024-09-24 19:23:04 +02:00
Thomas Basler
57c5b8c97e MQTT Hass: Make publish methods static 2024-09-24 19:22:05 +02:00
Thomas Basler
1c3e7de390 MQTT Hass: Change parameter order for publishDtuSensor 2024-09-24 19:21:06 +02:00
Thomas Basler
96e83f3d37 MQTT Hass: Change parameter order for publishInverterSensor 2024-09-24 19:18:56 +02:00
Thomas Basler
8e68632ed9 MQTT Hass: Rename caption parameter to name 2024-09-24 18:17:42 +02:00
Thomas Basler
8de1f7e70f MQTT Hass: Change char* to String& 2024-09-24 18:15:38 +02:00
Thomas Basler
bef81eed45 Feature: Publish Radio statistics to home assistant 2024-09-23 23:13:23 +02:00
Thomas Basler
181802a76b Feature: Allow reset of radio statistics via mqtt 2024-09-23 22:46:23 +02:00
Thomas Basler
93b6e5a885 Optimize MQTT subscription handling 2024-09-23 21:59:43 +02:00
Thomas Basler
e785904fca Fix: Restart was triggered before all website data was sent
This led to the effect that e.g. the confirmation messages where  not shown.

It is somehow related to ESPAsyncWebServer 3.3.0
2024-09-23 18:11:52 +02:00
Thomas Basler
3b3e6995c2 Fix: WebApp was not reloaded after firmware update
With the upgrade from ESPAsyncWebServer to 3.3.1 it seems that something has changed. Have to trigger the reboot from the main context.
2024-09-21 00:04:27 +02:00
Thomas Basler
b52cd31309 Output WiFi disconnect reason in console 2024-09-02 20:16:03 +02:00
Thomas Basler
70dacb5ea6 Merge branch 'pr2168' into dev 2024-08-01 17:53:53 +02:00