diff --git a/.DS_Store b/.DS_Store index 296730c..d9193cc 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/FileSets/.DS_Store b/FileSets/.DS_Store index ed58f52..761f250 100644 Binary files a/FileSets/.DS_Store and b/FileSets/.DS_Store differ diff --git a/FileSets/fileList b/FileSets/fileList index 686cd0a..dffadd7 100644 --- a/FileSets/fileList +++ b/FileSets/fileList @@ -1,2 +1 @@ /opt/victronenergy/dbus-systemcalc-py/delegates/relaystate.py -/opt/victronenergy/gui/qml/PageSettingsGeneral.qml diff --git a/FileSets/gpio_list b/FileSets/gpio_list index 0f3d904..c5e8487 100644 --- a/FileSets/gpio_list +++ b/FileSets/gpio_list @@ -38,11 +38,3 @@ # Digital input 5 Pin 37 / GPIO 26 26 in digital_input_5 - -#### Gracefull shutdown - connect pin 36 to pin 38 -#### Note these inputs and outputs is NOT added to the available I/O used by Venus OS !!!! -# Pin 36 / GPIO 16 -16 in digital_input_6 -# Relay 7 Pin 38 / GPIO 20 -20 out relay_7 - diff --git a/FileSets/v2.40/PageSettingsGeneral.qml b/FileSets/v2.40/PageSettingsGeneral.qml deleted file mode 100644 index 3bad501..0000000 --- a/FileSets/v2.40/PageSettingsGeneral.qml +++ /dev/null @@ -1,135 +0,0 @@ -//////// Modified to add Shutdown command (RPI only) - -import QtQuick 1.1 -import com.victron.velib 1.0 -import "utils.js" as Utils - -MbPage -{ - id: root - property string bindPrefix: "com.victronenergy.settings" - -//////// add for Shutdown command - property string systemBindPrefix: "com.victronenergy.system" - VBusItem { id: shutdownItem; bind: Utils.path(systemBindPrefix, "/Relay/6/State") } - VBusItem { id: shutdownItem2; bind: Utils.path(bindPrefix, "/Settings/Relay/6/InitialState") } - - model: VisualItemModel { - MbItemOptions { - id: accessLevelSelect - description: qsTr("Access level") - bind: Utils.path(bindPrefix, "/Settings/System/AccessLevel") - magicKeys: true - writeAccessLevel: User.AccessUser - possibleValues: [ - MbOption { description: qsTr("User"); value: User.AccessUser; password: "ZZZ" }, - MbOption { description: qsTr("User & Installer"); value: User.AccessInstaller; password: "ZZZ" }, - MbOption { description: qsTr("Superuser"); value: User.AccessSuperUser; readonly: true }, - MbOption { description: qsTr("Service"); value: User.AccessService; readonly: true } - ] - - // change to super user mode if the right button is pressed for a while - property int repeatCount - onFocusChanged: repeatCount = 0 - - function open() { - if (user.accessLevel >= User.AccessInstaller && ++repeatCount > 60) { - if (accessLevelSelect.value !== User.AccessSuperUser) - accessLevelSelect.item.setValue(User.AccessSuperUser) - repeatCount = 0 - } - } - } - - MbEditBox { - show: user.accessLevel >= User.AccessSuperUser - description: "Set root password" - onEditDone: { - if (newValue.length < 6) { - toast.createToast("Please enter at least 6 characters") - } else { - toast.createToast(vePlatform.setRootPassword(newValue)) - item.value = "" - } - } - } - - MbSwitch { - name: qsTr("SSH on LAN") - show: user.accessLevel >= User.AccessSuperUser - bind: "com.victronenergy.settings/Settings/System/SSHLocal" - } - - MbSwitch { - id: remoteSupportOnOff - name: qsTr("Remote support") - bind: "com.victronenergy.settings/Settings/System/RemoteSupport" - } - - MbItemValue { - description: qsTr("Remote support tunnel") - item.value: remotePort.item.valid && remotePort.item.value !== 0 ? qsTr("Online") : qsTr("Offline") - show: remoteSupportOnOff.item.value - } - - MbItemValue { - id: remotePort - description: qsTr("Remote support port") - item.bind: "com.victronenergy.settings/Settings/System/RemoteSupportPort" - show: remoteSupportOnOff.item.value - } - - MbOK { - id: reboot - description: qsTr("Reboot?") - writeAccessLevel: User.AccessUser - onClicked: { - toast.createToast(qsTr("Rebooting..."), 10000, "icon-restart-active") - vePlatform.reboot() - } - } -//////// add for Shutdown command - // shutdown uses a psudo relay output connected to a psudo digital input - // shutdownItem is the relay state in system - // shutdownItem2 is the relay innitial state in settings - // the latter must not remain set through the shutdown or the system - // will shutdown immediately on startup!!! - MbOK { - id: shutdown - description: qsTr("Shutdown?") - writeAccessLevel: User.AccessUser - onClicked: - { - toast.createToast(qsTr("Shutting down..."), 10000, "icon-restart-active") - if (shutdownItem.valid) - shutdownItem.setValue (1) - if (shutdownItem2.valid) - shutdownItem2.setValue (0) - } - } - - MbSwitch { - property VBusItem hasBuzzer: VBusItem {bind: "com.victronenergy.system/Buzzer/State"} - name: qsTr("Audible alarm") - bind: Utils.path(bindPrefix, "/Settings/Alarm/Audible") - show: hasBuzzer.valid - } - - MbItemOptions { - id: demoOnOff - description: qsTr("Demo mode") - bind: Utils.path(bindPrefix, "/Settings/Gui/DemoMode") - possibleValues: [ - MbOption { description: qsTr("Disabled"); value: 0 }, - MbOption { description: qsTr("ESS demo"); value: 1 }, - MbOption { description: qsTr("Boat/Motorhome demo 1"); value: 2 }, - MbOption { description: qsTr("Boat/Motorhome demo 2"); value: 3 } - ] - } - - MbItemText { - text: qsTr("Starting demo mode will change some settings and the user interface will be unresponsive for a moment.") - wrapMode: Text.WordWrap - } - } -} diff --git a/FileSets/v2.40/PageSettingsGeneral.qml.orig b/FileSets/v2.40/PageSettingsGeneral.qml.orig deleted file mode 100644 index 7f692e1..0000000 --- a/FileSets/v2.40/PageSettingsGeneral.qml.orig +++ /dev/null @@ -1,109 +0,0 @@ -import QtQuick 1.1 -import com.victron.velib 1.0 -import "utils.js" as Utils - -MbPage -{ - id: root - property string bindPrefix: "com.victronenergy.settings" - - model: VisualItemModel { - MbItemOptions { - id: accessLevelSelect - description: qsTr("Access level") - bind: Utils.path(bindPrefix, "/Settings/System/AccessLevel") - magicKeys: true - writeAccessLevel: User.AccessUser - possibleValues: [ - MbOption { description: qsTr("User"); value: User.AccessUser; password: "ZZZ" }, - MbOption { description: qsTr("User & Installer"); value: User.AccessInstaller; password: "ZZZ" }, - MbOption { description: qsTr("Superuser"); value: User.AccessSuperUser; readonly: true }, - MbOption { description: qsTr("Service"); value: User.AccessService; readonly: true } - ] - - // change to super user mode if the right button is pressed for a while - property int repeatCount - onFocusChanged: repeatCount = 0 - - function open() { - if (user.accessLevel >= User.AccessInstaller && ++repeatCount > 60) { - if (accessLevelSelect.value !== User.AccessSuperUser) - accessLevelSelect.item.setValue(User.AccessSuperUser) - repeatCount = 0 - } - } - } - - MbEditBox { - show: user.accessLevel >= User.AccessSuperUser - description: "Set root password" - onEditDone: { - if (newValue.length < 6) { - toast.createToast("Please enter at least 6 characters") - } else { - toast.createToast(vePlatform.setRootPassword(newValue)) - item.value = "" - } - } - } - - MbSwitch { - name: qsTr("SSH on LAN") - show: user.accessLevel >= User.AccessSuperUser - bind: "com.victronenergy.settings/Settings/System/SSHLocal" - } - - MbSwitch { - id: remoteSupportOnOff - name: qsTr("Remote support") - bind: "com.victronenergy.settings/Settings/System/RemoteSupport" - } - - MbItemValue { - description: qsTr("Remote support tunnel") - item.value: remotePort.item.valid && remotePort.item.value !== 0 ? qsTr("Online") : qsTr("Offline") - show: remoteSupportOnOff.item.value - } - - MbItemValue { - id: remotePort - description: qsTr("Remote support port") - item.bind: "com.victronenergy.settings/Settings/System/RemoteSupportPort" - show: remoteSupportOnOff.item.value - } - - MbOK { - id: reboot - description: qsTr("Reboot?") - writeAccessLevel: User.AccessUser - onClicked: { - toast.createToast(qsTr("Rebooting..."), 10000, "icon-restart-active") - vePlatform.reboot() - } - } - - MbSwitch { - property VBusItem hasBuzzer: VBusItem {bind: "com.victronenergy.system/Buzzer/State"} - name: qsTr("Audible alarm") - bind: Utils.path(bindPrefix, "/Settings/Alarm/Audible") - show: hasBuzzer.valid - } - - MbItemOptions { - id: demoOnOff - description: qsTr("Demo mode") - bind: Utils.path(bindPrefix, "/Settings/Gui/DemoMode") - possibleValues: [ - MbOption { description: qsTr("Disabled"); value: 0 }, - MbOption { description: qsTr("ESS demo"); value: 1 }, - MbOption { description: qsTr("Boat/Motorhome demo 1"); value: 2 }, - MbOption { description: qsTr("Boat/Motorhome demo 2"); value: 3 } - ] - } - - MbItemText { - text: qsTr("Starting demo mode will change some settings and the user interface will be unresponsive for a moment.") - wrapMode: Text.WordWrap - } - } -} diff --git a/FileSets/v2.60/.DS_Store b/FileSets/v2.60/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/FileSets/v2.60/.DS_Store and /dev/null differ diff --git a/FileSets/v2.60/PageSettingsGeneral.qml b/FileSets/v2.60/PageSettingsGeneral.qml deleted file mode 100644 index 43808bc..0000000 --- a/FileSets/v2.60/PageSettingsGeneral.qml +++ /dev/null @@ -1,143 +0,0 @@ -//////// Modified to add Shutdown command (RPI only) - -import QtQuick 1.1 -import com.victron.velib 1.0 -import "utils.js" as Utils - -MbPage -{ - id: root - property string bindPrefix: "com.victronenergy.settings" - -//////// add for Shutdown command - property string systemBindPrefix: "com.victronenergy.system" - VBusItem { id: shutdownItem; bind: Utils.path(systemBindPrefix, "/Relay/6/State") } - VBusItem { id: shutdownItem2; bind: Utils.path(bindPrefix, "/Settings/Relay/6/InitialState") } - - model: VisualItemModel { - MbItemOptions { - id: accessLevelSelect - description: qsTr("Access level") - bind: Utils.path(bindPrefix, "/Settings/System/AccessLevel") - magicKeys: true - writeAccessLevel: User.AccessUser - possibleValues: [ - MbOption { description: qsTr("User"); value: User.AccessUser; password: "ZZZ" }, - MbOption { description: qsTr("User & Installer"); value: User.AccessInstaller; password: "ZZZ" }, - MbOption { description: qsTr("Superuser"); value: User.AccessSuperUser; readonly: true }, - MbOption { description: qsTr("Service"); value: User.AccessService; readonly: true } - ] - - // touch version to get super user - property bool pulledDown: listview.contentY < -60 - Timer { - running: accessLevelSelect.pulledDown - interval: 5000 - onTriggered: if (user.accessLevel >= User.AccessInstaller) accessLevelSelect.item.setValue(User.AccessSuperUser) - } - - // change to super user mode if the right button is pressed for a while - property int repeatCount - onFocusChanged: repeatCount = 0 - - function open() { - if (user.accessLevel >= User.AccessInstaller && ++repeatCount > 60) { - if (accessLevelSelect.value !== User.AccessSuperUser) - accessLevelSelect.item.setValue(User.AccessSuperUser) - repeatCount = 0 - } - } - } - - MbEditBox { - show: user.accessLevel >= User.AccessSuperUser - description: "Set root password" - onEditDone: { - if (newValue.length < 6) { - toast.createToast("Please enter at least 6 characters") - } else { - toast.createToast(vePlatform.setRootPassword(newValue)) - item.value = "" - } - } - } - - MbSwitch { - name: qsTr("SSH on LAN") - show: user.accessLevel >= User.AccessSuperUser - bind: "com.victronenergy.settings/Settings/System/SSHLocal" - } - - MbSwitch { - id: remoteSupportOnOff - name: qsTr("Remote support") - bind: "com.victronenergy.settings/Settings/System/RemoteSupport" - } - - MbItemValue { - description: qsTr("Remote support tunnel") - item.value: remotePort.item.valid && remotePort.item.value !== 0 ? qsTr("Online") : qsTr("Offline") - show: remoteSupportOnOff.item.value - } - - MbItemValue { - id: remotePort - description: qsTr("Remote support IP and port") - item.bind: "com.victronenergy.settings/Settings/System/RemoteSupportIpAndPort" - show: remoteSupportOnOff.item.value - } - - MbOK { - id: reboot - description: qsTr("Reboot?") - writeAccessLevel: User.AccessUser - onClicked: { - toast.createToast(qsTr("Rebooting..."), 10000, "icon-restart-active") - vePlatform.reboot() - } - } -//////// add for Shutdown command - // shutdown uses a psudo relay output connected to a psudo digital input - // shutdownItem is the relay state in system - // shutdownItem2 is the relay innitial state in settings - // the latter must not remain set through the shutdown or the system - // will shutdown immediately on startup!!! - MbOK { - id: shutdown - description: qsTr("Shutdown?") - writeAccessLevel: User.AccessUser - onClicked: - { - toast.createToast(qsTr("Shutting down..."), 10000, "icon-restart-active") - if (shutdownItem.valid) - shutdownItem.setValue (1) - if (shutdownItem2.valid) - shutdownItem2.setValue (0) - } - } - - MbSwitch { - property VBusItem hasBuzzer: VBusItem {bind: "com.victronenergy.system/Buzzer/State"} - name: qsTr("Audible alarm") - bind: Utils.path(bindPrefix, "/Settings/Alarm/Audible") - show: hasBuzzer.valid - } - - MbItemOptions { - id: demoOnOff - description: qsTr("Demo mode") - bind: Utils.path(bindPrefix, "/Settings/Gui/DemoMode") - possibleValues: [ - MbOption { description: qsTr("Disabled"); value: 0 }, - MbOption { description: qsTr("ESS demo"); value: 1 }, - MbOption { description: qsTr("Boat/Motorhome demo 1"); value: 2 }, - MbOption { description: qsTr("Boat/Motorhome demo 2"); value: 3 } - ] - } - - MbItemText { - text: qsTr("Starting demo mode will change some settings and the user interface will be unresponsive for a moment.") - wrapMode: Text.WordWrap - } - } -} diff --git a/FileSets/v2.60/PageSettingsGeneral.qml.orig b/FileSets/v2.60/PageSettingsGeneral.qml.orig deleted file mode 100644 index 21a9c82..0000000 --- a/FileSets/v2.60/PageSettingsGeneral.qml.orig +++ /dev/null @@ -1,117 +0,0 @@ -import QtQuick 1.1 -import com.victron.velib 1.0 -import "utils.js" as Utils - -MbPage -{ - id: root - property string bindPrefix: "com.victronenergy.settings" - - model: VisualItemModel { - MbItemOptions { - id: accessLevelSelect - description: qsTr("Access level") - bind: Utils.path(bindPrefix, "/Settings/System/AccessLevel") - magicKeys: true - writeAccessLevel: User.AccessUser - possibleValues: [ - MbOption { description: qsTr("User"); value: User.AccessUser; password: "ZZZ" }, - MbOption { description: qsTr("User & Installer"); value: User.AccessInstaller; password: "ZZZ" }, - MbOption { description: qsTr("Superuser"); value: User.AccessSuperUser; readonly: true }, - MbOption { description: qsTr("Service"); value: User.AccessService; readonly: true } - ] - - // touch version to get super user - property bool pulledDown: listview.contentY < -60 - Timer { - running: accessLevelSelect.pulledDown - interval: 5000 - onTriggered: if (user.accessLevel >= User.AccessInstaller) accessLevelSelect.item.setValue(User.AccessSuperUser) - } - - // change to super user mode if the right button is pressed for a while - property int repeatCount - onFocusChanged: repeatCount = 0 - - function open() { - if (user.accessLevel >= User.AccessInstaller && ++repeatCount > 60) { - if (accessLevelSelect.value !== User.AccessSuperUser) - accessLevelSelect.item.setValue(User.AccessSuperUser) - repeatCount = 0 - } - } - } - - MbEditBox { - show: user.accessLevel >= User.AccessSuperUser - description: "Set root password" - onEditDone: { - if (newValue.length < 6) { - toast.createToast("Please enter at least 6 characters") - } else { - toast.createToast(vePlatform.setRootPassword(newValue)) - item.value = "" - } - } - } - - MbSwitch { - name: qsTr("SSH on LAN") - show: user.accessLevel >= User.AccessSuperUser - bind: "com.victronenergy.settings/Settings/System/SSHLocal" - } - - MbSwitch { - id: remoteSupportOnOff - name: qsTr("Remote support") - bind: "com.victronenergy.settings/Settings/System/RemoteSupport" - } - - MbItemValue { - description: qsTr("Remote support tunnel") - item.value: remotePort.item.valid && remotePort.item.value !== 0 ? qsTr("Online") : qsTr("Offline") - show: remoteSupportOnOff.item.value - } - - MbItemValue { - id: remotePort - description: qsTr("Remote support IP and port") - item.bind: "com.victronenergy.settings/Settings/System/RemoteSupportIpAndPort" - show: remoteSupportOnOff.item.value - } - - MbOK { - id: reboot - description: qsTr("Reboot?") - writeAccessLevel: User.AccessUser - onClicked: { - toast.createToast(qsTr("Rebooting..."), 10000, "icon-restart-active") - vePlatform.reboot() - } - } - - MbSwitch { - property VBusItem hasBuzzer: VBusItem {bind: "com.victronenergy.system/Buzzer/State"} - name: qsTr("Audible alarm") - bind: Utils.path(bindPrefix, "/Settings/Alarm/Audible") - show: hasBuzzer.valid - } - - MbItemOptions { - id: demoOnOff - description: qsTr("Demo mode") - bind: Utils.path(bindPrefix, "/Settings/Gui/DemoMode") - possibleValues: [ - MbOption { description: qsTr("Disabled"); value: 0 }, - MbOption { description: qsTr("ESS demo"); value: 1 }, - MbOption { description: qsTr("Boat/Motorhome demo 1"); value: 2 }, - MbOption { description: qsTr("Boat/Motorhome demo 2"); value: 3 } - ] - } - - MbItemText { - text: qsTr("Starting demo mode will change some settings and the user interface will be unresponsive for a moment.") - wrapMode: Text.WordWrap - } - } -} diff --git a/FileSets/v2.71/.DS_Store b/FileSets/v2.71/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/FileSets/v2.71/.DS_Store and /dev/null differ diff --git a/FileSets/v2.71/PageSettingsGeneral.qml b/FileSets/v2.71/PageSettingsGeneral.qml deleted file mode 100644 index d748614..0000000 --- a/FileSets/v2.71/PageSettingsGeneral.qml +++ /dev/null @@ -1,143 +0,0 @@ -//////// Modified to add Shutdown command (RPI only) - -import QtQuick 1.1 -import com.victron.velib 1.0 -import "utils.js" as Utils - -MbPage -{ - id: root - property string bindPrefix: "com.victronenergy.settings" - -//////// add for Shutdown command - property string systemBindPrefix: "com.victronenergy.system" - VBusItem { id: shutdownItem; bind: Utils.path(systemBindPrefix, "/Relay/6/State") } - VBusItem { id: shutdownItem2; bind: Utils.path(bindPrefix, "/Settings/Relay/6/InitialState") } - - model: VisualItemModel { - MbItemOptions { - id: accessLevelSelect - description: qsTr("Access level") - bind: Utils.path(bindPrefix, "/Settings/System/AccessLevel") - magicKeys: true - writeAccessLevel: User.AccessUser - possibleValues: [ - MbOption { description: qsTr("User"); value: User.AccessUser; password: "ZZZ" }, - MbOption { description: qsTr("User & Installer"); value: User.AccessInstaller; password: "ZZZ" }, - MbOption { description: qsTr("Superuser"); value: User.AccessSuperUser; readonly: true }, - MbOption { description: qsTr("Service"); value: User.AccessService; readonly: true } - ] - - // touch version to get super user - property bool pulledDown: listview.contentY < -60 - Timer { - running: accessLevelSelect.pulledDown - interval: 5000 - onTriggered: if (user.accessLevel >= User.AccessInstaller) accessLevelSelect.item.setValue(User.AccessSuperUser) - } - - // change to super user mode if the right button is pressed for a while - property int repeatCount - onFocusChanged: repeatCount = 0 - - function open() { - if (user.accessLevel >= User.AccessInstaller && ++repeatCount > 60) { - if (accessLevelSelect.value !== User.AccessSuperUser) - accessLevelSelect.item.setValue(User.AccessSuperUser) - repeatCount = 0 - } - } - } - - MbEditBox { - description: "Set root password" - showAccessLevel: User.AccessSuperUser - onEditDone: { - if (newValue.length < 6) { - toast.createToast("Please enter at least 6 characters") - } else { - toast.createToast(vePlatform.setRootPassword(newValue)) - item.value = "" - } - } - } - - MbSwitch { - name: qsTr("SSH on LAN") - showAccessLevel: User.AccessSuperUser - bind: "com.victronenergy.settings/Settings/System/SSHLocal" - } - - MbSwitch { - id: remoteSupportOnOff - name: qsTr("Remote support") - bind: "com.victronenergy.settings/Settings/System/RemoteSupport" - } - - MbItemValue { - description: qsTr("Remote support tunnel") - item.value: remotePort.item.valid && remotePort.item.value !== 0 ? qsTr("Online") : qsTr("Offline") - show: remoteSupportOnOff.item.value - } - - MbItemValue { - id: remotePort - description: qsTr("Remote support IP and port") - item.bind: "com.victronenergy.settings/Settings/System/RemoteSupportIpAndPort" - show: remoteSupportOnOff.item.value - } - - MbOK { - id: reboot - description: qsTr("Reboot?") - writeAccessLevel: User.AccessUser - onClicked: { - toast.createToast(qsTr("Rebooting..."), 10000, "icon-restart-active") - vePlatform.reboot() - } - } -//////// add for Shutdown command - // shutdown uses a psudo relay output connected to a psudo digital input - // shutdownItem is the relay state in system - // shutdownItem2 is the relay innitial state in settings - // the latter must not remain set through the shutdown or the system - // will shutdown immediately on startup!!! - MbOK { - id: shutdown - description: qsTr("Shutdown?") - writeAccessLevel: User.AccessUser - onClicked: - { - toast.createToast(qsTr("Shutting down..."), 10000, "icon-restart-active") - if (shutdownItem.valid) - shutdownItem.setValue (1) - if (shutdownItem2.valid) - shutdownItem2.setValue (0) - } - } - - MbSwitch { - property VBusItem hasBuzzer: VBusItem {bind: "com.victronenergy.system/Buzzer/State"} - name: qsTr("Audible alarm") - bind: Utils.path(bindPrefix, "/Settings/Alarm/Audible") - show: hasBuzzer.valid - } - - MbItemOptions { - id: demoOnOff - description: qsTr("Demo mode") - bind: Utils.path(bindPrefix, "/Settings/Gui/DemoMode") - possibleValues: [ - MbOption { description: qsTr("Disabled"); value: 0 }, - MbOption { description: qsTr("ESS demo"); value: 1 }, - MbOption { description: qsTr("Boat/Motorhome demo 1"); value: 2 }, - MbOption { description: qsTr("Boat/Motorhome demo 2"); value: 3 } - ] - } - - MbItemText { - text: qsTr("Starting demo mode will change some settings and the user interface will be unresponsive for a moment.") - wrapMode: Text.WordWrap - } - } -} diff --git a/FileSets/v2.71/PageSettingsGeneral.qml.orig b/FileSets/v2.71/PageSettingsGeneral.qml.orig deleted file mode 100644 index 4aa39ec..0000000 --- a/FileSets/v2.71/PageSettingsGeneral.qml.orig +++ /dev/null @@ -1,117 +0,0 @@ -import QtQuick 1.1 -import com.victron.velib 1.0 -import "utils.js" as Utils - -MbPage -{ - id: root - property string bindPrefix: "com.victronenergy.settings" - - model: VisualItemModel { - MbItemOptions { - id: accessLevelSelect - description: qsTr("Access level") - bind: Utils.path(bindPrefix, "/Settings/System/AccessLevel") - magicKeys: true - writeAccessLevel: User.AccessUser - possibleValues: [ - MbOption { description: qsTr("User"); value: User.AccessUser; password: "ZZZ" }, - MbOption { description: qsTr("User & Installer"); value: User.AccessInstaller; password: "ZZZ" }, - MbOption { description: qsTr("Superuser"); value: User.AccessSuperUser; readonly: true }, - MbOption { description: qsTr("Service"); value: User.AccessService; readonly: true } - ] - - // touch version to get super user - property bool pulledDown: listview.contentY < -60 - Timer { - running: accessLevelSelect.pulledDown - interval: 5000 - onTriggered: if (user.accessLevel >= User.AccessInstaller) accessLevelSelect.item.setValue(User.AccessSuperUser) - } - - // change to super user mode if the right button is pressed for a while - property int repeatCount - onFocusChanged: repeatCount = 0 - - function open() { - if (user.accessLevel >= User.AccessInstaller && ++repeatCount > 60) { - if (accessLevelSelect.value !== User.AccessSuperUser) - accessLevelSelect.item.setValue(User.AccessSuperUser) - repeatCount = 0 - } - } - } - - MbEditBox { - description: "Set root password" - showAccessLevel: User.AccessSuperUser - onEditDone: { - if (newValue.length < 6) { - toast.createToast("Please enter at least 6 characters") - } else { - toast.createToast(vePlatform.setRootPassword(newValue)) - item.value = "" - } - } - } - - MbSwitch { - name: qsTr("SSH on LAN") - showAccessLevel: User.AccessSuperUser - bind: "com.victronenergy.settings/Settings/System/SSHLocal" - } - - MbSwitch { - id: remoteSupportOnOff - name: qsTr("Remote support") - bind: "com.victronenergy.settings/Settings/System/RemoteSupport" - } - - MbItemValue { - description: qsTr("Remote support tunnel") - item.value: remotePort.item.valid && remotePort.item.value !== 0 ? qsTr("Online") : qsTr("Offline") - show: remoteSupportOnOff.item.value - } - - MbItemValue { - id: remotePort - description: qsTr("Remote support IP and port") - item.bind: "com.victronenergy.settings/Settings/System/RemoteSupportIpAndPort" - show: remoteSupportOnOff.item.value - } - - MbOK { - id: reboot - description: qsTr("Reboot?") - writeAccessLevel: User.AccessUser - onClicked: { - toast.createToast(qsTr("Rebooting..."), 10000, "icon-restart-active") - vePlatform.reboot() - } - } - - MbSwitch { - property VBusItem hasBuzzer: VBusItem {bind: "com.victronenergy.system/Buzzer/State"} - name: qsTr("Audible alarm") - bind: Utils.path(bindPrefix, "/Settings/Alarm/Audible") - show: hasBuzzer.valid - } - - MbItemOptions { - id: demoOnOff - description: qsTr("Demo mode") - bind: Utils.path(bindPrefix, "/Settings/Gui/DemoMode") - possibleValues: [ - MbOption { description: qsTr("Disabled"); value: 0 }, - MbOption { description: qsTr("ESS demo"); value: 1 }, - MbOption { description: qsTr("Boat/Motorhome demo 1"); value: 2 }, - MbOption { description: qsTr("Boat/Motorhome demo 2"); value: 3 } - ] - } - - MbItemText { - text: qsTr("Starting demo mode will change some settings and the user interface will be unresponsive for a moment.") - wrapMode: Text.WordWrap - } - } -} diff --git a/ReadMe b/ReadMe index 6fd0836..c49f211 100644 --- a/ReadMe +++ b/ReadMe @@ -6,10 +6,6 @@ This script adds: the additional GPIO pins (5 total) to /etc/venus/gpio_list makes additional digital inputs available makes all digital inputs behave the same: pull up so they are active low - shutdown command to Device List / Settings / General - -To use the shutdown command, pins 38 and 36 of the RPI's GPIO header must be connected - If you don't want the shutdown command to function, do not jumper these pins The Raspberry PI default is for the first 8 GPIO pins to have pull UPs and the remaining have pull DOWNs. This makes some digital input pins behave differently diff --git a/service/.DS_Store b/service/.DS_Store deleted file mode 100644 index e32a021..0000000 Binary files a/service/.DS_Store and /dev/null differ diff --git a/service/log/run b/service/log/run deleted file mode 100755 index 2860bb2..0000000 --- a/service/log/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -exec multilog t s25000 n4 /var/log/gracefulShutdown - diff --git a/service/run b/service/run deleted file mode 100755 index 42b2d5b..0000000 --- a/service/run +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -exec 2>&1 -exec /data/RpiGpioSetup/GracefulShutdown.sh - diff --git a/setup b/setup index e8806af..db9514e 100755 --- a/setup +++ b/setup @@ -19,15 +19,12 @@ # run manually initally, then called from reinstallMods # to uninstall/deactivate, call this script with "uninstall" as first parameter -# a shutdown command is added to the Settings / General -# the shutdown uses a psudo-digital input jumpered to a psudo-relay output # Note, this script DOES require a system reboot. gpioListFile="/etc/venus/gpio_list" overlayFile="/u-boot/overlays/VenusGpioOverlay.dtb" relayStateFile="/opt/victronenergy/dbus-systemcalc-py/delegates/relaystate.py" configFile="/u-boot/config.txt" -pageGeneralFile="/opt/victronenergy/gui/qml/PageSettingsGeneral.qml" # no log file for this package packageLogFile="" @@ -69,22 +66,7 @@ if [ $scriptAction == 'NONE' ] ; then echo " Activates all 5 predefined digital inputs" echo " Changes all digital inputs to have pull-ups in stead of a mix of pull up/down" - standardActionPrompt 'MORE_PROMPTS' - - # installing (not reinstalling) - prompt for options - if [ $scriptAction == 'NONE' ]; then - echo - echo "An optional shutdown command is added to Settings / General:" - echo " to use this command, RPI GPIO pings 38 and 36 must be connected together" - echo - read -p "Do you wish to install ths shugdown command? (y/n)? " - if $yesResponse ; then - touch "$setupOptionsDir/shutdownCommand" - else - rm -f "$setupOptionsDir/shutdownCommand" - fi - scriptAction='INSTALL' - fi + standardActionPrompt fi #### installing @@ -105,15 +87,6 @@ if [ $scriptAction == 'INSTALL' ] ; then echo "#### end change all digital inputs to pull ups" >> "$configFile" filesUpdated=true fi - - - if [ -f $setupOptionsDir/shutdownCommand ]; then - updateActiveFile "$pageGeneralFile" - installService $packageName - else - restoreActiveFile "$pageGeneralFile" - removeService $packageName - fi fi # uninstalling - check scriptAction again @@ -122,8 +95,6 @@ if [ $scriptAction == 'UNINSTALL' ] ; then restoreActiveFile "$gpioListFile" restoreActiveFile "$overlayFile" restoreActiveFile "$relayStateFile" - restoreActiveFile "$pageGeneralFile" - removeService $packageName # remove mods from configFile - do not use restore in case other mods were made manually if [ -f "$configFile" ]; then diff --git a/timeStamp b/timeStamp index 5979dcc..a353ef4 100644 --- a/timeStamp +++ b/timeStamp @@ -1 +1 @@ -1632854043 +1633068625 diff --git a/version b/version index 8616689..4d5034c 100644 --- a/version +++ b/version @@ -1 +1 @@ -v3.1 +v3.2