Thomas Basler
74e3947cb2
Merge branch 'pr2360' into dev
2024-11-06 19:55:03 +01: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
e29b86e4dc
Add API endpoint to retrieve custom languages and complete language pack
2024-10-21 19:02:50 +02:00
Thomas Basler
aa9f36ee8f
Rename config API to file API
2024-10-19 11:07:15 +02:00
Thomas Basler
8f4b89a193
Replace format strings by platform independent macros
2024-10-05 00:50:13 +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
Thomas Basler
ea28903761
Move parsing of serial from web request to separate method
2024-04-05 19:14:56 +02:00
Thomas Basler
980e847ccb
Feature: Check for out of memory situations when sending json responses
...
Also shows a nice message in the frontend if an internal error occours
2024-04-05 19:14:56 +02:00
Thomas Basler
2e3125fe8d
Feature: Migrated ArduinoJson 6 to 7
2024-04-05 19:14:56 +02:00
Thomas Basler
8add226a7c
Save flash: Move WebApi json parsing to separate method to prevent a lot of redundant code
2024-04-01 13:52:09 +02:00
Thomas Basler
251d197fb6
Migrate WebApi loop() methods to scheduler tasks
2024-01-20 02:00:22 +01:00
Thomas Basler
3c37b61f44
Use auto keyword and references more often
2024-01-04 15:38:56 +01:00
Thomas Basler
4053e31a5e
Prevent config corruption by checking whether memory allocation was successfull.
2024-01-04 13:42:39 +01:00
Thomas Basler
e95afbf2cc
Use references instead of pointers whenver possible
2023-12-12 13:26:07 +01:00
Thomas Basler
b937532505
Remove not required AsyncEventSource
2023-12-07 15:21:24 +01:00
Thomas Basler
80d534e045
Migrate WebApi to TaskScheduler
2023-11-23 22:35:05 +01:00
Thomas Basler
b85c53f476
Split config struct into different sub structs
2023-11-19 14:53:26 +01:00
Thomas Basler
9ac6dd6e8d
Feature: First very basic support to read the grid profile
...
The parser is still missing and requires community support to collect data.
2023-09-07 22:08:07 +02:00
Thomas Basler
d6028cbd50
Remove not required F() macro. Frees ~20kb flash.
2023-04-04 18:51:18 +02:00
Thomas Basler
759f8b7208
Log errors if too less memory for webapi is available
2023-02-23 21:10:00 +01:00
Thomas Basler
5f699f4927
Added Device Profiles
...
Allows the pin assignment during runtime.
Pin settings will be read from a json file called "pin_mapping.json"
2023-01-16 21:09:24 +01:00
Thomas Basler
8f5d394f3a
Added websocket for debug output
2022-12-19 21:38:39 +01:00
Thomas Basler
54d94af487
Cleanup includes
2022-12-14 22:13:03 +01:00
Thomas Basler
510f0c59f9
Implement readonly security for API endpoints
2022-11-22 23:40:19 +01:00
Thomas Basler
e60619b867
Added device reboot functionality
2022-11-21 23:29:57 +01:00
Dominik Westner
e5bbb7f517
implemented prometheus metrics
2022-11-10 18:00:13 +01:00
Thomas Basler
8d14dbd367
Password protection for security settings API
...
Also implemented the base functionallity to protect further API endpoints.
2022-11-03 21:00:13 +01:00
Thomas Basler
cf727d4ff9
Added API to change the access point password
2022-10-13 19:44:16 +02:00
Thomas Basler
14bad84031
Added WebAPI to control inverter power
2022-10-04 18:12:55 +02:00
Thomas Basler
e61d47b8a2
Added webapi endpoints to download/upload end delete configuration
2022-09-17 01:46:14 +02:00
Thomas Basler
de33b9ff88
Do not use namespace using-directives. Use using-declarations instead.
2022-09-13 21:35:51 +02:00
Thomas Basler
46367c4fa9
Added webapi to fetch current inverter limit
2022-09-09 18:43:21 +02:00
Thomas Basler
217fddf405
Added small dialog to show inverter info (firmware version etc.)
2022-08-11 16:42:50 +02:00
Thomas Basler
184183e979
Move websocket stuff to liveview class
2022-07-20 19:36:07 +02:00
Thomas Basler
37aac48a19
Change License to GPLv2 as the RF24 lib uses GPL-2.0-only
2022-07-15 18:05:58 +02:00
Thomas Basler
f7eb54fa41
First version of webapi for event log
2022-07-08 18:22:35 +02:00
Thomas Basler
8b939f9418
Rename variables to match code style
2022-07-06 19:25:30 +02:00
Axel Hinrichs
401e6739cd
[WebApi] rate limit ws cleanup (1/s)
2022-07-05 23:42:07 +02:00
Thomas Basler
712be3fc15
Code cleanup
2022-07-01 23:38:51 +02:00
Thomas Basler
cf273c93e7
Fixed 404 error when pressing refresh in webapp
2022-07-01 23:32:11 +02:00
Thomas Basler
17cc2a475d
Rename websocket from ws to livedata
...
Allows devServer to proxy websockets as well...
2022-06-18 01:14:31 +02:00
Thomas Basler
af00158e14
First version of very simple websocket api
2022-06-16 01:44:42 +02:00
Thomas Basler
92abfdfaa6
Separated WebApi into different files
2022-06-15 23:46:22 +02:00
Thomas Basler
cae47a142a
Implemented periodic called loop method in webapi
2022-06-15 22:53:05 +02:00
Thomas Basler
b597e907de
Fixed issue in webapi that a inverter serial has to be read as hex
2022-05-31 19:26:26 +02:00
Thomas Basler
891b2b2917
Fix encoding header for favicon
2022-05-30 23:20:15 +02:00
Thomas Basler
90fe3df3fb
Integrate Hoymiles library into main application
2022-05-30 21:57:21 +02:00
Thomas Basler
774ab91531
Fixed typo
2022-05-27 01:19:09 +02:00
Thomas Basler
e47e5c0197
Extend webapi to change dtu settings
2022-05-27 01:00:18 +02:00
Thomas Basler
35d8a76763
Implemented firmware upgrade api
2022-05-23 23:26:19 +02:00