Skip to content
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

[Request] Hide Solar Passthrough settings if VE.Direct is disabled #662

Closed
schlimmchen opened this issue Feb 10, 2024 · 8 comments · Fixed by #755
Closed

[Request] Hide Solar Passthrough settings if VE.Direct is disabled #662

schlimmchen opened this issue Feb 10, 2024 · 8 comments · Fixed by #755
Labels
enhancement New feature or request

Comments

@schlimmchen
Copy link
Member

Is your feature request related to a problem? Please describe.

People don't get it. See #651.

Describe the solution you'd like

Hide all (full) solar passthrough setting from DPL settings view of the web application if VE.Direct is not enabled, possibly also if the pin mapping is not setup to allow VE.Direct.

Describe alternatives you've considered

No response

Additional context

No response

@schlimmchen schlimmchen added the enhancement New feature or request label Feb 10, 2024
@spcqike
Copy link

spcqike commented Feb 10, 2024

Hi Bernhard

i really like the idea of reducing the complexity of the webUI and hiding options, that the user can't use, because he hasn't the hardware.

for this new request, i want to kindly point you to one of my very first issues, where you wanted to participate in some way 😄
#237 (comment)

without solarpassthrough, users without battery can't use DPL. (at least, thats what i think and have in mind. as i'm not at home (and its dark anyway) i can't test it right now)

https://github.com/helgeerbe/OpenDTU-OnBattery/blob/b794f46ef0807b6f10fe056ae3fb2ee5e980242d/src/PowerLimiter.cpp#L322

that is because calcPowerLimit() only works, if either canUseDirectSolarPower() or _batteryDischargeEnabled is true.
canUseDirectSolarPower() only can be true, if you have valid data from a victronMPPT.

_batteryDischargeEnabled on the other hand will be true, when solarpassthrough is enabled and startthreshold is reached.

https://github.com/helgeerbe/OpenDTU-OnBattery/blob/b794f46ef0807b6f10fe056ae3fb2ee5e980242d/src/PowerLimiter.cpp#L287-L289

so, please keep that in mind 😄

maybe it's really possible, to also add an option, whether or not a battery is used at all, like mentioned and discussed earlier

@schlimmchen
Copy link
Member Author

Understood.

Pleas note, though, that canUseDirectSolarPower() returns false if !VictronMppt.isDataValid(), so regardless of whether solar passthrough is enabled or disabled, is must not make a difference if you have no working VE.Direct: canUseDirectSolarPower() will be false in any case.

bool PowerLimiterClass::canUseDirectSolarPower()
{
    CONFIG_T& config = Configuration.get();

    if (!config.PowerLimiter.SolarPassThroughEnabled
            || isBelowStopThreshold()
            || !VictronMppt.isDataValid()) {
        return false;
    }

    return VictronMppt.getPowerOutputWatts() >= 20; // enough power?
}

_batteryDischargeEnabled on the other hand will be true, when solarpassthrough is enabled and startthreshold is reached.

Yeah, that's true and that's a problem.

So we actually do need to know whether or not an actual battery is attached to the system or not. That comes back to the issue that the user cannot specify which inverter(s) are attached to the battery and which aren't (and which shall be governed by the DPL).

@spcqike
Copy link

spcqike commented Feb 10, 2024

well, while reading and answering #651 i wonderd, why his logs show [DPL::loop] battery discharging allowed even so passtrough wasn't enabled in the first place.... and i found my mistake:

https://github.com/helgeerbe/OpenDTU-OnBattery/blob/b794f46ef0807b6f10fe056ae3fb2ee5e980242d/src/PowerLimiter.cpp#L261-L290

in line 270 _batteryDischargeEnabled will be set to true if stopthreshold is not reached and passthrough is disabled and startthreshold is reached.

so yeah, i guess one should be able to hide passthrough options without VE.Direct. maybe :D

@schlimmchen
Copy link
Member Author

I overlooked the exclamation mark 🤦‍♂️

But still.... Nulleinspeisung without battery currently works by chance, not because it is actually supported... If we know that all inverter(s) governed by the DPL were NOT attached to a battery, we could just force _batteryDischargeEnabled to true, meaning "there is power available, just use it". Or similar.

@spcqike
Copy link

spcqike commented Feb 10, 2024

So we actually do need to know whether or not an actual battery is attached to the system or not. That comes back to the issue that the user cannot specify which inverter(s) are attached to the battery and which aren't

If we know that all inverter(s) governed by the DPL were NOT attached to a battery, we could just force _batteryDischargeEnabled to true, meaning "there is power available, just use it". Or similar.

maybe its possible, to add such options to the inverter itself? like, where you can name it and name the inputs and such.
maybe one could add a switch or checkbox say "this inverter is PV only" or "this inverter uses a battery".

and, as the DPL right now only allows one lower and one upper limit, maybe this could become an inverter config, too? i guess this would be needed or comes handy, if we think about managing multiple inverters with DPL.

schlimmchen added a commit to schlimmchen/OpenDTU-OnBattery that referenced this issue Feb 14, 2024
@spcqike
Copy link

spcqike commented Feb 15, 2024

hello @schlimmchen
as you allready work on this topic (and as i don't know if you get a notification, whenever someone mentions your name), i want to point you towards my findings from today:
#237 (comment)

08:37:04.150 > [DPL::loop] dcVoltage: 42.80 V, loadCorrectedVoltage: 42.80 V, StartTH: 0.00 V, StopTH: 0.00 V
08:37:04.152 > [DPL::loop] StartTH reached: no, StopTH reached: no, inverter is NOT producing
08:37:04.152 > [DPL::loop] SolarPT disabled, Drain Strategy: 1, canUseDirectSolarPower: no
08:37:04.167 > [DPL::loop] battery discharging prevented, PowerMeter: 238 W, target consumption: -20 W

without solar-passthrough, a start and stop voltage of 0V won't result in a discharge production. i don't know why, but it says StartTH reached: no. i thought, 42.8V is greater than 0V 😄

i now put 10V for start and 5V for stop, and its working. without passthrough.

@schlimmchen
Copy link
Member Author

https://github.com/helgeerbe/OpenDTU-OnBattery/blob/b794f46ef0807b6f10fe056ae3fb2ee5e980242d/src/PowerLimiter.cpp#L619

If the voltage is smaller or equal to 0, it is deemed an invalid threshold and the test "is a threshold reached" returns false.

Don't worry. I plan to add a switch that allows you to explicitly mark the inverter as "not connected to a battery". I am thinking this will go directly to the DPL settings page, together with the other inverter-related settings.

schlimmchen added a commit to schlimmchen/OpenDTU-OnBattery that referenced this issue Feb 23, 2024
schlimmchen added a commit that referenced this issue Mar 14, 2024
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.
  however, when editing the DPL settings, the user is forced to select
  an inverter from the newly created drow-down list.

* 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.

* show more configuration hints, depending on actual configuration

* replace inputs by InputElement where possible
schlimmchen added a commit that referenced this issue Mar 15, 2024
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
schlimmchen added a commit that referenced this issue Mar 15, 2024
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
schlimmchen added a commit that referenced this issue Mar 16, 2024
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
schlimmchen added a commit that referenced this issue Mar 16, 2024
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
schlimmchen added a commit that referenced this issue Mar 17, 2024
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
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants