-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
369 changed files
with
4,835 additions
and
9,231 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,222 @@ | ||
--- /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/HubData.qml.orig 2025-01-12 08:25:03 | ||
+++ /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/HubData.qml 2024-05-17 06:58:33 | ||
@@ -1,14 +1,32 @@ | ||
+//////// modified for VE.Direct inverter support | ||
+//////// modified for grid/genset meter | ||
+//////// added alternator, AC charger, wind generator | ||
+ | ||
import QtQuick 1.1 | ||
+import com.victron.velib 1.0 | ||
import "utils.js" as Utils | ||
|
||
Item { | ||
id: root | ||
|
||
+ property variant sys: theSystem | ||
+ | ||
property string systemPrefix: "com.victronenergy.system" | ||
+ property string settingsPrefix: "com.victronenergy.settings" | ||
property string vebusPrefix: _vebusService.valid ? _vebusService.value : "" | ||
|
||
+//////// add to support VE.Direct inverters | ||
+ property string inverterService: "" | ||
+//////// add for grid/genset meters | ||
+ property string gridMeterService: "" | ||
+ property string gensetService: "" | ||
+ | ||
property variant battery: _battery | ||
property alias dcSystem: _dcSystem | ||
+ property alias alternator: _alternator | ||
+ property alias windGenerator: _windGenerator | ||
+ property alias fuelCell: _fuelCell | ||
+ property alias acCharger: _acCharger | ||
property alias pvCharger: _pvCharger | ||
property alias pvOnAcIn1: _pvOnAcIn1 | ||
property alias pvOnAcIn2: _pvOnAcIn2 | ||
@@ -18,8 +36,8 @@ | ||
property alias acInLoad: _acInLoad | ||
property alias acOutLoad: _acOutLoad | ||
property alias grid: _grid | ||
+ property alias acInput: _activein | ||
property alias genset: _genset | ||
- property alias acInput: _activein | ||
property VBusItem systemType: VBusItem { bind: Utils.path(systemPrefix, "/SystemType") } | ||
property bool hasGridMeter: _hasGridMeter.valid | ||
property variant acSource: _acSource.value | ||
@@ -60,6 +78,30 @@ | ||
property VBusItem power: VBusItem { bind: Utils.path(systemPrefix, "/Dc/Pv/Power"); unit: "W"} | ||
} | ||
|
||
+//////// added alternator | ||
+ QtObject { | ||
+ id: _alternator | ||
+ property VBusItem power: VBusItem { bind: Utils.path(systemPrefix, "/Dc/Alternator/Power"); unit: "W"} | ||
+ } | ||
+ | ||
+//////// added AC charger | ||
+ QtObject { | ||
+ id: _acCharger | ||
+ property VBusItem power: VBusItem { bind: Utils.path(systemPrefix, "/Dc/Charger/Power"); unit: "W"} | ||
+ } | ||
+ | ||
+//////// added wind generator | ||
+ QtObject { | ||
+ id: _windGenerator | ||
+ property VBusItem power: VBusItem { bind: Utils.path(systemPrefix, "/Dc/WindGenerator/Power"); unit: "W"} | ||
+ } | ||
+ | ||
+//////// added fuel cell | ||
+ QtObject { | ||
+ id: _fuelCell | ||
+ property VBusItem power: VBusItem { bind: Utils.path(systemPrefix, "/Dc/FuelCell/Power"); unit: "W"} | ||
+ } | ||
+ | ||
ObjectAcConnection { | ||
id: _pvOnAcOut | ||
bindPrefix: Utils.path(systemPrefix, "/Ac/PvOnOutput") | ||
@@ -77,8 +119,11 @@ | ||
|
||
ObjectAcConnection { | ||
id: _genset | ||
- splitPhaseL2PassthruDisabled: _splitPhaseL2Passthru.value === 0 | ||
+ splitPhaseL2PassthruDisabled: _splitPhaseL2Passthru.value === 0 | ||
bindPrefix: Utils.path(systemPrefix, "/Ac/Genset") | ||
+//////// modified for VE.Direct inverter support | ||
+ inverterSource: "/Ac/ActiveIn" | ||
+ inverterService: sys.vebusPrefix != "" ? sys.vebusPrefix : root.inverterService | ||
} | ||
|
||
VBusItem { | ||
@@ -91,20 +136,20 @@ | ||
bind: Utils.path(systemPrefix, "/Ac/Grid/DeviceType") | ||
} | ||
|
||
- /* | ||
- * Single Multis that can be split-phase reports NrOfPhases of 2 | ||
- * When L2 is disconnected from the input the output L1 and L2 | ||
- * are shorted. This item indicates if L2 is passed through | ||
- * from AC-in to AC-out. | ||
- * 1: L2 is being passed through from AC-in to AC-out. | ||
- * 0: L1 and L2 are shorted together. | ||
- * invalid: The unit is configured in such way that its L2 output is not used. | ||
- */ | ||
+ /* | ||
+ * Single Multis that can be split-phase reports NrOfPhases of 2 | ||
+ * When L2 is disconnected from the input the output L1 and L2 | ||
+ * are shorted. This item indicates if L2 is passed through | ||
+ * from AC-in to AC-out. | ||
+ * 1: L2 is being passed through from AC-in to AC-out. | ||
+ * 0: L1 and L2 are shorted together. | ||
+ * invalid: The unit is configured in such way that its L2 output is not used. | ||
+ */ | ||
|
||
- VBusItem { | ||
- id: _splitPhaseL2Passthru | ||
- bind: Utils.path(vebusPrefix, "/Ac/State/SplitPhaseL2Passthru") | ||
- } | ||
+ VBusItem { | ||
+ id: _splitPhaseL2Passthru | ||
+ bind: Utils.path(vebusPrefix, "/Ac/State/SplitPhaseL2Passthru") | ||
+ } | ||
|
||
VBusItem { | ||
id: _l2L1OutSummed | ||
@@ -114,32 +159,42 @@ | ||
|
||
ObjectAcConnection { | ||
id: _grid | ||
- splitPhaseL2PassthruDisabled: _splitPhaseL2Passthru.value === 0 | ||
+ splitPhaseL2PassthruDisabled: _splitPhaseL2Passthru.value === 0 | ||
bindPrefix: Utils.path(systemPrefix, "/Ac/Grid") | ||
+//////// modified for VE.Direct inverter support | ||
+ inverterSource: "/Ac/ActiveIn" | ||
+ inverterService: sys.vebusPrefix != "" ? sys.vebusPrefix : root.inverterService | ||
} | ||
|
||
- ObjectAcConnection { | ||
- id: _activein | ||
- bindPrefix: Utils.path(systemPrefix, "/Ac/ActiveIn") | ||
- } | ||
+ ObjectAcConnection { | ||
+ id: _activein | ||
+ splitPhaseL2PassthruDisabled: _splitPhaseL2Passthru.value === 0 | ||
+ bindPrefix: Utils.path(systemPrefix, "/Ac/ActiveIn") | ||
+//////// modified for VE.Direct inverter support | ||
+ inverterSource: "/Ac/ActiveIn" | ||
+ inverterService: sys.vebusPrefix != "" ? sys.vebusPrefix : root.inverterService | ||
+ } | ||
|
||
ObjectAcConnection { | ||
id: _acLoad | ||
l2AndL1OutSummed: _l2L1OutSummed.valid && (_l2L1OutSummed.value !== 0) | ||
- isAcOutput: true | ||
+ isAcOutput: true | ||
bindPrefix: Utils.path(systemPrefix, "/Ac/Consumption") | ||
+//////// modified for VE.Direct inverter support | ||
+ inverterSource: "/Ac/Out" | ||
+ inverterService: sys.vebusPrefix != "" ? sys.vebusPrefix : root.inverterService | ||
} | ||
|
||
ObjectAcConnection { | ||
id: _acOutLoad | ||
l2AndL1OutSummed: _l2L1OutSummed.valid && (_l2L1OutSummed.value !== 0) | ||
- isAcOutput: true | ||
+ isAcOutput: true | ||
bindPrefix: Utils.path(systemPrefix, "/Ac/ConsumptionOnOutput") | ||
} | ||
|
||
ObjectAcConnection { | ||
id: _acInLoad | ||
- splitPhaseL2PassthruDisabled: _splitPhaseL2Passthru.value === 0 | ||
+ splitPhaseL2PassthruDisabled:_splitPhaseL2Passthru.value === 0 | ||
bindPrefix: Utils.path(systemPrefix, "/Ac/ConsumptionOnInput") | ||
} | ||
|
||
@@ -167,4 +222,47 @@ | ||
id: _dcSystem | ||
property VBusItem power: VBusItem { bind: Utils.path(systemPrefix, "/Dc/System/Power"); unit: "W"} | ||
} | ||
+ | ||
+//////// add to support for adjustable watt / killowatt display switching | ||
+ VBusItem { id: kwThresholdItem; bind: Utils.path(settingsPrefix, "/Settings/GuiMods/KilowattThreshold") } | ||
+ property int kilowattThreshold: kwThresholdItem.valid ? kwThresholdItem.value : 1000 | ||
+ | ||
+//////// add to support VE.Direct inverters | ||
+//////// and grid/genset meters | ||
+ Component.onCompleted: discoverServices() | ||
+ | ||
+ // When new service is found check if is a tank sensor | ||
+ Connections | ||
+ { | ||
+ target: DBusServices | ||
+ onDbusServiceFound: addService(service) | ||
+ } | ||
+ function addService(service) | ||
+ { | ||
+ switch (service.type) | ||
+ { | ||
+ case DBusService.DBUS_SERVICE_INVERTER: | ||
+ if (inverterService === "") | ||
+ inverterService = service.name; | ||
+ break;; | ||
+ case DBusService.DBUS_SERVICE_GRIDMETER: | ||
+ if (gridMeterService === "") | ||
+ gridMeterService = service.name; | ||
+ break;; | ||
+ case DBusService.DBUS_SERVICE_GENSET: | ||
+ if (gensetService === "") | ||
+ gensetService = service.name; | ||
+ break;; | ||
+ } | ||
+ } | ||
+ | ||
+ // Check available services inverter services | ||
+ function discoverServices() | ||
+ { | ||
+ inverterService = "" | ||
+ gridMeterService = "" | ||
+ gensetService = "" | ||
+ for (var i = 0; i < DBusServices.count; i++) | ||
+ addService(DBusServices.at(i)) | ||
+ } | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/ObjectAcConnection.qml.orig 2025-01-12 08:28:05 | ||
+++ /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/ObjectAcConnection.qml 2024-05-14 07:00:12 | ||
@@ -1,19 +1,41 @@ | ||
+////// modified to show voltage, current and frequency in flow overview | ||
+////// modified to show bar graphs | ||
+////// modified to use grid or genset meter if present | ||
+ | ||
import QtQuick 1.1 | ||
import com.victron.velib 1.0 | ||
import "utils.js" as Utils | ||
|
||
QtObject { | ||
property string bindPrefix | ||
+ property string inverterService: "" | ||
+ property string inverterSource: "" | ||
|
||
property VBusItem powerL1: VBusItem { bind: Utils.path(bindPrefix, "/L1/Power"); unit: "W"} | ||
property VBusItem powerL2: VBusItem { bind: Utils.path(bindPrefix, "/L2/Power"); unit: "W"} | ||
property VBusItem powerL3: VBusItem { bind: Utils.path(bindPrefix, "/L3/Power"); unit: "W"} | ||
- property VBusItem phaseCount: VBusItem { bind: Utils.path(bindPrefix, "/NumberOfPhases") } | ||
- property bool splitPhaseL2PassthruDisabled: false | ||
- property bool isAcOutput: false | ||
+ property VBusItem power: VBusItem { unit: "W" } | ||
+ property VBusItem phaseCount: VBusItem { bind: Utils.path(bindPrefix, "/NumberOfPhases") } | ||
+ property bool splitPhaseL2PassthruDisabled: false | ||
+ property bool isAcOutput: false | ||
property bool l2AndL1OutSummed: false | ||
+////// added to show bar graphs | ||
+ property VBusItem inverterState: VBusItem { bind: Utils.path(systemPrefix, "/SystemState/State" ) } | ||
+ | ||
+ ////// add to show voltage, current, frequency and bar graphs and use grid/genset meter | ||
+ property VBusItem voltageL1: VBusItem { bind: Utils.path (bindPrefix, "/L1/Voltage"); unit: "V"} | ||
+ property VBusItem voltageL2: VBusItem { bind: Utils.path (bindPrefix, "/L2/Voltage"); unit: "V"} | ||
+ property VBusItem voltageL3: VBusItem { bind: Utils.path (bindPrefix, "/L3/Voltage"); unit: "V"} | ||
|
||
- property VBusItem power: VBusItem { unit: "W" } | ||
+ property VBusItem currentL1: VBusItem { bind: Utils.path (bindPrefix, "/L1/Current"); unit: "A"} | ||
+ property VBusItem currentL2: VBusItem { bind: Utils.path (bindPrefix, "/L2/Current"); unit: "A"} | ||
+ property VBusItem currentL3: VBusItem { bind: Utils.path (bindPrefix, "/L3/Current"); unit: "A"} | ||
+ | ||
+ property VBusItem frequency: VBusItem { bind: Utils.path (bindPrefix, "/Frequency"); unit: "Hz"} | ||
+ | ||
+ property VBusItem inCurrentLimit: VBusItem { bind: Utils.path(inverterService, inverterSource, "/CurrentLimit"); unit: "A"} | ||
+ ////// end add to show voltage, current and frequency | ||
+ | ||
// As systemcalc doesn't provide the totals anymore we calculate it here. | ||
// Timer is needed because the values are not received in once and then the total | ||
// changes too often on system with more than one phase |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/OverviewGridParallel.qml.orig 2025-01-12 08:30:33 | ||
+++ /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/OverviewGridParallel.qml 2024-05-14 07:00:12 | ||
@@ -4,6 +4,10 @@ | ||
OverviewPage { | ||
id: root | ||
|
||
+////// GuiMods — DarkMode | ||
+ property VBusItem darkModeItem: VBusItem { bind: "com.victronenergy.settings/Settings/GuiMods/DarkMode" } | ||
+ property bool darkMode: darkModeItem.valid && darkModeItem.value == 1 | ||
+ | ||
property variant sys: theSystem | ||
property bool hasAcOutSystem: _hasAcOutSystem.value === 1 | ||
|
||
@@ -20,8 +24,9 @@ | ||
width: 148 | ||
height: 100 | ||
title: getAcSourceName(sys.acSource) | ||
- titleColor: "#E74c3c" | ||
- color: "#C0392B" | ||
+////// GuiMods — DarkMode | ||
+ titleColor: !darkMode ? "#E74c3c" : "#73261E" | ||
+ color: !darkMode ? "#C0392B" : "#601C15" | ||
anchors { | ||
top: root.top; topMargin: 1 | ||
left: parent.left; leftMargin: 5 | ||
@@ -44,8 +49,9 @@ | ||
OverviewBox { | ||
id: acLoadBox | ||
title: qsTr("AC Loads") | ||
- color: "#27AE60" | ||
- titleColor: "#2ECC71" | ||
+////// GuiMods — DarkMode | ||
+ color: !darkMode ? "#27AE60" : "#135730" | ||
+ titleColor: !darkMode ? "#2ECC71" : "#176638" | ||
width: 148 | ||
height: 100 | ||
|
||
@@ -63,8 +69,9 @@ | ||
OverviewBox { | ||
id: acOutputBox | ||
title: qsTr("Critical Loads") | ||
- color: "#157894" | ||
- titleColor: "#419FB9" | ||
+////// GuiMods — DarkMode | ||
+ color: !darkMode ? "#157894" : "#0a3c4a" | ||
+ titleColor: !darkMode ? "#419FB9" : "#204f5c" | ||
height: 100 | ||
width: 148 | ||
visible: hasAcOutSystem | ||
@@ -103,8 +110,7 @@ | ||
|
||
soc: sys.battery.soc.valid ? sys.battery.soc.value : 0 | ||
preferRenewable: sys.preferRenewableEnergy.valid | ||
- preferRenewableOverride: sys.preferRenewableEnergy.value === 0 || sys.preferRenewableEnergy.value === 2 | ||
- preferRenewableOverrideGenset: sys.remoteGeneratorSelected.value === 1 || sys.acSource.value === 2 | ||
+ preferRenewableOverride: sys.preferRenewableEnergy.value === 0 | ||
height: pvInverterOnGrid.visible ? 81 : 101 | ||
width: 145 | ||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/OverviewHub.qml.orig 2025-01-12 08:30:33 | ||
+++ /Users/Kevin/GitHub/GuiMods.copy/FileSets/PatchSource/OverviewHub.qml 2024-05-14 07:00:12 | ||
@@ -4,6 +4,10 @@ | ||
OverviewPage { | ||
id: root | ||
|
||
+////// GuiMods — DarkMode | ||
+ property VBusItem darkModeItem: VBusItem { bind: "com.victronenergy.settings/Settings/GuiMods/DarkMode" } | ||
+ property bool darkMode: darkModeItem.valid && darkModeItem.value == 1 | ||
+ | ||
property variant sys: theSystem | ||
property bool hasAcSolarOnAcIn1: sys.pvOnAcIn1.power.valid | ||
property bool hasAcSolarOnAcIn2: sys.pvOnAcIn2.power.valid | ||
@@ -21,8 +25,9 @@ | ||
width: 148 | ||
height: showStatusBar ? 100 : 120 | ||
title: getAcSourceName(sys.acSource) | ||
- titleColor: "#E74c3c" | ||
- color: "#C0392B" | ||
+////// GuiMods — DarkMode | ||
+ titleColor: !darkMode ? "#E74c3c" : "#73261E" | ||
+ color: !darkMode ? "#C0392B" : "#601C15" | ||
|
||
anchors { | ||
top: multi.top | ||
@@ -54,8 +59,9 @@ | ||
OverviewBox { | ||
id: acLoadBox | ||
title: qsTr("AC Loads") | ||
- color: "#27AE60" | ||
- titleColor: "#2ECC71" | ||
+////// GuiMods — DarkMode | ||
+ color: !darkMode ? "#27AE60" : "#135730" | ||
+ titleColor: !darkMode ? "#2ECC71" : "#176638" | ||
width: 148 | ||
height: showStatusBar ? 100 : 120 | ||
|
||
@@ -73,9 +79,7 @@ | ||
id: battery | ||
|
||
soc: sys.battery.soc.valid ? sys.battery.soc.value : 0 | ||
- preferRenewable: sys.preferRenewableEnergy.valid | ||
- preferRenewableOverride: sys.preferRenewableEnergy.value === 0 || sys.preferRenewableEnergy.value === 2 | ||
- preferRenewableOverrideGenset: sys.remoteGeneratorSelected.value === 1 || sys.acSource.value === 2 | ||
+ | ||
anchors { | ||
bottom: parent.bottom; bottomMargin: 5; | ||
left: parent.left; leftMargin: 10 |
File renamed without changes.
File renamed without changes.
Oops, something went wrong.