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

systemcalc: get AC volts, amps and frequency to the UIs #843

Closed
mpvader opened this issue Aug 17, 2021 · 4 comments
Closed

systemcalc: get AC volts, amps and frequency to the UIs #843

mpvader opened this issue Aug 17, 2021 · 4 comments
Assignees
Milestone

Comments

@mpvader
Copy link
Contributor

mpvader commented Aug 17, 2021

There are multiple solutions.

The reason for this is the VRM Dashboard, which is currently being extended by Teun to have far more data in its detailed-mode.

Discussed on slack here: https://victrondevelopment.slack.com/archives/C7C1ZU6UD/p1629140050083000

@mpvader mpvader added this to the v2.80 milestone Aug 17, 2021
@izak
Copy link
Collaborator

izak commented Aug 18, 2021

Background:

Specification

  • Create a set of dbus paths under /Ac/In/0/... and /Ac/In/1/..., with some suitable representation below it.

  • VRM can't really do anything with a service name, it will need the service type and the device instance in order to construct an MQTT path. Other local dbus services will find the service name itself more useful. So I suggest:

    • /Ac/In/0/ServiceName (eg com.victronenergy.grid.ttyUSB0 or com.victronenergy.vebus.ttyO1)
    • /Ac/In/0/ServiceType (grid, genset or vebus)
    • /Ac/In/0/DeviceInstance (device instance on venus)
    • /Ac/In/0/VrmDeviceInstance (same as DeviceInstance, except on a CCGX where it historically must be zero. Logged to VRM).
    • /Ac/In/0/Source (1 = grid, 2 = generator, 3 = shore)
    • /Ac/In/0/Connected (0 = disconnected, 1 = connected, this duplicates the information in /Ac/ActiveIn/Source somewhat, but less ambiguously)
  • And the same for /Ac/In/1.

  • Additionally, the number of available inputs will be republished from the Multi for convenience. This can be 0, 1 or 2. If an input is not used (as set in com.victronenergy.settings/Settings/SystemSetup/AcInput1), this could be lower than the actual set available on the hardware.

    • /Ac/In/NumberOfAcInputs

How it will work:

Below, "grid meter" means an energy meter used to measure the grid, and "genset meter" means an energy meter used to measure a genset. Subtree refers to the part under /Ac/Sources that provides information about that source.

To make the example concrete, assume the generator is on AC-IN-1, and the grid is on AC-IN-2.

  1. If you have both a grid meter and a genset meter, then /Ac/In/1 will contain the information for the grid meter, and /Ac/In/0 will contain the information for the genset meter. Easy peasy.
  2. If you have meters for neither grid nor genset, then only one of the subtrees will be populated at a time depending on the active input of the Multi/Quattro. The other one will show all values invalid (except Source). The ServiceType for the active input will be vebus in this case.
  3. If you have a grid meter, but no genset meter, then /Ac/In/1 always points to the grid meter, and /Ac/In/0 points to vebus ONLY when the active AC input is configured as a generator, otherwise all values are invalid (except Source).
  4. Conversely, if you have a genset meter, but no grid meter, then the /Ac/In/1 points to vebus ONLY when the active AC input is grid, otherwise it is invalid. /Ac/In/0 always points to the genset meter.
  5. /Ac/In/x/Source is always available, since that is configured in localsettings and always known.

izak added a commit to victronenergy/dbus-systemcalc-py that referenced this issue Aug 20, 2021
This summarises the available AC inputs, what is connected to them, and
if an energy meter or the vebus holds the power, voltage and current
values for the source.

victronenergy/venus#843
izak added a commit to victronenergy/dbus-systemcalc-py that referenced this issue Aug 23, 2021
This summarises the available AC inputs, what is connected to them, and
if an energy meter or the vebus holds the power, voltage and current
values for the source.

victronenergy/venus#843
@AlexImb AlexImb self-assigned this Aug 30, 2021
jhofstee added a commit to victronenergy/meta-victronenergy that referenced this issue Sep 2, 2021
Remove DVCC support for Phoenix inverters (note: Inverter RS is still supported)
    It is better implemented as Link Vregs in firmware.
    victronenergy/venus#736
Add venus version and build date/time to dbus/mqtt
    For use in html5 app
    Closes victronenergy/venus#838
Add support for fuel cell devices
    This adds support for accounting of DC power, or using a fuel cell as a
    voltage measuring service.
Add AC-input summary for UIs (GUI, VRM) so they know what inputs are available,
    used, and where to find data for it.
    victronenergy/venus#843
@AlexImb
Copy link
Member

AlexImb commented Sep 13, 2021

@izak can we add data attributes for these new paths? Most of the logic in VRM relies on data attributes that are then mapped to MQTT paths.

@izak
Copy link
Collaborator

izak commented Sep 14, 2021

@AlexImb I added the attributes to vrmlogger, and I made an issue documenting them as usual in the VRM tracker.

@mpvader
Copy link
Contributor Author

mpvader commented Dec 15, 2021

This is all done and works.

@mpvader mpvader closed this as completed Dec 15, 2021
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

No branches or pull requests

3 participants