Commit Graph

517 Commits

Author SHA1 Message Date
Bernhard Kirchen
5d8bb8f810 Merge upstream tag 'v24.9.26' into development 2024-09-27 20:07:53 +02:00
Thomas Basler
818fdc42c9 Simplify inverter handling 2024-09-26 18:17:11 +02:00
Thomas Basler
8e26ef4e2e Fix: Only count RF RX packets when packets where sent
This mainly occours after a reset of  the statistics that receive count is higher then transmit count
2024-09-26 17:45:34 +02:00
Thomas Basler
0c012bf62a Move inverter housekeeping tasks inside the InverterAbstract class 2024-09-23 22:08:53 +02:00
Bernhard Kirchen
82de98c7c0 Merge remote-tracking branch 'tbnobody/master' into development 2024-09-23 21:38:50 +02:00
Eugen
2637e32145
Feature: rxen/txen support for RS485 transceiver for SDM power meter (#1269)
This allows to talk to the SDM power meter through an RS485 transceiver
with separate rxen and txen pins, like on the OpenDTU Fusion board.
2024-09-23 21:20:03 +02:00
Thomas Basler
a54b19bf5b Feature: Inverter radio statistics (rx/tx statistics)
The  statistics are shown in the WebApp and published via MQTT.
Statistics are reset at midnight.
2024-09-22 18:51:07 +02:00
Bernhard Kirchen
38726b99ab Merge remote-tracking branch 'tbnobody/master' into development 2024-09-21 22:00:49 +02:00
Gumbagubanga
89d9a40296
Feature: Support for W5500 ethernet module (#1231)
adds support for w5500 Ethernet chip, present on
OpenDTU Fusion PoE Ethernet hat in particular.
2024-09-13 16:51:22 +02:00
Thomas Basler
a949776966 Feature: Add support for HERF 1 channel inverters 2024-09-02 20:44:26 +02:00
Thomas Basler
1f3af949a0 Add serial prefix 1410 to HMS_2CH inverters
This is related to #2235 and fixes #2230
2024-08-28 21:25:15 +02:00
Andreas Böhm
df53f34b51
Feature: SPIPortManager allows simultaneous use of CMT2300 and Huawei charger
* backport SPIPortManager from @skippermeister
* adapt to support ESP32 and ESP32-S3 and ESP32-C3
* use logic to work with SPI numbering as in the official
  documentation: start with SPI0 and go up to SPI3
* increase Huawei CAN controller stack size to 2000
* increase startup delay for USB_CDC enabled builds to be able to
  catch bootlogs over USB
2024-08-19 20:44:59 +02:00
Bernhard Kirchen
77af085ad3 Merge upstream tag 'v24.8.1' into development 2024-08-01 20:28:11 +02:00
Thomas Basler
70dacb5ea6 Merge branch 'pr2168' into dev 2024-08-01 17:53:53 +02:00
Bernhard Kirchen
6ee6eaf0b2
Fix: inverter power limits precision
Hoymiles inverters allow setting relative limits with a precision of 0.1 %.
this changeset allows to utilize this precision.

* preserve accuracy when decoding power limit
* Web API: process floating point limits
* MQTT: process floating point limits
* use appropriate accuracy for limits in web UI
* HASS: step for relative inverter limit is 0.1 %
2024-07-23 21:17:25 +02:00
Niko
0013b2c934
Double VE.Direct receive buffer to avoid overflow (#1109) 2024-07-16 08:15:11 +02:00
Thomas Basler
45b7f45734 Merge branch 'pr2099' into dev 2024-07-05 21:17:06 +02:00
Thomas Basler
d09be3a384 Feature: Add support for HMS-800-2T-LV inverters 2024-07-05 21:10:15 +02:00
Bernhard Kirchen
6b09ca056e Feature: SML power meters: reset SML decoder
implement a function which allows to reset the SML decoder. this new
function is used after a datagram ends. for the SML HTTP power meter
this is simple: after all bytes from the request's answer have been
decoded, we reset the decoder. for the SML serial power meter, we
perform the reset after a datagram ended based on timing (no new bytes
have been received for a specific amount of time).
2024-06-27 22:18:41 +02:00
Bernhard Kirchen
5be1615f4e SML parser: add new OBIS handlers for Hertz and Degrees
copied from the original library.
2024-06-27 22:18:41 +02:00
Bernhard Kirchen
19a8f6a7bd SML parser: pass SML char by value
there is no use in passing it by reference, especially a non-const
reference.
2024-06-27 22:18:41 +02:00
Bernhard Kirchen
7f724ce561 SML parser: remove commented-out code
the comparison is part of the original library code, but the compiler
rightfully complains that the comparison byte <= 0xFF is always true,
since byte is uint8_t. the comparison was commented out, and is now
removed.
2024-06-27 22:18:41 +02:00
Bernhard Kirchen
1afa9a6d90 SML parser: prevent out-of-bound array access
array nodes has MAX_TREE_SIZE elements, so the maximum index allowed to
use to access an element of nodes is one less, not MAX_TREE_SIZE.
2024-06-27 22:18:41 +02:00
Bernhard Kirchen
6c06e71fd0 Feature: SDM power meter: switch to software serial
a 9600 baud serial interface does not need a hardware UART. these
changes switch the SDM power meter implementation to use a software
serial instance instead. this is desirable as hardware UARTs are scarce
and users need them for JK BMS and VE.Direct interfaces.
2024-06-27 22:18:41 +02:00
Bernhard Kirchen
8202bb23cd update SDM power meter library to version 2.2.3
in particular, this brings improved timing (settings). the values are
now read out much quicker in succession.
2024-06-27 22:18:41 +02:00
Bernhard Kirchen
75c07c17f2 powermeter refactor: SML lib: replace double by float
avoid additional conversions and avoid double for the fact that
calculations on type double are implemented in software, whereas
float is handled in hardware on ESP32.
2024-06-26 20:51:56 +02:00
Florian Mösch
ca4c45fcf2 Update AlarmLogParser.cpp
added a few German translations
2024-06-24 17:22:30 +02:00
Bernhard Kirchen
5e3a53d8d3 Merge upstream tag 'v24.6.10' into development 2024-06-21 16:45:41 +02:00
Bernhard Kirchen
5a1c3af31f Feature: add support for a third Victron MPPT
only on ESP32-S3-USB. this fiddles with the available hardware UARTs to
make it possible to use a third Victron MPPT. if three MPPTs are defined
int the pin mapping, you will not be able to use the SmartShunt and JK
BMS battery interfaces.

note that using a second MPPT will also conflict with the SDM power
meter, and that conflict is not detected, yet.
2024-06-02 22:41:07 +02:00
Thomas Basler
b1a8f04617 Fix: Wrong divider in gridprofile RVHF
Fixes #2021
The result may look wrong for some profiles (e.g. 502 Hz) but it seems to be correct as the Hoymiles parser also outputs 502 Hz. See #1606
2024-06-02 13:56:13 +02:00
Bernhard Kirchen
c22ae2bf8d Feature: show BMS FW and HW version (JK BMS, SmartShunt) 2024-06-01 11:23:22 +02:00
swingstate
561f4be6d6 Feature: SmartShunt: process midpoint voltage and deviation 2024-05-31 21:08:15 +02:00
Bernhard Kirchen
63370e8a83 VE.Direct: prefer strncpy over strcpy
strcpy is not safe.
2024-05-31 20:16:29 +02:00
Bernhard Kirchen
88314f93c2 Fix: properly format Victron MPPT firmware version 2024-05-31 20:16:29 +02:00
Thomas Basler
6e607f7f67 Feature: Add option to clear eventlog at midnight 2024-05-31 00:07:28 +02:00
Thomas Basler
3a4f70dc75 Added parser documentation 2024-05-30 23:27:29 +02:00
Thomas Basler
33bfde34b2 Added some missing names to grid profile parser 2024-05-29 22:48:27 +02:00
Thomas Basler
6ce474053e Feature: Show MCU temperature in system info 2024-05-28 23:24:08 +02:00
Thomas Basler
90711ddd76 Code Refactoring: Use internal inverter instance in handleResponse method 2024-05-16 19:58:20 +02:00
Thomas Basler
6d6d62bb77 Code Refactoring: Use internal inverter instance in gotTimeout method 2024-05-16 19:55:01 +02:00
Thomas Basler
6a7bed0ecf Code Refactoring: Add inverter reference to each command
Instead of just adding the target_address to a command this patch adds a reference to the whole inverter instance
2024-05-16 19:54:09 +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
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
helgeerbe
fdc5054480 Merge remote-tracking branch 'tbnobody/OpenDTU/master' into merge-v24.4.12 2024-04-25 20:59:19 +02:00
Thomas Basler
bf49410f6d Merge branch 'pr1909' into dev 2024-04-12 17:05:51 +02:00
Bernhard Kirchen
153293e1c7 remove remaining usage of F() macro 2024-04-12 15:28:26 +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
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
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