Commit Graph

2612 Commits

Author SHA1 Message Date
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
51624669b0 move documentation to opendtu-onbattery.net 2024-08-17 22:16:50 +02:00
Bernhard Kirchen
2894d15477 remove obsolete #include 2024-08-16 21:38:16 +02:00
Bernhard Kirchen
5d1d071c8a
Fix: Improve DPL nighttime discharging (#1126)
* fix: DPL: start discharging at night logic error

the switch "always start discharging battery at night" would cause to
stop discharging the battery when there was solar power and the battery
was discharged below the start threshold.

this change introduces a nighttime discharging boolean variable, which
is enabled the instant we decide to start a battery discharge cycle due
to nighttime havin arrived. we reset this variable as soon as it is
daytime (solar power available). in that case, we allow discharging the
battery if the start threshold was reached. this can actually be the
case if the battery is charged with cheap electricity during the night.

removed comments as they merely spell out what the if statement already
expresses quite nicely.

* use SunPosition.isDayPeriod() to check for daytime

---------

Co-authored-by: Andreas Böhm <andreas@boehm.cx>
2024-08-15 20:10:32 +02:00
Andreas Böhm
599c5cea7d
adjustment: reduce precision of charged- and discharged energy for pytes batteries (#1165)
Precision is reduced to match the CAN protocol definition.
2024-08-13 17:51:12 +02:00
Andreas Böhm
dacf9d4be1
remove ac-charger target consumption limits (#1159) 2024-08-08 22:41:05 +02:00
Andreas Böhm
df11db1244
fix: add auth check on battery, huawei and powermeter API endpoints (#1155) 2024-08-08 20:58:12 +02:00
Bernhard Kirchen
82b28e3732 Merge upstream tag 'v24.8.5' into development 2024-08-06 21:05:21 +02:00
Thomas Basler
0cc55f3b87 webapp: update dependencies 2024-08-05 18:31:31 +02:00
Thomas Basler
0bb3fc8b94 Fixed documentation for webapp dev mode 2024-08-05 18:31:31 +02:00
Thomas Basler
e279cf5cec Added hint in issue template that HMS-xxxW inverters are not supported 2024-08-05 18:31:31 +02:00
Thomas Basler
cdaf10a92a Fix: Wifi reconnect issue introduced with #2117 and discussed in #2185 was fixed 2024-08-05 18:31:21 +02:00
Bernhard Kirchen
04513d3f22 webapp: disable OTA firmware dialog for unsupported devices
show a warning instead and cancel uploads with a HTPP 500 response.
2024-08-04 22:38:19 +02:00
Bernhard Kirchen
4334e60030 webapp: apply formatter on downstream sources 2024-08-01 20:51:59 +02:00
Bernhard Kirchen
77af085ad3 Merge upstream tag 'v24.8.1' into development 2024-08-01 20:28:11 +02:00
Thomas Basler
e85001b2d2 webapp: add app.js.gz 2024-08-01 18:42:12 +02:00
Thomas Basler
eef0335d37 Update espressif32 from 6.7.0 to 6.8.1 2024-08-01 18:39:53 +02:00
Thomas Basler
931eafff18 Merge branch 'pr2109' into dev 2024-08-01 18:23:40 +02:00
Thomas Basler
7627db6c39 Update nrf24/RF24 from 1.4.8 to 1.4.9 2024-08-01 18:16:11 +02:00
Thomas Basler
1984eeeca3 Update bblanchon/ArduinoJson from 7.0.4 to 7.1.0 2024-08-01 18:13:46 +02:00
Thomas Basler
03137e15dd Upgrade ESPAsyncWebServer from 2.10.8 to 3.1.2 2024-08-01 18:11:39 +02:00
Thomas Basler
a17aa031dd webapp: update dependencies 2024-08-01 18:11:29 +02:00
Thomas Basler
70dacb5ea6 Merge branch 'pr2168' into dev 2024-08-01 17:53:53 +02:00
vaterlangen
cb5e7e59a5 Feature: add unit for MQTT battery voltage (#1143) 2024-07-31 15:05:41 +02:00
Bernhard Kirchen
1a19f881aa Feature: support JSON payload in MQTT battery provider
this changeset adds support for parsing the MQTT battery provider's SoC
and voltage topics' payloads as JSON to extract a numeric value at a
configurable path.
2024-07-31 15:05:41 +02:00
Andreas Böhm
accc70dea0
feature: show battery voltage, current, and power in live view (#1131)
* show battery voltage, current, and power in live view header (the "totals")
* show battery current and power in extra card
* use soc and current precision in live view
* BatteryStats: do not knowingly publish invalid data: not all battery
  providers know all values the base class manages. make sure to
  prevent publishing invalid values.

Co-authored-by: Bernhard Kirchen <schlimmchen@posteo.net>
2024-07-27 21:35:58 +02:00
Andreas Böhm
e95b70efeb
Feature: expose 'full solar passsthrough active' via MQTT (#1136) 2024-07-26 20:37:40 +02:00
Andreas Böhm
e3f9da75b9
BREAKING CHANGE: allow multiple OpenDTU-OnBattery instances at same HASS
This breaks existing HASS automation, as entity names and MQTT topics change!

* include dtu-unique-id in DPL MQTT HASS topics to allow multiple DTUs to be controlled
* fix filename "src/MqttHandlVedirectHass.cpp"
* refactor: use values from 'MqttHandleHass', add 'via_device' to all HASS devices
* set step size for power limiter voltage values
2024-07-23 21:27:14 +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
Bernhard Kirchen
86a49a781a fix: use mutex when writing MQTT power meter value
we previously used the mutex to protect writing the target variable.
however, we would only do that for the old usecase, where a plain float
value in Watts was expected as the topic's payload.
2024-07-22 20:07:38 +02:00
Bernhard Kirchen
5e5a5253f4 fix: initialize MQTT power meter values to zero
avoid using uninitialized memory.
2024-07-22 20:07:38 +02:00
Niko
415c767d1d
Fix: Victron MPPT: be happy with at least one that delivers valid data (#1118) 2024-07-21 19:46:06 +02:00
Sven Sowa
5fee069c65
Remove double call to generateOnBatteryJsonResponse() (#1115)
the 2nd call was added in a merge operation in April
2024-07-21 17:59:57 +02:00
Niko
0013b2c934
Double VE.Direct receive buffer to avoid overflow (#1109) 2024-07-16 08:15:11 +02:00
Bernhard Kirchen
926a0b992d improve error messages when probing JSON path value type 2024-07-15 17:41:30 +02:00
Bernhard Kirchen
9e7a0bca31 fix: handle numeric values disguised as strings in JSON
closes #1104.
2024-07-15 17:41:30 +02:00
Andreas Böhm
b90da210be
Fix: Improve overscaling for shaded inputs (#1089) 2024-07-11 15:03:12 +02:00
Bernhard Kirchen
d9d0141fde Merge upstream tag 'v24.6.29' into development 2024-07-10 21:45:43 +02:00
Bernhard Kirchen
e358513495
Merge PR #1077 from helgeerbe/powermeter-refactoring
this PowerMeter refactoring tackles many issues and prepares to solve many more.
2024-07-10 21:20:39 +02:00
Andreas Böhm
6a3f90ff95
Feature: add support for Pytes batteries using CAN (#1088)
Co-authored-by: Bernhard Kirchen <schlimmchen@posteo.net>
2024-07-10 21:01:49 +02:00
Thomas Basler
7e52003830 Merge branch 'pr2035' into dev 2024-07-05 22:01:27 +02:00
Thomas Basler
342642ec01 webapp: Apply auto formatter 2024-07-05 21:57:53 +02:00
Thomas Basler
d8316db20f webapp: Add Autoformatter 2024-07-05 21:32:26 +02:00
Thomas Basler
b4e4e3b04d webapp: update dependencies 2024-07-05 21:24:38 +02:00
Thomas Basler
45b7f45734 Merge branch 'pr2099' into dev 2024-07-05 21:17:06 +02:00
Thomas Basler
4fd0cabe29 Merge branch 'pr2117' into dev 2024-07-05 21:15:34 +02:00
Thomas Basler
d09be3a384 Feature: Add support for HMS-800-2T-LV inverters 2024-07-05 21:10:15 +02:00
Bernhard Kirchen
0c16652acb make MQTT power meter the default power meter
make the MQTT power meter pre-selected when editing power meter settings
for the first time. the MQTT power meter is the most efficient and hence
preferred power meter implementation.
2024-07-01 22:12:30 +02:00
Bernhard Kirchen
b808e9ab18 HTTP+JSON power meter: value 1 is always enabled
enabling the HTTP+JSON power meter without enabling at least one value
makes no sense, so value 1 has always been treated as "always enabled".
while doing the power meter refactoring, however, a regression was
introduced that would hide the settings for value 1 in the web UI until
the power meter settings would be saved, which they cannot be due to
missing settings for value 1.
2024-07-01 22:07:55 +02:00
jstammi
1eab3ae773 Fix: explicitly disconnect prior connecting to wifi
to prevent from invalid association packets exchange
#618

(cherry picked from commit b6c320d481eb77b4f4e0407237917d2d897bfd9d)
2024-06-30 20:20:05 +02:00