-
-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restructure solarcharger classes #1457
Restructure solarcharger classes #1457
Conversation
d4d9737
to
d11be3b
Compare
e23be05
to
983abde
Compare
d11be3b
to
a3d0408
Compare
08e5b9a
to
635a450
Compare
5723f4e
to
b630fb9
Compare
8f5e560
to
d5775dc
Compare
4811e65
to
9e73fcc
Compare
088c3e0
to
ea10501
Compare
a396cf5
to
e447c6b
Compare
e447c6b
to
d7ff717
Compare
src/solarcharger/mqtt/Provider.cpp
Outdated
_outputPowerTopic = config.PowerTopic; | ||
_outputCurrentTopic = config.CurrentTopic; | ||
|
||
auto configValid = config.CalculateOutputPower ? !_outputCurrentTopic.isEmpty() : !_outputPowerTopic.isEmpty(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@schlimmchen i forgot to check if the voltage topic is set when we need to calculate the output.
Could you add this check please?
MQTT solar charger provider: I cannot save the power topic or path, and the units have no default values in the webapp. Something is very wrong: You removed the prefix When booting and until a value is received at the subscribed power topic, the live card's data age always resets to zero after 10 seconds. That's because I did the fix you requested, but also made the error message independent of the verbose logging switch. Error messages shall always be printed. The message was adjusted to show whether or not there is a topic set for each of the three values, as it is hard to comprehend why the "config valid" switch toggled to false. => Fixed in 1c18032 The live view card (still) reads "MPPT: MQTT". I took the liberty to change that and have it translated to something meaningful and nothing with "MPPT" in it. Also, I replaced "MPPT" elsewhere in the language files. => See b7dcb9f |
this changeset restructures and refactors the solar charger integration to accomodate different solar charger data providers in the future. we did only support (multiple) Victron SmartSolar MPPT charge controllers using the VE.Direct interface, but will be able to integrate solar output values for use by the DPL in the future.
adds support to integrate solar charge controller output power, current, and voltage values from the MQTT broker, allowing the DPL to do solar-passthrough with any solar charge controller hardware as long as it publishes the relevant values to the MQTT broker.
b7dcb9f
to
60fc9b3
Compare
I then squashed the refactoring commits into one commit, as we discussed, squashed my fixes into the "Feature:" commit, and rebased onto the current development branch. I will be double-checking that my VE.Direct solar chargers are working fine with the new firmware, and if so, I will merge this PR using the rebase strategy. |
Restructure solarcharger classes to allow simple addition of new providers.
Based on the structure that @schlimmchen introduced here: #1451
Closes #1408.
Closes #457.