Commit Graph

1949 Commits

Author SHA1 Message Date
helgeerbe
a1d0dad128 Merge branch 'development' 2023-11-15 14:29:52 +01:00
helgeerbe
8cccce5875 add weapp 2023-11-15 14:26:54 +01:00
helgeerbe
6f7470feb4 fix: ModuleNotFoundError: No module named 'pkg_resources': 2023-11-15 14:07:27 +01:00
helgeerbe
28f46471bf set unique name for test_build action 2023-11-15 13:59:22 +01:00
helgeerbe
a004e94e57 create test_build action 2023-11-15 13:59:09 +01:00
helgeerbe
6e336f1117 set unique name for test_build action 2023-11-15 13:54:42 +01:00
helgeerbe
7637dc591b create test_build action 2023-11-15 13:52:35 +01:00
MalteSchm
3dceddfe49
Split Huawei setValue in private/public implementation. Prevent setting values when internal power control mode is enabled (#521) 2023-11-15 12:38:35 +01:00
helgeerbe
d4d42167ec Merge branch 'pr/philippsandhaus/510' into development 2023-11-15 12:33:50 +01:00
Al3x Zamponi
3af0437857
Update MqttHandlVedirectHass.cpp
Fix HASS unit
2023-11-13 17:12:19 +01:00
helgeerbe
eb578f08c5 Merge branch 'development' 2023-10-24 16:40:47 +02:00
helgeerbe
49a10305e2 fix: liveData is not updated
- due to roll back of upstream commit, duplicated code allocated json buffer twice
- enlarge json buffer to 4200
2023-10-24 15:25:31 +02:00
helgeerbe
9ca3655de6 add webapp 2023-10-23 13:32:12 +02:00
Bernhard Kirchen
254b95cb0f
Fix: replace links to upstream project where applicable (#514) 2023-10-23 13:24:05 +02:00
Bernhard Kirchen
0fa2745ace
Fix: VE.Direct refactor issues from #505 (#516)
* VE.Direct: return non-nullptr as a fallback

the changed return statement was supposed to return a shared_ptr to a
new and valid MPPT data struct as a fallback. however, it did return a
new shared_ptr that was initialized to nullptr.

* VE.Direct: make liveview total use total MPPT values

this change makes the call to VictronMppt.getData() obsolete, which in
turn will therefore not cause an error message on the console if
VE.Direct (MPPT) is not enabled. this change also takes care that once
multiple VE.Direct MPPT charge controllers are supported, the sums of
the respective total values are used in the web app totals.
2023-10-23 13:23:06 +02:00
Philipp Sandhaus
8ba9048f99
Show battery temperature when sensor is present (#511) 2023-10-23 13:22:10 +02:00
Al3x Zamponi
c5427dedce
Add calculated values to hass auto discovery (#509)
Add battery P and E as well as panel I to auto discovery values of HA
2023-10-23 13:18:24 +02:00
Philipp Sandhaus
b159c31258 Display efficiency measuremnt for Huawei AC charger in % in web interface 2023-10-20 22:14:45 +02:00
helgeerbe
b833d5ab52 add webapp 2023-10-19 16:24:19 +02:00
Bernhard Kirchen
4d4aadf8de
Feature: AC charger: configurable CAN controller frequency (#500) 2023-10-19 16:16:01 +02:00
Bernhard Kirchen
d23b991f5c
VE.Direct: Fix design issues and prepare support for multiple instances (#505)
* introduce VictronMpptClass

this solves a design issue where the loop() method of a static instance
of VeDirectMpptController, which is part of library code, is called as
part of the main loop() implementation. that is a problem because the
call to this loop() must be handled differently from all other calls:
the lib does not know whether or not the feature is enabled at all.
also, the instance would not be initialized when enabling the feature
during normal operation. that would even lead to a nullptr exception
since the pointer to the serial implementation is still uninitialized.

this new intermediate class is implemented with the support for multiple
Victron charge controllers in mind. adding support for more charge
controllers should be more viable than ever.

fixes #481.

related to #397 #129.

* VE.Direct: move get.*AsString methods to respective structs

those structs, which hold the data to be translated into strings, know
best how to translate them. this change also simplifies access to those
translation, as no parameter must be handed to the respective methods:
they now act upon the data of the instance they are called for. adds
constness to those methods.

* VE.Direct: simplify and clean up get.*AsString methods

use a map, which is much easier to maintain and which reads much easier.
move the strings to flash memory to save RAM.

* DPL: use VictronMpptClass::getPowerOutputWatts method

remove redundant calculation of output power from DPL. consider
separation of concern: VictronMpptClass will provide the total solar
output power. the DPL shall not concern itself about how that value is
calculated and it certainly should be unaware about how many MPPT charge
controllers there actually are.

* VE.Direct: avoid shadowing struct member "P"

P was part of the base struct for both MPPT and SmartShunt controller.
however, P was also part of the SmartShunt controller data struct,
shadowing the member in the base struct.

since P has slightly different meaning in MPPT versus SmartShunt, and
since P is calculated for MPPT controllers but read from SmartShunts, P
now lives in both derived structs, but not in the base struct.

* VE.Direct: isDataValid(): avoid copying data structs

pass a const reference to the base class implementation of isDataValid()
rather than a copy of the whole struct.

* VE.Direct: unify logging of text events

* VE.Direct: stop processing text event if handled by base

in case the base class processed a text event, do not try to match it
against values that are only valid in the derived class -- none will
match.

* VE.Direct MPPT: manage data in a shared_ptr

instead of handing out a reference to a struct which is part of a class
instance that may disappear, e.g., on a config change, we now manage the
lifetime of said data structure using a shared_ptr and hand out copies
of that shared_ptr. this makes sure that users have a valid copy of the
data as long as they hold the shared_ptr.

* VE.Direct MPPT: implement getDataAgeMillis()

this works even if millis() wraps around.

* VE.Direct: process frame end event only for valid frames

save a parameters, save a level of indention, save a function call for
invalid frames.
2023-10-19 16:15:29 +02:00
Bernhard Kirchen
917242909b
Fix: PowerMeter: update _lastPowerMeterUpdate for SOURCE_SML (#506)
closes #498.
2023-10-19 16:14:36 +02:00
helgeerbe
5bbbe6bfcb Merge branch 'development' 2023-10-10 09:27:21 +02:00
helgeerbe
b461aff622 Merge remote-tracking branch 'tbnobody/OpenDTU/master' into development 2023-10-10 09:26:43 +02:00
Thomas Basler
2991af79f2 webapp: add app.js.gz 2023-10-09 19:43:04 +02:00
Thomas Basler
f203a971b0 Feature: Added Descriptions for Event Log Messages as shown in #121 2023-10-09 19:38:22 +02:00
Thomas Basler
76dfaa7d3b Fix #1405: Add some border around icons when in multi line mode 2023-10-09 17:06:47 +02:00
Thomas Basler
0037e5969e webapp: Update dependencies 2023-10-09 17:01:58 +02:00
Thomas Basler
d373702d7b Added additional ID for HMS-1000 to DevInfoParser
Fix #1392
2023-10-09 16:58:21 +02:00
Bernhard Kirchen
116da05114
DPL: (re-)send power limits periodically (#483)
avoid staleness in case the same power limit is calculated over and over
again, hence no new power limit value is calculated and hence no power
limit command is sent to the inverter. staleness occurs in this case if
the first power limit command to establish the respective limit was not
received by the inverter. one can easily simulate a situation where the
same power limit is caluclated over and over again: with a battery above
the start threshold, set a very low upper power limit for the inverter
(DPL setting). that value will be used as the limit as long as the power
meter reading is larger than that.

we could also check the limit reported by the inverter. however, that
value is in percent of the inverter's max AC output, and is often not
the same value as we requested as the limit, but slightly off. we then
would have to decide how much deviation is okay, which is unreasonably
complicated.

closes #478.
2023-10-09 09:51:40 +02:00
helgeerbe
4324ae3081 Merge branch 'development' 2023-10-04 14:10:19 +02:00
Bernhard Kirchen
f7abbdbe06
Publish calculated MPPT metrics (#475)
* VE.Direct MPPT MQTT: remove trailing whitespace

* VE.Direct MPPT MQTT: publish P, IPV and E to MQTT

those values are calculated by OpenDTU-OnBatery and are part of the web
application live view, but were previously not published through MQTT.

closes #376.
2023-10-04 13:26:22 +02:00
helgeerbe
7fb26e1e81
Channel for AC must always be CH0 (#472) 2023-10-02 11:44:00 +02:00
MalteSchm
b1164d6c69
Move Huawei CAN bus communication to separate thread (#454) 2023-10-02 11:22:10 +02:00
Thomas Basler
4d61b20f39 Update olikraus/U8g2 from 2.35.4 to 2.35.7 2023-09-30 11:07:20 +02:00
Thomas Basler
253b50f765 Update nrf24/RF24 from 1.4.7 to 1.4.8 2023-09-30 11:05:13 +02:00
Thomas Basler
ea6a7f1a88 webapp: Update dependencies 2023-09-30 10:52:35 +02:00
Thomas Basler
32d91379fa Init all data members befor pushing it into the buffer 2023-09-30 10:48:41 +02:00
Thomas Basler
d4345917da Added additional ID for HMS-900 to DevInfoParser
Fix #1392
2023-09-30 10:45:49 +02:00
helgeerbe
f0a55ea32b Merge branch 'development' 2023-09-28 13:17:59 +02:00
Philipp Sandhaus
4ee49a6ecb
Removed checking for valid tx pin for Victron (#455)
Please check wiki documentation, and change/extend it accordingly.
2023-09-28 13:13:32 +02:00
helgeerbe
933345d659 remove manual builds from action 2023-09-22 18:05:49 +02:00
helgeerbe
e937fd1cb8 add webapp 2023-09-22 17:27:17 +02:00
Philipp Sandhaus
7142921021
Integration of Victron SmartShunt via VE.Direct (#452)
* Move Mppt logic to subclass

* Added Definitions for Shunts and restructering

* First integration of SmartShunt data into Web Interface

* Code cleanup

* VE.Direct: whitespace cleanup

* VE.Direct: manage HardwareSerial in unique_ptr

* VE.Direct: _efficiency is only needed by MPPT

* VE.Direct: keep as many members private as possible

* VE.Direct: use int8_t for pins (as before)

* VictronSmartShunt: _verboseLogging is not used

* VE.Direct: OR (off reason) is MPPT specific

it also applies to Phoenix inverters and Smart BuckBoost, but since
there is no support for those, the code is moved to the MPPT controller.

* Added Shunt alarms to liveview
Changed from double to int for several readings

* Update build.yml to allow manual builds

---------

Co-authored-by: Philipp Sandhaus <philipp.sandhaus@cewe.de>
Co-authored-by: Bernhard Kirchen <schlimmchen@posteo.net>
2023-09-22 17:24:57 +02:00
Thomas Basler
f8cba5721e Fix: Deny passwordless access to prometheus API if readonly access is disabled
Fix #1358
2023-09-19 18:59:20 +02:00
helgeerbe
160d3f23bd fix: #450 power meter request fails when username or password contains @
user name and password is now encoded in the authorization header
2023-09-19 14:16:29 +02:00
helgeerbe
ae392329ea Merge branch 'development' 2023-09-19 13:06:46 +02:00
helgeerbe
b081845b95 Merge remote-tracking branch 'tbnobody/OpenDTU/master' into development 2023-09-19 12:28:00 +02:00
Thomas Basler
d419fd4794 webapp: add app.js.gz 2023-09-18 20:48:44 +02:00
Thomas Basler
64bfb63ba8 Revert espressif32 from 6.4.0 back to 6.3.2
Total available heap size was reduced from 281kb to 247kb which causes TLS issues (among others)
2023-09-18 20:47:29 +02:00