Commit Graph

655 Commits

Author SHA1 Message Date
Thomas Basler
8cab3335f3 BREAKING CHANGE: WebAPI endpoint /api/limit/config requires different parameters
Due to the fact that different inverters require different type identifiers in the backend the `limit_type` parameter was changed to numbers from 0 to 3.
* AbsolutNonPersistent = 0
* RelativNonPersistent = 1
* AbsolutPersistent = 2
* RelativPersistent = 3
2025-08-07 20:44:45 +02:00
Andreas Böhm
99e6930108 webapp: fix: return log level for more than 5 modules 2025-06-09 15:21:36 +02:00
Bernhard Kirchen
5c89460e14 do not derive MessageOutput from Print
force us to use ESP_LOGx macros to log messages. print*() functions are
no longer available through MessageOutput.
2025-06-09 15:19:37 +02:00
Bernhard Kirchen
466f584737 MessageOutput: remove redundant #include 2025-06-09 15:19:12 +02:00
Thomas Basler
27d28090d5 Fix: Dont allow HA base topic without trailing slash 2025-05-20 19:44:59 +02:00
Bernhard Kirchen
4e0685ea13 Fix: typo in logging tag of PinMappingClass 2025-05-16 21:22:59 +02:00
Thomas Basler
6bd9cce559 Apply code formatting 2025-05-04 16:26:54 +02:00
Thomas Basler
7735c672af Fix vector reservation for logging modules 2025-05-04 16:26:54 +02:00
Thomas Basler
98675263b6 Fix: Prevent crash when performing a lot of inverter edits
On every edit the whole HA MQTT gets published. This leads to a memory issue when saving quite often without any delay in between. The patch only send config updates every 60 seconds and adds several yield() calls.
This should also fix the crash when saving the network config very often.
2025-05-04 16:26:54 +02:00
Bernhard Kirchen
95106e4488 Fix: motivate browsers to reload web app resources
by mangling the Git commit hash into the MD5 hash of all web application
resource's ETag headers, we ensure that index.html is essentially
invalidated in the browser's cache, even if the actual content is the
same between firmware versions. this hopefully makes the browser
recognize that it has to reload app.js in particular.
2025-05-04 16:26:27 +02:00
Thomas Basler
bb800a1dac Apply log level only for facilities which are available for configuration 2025-05-04 16:26:27 +02:00
Thomas Basler
030df8b715 Syslog: Send dynamic headers based on log level of the message
The code part regarding overflow was also removed as the write method 1 in any case. Different handling regarding line break etc. in one message was also removed as the function is called only containing one log line from MessageOutput.
2025-05-04 16:26:27 +02:00
Thomas Basler
473dd6cbcc Use new logging function in syslog module 2025-05-04 16:26:27 +02:00
ranma
bf31ccd02c Feature: Add syslog logger
This implements RFC5424 version of the protocol.

Doesn't use https://github.com/arcao/Syslog since the protocol itself
is trivial and most of the libraries functionality is not needed here.
The library also doesn't support setting the PROCID field, which is set
to a random id to indicate a reboot here.

