Skip to content

Development Testing Tips And Tricks

Chris Adams edited this page Feb 27, 2023 · 23 revisions

Development / Testing Tips And Tricks

Device demo modes

To test some temperature sensors and relay settings: Run /opt/victronenergy/dbus-recorder/startdemo.sh 2 to add a 'Fridge' temperature sensor relay to the relay settings.

How to add a dbus data point

see: https://github.com/victronenergy/localsettings

dbus -y com.victronenergy.settings /Settings AddSettings '%[{"path": "CGwacs/DeviceIds", "default": "1,2,3,4,5,6"}]'

	dbus -y com.victronenergy.settings /Settings AddSettings '%[{"path": "CGwacs/DeviceIds", "default": "1,2,3,4,5,6"}]'

	custom name:
	dbus -y com.victronenergy.settings /Settings AddSettings '%[{"path": "Devices/cgwacs_1/CustomName", "default": "customname1"}]'
	dbus -y com.victronenergy.settings /Settings AddSettings '%[{"path": "Devices/cgwacs_2/CustomName", "default": "customname2"}]'
	dbus -y com.victronenergy.settings /Settings AddSettings '%[{"path": "Devices/cgwacs_3/CustomName", "default": "customname3"}]'
	dbus -y com.victronenergy.settings /Settings AddSettings '%[{"path": "Devices/cgwacs_4/CustomName", "default": "customname4"}]'

	dbus -y com.victronenergy.settings /Settings AddSettings '%[{"path": "Devices/cgwacs_1/ServiceType", "default": "pvinverter"}]'
	dbus -y com.victronenergy.settings /Settings AddSettings '%[{"path": "Devices/cgwacs_2/ServiceType", "default": "grid"}]'

	classAndVrmInstanceItem:
	dbus -y com.victronenergy.settings /Settings AddSettings '%[{"path": "Devices/cgwacs_1/ClassAndVrmInstance", "default": "pvinverter:1"}]'
	dbus -y com.victronenergy.settings /Settings AddSettings '%[{"path": "Devices/cgwacs_2/ClassAndVrmInstance", "default": "grid:1"}]'
	dbus -y com.victronenergy.settings /Settings AddSettings '%[{"path": "Devices/cgwacs_3/ClassAndVrmInstance", "default": "genset:1"}]'
	dbus -y com.victronenergy.settings /Settings AddSettings '%[{"path": "Devices/cgwacs_4/ClassAndVrmInstance", "default": "acload:1"}]'

	multiPhaseSupport:
	dbus -y com.victronenergy.settings /Settings AddSettings '%[{"path": "Devices/cgwacs_1/SupportMultiphase", "default": "0"}]'
	dbus -y com.victronenergy.settings /Settings AddSettings '%[{"path": "Devices/cgwacs_2/SupportMultiphase", "default": "1"}]'

	isMultiphase:
	dbus -y com.victronenergy.settings /Settings AddSettings '%[{"path": "Devices/cgwacs_1/IsMultiphase", "default": "1"}]'
	dbus -y com.victronenergy.settings /Settings AddSettings '%[{"path": "Devices/cgwacs_2/IsMultiphase", "default": "0"}]'


	pvOnL2:
	dbus -y com.victronenergy.settings /Settings AddSettings '%[{"path": "Devices/cgwacs_1_S/Enabled", "default": "0"}]'
	dbus -y com.victronenergy.settings /Settings AddSettings '%[{"path": "Devices/cgwacs_2_S/Enabled", "default": "0"}]'

	PV inverter on phase 2 Position:
	dbus -y com.victronenergy.settings /Settings AddSettings '%[{"path": "Devices/cgwacs_2/Position", "default": "0"}]'



	/L2/ServiceType
	dbus -y com.victronenergy.settings /Settings AddSettings '%[{"path": "Devices/cgwacs_1/L2/ServiceType", "default": "pvinverter"}]'
	dbus -y com.victronenergy.settings /Settings AddSettings '%[{"path": "Devices/cgwacs_2/L2/ServiceType", "default": "grid"}]'

Searching for duplicate translation strings

find . -name "*.qml" -exec grep "//%" {} ; | sed -Ez 's/[ ]( )+([/])//g' | sort

edit: copy pasted from another page, and only just noticed that GitHubs markdown corrupted the paste, so this is unlikely to be correct. Oops.

Clone this wiki locally