Commit Graph

2656 Commits

Author SHA1 Message Date
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
Stefan Oberhumer
97800434c4 Prevent compiling the whole project on each commit.
Putting the git information into a generated sourcefile prevents
recompiling the whole project after each commit.
2024-04-18 09:02:57 +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
Thomas Basler
2e3125fe8d Feature: Migrated ArduinoJson 6 to 7 2024-04-05 19:14:56 +02:00
Thomas Basler
e7a9c96b72 Upgrade ESP Async WebServer from 2.8.1 to 2.9.0 2024-04-03 23:11:30 +02:00
Bernhard Kirchen
3934906001
Merge pull request #836 from helgeerbe/merge-v24.3.31
Merges v24.3.31 from upstream
2024-04-03 20:08:09 +02:00
Thomas Basler
aa10c2c5e1 Fix: Too small event_queue_size in AsyncTCP lead to wdt reset
Fix #1705
2024-04-03 19:12:08 +02:00
Thomas Basler
b55ca53d1d Fix: Setting DTU options was only possible once without reboot
Fix #1884
2024-04-03 18:35:27 +02:00
Bernhard Kirchen
21cdc69625 Feature: use VE.Direct "network total DC power"
1. makes the DPL use the power generated by all connected charge
   controllers for calculations based on solar passthrough.
2. makes the network total DC power appear as "MPPT Total Power" in the
   live view at the top.
3. shows the network total DC power in the VE.Direct live data card.
2024-04-03 16:33:15 +02:00
Bernhard Kirchen
6b8c93d2e6 polish VE.Direct HEX support
* show charge controller temperature in live view
* send hex requests right after decoding a frame. this seems to have the
  best chance of getting an answer to all requests.
* deem 0xFFFFFFFF value of network total DC power as invalid indicator.
  neither network state, nor network info, nor network mode seem to
  indicate that the charge controller is part of a VE.Smart network. for
  that reason, we revert to always querying the network total DC power
  value, but testing it for max(uin32_t) value, which seems to indicate
  that the charge controller is not part of a VE.Smart network.
* improve (verbose) logging, e.g., use _logId, and print names of
  response codes and known registers, always print error messages,
  add additional tests to prevent overly verbose messages.
* move hex protocol definitions to VeDirectData.h header
  and use enum classes
* define register addresses in enum class
* move values retrieved through hex protocol into main MPPT data struct
* do not send HEX requests if the serial interface cannot send data
* detect whether smart battery sense temperature is available
* web app: make all VE.Direct sub-cards iterable. this makes addind more
  values much simpler and saves a bunch of code in the web app.
* make VeDirectFrameHandler state a type-safe enum class
* unindent MPPT controller loop()
* whitespace cleanup
2024-04-03 16:33:15 +02:00
SW-Nico
aadd7303ac Feature: add support for VE.Direct hex messages 2024-04-03 16:33:15 +02:00
helgeerbe
ff44267e73 Merge remote-tracking branch 'tbnobody/OpenDTU/master' into merge-v24.3.31 2024-04-03 11:53:03 +02:00
Bernhard Kirchen
8c6e925ca4 VE.Direct: make state machine timeout robust against overflow 2024-04-02 21:05:59 +02:00
Bernhard Kirchen
43f553d2d4 VE.Direct MQTT: simplify code
the use of a #define is warranted here since it saves a lot of code
duplication and improves code readability.
2024-04-02 21:05:59 +02:00
Bernhard Kirchen
92a7f27919 VE.Direct: use float rather than double
double precision floating point numbers are not needed to handle
VE.Direct values. handling double is implemented in software and hence
*much* more resource intensive.
2024-04-02 21:05:59 +02:00
Bernhard Kirchen
b299b9dc6c VE.Direct: simplify access to data
hand out const& to the data structs. this is possible now that this
struct is "stable", i.e., not reset regularly.
2024-04-02 21:05:59 +02:00
Bernhard Kirchen
ad125ea804 Fix: properly handle fragmented VE.Direct messages
queue every text event until the frame was checked by it checksum. then
process the data directly into the buffer struct. do not clear the
buffer struct, so it will always include the most recent value of a
particular data point.
2024-04-02 21:05:59 +02:00
Bernhard Kirchen
187f197e32 Feature: add unique prefix to VE.Direct messages 2024-04-02 21:05:59 +02:00