Commit Graph

2421 Commits

Author SHA1 Message Date
Alexander Kukushkin
2f7e1f3f70
Fix: solar_passthrough_losses setting persistence (#957)
Due to a typo the value of `solar_passtrough_losses` was lost after a restart.
2024-05-06 11:12:25 +02:00
Bernhard Kirchen
b7a8bdf07b remove rweather/Crypt lib from firmware (save 2.1k of flash)
mbedtls is already integral part of the firmware. use it in favor of
rweather/Crypto library to calculate a sha256 checksum of a string, as
used in the HTTP power meter implementation.
2024-05-06 11:04:24 +02:00
Bernhard Kirchen
1dd64a57fd remove FirebaseJson lib from firmware (save 17.5k of flash)
we used this library solely to interpret the answer of an HTTP web
server as JSON and find a particular value using a path expression in
the HTTP power meter implementation.

since we ran out of flash memory on non-S3 ESP32, we need to cut some
corners. removing FirebaseJson is the last low-hanging fruit that we
currently know of. we can get rid of it by using ArduinoJson (which is
already integral part of the firmware) and implementing a custom logic
to extract a value based on a path expression.

other than the FirebaseJson path "finder", the new implementation
only knows how to access sub-keys delimited by a forward slash. in
particular, accessing array members is not supported any more. I am
hoping that this is simply not an issue. if so, we will have users
complaining and we can add this functionality in a later release.
2024-05-06 11:04:24 +02:00
SW-Nico
6620ab487a Fix: VE.Direct: take the load current into account
when calculating efficiency, we need to take into account that the load
might also sink a significant amount of current and power, which adds to
the total output of the charge controller.
2024-05-02 21:46:57 +02:00
eu-gh
686b5df64e
Feature: Publish Huawei AC charger mode via MQTT (#876) 2024-05-02 21:19:25 +02:00
Bernhard Kirchen
744df41b01
Merge pull request #945 from helgeerbe/merge-v24.4.24
Merge upstream v24.4.24
2024-05-02 21:07:03 +02:00
Bernhard Kirchen
18dab3cf1c Merge upstream tag 'v24.4.24' into development 2024-05-02 20:49:41 +02:00
Bernhard Kirchen
4cf596eb5a
Merge pull request #923 from helgeerbe/merge-v24.4.12
merge upstream tag v24.4.12, resolve conflicts (helgeerbe), fix eslint errors (schlimmchen) and adopt new web api method to save code duplication (schlimmchen).
2024-04-29 21:17:14 +02:00
Bernhard Kirchen
4e36c8c9ea
Feature: battery interface: use HW serial 0 on ESP32-C3 or S3 (#933)
this allows to use two VE.Direct interfaces, as there is no conflict
regarding HW serial port 2 after making the battery interfaces use
serial port 0 on devices with USB CDC. on those chips HW serial 0 is
free to be used since serial messages are written through the USB
interface directly.
2024-04-29 20:43:35 +02:00
Bernhard Kirchen
d3b306e2fc appease eslint 2024-04-29 20:31:50 +02:00
Bernhard Kirchen
84e83f2dbb adopt WebApiClass::parseRequestData() method
saves redundant code, reducing flash usage.
2024-04-29 20:31:50 +02:00
MalteSchm
64738a6246 Introducing defines for RX2/TX2 2024-04-25 22:54:12 +02:00
helgeerbe
fdc5054480 Merge remote-tracking branch 'tbnobody/OpenDTU/master' into merge-v24.4.12 2024-04-25 20:59:19 +02:00
Thomas Basler
4623839425 webapp: add app.js.gz 2024-04-24 22:34:39 +02:00
Thomas Basler
5a93a7e4b9 Updated timezone config 2024-04-24 22:33:37 +02:00
Thomas Basler
5ab4b6d38e webapp: update dependencies 2024-04-24 22:31:13 +02:00
Thomas Basler
29403013f5 Fix: Device Manager shows 404 if no pin_mapping.json was available 2024-04-24 22:28:59 +02:00
Thomas Basler
f8cc171e4a Fix: Return 404 (and nothing else) if file not found 2024-04-24 22:15:25 +02:00
MalteSchm
f0df583c13
Feature: support for Huawei target power consumption 2024-04-24 20:26:56 +02:00
Bernhard Kirchen
74330a5617 Feature: restart unresponsive inverter
we found that the inverter sometimes stops responding to commands,
especially to the "start producing" command. we now count the number of
consecutive timeouts when trying to send a new limit or power state
commands. after two timeouts were recorded, every additional timeout
will send a restart command to the inverter.

as a last resort, if the counter keeps climbing, the DTU is restarted.

notice that this only targets unresponsive inverters which are
reachable. unreachable inverters are not restarted and do not cause a
DTU reboot. this is important for solar-driven inverters, which are
unreachable during the night. the DPL will not calculate a new limit and
hence the updateInverter() method will do nothing while the target
inverter is unreachable.

publish the timeout counter to MQTT for monitoring purposes.
2024-04-24 16:15:01 +02:00
Thomas Basler
21cadabd5d Upgrade olikraus/U8g2 from 2.35.15 to 2.35.17 2024-04-23 18:52:47 +02:00
Thomas Basler
c36369a83b Upgrade ESP Async WebServer from 2.9.0 to 2.9.3 2024-04-23 18:49:52 +02:00
Bernhard Kirchen
eb9bfd1ac6 Fix: DPL mode 2 for solar-powered inverters
for solar-powered inverters, the unconditional full solar-passthrough
implementation now sets the upper limit configured in the DPL settings.
2024-04-22 12:51:31 +02:00
Bernhard Kirchen
1d4bea24ff Fix: JK BMS: BMS name is second part of product ID 2024-04-18 16:36:11 +02:00
Bernhard Kirchen
4cd690de66 VE.Direct: publish data retrieved from HEX protocol 2024-04-18 13:06:37 +02:00
Bernhard Kirchen
abe01ae36f Feature: HTTP power meter: support changing sign 2024-04-18 12:10:29 +02:00
Bernhard Kirchen
ede1abb5e6 Feature: HTTP power meter: support mW/kW as units 2024-04-18 12:10:29 +02:00
Bernhard Kirchen
247cfe712e HTTP power meter: prevent out-of-bound array access 2024-04-18 12:10:29 +02:00
Bernhard Kirchen
e92701ccdf reuse power meter's HTTP config struct 2024-04-18 12:10:29 +02:00
Bernhard Kirchen
4bc4defe66 DPL: insist on power meter value more recent than inverter stats
avoid performing a calculation based on a (slightly) outdated power
meter reading, which was aquired just before the limit was actually
applied by the inverter, but which was received by OpenDTU-OnBattery
after the inverter stats.
2024-04-15 23:02:58 +02:00
Bernhard Kirchen
5fcf09d0a0 fix hysteresis hint texts 2024-04-15 23:02:58 +02:00
Bernhard Kirchen
52d7ac9581 Feature: DPL: support setups without power meter
without a power meter configured, the DPL now sets the base load as the
inverter limit if the battery charge allows it. it also takes
solar-passthrough into account, i.e., if the battery is in a charge
cycle but the solar output (Victron MPPT) is significant, the solar
power will be used up until the base load. if the battery reaches the
full solar passthrough threshold, the DPL will match the inverter limit
to the MPPT solar output.
2024-04-15 23:02:58 +02:00
Bernhard Kirchen
7e307114e5 Feature: DPL: introduce base load setting
on power meter issues (usually a timeout), keep the inverter enabled and
make it produce the configured base load limit if the battery can be
discharged. that should be okay since the base load config value is
expected to be small and a little less than the actual household base
load, i.e., if this amount of power is produced, the household will
consume it in any case and no energy is fed into the grid.
2024-04-15 23:02:58 +02:00
Bernhard Kirchen
cf1ea42f8b power limiter: remove obsolete enum 2024-04-15 23:02:58 +02:00
Thomas Basler
d0981934b0 webapp: add app.js.gz 2024-04-12 22:37:52 +02:00
Thomas Basler
68b1a9ee08 Remove no more required web server patch
By using the new ESPAsyncWebserver this patch is no more required as it is already included in the upstream repo
2024-04-12 20:53:36 +02:00
Thomas Basler
011f00e5de Fix: If unauthenticaed, the redirect to login page did not work 2024-04-12 20:38:28 +02:00
Thomas Basler
de156ef10a webapp: Fix lint errors 2024-04-12 20:34:30 +02:00
Thomas Basler
b58d08683e webapp: update dependencies 2024-04-12 20:02:18 +02:00
Thomas Basler
bf49410f6d Merge branch 'pr1909' into dev 2024-04-12 17:05:51 +02:00
Bernhard Kirchen
4c2822cdbc remove usage of F() macro
frees 888 Bytes of flash.
2024-04-12 15:33:47 +02:00
Bernhard Kirchen
153293e1c7 remove remaining usage of F() macro 2024-04-12 15:28:26 +02:00
Bernhard Kirchen
8b3a1bef47 Fix: show AC input power of Huawei AC charger in live view
makes the value match its description. since most values in the top part
of the live view are related to the AC side of the system, it makes
sense to use the correct value rather than to change the description.
2024-04-11 14:27:47 +02:00
Bernhard Kirchen
f634f58788 Fix: DPL: use correct channel type to get inverter efficiency 2024-04-11 08:28:49 +02:00
Bernhard Kirchen
a9c3e05f05 PowerMeter admin: URL examples to the top and hidden if disabled 2024-04-10 20:44:46 +02:00
PhilJaro
165a9bc168
adjust VE.Direct MPPT yield resulotion (#859) 2024-04-09 20:31:05 +02:00
eu-gh
0ed09aeb4c Feature: Huawei: add SoC stop threshold and verbose logging switch 2024-04-07 17:16:50 +02:00
SW-Nico
b9ad1e3054 VE.Direct: process more values and refactor variable names
* process "IL", "AR" and "MON"
* discard "BMV" and (unsolicited) History Data
* simplify isDataValid()
* veMpptStruct, veStruct: new, verbose variable names, including units,
  and replace floats (save values with original integer precision)
* comment on rollover situation in isDataValid()
2024-04-07 17:13:07 +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