# HG changeset patch # User Daniel O'Connor # Date 1639012728 -37800 # Node ID 8d48ca5294d3a097060f1456dc8ad418ef57eac8 # Parent 3a3dba401b4a88843a830efcd0da51cef76841a8 Use add_mandatory_paths rather than rolling our own. diff -r 3a3dba401b4a -r 8d48ca5294d3 eprodbus.py --- a/eprodbus.py Mon Dec 06 22:32:32 2021 +1030 +++ b/eprodbus.py Thu Dec 09 11:48:48 2021 +1030 @@ -167,11 +167,7 @@ DBusGMainLoop(set_as_default = True) dbusservice = VeDbusService(servicename) - dbusservice.add_path('/Connected', value = True) - dbusservice.add_path('/ProductName', value = 'Enerdrive ePro') - dbusservice.add_path('/Mgmt/Connection', value = '/dev/' + port) - dbusservice.add_path('/DeviceInstance', value = instance) - dbusservice.add_path('/ProductId', value = 'unknown') + dbusservice.add_mandatory_paths(__file__, '1.0', 'Serial ' + port, instance, 0, 'Enerdrive ePro', '1.0', '1.0', 1) dbusservice.add_path('/Dc/0/Voltage', value = None) dbusservice.add_path('/Dc/0/Temperature', value = None) dbusservice.add_path('/Dc/0/Current', value = None)