Can anyone help please I have written my mod to get my temp sensor and water on my overview page but if I update to the beta and reinstate it it doesn’t display at all
Any advise
Attached is my script and result
#!/bin/sh
=================================================================
Venus OS Custom Live Sensor Installer
Hard-coded paths, Unix line endings, safe commands
=================================================================
Paths
STATUSBAR_QML=“/opt/victronenergy/gui-v2/Victron/VenusOS/components/StatusBar.qml”
ICON_DIR=“/data/custom-icons”
CUSTOM_ROW=“/data/custom_live_sensor_row.qml”
Backup original QML
echo “Backing up original statusbar.qml…”
if [ -f “$STATUSBAR_QML” ]; then
cp “$STATUSBAR_QML” “${STATUSBAR_QML}.bak”
else
echo “Error: $STATUSBAR_QML does not exist!”
exit 1
fi
Write the custom live sensor row to a temporary file
cat > “$CUSTOM_ROW” <<‘EOF’
// === Custom Live Sensor Row with Icons (Final) ===Row {
id: liveSensorRow
spacing: 16
anchors.verticalCenter: parent.verticalCenter
anchors.right: clockLabel.left
anchors.rightMargin: 20
visible: !breadcrumbs.visible// — D-Bus Bindings — VeQuickItem { id: internalTemp; uid: "dbus/com.victronenergy.temperature.adc_builtin_temp_3/Temperature" } VeQuickItem { id: externalTemp; uid: "dbus/com.victronenergy.temperature.adc_builtin_temp_2/Temperature" } VeQuickItem { id: fridgeTemp; uid: "dbus/com.victronenergy.temperature.adc_builtin_temp_1/Temperature" } VeQuickItem { id: waterLevel; uid: "dbus/com.victronenergy.tank.adc_gxtank_HQ2233VFF4U_0/Level" } VeQuickItem { id: waterCapacity; uid: "dbus/com.victronenergy.tank.adc_gxtank_HQ2233VFF4U_0/Capacity" } VeQuickItem { id: themeMode; uid: "dbus/com.victronenergy.settings/Settings/Gui/ColorScheme" } // — Internal Temp — Row { spacing: 4 Image { width: 20; height: 20 fillMode: Image.PreserveAspectFit source: themeMode.value === 1 ? "file:///data/custom-icons/tempB.svg" : "file:///data/custom-icons/temp.svg" } Label { text: internalTemp.valid ? internalTemp.value.toFixed(1) + "°C" : "--.-°C" font.bold: true; font.pixelSize: 18 } } // — External Temp — Row { spacing: 4 Image { width: 20; height: 20 fillMode: Image.PreserveAspectFit source: themeMode.value === 1 ? "file:///data/custom-icons/externalB.svg" : "file:///data/custom-icons/external.svg" } Label { text: externalTemp.valid ? externalTemp.value.toFixed(1) + "°C" : "--.-°C" font.bold: true; font.pixelSize: 18 } } // — Fridge Temp — Row { spacing: 4 Image { width: 20; height: 20 fillMode: Image.PreserveAspectFit source: themeMode.value === 1 ? "file:///data/custom-icons/snowflakeB.svg" : "file:///data/custom-icons/snowflake.svg" } Label { text: fridgeTemp.valid ? fridgeTemp.value.toFixed(1) + "°C" : "--.-°C" font.bold: true; font.pixelSize: 18 } }}
Row {
id: water
spacing: 16
anchors.verticalCenter: parent.verticalCenter
anchors.left: connectivityRow.right
anchors.leftMargin: 20
visible: !breadcrumbs.visible// — Water Tank Level — Row { spacing: 4 Image { width: 20; height: 20 fillMode: Image.PreserveAspectFit source: themeMode.value === 1 ? "file:///data/custom-icons/waterB.svg" : "file:///data/custom-icons/water.svg" } Label { text: waterLevel.valid ? (waterCapacity.valid ? ((waterLevel.value / 100.0) * waterCapacity.value * 1000).toFixed(0) + "L" : (waterLevel.value.toFixed(0) + "%")) : "--" font.bold: true font.pixelSize: 18 } }}
// === End Custom Live Sensor Row ===
EOF
Inject the custom row before “Row { id: connectivityRow”
TMP_FILE=“${STATUSBAR_QML}.tmp”
awk ’
{
if ($0 ~ /[1]Row[[:space:]]{[[:space:]]*$/) {
getline nextline
if (nextline ~ /[2]id: connectivityRow[[:space:]]$/) {
system(“cat '”$CUSTOM_ROW"‘")
}
print $0
print nextline
next
}
}’ “$STATUSBAR_QML” > “$TMP_FILE” && mv “$TMP_FILE” “$STATUSBAR_QML”
Create icons directory
echo “Creating icon directory…”
mkdir -p “$ICON_DIR”
Write SVG files (white and black versions)
echo “Writing SVG icons…”
write_svg() {
cat > “$ICON_DIR/$1” <<EOF
$2
EOF
}White icons
write_svg temp.svg ‘’
write_svg external.svg ‘’
write_svg snowflake.svg ‘’
write_svg water.svg ’
’Black icons
write_svg tempB.svg ‘’
write_svg externalB.svg ‘’
write_svg snowflakeB.svg ‘’
write_svg waterB.svg ‘’
Restart GUI
echo “Restarting GUI…”
svc -t /service/start-guiecho “Installation complete! Original backup at ${STATUSBAR_QML}.bak”
