Commit Graph

1783 Commits

Author SHA1 Message Date
helgeerbe
5335ec1bde Merge remote-tracking branch 'tbnobody/OpenDTU/master' into development 2023-08-04 12:21:16 +02:00
Thomas Basler
f3e3ec0685 webapp: Update dependencies 2023-08-03 22:36:48 +02:00
Thomas Basler
43cba67531 Fix: Virtual console scrambled output when the output came from different contexts 2023-08-03 22:16:29 +02:00
Thomas Basler
10ba10d792 cpplint: do not complain mutex include 2023-08-03 22:07:53 +02:00
Thomas Basler
0bdee6ec99 Fix: Prevent access to nullptr object when reconnecting to mqtt
It could occour when saving the settings via the web ui
2023-08-03 18:46:28 +02:00
Thomas Basler
832df5a80e Implement the command queue thread safe
The queue will be maybe filled from within another thread (mqtt/web) and handled from the main loop
2023-08-03 00:17:32 +02:00
Thomas Basler
be09c4052f Fix: Ensure that only completly assembled packets are put into the command queue 2023-08-02 22:41:53 +02:00
helgeerbe
69456affce Merge remote-tracking branch 'tbnobody/OpenDTU/master' into development 2023-08-02 19:46:35 +02:00
Thomas Basler
686112e4ee Fix: Wrong detection of HM-300 inverters
Was introduced in v23.8.1; Fixes #1198
2023-08-02 18:41:25 +02:00
Thomas Basler
77528f6e6a webapp: add app.js.gz 2023-08-01 21:55:25 +02:00
Thomas Basler
ba9bddf277 webapp: Update dependencies 2023-08-01 21:54:19 +02:00
Bernhard Kirchen
81864b3420
execute MQTT client synchronously in main loop() (#350)
processing a published valued on a subscribed topic is currently running
in a task that is not the task executing the main loop(). that's because
the espMqttClient(Secure) was constructed without arguments, which
selects the constructor with two arguments priority and core, both of
which have default values. that constructor selects
espMqttClientTypes::UseInternalTask::YES, causing a task to be created
in which context the MQTT client loop is executed.

MQTT subscribers assume they are running in the same context as the main
loop(). most code assumes exactly that. as the scheduler is preemptive
and very little (none at all?) code is interlocked, we have to make sure
to meet the programmer's expectations.

this changeset calls the MQTT client loop in the context of the main
loop() and enforces the use of espMqttClientTypes::UseInternalTask::NO.
2023-08-01 09:20:04 +02:00
Thomas Basler
5bbc67bc49 Fix: Clear parser buffers to prevent random numbers if no data was received 2023-07-31 22:52:38 +02:00
Thomas Basler
2eeb7423bf Update olikraus/U8g2 from 2.35.3 to 2.35.4 2023-07-31 22:42:06 +02:00
Thomas Basler
c374a83cfe Update bblanchon/ArduinoJson from 6.21.2 to 6.21.3 2023-07-31 22:40:54 +02:00
Thomas Basler
a90073cba2 webapp: Update dependencies 2023-07-31 22:31:53 +02:00
Thomas Basler
ef65094181 Fix: Prevent wrong values of devinfo data because of non-atomic transaction 2023-07-31 22:27:28 +02:00
Thomas Basler
74169c3b17 Fix: Prevent wrong values of systemconfigpara data because of non-atomic transaction 2023-07-31 22:06:04 +02:00
Thomas Basler
698ecbcd53 Fix: Prevent wrong values of alarm data because of non-atomic transaction and fix calculation of getEntryCount() 2023-07-31 22:06:04 +02:00
Thomas Basler
14305a9f12 Fix: Prevent wrong values of statistics data because of non-atomic transaction 2023-07-31 22:05:22 +02:00
Thomas Basler
9821c1905b Fix: Uninitliazed variable used before first use 2023-07-31 21:44:50 +02:00
helgeerbe
587b2dc553 add webapp 2023-07-31 14:21:24 +02:00
Bernhard Kirchen
2bce8311a7
MQTT verbose logging fixes (#341)
* MQTT verbose logging: fix typo

this typo caused that verbose logging was always disabled for MQTT and
could not be enabled.

* webapp status: show MQTT verbose logging setting
2023-07-31 14:16:35 +02:00
Bernhard Kirchen
6b425d96b0
PowerMeter fixes (#342)
* PowerMeter: gracefully handle non-float MQTT values

* PowerMeter: update _lastPowerMeterUpdate conservatively

update the timestampt only if the topic actually matched any
subscription and if the value could be parsed as a float.

* PowerMeter: unsubscribe before subscribing

* PowerMeter: organize subscriptions in a map

this allows for a slightly more elegant code and reduced amount of code
overall.

* PowerMeter: clean up header

* move private methods to private section of class declaration.
* remove unused member variable.
2023-07-31 14:16:06 +02:00
Bernhard Kirchen
9bc334e368
reset docs/MQTT_Topics.md to upstream version (#343)
MQTT topics that are specific to OpenDTU-OnBattery shall only be
documented once. They are documented in the project's wiki already.
2023-07-31 14:14:32 +02:00
helgeerbe
43e836ac41 resolve merge conflict with upstream/master 2023-07-24 13:23:50 +02:00
helgeerbe
2440028d38 Merge remote-tracking branch 'tbnobody/OpenDTU/master' into development 2023-07-24 13:16:15 +02:00
MalteSchm
18c464e524
SoC based threshold detection fix (#320) 2023-07-24 13:03:12 +02:00
helgeerbe
8b01fa07cc Replace Readme with wiki home page 2023-07-24 13:02:12 +02:00
Thomas Basler
92c9544bb3 webapp: add app.js.gz 2023-07-22 20:25:55 +02:00
Thomas Basler
1146e15ea6 Move units from description to postfix for AP timeout 2023-07-22 18:30:18 +02:00
Martin Dummer
8bfa7e530c Feature: Admin AccessPoint Timeout now configurable
Make the administrative accesspoint timeout configurable. The default
value is 3 minutes, values from 0-99999 are possible, where 0 means
infinite (no timeout).

Signed-off-by: Martin Dummer <martin.dummer@gmx.net>
2023-07-22 18:14:07 +02:00
Thomas Basler
2e25fdcf8f Formatting style in platformio.ini 2023-07-22 18:08:34 +02:00
Thomas Basler
a68c553d27 Code formatting without functional changes 2023-07-22 18:07:03 +02:00
Thomas Basler
658a42db80 Apply code formatter without functional changes 2023-07-22 18:00:41 +02:00
Thomas Basler
a06a56a490 Harden config parser by defining right unsigned data type 2023-07-22 17:41:56 +02:00
Thomas Basler
736220c80d Reorder config struct components 2023-07-22 17:28:58 +02:00
Thomas Basler
0d5b938328 Update olikraus/U8g2 from 2.34.22 to 2.35.3 2023-07-22 16:01:19 +02:00
Thomas Basler
cc0af372ef webapp: Update dependencies 2023-07-22 15:53:51 +02:00
Thomas Basler
eaacce7483 Feature: Show error in webapp if pin_mapping.json contains syntax errors 2023-07-22 15:51:16 +02:00
Thomas Basler
972dea297b Fix: Prevent runtime errors in webapp when invalid pin_mapping.json is provided 2023-07-22 15:30:40 +02:00
Thomas Basler
bf4dc56cb8 Fix: Reboot loop if negative display pins and type where provided
Fix #1163
2023-07-21 19:02:18 +02:00
Thomas Basler
9dbeec3a31 Fix: Set WiFi setScanMethod and setSortMethod also on first connect 2023-07-20 23:44:09 +02:00
Phantomias2006
e06740fbb8
Add data age at battery MQTT (#322)
* Add data age at battery MQTT

* Update README.md

typo

* Update MQTT_Topics.md

typo

* Update PylontechCanReceiver.cpp

typo
2023-07-19 09:47:37 +02:00
helgeerbe
cea1f94b5e add webapp 2023-07-18 10:01:36 +02:00
Bernhard Kirchen
f0def2ae89
Selective verbosity (#318)
* DPL: implement verbose logging switch

* MQTT: implement verbose logging switch

* power meter: implement verbose logging switch

* Hoymiles lib: implement verbose logging switch

* cpp linting: "final" makes "virtual" and "override" redundant

... however, using only "final" is not as verbose.
2023-07-18 09:57:03 +02:00
Phantomias2006
a7da000345
Feature: set Huawei offline parameters via MQTT (#315)
* Add Huawei offline parameters via MQTT

* Update README.md

Correction of the docu

* Update MQTT_Topics.md

Correction of the docu
2023-07-18 09:52:31 +02:00
Martin
0dd1566dc6
Fix: WebApp Live-View: adjust window-title and header (#317)
adjust window-title and header from OpenDTU to OpenDTU-onBattery
Additionally change orientation of battery symbol to vertically centered
(looks nicer)

Signed-off-by: Martin Dummer <martin.dummer@gmx.net>
2023-07-18 09:51:59 +02:00
Martin
c393e52185
Feature: add Home Assistant MQTT discovery for Pylontech battery (#314)
When OpenDTU has a Pylontech CAN Bus Battery connected and enabled, this
patch adds the discovery routine for Home Assistant

Signed-off-by: Martin Dummer <martin.dummer@gmx.net>
2023-07-17 09:50:58 +02:00
Bernhard Kirchen
cbc99d715f
DPL: increase backoff while inverter is kept shut down (#310)
if the new calculated power limit is below the minimum power limit
setting, the inverter is shut down. the shutdown() function is called
every time this condition is detected, which is also true if the
inverter is kept shut down for longer. that happens while the battery
is charging in particular (solar passthrough off). there are other
cases.

in such cases we still want to get into the DPL status "stable". to be
able to determine this stable state, we must know if the call to
shutdown did actually initiate a shutdown or if the inverter is already
shut down.

we then can forward this "changed" or "not changed" info up the call
chain, where the loop() will know that the system is actually stable.
2023-07-17 09:40:18 +02:00