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

Add optional "load current" to live view, MQTT and HASS. #1367

Merged
merged 2 commits into from
Nov 3, 2024

Conversation

SW-Niko
Copy link

@SW-Niko SW-Niko commented Nov 1, 2024

  • add optional "load current" to live view, MQTT and HASS.
  • change "load output" to optional handling
    Charge controller with physical "load output" will publish "load output state" and "load current"
    Charge controller without physical "load output" but configured "virtual output" will publish just "load output state"
    Charge controller without physical "load output" and not configured "virtual output" will not publish "load output state" and "load current"

change "load output" to optional handling
@SW-Niko
Copy link
Author

SW-Niko commented Nov 1, 2024

Based on issue #947

grafik

I will check the current. But I have to find a 24VDc Load first.

Copy link
Member

@schlimmchen schlimmchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good except for some details.

src/WebApi_ws_vedirect_live.cpp Outdated Show resolved Hide resolved
Comment on lines 167 to 169
if (mpptData.loadOutputState_LOAD.first > 0) {
device["LOAD"] = mpptData.loadOutputState_LOAD.second ? "ON" : "OFF";
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should publish it like this only if IL is available. Otherwise, if IL is not available but LOAD ist available, we display mpttData.loadOutputState_LOAD.second with a new label VIRTLOAD and add the respective texts/translations, as we then can assume that the device has a virtual load output, rather than (what you call) a physical load output. What do you think?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A good idea, but I assume it will not work on all devices.
I'm pretty sure I can also configure the virtual load output on any device with (physical) load output.
In that case IL is always available and I can not distinguish if I use virtual or physical load output.
I will check my assumption on my system today. Stay tuned.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, if you have both then you can't distinguish which is used.
But anyway ... I like the idea. I think we can ignore this little disadvantage.
We just talk about the display in the web-view and keep MQTT and HASS like it is?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that it is very strange that those "smaller" models have both a physical and a virtual load output, but only a single property "LOAD". Therefore I would assume that the physical and virtual load output are always in sync. And therefore I don't think that it is even a problem that it says "load output" in the live view for models who have both a physical and a virtual load output. So yes, let's do this: Show "virtual load output state" if no IL but LOAD is available.

We just talk about the display in the web-view and keep MQTT and HASS like it is?

Yes.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Therefore I would assume that the physical and virtual load output are always in sync

Yes, they are.

Ok, I simulated different charger models
LOAD = true, IL = true
grafik
LOAD = true, IL = false
grafik
LOAD = false, IL = false
grafik

@schlimmchen schlimmchen merged commit f9b84a0 into hoylabs:development Nov 3, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Load current of Victron charge controllers neither displayed nor published
2 participants