Closed vejpasop closed 12 months ago
Re the note regarding AC in 1 / 2: The generator is not always connected to AC in 1. AC in 1 gets the "priority" AC source which should sometimes be the grid. In fact, the generator start/stop logic that uses don't start generator when on AC 1 requires the grid on AC in 1.
hi Kevin, Venus OS is being fixed up to support generators to be connected on AC in 1.
more details here:
https://professional.victronenergy.com/news/detail/178/
EDIT: and AC input 1 is really the way to go for generators. Above new feature will remain AC in 1 only for Quattros.
The other thing I have heard is that AC input presence (voltage and frequency) are only sensed on the active input and AC input 1. If that is the case then Quattro would not be able to detect mains on AC in 2 and therefore stop the generator. If this is not the case and AC in 2 presence can be detected then all is well.
Yes, it can be detected on AC in 2.
User setting /Dc/0/PreferRenewableEnergy
added to in mk2-dbus v3.52
Short update, also @kwindrem , this is progressing quickly now. Above text has been updated, and see here:
More changes are required for generator support.
When a generator is running the override should be active as long as the generator runs to ensure proper charging. In a systems system with a DMC the DMC can communicate the generator state trough the "transfer switch" input of the DMC. In a system with a Venus device only we need to communicate generator run state. For this we will need to add an extra dbus path to mk2dbus to communicate the generator state. @Izak will than have to write this path.
I added this to the GUI. The battery shows new icons to reflect that the prefer renewable option is enabled, then when a full charge is forced a red strip with icons is added, red is used to maximice the contrast so user can see it from the distance.
Changes are ready to be added to the todo but first I'll like to get some feedback.
Here is a short video:
https://github.com/victronenergy/venus/assets/6424631/bc62a6e7-b912-45d0-88c6-f1a147ec49c6
Handle edge case when 506 firmware settings file is used to restore settings on fw 504 / 505.
Use /Ac/State/RemoteGeneratorSelected
item to for the logic.
https://github.com/victronenergy/venus/assets/6424631/6c251cb1-d78c-4a13-a87c-e5b7540bac54
When external generator is selected charge to 100% can't be stopped:
mk2-dbus v3.57 is on the Venus TODO
@izak The "Notify Multi when generator is running" is inverted. Tested on a Venus GX By reading your code I don't know why (yet)
gui added to the ToDo
@jepefe I noticed an issue with the GUI radio buttons for "Charge the battery to 100%". When you select this option for the first time (after a clean start of the GUI service) the yes / no buttons are selected like
After selecting yes the recharge starts correctly. However when you revisit the screen to return to normal operation the "yes" button is selected like
Now if you click "yes" the "yes" buttons selection clears and we return to normal operation. The next time we want to start charging the "yes" button is already pre-selected. This looks a bit awkward. See video
https://github.com/victronenergy/venus/assets/10847324/58942304-94e8-42f3-80b1-6d4d66b2e954
@vejpasop, we have sites now that think they have a generator when they don't have one. I think the reason is this:
- /Ac/State/RemoteGeneratorSelected will be 1 when either of the following is true:
- On Quattro while we are connected to AC input 1
- When the DMC generator switch input is closed
- When '/Ac/Control/RemoteGeneratorSelected' is set to 1
Sites with the grid connected to AC-in-1 of a Quattro now set this path to 1. The GUI then shows that the AC input is a generator.
Probably the simplest solution is to drop that first condition. Or will that lose something important?
There is also a problem with the override of preferred renewable energy if the AC input type is set to generator in the GX device. In this case, the system does not automatically recharge the battery to 100%.
The "generator" digital input to say the generator is running sets /Ac/Control/RemoteGeneratorSelected. However this does not happen of the AC input type is manually set to Generator.
Also, are there cases where if the GX device's configuration changes that the /Ac/Control/RemoteGeneratorSelected state isn't updated properly?
My thought is that this all should be handled elsewhere. startstop.py seemed the likely spot however mpvader mentioned that not all users use the generator control logic in the GX device. So maybe in systemcalc?
The GUI then shows that the AC input is a generator.
As discussed, we’re going to remove/revert that out of the gui. @jepefe .
and @vejpasop is going to change mk2dbus to no longer use Ac/Control/RemoteGeneratorSelected
when the device is a quattro. Since that relates to external transfer switches, which really is for Multis
We should remove the the corresponding generator section of Solar & Wind Feature video also.
Since the Ac/State/RemoteGeneratorSelected
was also used by the GUI to determine if we could stop the charge cycle manually we need to add an "overridden" state to Dc/0/PreferRenewableEnergy
in case of a running remote generator or a Quattro on AC in 1
In mk2-dbus v3.58 changes
"sustain" is now reported through the State
item.
Ac/State/RemoteGeneratorSelected
remains invalid on Quattro's. The current GUI relies on this to determine if the "charge to 100%" can be manually stopped. In case of a generator running or a Quattro on ACin 1 it cannot be stopped. To solve this Dc/0/PreferRenewableEnergy
now reports "overridden' in this case.
Todo:
SystemStateDescription { value: 0xF4; name: "sustain"; text: qsTr("Sustain")}
@jepefe Dc/0/PreferRenewableEnergy
"overridden" instead of Ac/State/RemoteGeneratorSelected
@jepefe Changes added in gui: fix_solar_and_wind
Add a new feature to our systems, mainly for boats and campers and such, that makes the system give priority to solar or wind when it comes to charging; rather than the Multi or Quattro doing the bulk of it from shore power.
In the implementation, this will consist of a few things:
Details:
In the Multi firmware, a settable flag in the eeprom is added, which when enabled makes it:
This setting will be added to both VEconfigure and VictronConnect.
About the override button:
When enabled, the UIs show the override button: when above eeprom setting is enabled in the Multi, the GUIs show the "override control", which when enabled, (a) lets the multi charge up to absorption again, and (b) make sure it starts doing that per immediate, even when already in float or absorption. Since thats what the user wants, its a "charge my batteries full for this time" button, or "I want my batteries full now" button. Reason to have it be a button, rather than a slider that you have to restore, are for example: when putting the boat in the winter storage, you want it to one time fully charge the battery. And then you don' twant to go back there the following day to set it back to float-only. And similarly if you get somewhere in a harbour, want to leave the following morning with full batteries, you want to then charge it fully; and not next day have to remember to set it back to float-only.
The user control will be made visible in all the UIs:
On dbus, the path
/Dc/0/PreferRenewableEnergy
will be invalid if either firmware is too old or firmware new enough but option not enabled in the settings/eeprom. When the setting is enabled in eeprom, then it will show a 1. To make it charge once, write a 0 in there. The Multi will then start charging (charge engine will be restarted) and the dbus path will remain 0 as long as thats going on. Once charge cycle is completed (state goes to float), it will self-reset to 1.User interface (GX UI, HTML5, VRM):
when
/Dc/0/PreferRenewableEnergy
is invalid, the button is hidden as explained above.when
/Dc/0/PreferRenewableEnergy
is 1, the UI should make clear that Solar and wind priority is enabled. Also it should offer the override button, which when pressed makes the path charge once, by writing a 0 into the path.when
/Dc/0/PreferRenewableEnergy
is 0, the UI should make clear that the system is doing a once off full charge; and it will go back to normal (solar and wind priority) once charge cycle is completed. Also when in this state, UI can offer the user a "cancel" button, which when pressed writes a 1 into the path, which makes the Multi stop what its doing (bulk, absorption) and skip to float instead. Note that when in Bulk, it will remain in bulk and charge up to float first - of course.When
/Ac/State/RemoteGeneratorSelected
is 1 PreferRenewableEnergy is overruled (Dc/0/PreferRenewableEnergy
will be 0 in this case)/Ac/State/RemoteGeneratorSelected
will be 1 when either of the following is true:/Ac/Control/RemoteGeneratorSelected
can be used by generator start stop control on Venus to indicate generator operationBOL mode
When in BOL mode (canbus battery), charge with the lowest value of the CVL (Charge Voltage Limit) and Float voltage setting. For a Quattro, this will only work when connected to AC-in-2, since AC-in-1 is where a generator is connected and while that is running you want to charge with full power.
Todo:
Outsourced to El Nino: