Commit Graph

803 Commits

Author SHA1 Message Date
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
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
Thomas Basler
a667042977 webapp: Update dependencies 2024-06-29 00:33:49 +02:00
Thomas Basler
ba95f99e03 Feature: Allow custom MQTT Client ID 2024-06-29 00:28:21 +02:00
Thomas Basler
e4bbf55ea5 webapp: Check if temperature is set
It seems that some ESPs don't have a temperature sensor anymore
2024-06-29 00:08:57 +02:00
Bernhard Kirchen
3fe39d722c PowerMeter admin view: make the linter happy
* do not combine v-if and v-for
* add v-bind:key to for loop of HTTPS+JSON power meter value configs
2024-06-27 22:18:41 +02:00
Bernhard Kirchen
9911dec279 HTTP request config component: do not mutate prop
use an event-driven mutation scheme, i.e., adapt the common v-model
approach to bind data to the child component.
2024-06-27 22:18:41 +02:00
Bernhard Kirchen
ea84bb9229 power meter web UI: remove JSON path placeholder
this causes too much confusion, as many users don't understand that this
is a placeholder, not an actual configured value.
2024-06-27 22:18:41 +02:00
Bernhard Kirchen
15b6a32b92 Feature: support JSON payload in MQTT power meter
the MQTT power meter can now process the messages published at the
respective topics as JSON and extract a power value using a JSON path
(same as in HTTP+JSON power meter). additionally, selecting a unit for
the power value as well as an option to invert the value's sign was
added as well, similar to the HTTPS+JSON power meter.
2024-06-27 22:18:41 +02:00
Bernhard Kirchen
9520d8d394 powermeter refactor: polish web UI 2024-06-27 22:18:41 +02:00
Bernhard Kirchen
a2a9debd02 Feature: make power meter polling intervals configurable
this change makes the respective setting accessible from the web UI.
2024-06-27 22:18:41 +02:00
Bernhard Kirchen
3f2d9d38fa powermeter refactor: fully structure settings per provider
all power meter providers now have their own configuration struct
defined. a respective method to serialize and deserialize the provider
config is implemented for each provider.
2024-06-27 22:18:41 +02:00
Bernhard Kirchen
e1778eba76 powermeter refactor: use HttpGetter in HTTP SML implementation 2024-06-27 22:18:41 +02:00
Bernhard Kirchen
a08ef4cb43 powermeter refactor: test HTTP+JSON power meter as a whole
apply all config values from the webfrontend, then perform one polling
cycle. display values seperately in the result, and show the resulting
value as well.
2024-06-27 22:18:41 +02:00
Bernhard Kirchen
4d99e87ef4 powermeter: add example URL with non-default TCP port 2024-06-26 21:25:08 +02:00
Bernhard Kirchen
6da90de765 remove extraction of basic auth params from URL
the extractUrlComponents method did extract username and password
from the URL and encoded it for basic authentication. however, the
respective result string was never used. we only perform basic
authentication if the auth type is "basic" and if username and
password were supplied through the respective inputs.
2024-06-26 21:25:08 +02:00
Bernhard Kirchen
297b149f84 powermeter refactor: generalize HTTP request config
the parameters to peform an HTTP request by the HTTP(S)+JSON power meter
have been generalized by introducing a new config struct. this is now
used for all values which the HTTP(S)+JSON power meter can retrieve, and
also used by the HTTP+SML power meter implementation. we anticipate that
other feature will use this config as well.

generalizing also allows to share serialization and deserialization
methods in the configuration handler and the web API handler, leading to
de-duplication of code and reduced flash memory usage.

a new web UI component is implemented to manage a set of HTTP request
settings.
2024-06-26 21:25:08 +02:00
Bernhard Kirchen
54c04aed61 SDM power meter: remove baud rate setting
this setting was not used. the baud rate for the SDM is set to 9600 in
the source code. until the baud rate being customizable is actually
required by somebody, we remove the setting altogether.
2024-06-26 20:51:56 +02:00
Marvin Carstensen
8ec1695d1b Feature: support Tibber bridge as power meter interface 2024-06-26 20:50:50 +02:00
Bernhard Kirchen
83c59d7811 convert files with CRLF endings to LF endings
this only changes line endings. inspect this commit with command `git
show <commit-sha> --ignore-space-at-eol` and it will tell you that the
commit appears to be "empty" (since all changes are whitespace changes
near the end of a line, which are ignored in that git show command).

