Commit Graph

792 Commits

Author SHA1 Message Date
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
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
Bernhard Kirchen
a9c3e05f05 PowerMeter admin: URL examples to the top and hidden if disabled 2024-04-10 20:44:46 +02:00
eu-gh
0ed09aeb4c Feature: Huawei: add SoC stop threshold and verbose logging switch 2024-04-07 17:16:50 +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
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
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
helgeerbe
ff44267e73 Merge remote-tracking branch 'tbnobody/OpenDTU/master' into merge-v24.3.31 2024-04-03 11:53:03 +02:00
MalteSchm
8abf614047 Feature: BMS initiated emergency charging
This change logically connects the AC-Charger with the BMS to add BMS
initiated emergency charging and respecting BMS current limits.
2024-04-02 21:05:00 +02:00
PhilJaro
da96273085
Fix typo in German locale (#831) 2024-04-02 12:05:45 +02:00
Thomas Basler
f0a8cabc2c webapp: update dependencies 2024-03-31 14:31:57 +02:00
Rene
eff8d52014 better alignment inverter, issue 360 2024-03-25 22:42:22 +01:00
Bernhard Kirchen
06f39f8396 Merge remote-tracking branch 'tbnobody/master' into development 2024-03-23 22:58:21 +01:00
Bernhard Kirchen
054a677575 DPL settings in web app: split metadata from config
users are manipulating the DPL using HTTP POST requests. often they are
requesting the current settings using HTTP GET on the respective route,
then change a particular settings, and send all the data back using HTTP
POST. if they failed to remove the metadata node from the JSON,
OpenDTU-OnBattery would not be able to process the JSON due to its size.
the web app does not submit the metadata.

to avoid problems, the metadata is now split from the configuration
data.
2024-03-23 22:13:50 +01:00
Thomas Basler
bf4d128e49 webapp: update dependencies 2024-03-22 20:39:12 +01:00
Thomas Basler
ed326763b7 webapp: update dependencies 2024-03-21 19:59:13 +01:00
helgeerbe
5259fc172a Merge remote-tracking branch 'tbnobody/OpenDTU/master' into v24.3.15 2024-03-20 09:42:35 +01:00
PhilJaro
4f0385285c add new Victron SmartShunt values to liveView and MQTT (HASS) 2024-03-17 21:00:32 +01:00
Snoopy-HSS
f6680bd664 Feature: Support SMA HomeManager 2.0 as PowerMeter 2024-03-17 20:20:29 +01:00
Bernhard Kirchen
13bc943dd5 Feature: Refactor/Simplify DPL settings
this changeset refactors the web application's DPL settings view. the
DPL settings can be complex, and they shall be presented in a way that
allows users to comprehend their meaning. irrelevant settings are now
hidden or displayed dynamically based on the influencing settings.

* group SoC thresholds into their own card

* hide battery SoC thresholds if battery disabled. if the user did not
  even enable the battery interface, battery SoC values will not be used
  for DPL decisions. in that case we completely hide the respective
  settings from the DPL admin view. this reduces the amount of settings
  for new users and especially users who don't even have a battery in
  their setup or have no BMS connected.

* group voltage thresholds and improve label texts

* fix load correction factor unit

* fix header (wording)

* group solar-passthrough settings in new card

* group inverter-related settings

* hide solar passthrough settings if VE.Direct is disabled. closes #662.

* completely disable form if any requirement is not met

* list available inverters by name and type. this makes it much more
  convenient to select the right inverter, especially since the order of
  the inverters in the web UI is decoupled from their position in the
  internal array, which was used to select them previously. care was
  taken that old configs select the same inverter after an update.
  when editing the DPL settings, the selects an inverter from the newly
  created drow-down list, and the respective old inverter is
  pre-selected.

* disable form if no inverter is configured (config alert)

* make inverter input selection dynamic. adjust selection to actual
  amount of channels for selected inverter. skip selection altogether if
  inverter has only one channel, or if it is solar powered.

* web app: wording adjustments

* group meta data into new property and exclude from submission. saves
  memory when evaluating the submitted settings.

* hide irrelevant settings if inverter is solar-powered

* move restart hour setting to inverter card. translate setting which
  disabled automatic restart.

* simplify "drain strategy" setting into an on/off toggle. care was
  taken that existing configs work the same after an upgrade. the
  respective drain strategy is translated into the new setting when
  reading the config. once the config is written, the new setting is
  persisted and the old is not part of the config any more.

* show more configuration hints, depending on actual configuration

* replace inputs by InputElement components where possible
2024-03-17 16:50:57 +01:00
Bernhard Kirchen
7d6b7252bf polish support for second VE.Direct MPPT charge controller
* fix compiler warning in SerialPortManager.cpp: function must not
  return void

* clean up and simplify implementation of usesHwPort2()
  * make const
  * overrides are final
  * default implementation returns false
  * implement in header, as the implementation is very simple

* rename PortManager to SerialPortManager. as "PortManager" is too
  generic, the static instance of the serial port manager is renamed to
  "SerialPortManager". the class is therefore renamed to
  SerialPortManagerClass, which is in line with other (static) classes
  withing OpenDTU(-OnBattery).

* implement separate data ages for MPPT charge controllers

* make sure MPPT data and live data time out

* do not use invalid data of MPPT controlers for calculations

* add :key binding to v-for iterating over MPPT instances
2024-03-17 16:50:15 +01:00
Arman Vartan
75541be248 Feature: Support for second Victron MPPT charge controller
this change adds support for a second Victron MPPT charge controller
using a second serial connection.

* Add device configuration for a second victron mppt
* Update VedirectView for second victron mppt
* Update MqttHandleVedirect for second victron mppt
* Update MqttHandleVedirectHass for second victron mppt
* Handle nonexisting victron controllers with optionals
* Add bool-function to Battery and inherited classes, if uart port 2 is
  being used
* Introduced a serial port manager. In order to prevent the battery and
  the Victron MPPT to use the same hw serial ports, this class keeps
  track of the used ports and their owners.
2024-03-17 16:50:15 +01:00
Thomas Basler
7c60c37f49 webapp: update dependencies 2024-03-15 20:16:59 +01:00
Thomas Basler
3138e28cdf webapp: Remove not required cast to string 2024-03-15 19:54:29 +01:00
Thomas Basler
a0d0aec677 Fix: Correct detection of Hoymiles serial if it contains hex characters 2024-03-15 19:46:24 +01:00
Bernhard Kirchen
2efa1b35b0 live view: do not access undefined data
if the respective feature is disabled, there is no data. do not try to
access it.
2024-03-15 08:55:21 +01:00
Bernhard Kirchen
cf27bd29d7 adjust (new) about texts to OpenDTU-OnBattery 2024-03-14 16:27:32 +01:00
Thomas Basler
437f572c39 Fix: Don't throw exception if git_hash is not set 2024-03-12 22:11:19 +01:00
Thomas Basler
bd8d93bf92 Feature: Allow enabling and disabling of the version check
Fix #1787
2024-03-12 18:35:19 +01:00
Thomas Basler
9634c93a3c Fix: Show firmware update tooltip only if newer version available
Closes #1796
2024-03-12 17:27:43 +01:00
Thomas Basler
57a997baac webapp: update dependencies 2024-03-12 16:42:29 +01:00
Bernhard Kirchen
c6f81806d6 DPL: make "IsInverterSolarPowered" configurable through web app 2024-03-09 15:40:13 +01:00
Thomas Basler
f995287a6e Feature: Add support for HERF inverters 2024-03-06 21:57:18 +01:00
Bernhard Kirchen
50635ee2ce Feature: live view: update with respective frequency
the update frequency of Victron MPPT charger data, the battery Soc, the
huawei charger power, and the power meter differ from one another, and
differ in particular from the inverter update frequency.

the OnBattery-specific data is now handled in a new method, outside the
upstream code, which merely call the new function(s). the new function
will update the websocket independently from inverter updates. also, it
adds the respective data if it actually changed since it was last
updated through the websocket.

for the webapp to be able to recover in case of errors, all values are
also written to the websocket with a fixed interval of 10 seconds.
2024-03-05 11:31:44 +01:00
Thomas Basler
10cd2e4201 webapp: update dependencies 2024-03-04 21:07:01 +01:00
Thomas Basler
3c2b35016a webapp: update dependencies 2024-03-01 19:36:18 +01:00
Bernhard Kirchen
c560d1d90e
fix: copy OnBattery-specific data from live view websocket (#696)
closes #685.
closes #682.
2024-02-29 17:09:18 +01:00
helgeerbe
c72ae561c7 Merge remote-tracking branch 'tbnobody/OpenDTU/master' into development 2024-02-19 16:03:56 +01:00
Thomas Basler
f80d03210b webapp: update dependencies 2024-02-19 15:47:59 +01:00
Bernhard Kirchen
3595725f8a Feature: implement subscription to battery voltage MQTT topic
this extends the MqttBattery implementation by an additional topic which
allows to subscribe to receive battery voltage readings through the MQTT
broker. similar to the battery SoC topic, this allows to import a
critical battery data point for the DPL, in case the user chooses to use
voltage thresholds rather than SoC thresholds to control the DPL. if an
otherwise incompatible BMS is available which publishes the battery pack
voltage through MQTT, this can now be used to feed accurate voltage
readings to the DPL.
2024-02-18 22:17:15 +01:00
Bernhard Kirchen
921302bf73 Feature: DPL: add switch allowing to ignore SoC
unfortunately, the battery SoC values reported by battery BMSs are
unreliable, at least for some users, or at least without regular
(manual) full charge cycles to calibrate the BMS. it offers great
advantages to connect OpenDTU-OnBattery to a BMS (MQTT publishing of
values, Home Assistent integration, etc.), but previously the users
were then forced to configure the DPL by SoC values.

this change allows to configure the DPL such that SoC values are
ignored. instead, the voltage limits are used to make DPL decisions, as
if no SoC was available in the first place.

the SoC related setting are hidden from the DPL settings view if SoC
values are configured to be ignored.

closes #654.
2024-02-18 21:46:42 +01:00
Thomas Basler
380879e077 webapp: update dependencies 2024-02-16 18:24:14 +01:00
Hannes0009
a1cd1617e4
Update de.json
improved german orthography
2024-02-14 11:06:07 +01:00
Thomas Basler
c97de9b690 webapp: update dependencies 2024-02-12 16:48:54 +01:00
Thomas Basler
b9bf454237 webapp: Add link to documentation in about view 2024-02-10 02:10:06 +01:00
helgeerbe
b794f46ef0 Merge remote-tracking branch 'tbnobody/OpenDTU/master' into development 2024-02-09 20:14:58 +01:00
Thomas Basler
ac91a50ffe webapp: update dependencies 2024-02-07 19:29:09 +01:00
Thomas Basler
8e01a275af Merge branch 'pr1693' into dev 2024-02-02 22:36:18 +01:00
Nikolaj Kappler
86b9625254 fix #1668
use builtin bootstrap css for scrolling
2024-02-02 22:34:58 +01:00
Thomas Basler
7e2064e264 Feature: Added support for boards with 16MB flash and PSRAM 2024-02-02 20:33:42 +01:00
Thomas Basler
c27ecc3620 BREAKING CHANGE: Web API Endpoint /api/livedata/status
To reduce the heap usage it is necessary to send the inverters one by one instead of a huge response. A simple call to `/api/livedata/status` returns just some very general information. If detailed inverter information are required the inverter serial number has to appended `?inv=<serial number>`.
The websocket also returns only one inverter at a time. It as to be assembled at client side.
2024-01-30 22:29:25 +01:00
vaterlangen
97f006d867 fixed typo in OTA text 2024-01-27 15:18:25 +01:00
Thomas Basler
fe9ac6a2fd webapp: update dependencies 2024-01-26 16:56:49 +01:00
helgeerbe
7094bca7db fix: Inverter Labels in InverterTotalInfo 2024-01-26 13:34:03 +01:00
helgeerbe
ebacc2f25f Merge remote-tracking branch 'tbnobody/OpenDTU/master' into development 2024-01-25 23:36:32 +01:00
Thomas Basler
d99de94c00 webapp: Fix lint errors 2024-01-21 16:48:47 +01:00
Thomas Basler
3f135e8349 webapp: update dependencies 2024-01-21 16:39:22 +01:00
Thomas Basler
4cfb1b1c26 Fix: PullToRefresh does not work anymore
It was using the wrong mainElement
2024-01-21 00:55:05 +01:00
Thomas Basler
8a80289474 Feature: Implement firmware update check is a opt-in to protect your privacy 2024-01-20 22:43:40 +01:00
Thomas Basler
9428eecce4 webapp: Use CardElement in InverterTotalInfo 2024-01-19 22:03:26 +01:00
Thomas Basler
a06d21024c webapp: Move interfaces to seperate file 2024-01-19 21:48:39 +01:00
Thomas Basler
6b31a4d470 webapp: Introduce Modal component
Less duplicated code
2024-01-19 21:36:18 +01:00
Thomas Basler
5d63f64411 webapp: Fix typo 2024-01-19 20:02:03 +01:00
Thomas Basler
0584eadcf2 Feature: Automatic page reload after firmware upgrade
This will work after the current upgrade if this code was loaded.
2024-01-19 19:10:49 +01:00
Thomas Basler
f7119bc3c7 webapp: Fix font-feature class 2024-01-19 17:20:57 +01:00
Thomas Basler
ce978cb0f5 webapp: update dependencies 2024-01-18 20:39:44 +01:00
Nikolaj Kappler
199351c703 webapp: Correctly center header text 2024-01-18 20:39:43 +01:00
Nikolaj Kappler
a7479d33e3 webapp: Reduce wasted horizontal space for better mobile UX 2024-01-18 20:39:43 +01:00
Nikolaj Kappler
41f3955429 webapp: Vertically center Header/Logo Text 2024-01-18 20:39:43 +01:00
Nikolaj Kappler
bfeb852e23 webapp: Remove redundant main container 2024-01-18 20:39:43 +01:00
Nikolaj Kappler
caaa7b6347 fix count being a string 2024-01-18 20:39:43 +01:00
Nikolaj Kappler
f26e824247 fix #1649
one of the goals of my pull request, besides simplifying the code was to have localization.

It's nice that the browser can handle this, but for consistency, we'll go with vue-i18n since it is already available
2024-01-18 20:39:42 +01:00
Thomas Basler
6233ad12ae webapp: Prefix Country with CMT2300A 2024-01-18 20:39:28 +01:00
helgeerbe
63205f88be Merge remote-tracking branch 'tbnobody/OpenDTU/master' into development 2024-01-16 17:39:45 +01:00
Thomas Basler
18485ffefd webapp: update dependencies 2024-01-14 16:37:43 +01:00
Thomas Basler
c20caf8097 Feature: Support HMS/HMT inverters in different countries with different frequency bands
Thanks to @Fribur, @homeautomation2022 and @stefan123t
2024-01-14 16:37:34 +01:00
Thomas Basler
abc53f4257 Merge branch 'pr1639' into dev 2024-01-13 13:01:21 +01:00
Thomas Basler
2c92750100 webapp: Remove hard coded min/max frequencies for CMT module 2024-01-13 12:51:20 +01:00
Thomas Basler
ee78698e37 Migrate all frequency calculations to Hz
Previously the code contains calculations  using a mixture  of kHz and Hz.

Thanks to @Fribur
2024-01-13 12:51:20 +01:00
Thomas Basler
f013698471 Feature: Added fullscreen diagram to display 2024-01-13 11:31:12 +01:00
Nikolaj Kappler
6166ecdb7d refactor webapp/utils/time 2024-01-13 11:14:20 +01:00
Thomas Basler
637d4f06a3 Feature: Added option to disable the diagram at the display 2024-01-08 14:19:26 +01:00
Thomas Basler
9d8e195ce1 Merge branch 'pr1611' into dev 2024-01-07 01:53:43 +01:00
Bernhard Kirchen
2608080708 Feature: add heap details to system info and prometheus (#595)
this change adds the values of ESP.gteMaxAllocHeap() and
ESP.getMinFreeHead() to the prometheus metrics and the system
information object. the web UI uses these values to diplay the size of
the largest free contiguous block, calculate a rough estimate for the
level of fragmentation, and the maximum usage of heap memory since boot
in absolute and relative amounts.
2024-01-06 20:12:35 +01:00
Thomas Basler
024ee26705 Feature: Added pull to refresh and websocket indicator 2024-01-06 20:03:52 +01:00
Thomas Basler
bfcce16bc9 webapp: update dependencies 2024-01-05 22:04:54 +01:00
Thomas Basler
88d75673fc Prevent config corruption by checking whether memory allocation was successfull. 2024-01-05 21:55:15 +01:00
Bernhard Kirchen
377406f10c
Feature: add heap details to system info and prometheus (#595)
this change adds the values of ESP.gteMaxAllocHeap() and
ESP.getMinFreeHead() to the prometheus metrics and the system
information object. the web UI uses these values to diplay the size of
the largest free contiguous block, calculate a rough estimate for the
level of fragmentation, and the maximum usage of heap memory since boot
in absolute and relative amounts.
2024-01-05 21:46:31 +01:00
Thomas Basler
22e2d1bb54 webapp: update dependencies 2024-01-04 22:57:12 +01:00
Bernhard Kirchen
e7a005839b
Feature: implement MQTT-driven battery provider (#589)
this battery provider implementation subscribes to a user-configurable
MQTT topic to retrieve the battery SoC value. the value is not
re-published under a different topic. there is no card created in the
web app's live view, since the SoC is already part of the totals at the
top of the live view. that is the only info this battery provider
implements.

closes #293.
relates to #581.
2024-01-04 15:42:10 +01:00
Thomas Basler
4053e31a5e Prevent config corruption by checking whether memory allocation was successfull. 2024-01-04 13:42:39 +01:00
Moritz Lerch
d62234ac65
webapp: add missing button spacing 2024-01-02 23:40:21 +01:00
MalteSchm
5bd3ce5a8f
Reducing lower limit for AC-charger (#574) 2024-01-01 17:06:58 +01:00
helgeerbe
cbf7680836 merge v23.12.31 2024-01-01 14:50:51 +01:00
Thomas Basler
1ebd5620de webapp: update dependencies 2023-12-31 19:28:53 +01:00
Bernhard Kirchen
7928f2f8cf
Feature: JK BMS: add more values to live view (#552)
there are more interesting values available to display in the live view.
however, adding them made the list of values very long. this can be
mitigated by using a new column/card, which uses the available screen
space nicely on bigger screens.
2023-12-30 16:46:44 +01:00
Bernhard Kirchen
bb34fa74fd
Fix: use FormFooter in OnBattery-specific forms (#569)
the upstream project introduced a new Vue component "FormFooter", which
is used to end an input form, namely all settings forms. we should not
only use this component as well, but the save button on our forms
actually broke since the text dtuadmin.Save is replaced by base.Save.

also replace the use of dtuadmin.Seconds with base.Seconds, such that an
upstream change to dtuadmin.Seconds will not break the battery admin an
AC charger views.
2023-12-30 16:46:16 +01:00