Adds UI for syslog configuration to network admin view.
2025-05-04 16:26:27 +02:00
Tobias Diedrich
3d39349876 Add UI for syslog configuration to network view 2025-05-04 16:26:27 +02:00
benzman
d039455b82 Fix: handle MQTT message fragmentation
MQTT messages might arrive in parts if their payload is too big. for that
reason, we need to be prepared to re-assemble fragmented messages
on a topic before handing them over to the subscriber.
2025-05-04 16:17:24 +02:00
Thomas Basler
d4c29d708b Feature: Allow setting the log level for the different modules at runtime 2025-05-04 16:17:24 +02:00
Thomas Basler
3eaff7e45c Use ESP Logging Macros for hoymiles library 2025-05-04 16:17:24 +02:00
Thomas Basler
1c6dffbfce Use ESP Logging Macros for invertersetup 2025-05-04 16:17:24 +02:00
Thomas Basler
7df4bbc454 Use ESP Logging Macros for i18n 2025-05-04 16:17:23 +02:00
Thomas Basler
c5e97a5c7b Use ESP Logging Macros for mqtt 2025-05-04 16:17:23 +02:00
Thomas Basler
d0e8dbe61f Use ESP Logging Macros for network 2025-05-04 16:17:23 +02:00
Thomas Basler
24b0dae659 Use ESP Logging Macros for configuration 2025-05-04 16:17:23 +02:00
Thomas Basler
ac03cbff3c Use ESP Logging Macros for pinmapping 2025-05-04 16:17:23 +02:00
Thomas Basler
77eff68c5f Use ESP Logging Macros for utils 2025-05-04 16:17:23 +02:00
Thomas Basler
dd646aebff Use ESP Logging Macros for webapi 2025-05-04 16:17:23 +02:00
Thomas Basler
6bbea37526 Use ESP Logging Macros for device startup 2025-05-04 16:17:23 +02:00
Thomas Basler
724890147f Feature: Redirect all ESP log output to the MessageOutput handler 2025-05-04 16:17:23 +02:00
Thomas Basler
8372deaf7c BREAKING CHANGE: Logging newline changed from "\r\n" to "\n" 2025-05-04 16:17:23 +02:00
Thomas Basler
9d0de8d2ca Replace all print and println with printf in startup code 2025-05-04 16:17:23 +02:00
Thomas Basler
39b8d3f43f Implement Wifi reconnect watchdog
Sometimes the ESP does not trigger the ARDUINO_EVENT_WIFI_STA_DISCONNECTED when a disconnect occours. In this case, no further reconnect attempt is done. To take care of this behavior, the wifi hardware is reset when no connect occours within 60 seconds..
2025-05-04 16:17:23 +02:00
Thomas Basler
ec614b3132 Move disableAdminMode to separate method 2025-05-04 16:16:38 +02:00
Thomas Basler
ed9d4cc65d Fix: When enabling admin mode, the search for the STA was automatically disabled 2025-05-04 16:16:38 +02:00
Thomas Basler
818133e866 Wifi connection is only established when IP is set and the stack reports connected 2025-05-04 16:16:38 +02:00
Thomas Basler
6b3decf397 Fix possible race condition when enabling Admin Mode AP 2025-05-04 16:16:38 +02:00
Thomas Basler
52961ed5a6 InverterSettings: Optimize init function
Also replace all print and println by printf
2025-05-04 16:16:38 +02:00
Thomas Basler
6c4d3f47c7 NetworkSettings: Optimize loop function
Also replace all print and println by printf
2025-05-04 16:16:38 +02:00
Thomas Basler
f490e4af4b NetworkSettings: Optimize handleMDNS function
Also replace all print and println by printf
2025-05-04 16:16:38 +02:00
Thomas Basler
650f33f7f7 NetworkSettings: Optimize setStaticIp function
Also replace all print and println by printf
2025-05-04 16:16:38 +02:00
Thomas Basler
b911ba09a4 NetworkSettings: Optimize applyConfig function
Also replace all print and println by printf
2025-05-04 16:16:38 +02:00
Thomas Basler
852649fd86 NetworkSettings: Optimize setHostname function
Also replace all print and println by printf
2025-04-18 11:00:13 +02:00
Thomas Basler
0dcf3c5902 NetworkSettings: Replace println by printf 2025-04-18 11:00:13 +02:00
Thomas Basler
9735deae44 Configuration: Replace print and println with printf 2025-04-18 11:00:13 +02:00
Thomas Basler
3572f177fa MqttHandleInverter: Replace all print and println with printf 2025-04-18 11:00:13 +02:00
Thomas Basler
5cb7fcd854 MqttSettings: Replace all print and println with printf 2025-04-18 11:00:13 +02:00
Thomas Basler
7f922f849a Pinmapping: Remove println output 2025-04-18 11:00:13 +02:00
Thomas Basler
3addcc2758 Use more thread save Message Output
Thanks to OnBattery!
2025-04-18 11:00:13 +02:00
Thomas Basler
5019e8e64f Show git branch name in system info
Thanks to OnBattery
2025-04-10 18:40:59 +02:00
Thomas Basler
542e755c64 Remove not required parameters from MqttSubscribeParser
index and total are only required to handle different payload fragments. This is not done here. In a further step, the correct fragment handling will be implemented outside this library.
2025-04-09 19:36:46 +02:00
Thomas Basler
f1efe21ba3 Make setLed method compatible with Arduino Framework 3 2025-04-09 18:44:05 +02:00