the files to be changed were found and updated using this command:
find lib src include webapp/src -type f | \
    xargs grep --binary-files=without-match --files-with-matches \
    $(printf '\r\n') | xargs dos2unix

the following files were restored afterwards, as they are using CRLF
line endings in the upstream as well:
 - lib/CMT2300a/cmt2300a_defs.h
 - lib/README
 - include/README
2024-06-24 21:57:12 +02:00
Bernhard Kirchen
5e3a53d8d3 Merge upstream tag 'v24.6.10' into development 2024-06-21 16:45:41 +02:00
Andreas Böhm
83ac15405e
Feature: Implement DPL 'overscaling' to compensate shading (#956) 2024-06-20 13:32:29 +02:00
Bernhard Kirchen
95e560bdc7 fix: optimize margins in live view
all total cards at the top of the live view go into the same row.
bootstrap will line-break after every third column/card, as the row
is row-cols-3.

the battery icon to the right of the project name in the header shall
have marging to said project name.

the rows in the live view now use class mt-0 to counteract bootstraps
negative margin for individual rows.
2024-06-17 17:32:26 +02:00
Thomas Basler
417df65b92 webapp: update dependencies 2024-06-10 21:40:55 +02:00
Thomas Basler
8ef28e27b4 webapp: update dependencies 2024-06-08 11:11:31 +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
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
eu-gh
90eb25f503
Fix: Huawei PSU: enforce BatterySoC Limit < 100 in UI (#992) 2024-05-30 21:31:46 +02:00
Bernhard Kirchen
6ab1b41f78 fix: project's name is 'OpenDTU-OnBattery' (capital 'O')
there were 47 matches in the repo for "OnBattery", but only 17 for
"onBattery". Also, the repo's name on github uses a capital 'O'.
2024-05-30 13:55:44 +02:00
Thomas Basler
72492c267f webapp: Remove no more required locale 2024-05-30 00:05:14 +02:00
Thomas Basler
ea4e7b77f5 webapp: Remove duplicated code 2024-05-29 21:09:37 +02:00
Thomas Basler
df80953b5e Use correct units in hardware info 2024-05-28 23:38:43 +02:00
Thomas Basler
6ce474053e Feature: Show MCU temperature in system info 2024-05-28 23:24:08 +02:00
Thomas Basler
e211dd5be2 Add proper formatting for flashsize output 2024-05-28 21:37:20 +02:00
Thomas Basler
5761e9facf webapp: Locale update for "screensaver"
Fix #2010
2024-05-28 21:32:46 +02:00
Thomas Basler
24983acf17 Merge branch 'pr2015' into dev 2024-05-28 20:13:22 +02:00
Bernhard Kirchen
bdc9c09db2 Feature: show ESP32 flash memory size in system info 2024-05-27 21:54:35 +02:00
Bernhard Kirchen
4972892d9a Feature: show ESP32 flash memory size in system info 2024-05-27 21:52:49 +02:00
Bernhard Kirchen
edf493bc6d DPL web UI: add hint to setting "inverter behind power meter" 2024-05-09 13:58:48 +02:00
Bernhard Kirchen
ca3d1da740 power meter web UI: add example for array access + translations
this re-adds an example JSON path accessing an array in the JSON.
also use translatable texts in the example section.
2024-05-09 13:58:44 +02:00
Bernhard Kirchen
255e81e6bd Merge upstream tag 'v24.5.6' into development 2024-05-07 22:03:26 +02:00
Stefan Schultheis, OE1SCS
a11cc82782
Typos de.json translation 2024-05-07 13:58:27 +02:00
Thomas Basler
f6e048b064 webapp: update dependencies 2024-05-06 19:40:36 +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
Bernhard Kirchen
18dab3cf1c Merge upstream tag 'v24.4.24' into development 2024-05-02 20:49:41 +02:00
Thomas Basler
69e257dc8e webapp: update dependencies 2024-04-29 22:54:26 +02:00