@@ -222,7 +222,7 @@ def __init__(
222
222
self ._dbusservice .add_path ('/ProductId' , 0xFFFF )
223
223
self ._dbusservice .add_path ('/ProductName' , productname )
224
224
self ._dbusservice .add_path ('/CustomName' , customname )
225
- self ._dbusservice .add_path ('/FirmwareVersion' , '0.1.5 (20231218 )' )
225
+ self ._dbusservice .add_path ('/FirmwareVersion' , '0.1.6 (20240226 )' )
226
226
# self._dbusservice.add_path('/HardwareVersion', '')
227
227
self ._dbusservice .add_path ('/Connected' , 1 )
228
228
@@ -258,7 +258,8 @@ def _update(self):
258
258
self ._dbusservice ['/Ac/L1/Voltage' ] = round (pv_L1_voltage , 2 ) if pv_L1_voltage is not None else None
259
259
self ._dbusservice ['/Ac/L1/Frequency' ] = round (pv_L1_frequency , 2 ) if pv_L1_frequency is not None else None
260
260
self ._dbusservice ['/Ac/L1/Energy/Forward' ] = round (pv_L1_forward , 2 ) if pv_L1_forward is not None else None
261
- else :
261
+ # at least one phase is needed to work properly
262
+ elif pv_L2_power is None and pv_L3_power is None :
262
263
self ._dbusservice ['/Ac/L1/Power' ] = round (pv_power , 2 ) if pv_power is not None else None
263
264
self ._dbusservice ['/Ac/L1/Current' ] = round (pv_current , 2 ) if pv_current is not None else None
264
265
self ._dbusservice ['/Ac/L1/Voltage' ] = round (pv_voltage , 2 ) if pv_voltage is not None else None
@@ -389,35 +390,35 @@ def _n(p, v): return (str("%i" % v))
389
390
'/Ac/Voltage' : {'initial' : 0 , 'textformat' : _v },
390
391
'/Ac/Energy/Forward' : {'initial' : None , 'textformat' : _kwh },
391
392
392
- '/Ac/L1/Power' : {'initial' : 0 , 'textformat' : _w },
393
- '/Ac/L1/Current' : {'initial' : 0 , 'textformat' : _a },
394
- '/Ac/L1/Voltage' : {'initial' : 0 , 'textformat' : _v },
395
- '/Ac/L1/Frequency' : {'initial' : None , 'textformat' : _hz },
396
- '/Ac/L1/Energy/Forward' : {'initial' : None , 'textformat' : _kwh },
397
-
398
393
'/Ac/MaxPower' : {'initial' : int (config ['PV' ]['max' ]), 'textformat' : _w },
399
394
'/Ac/Position' : {'initial' : int (config ['PV' ]['position' ]), 'textformat' : _n },
400
395
'/Ac/StatusCode' : {'initial' : 0 , 'textformat' : _n },
401
396
'/UpdateIndex' : {'initial' : 0 , 'textformat' : _n },
402
397
}
403
398
404
- if pv_L2_power is not None :
405
- paths_dbus .update ({
406
- '/Ac/L2/Power' : {'initial' : 0 , 'textformat' : _w },
407
- '/Ac/L2/Current' : {'initial' : 0 , 'textformat' : _a },
408
- '/Ac/L2/Voltage' : {'initial' : 0 , 'textformat' : _v },
409
- '/Ac/L2/Frequency' : {'initial' : None , 'textformat' : _hz },
410
- '/Ac/L2/Energy/Forward' : {'initial' : None , 'textformat' : _kwh },
411
- })
412
-
413
- if pv_L3_power is not None :
414
- paths_dbus .update ({
415
- '/Ac/L3/Power' : {'initial' : 0 , 'textformat' : _w },
416
- '/Ac/L3/Current' : {'initial' : 0 , 'textformat' : _a },
417
- '/Ac/L3/Voltage' : {'initial' : 0 , 'textformat' : _v },
418
- '/Ac/L3/Frequency' : {'initial' : None , 'textformat' : _hz },
419
- '/Ac/L3/Energy/Forward' : {'initial' : None , 'textformat' : _kwh },
420
- })
399
+ paths_dbus .update ({
400
+ '/Ac/L1/Power' : {'initial' : None , 'textformat' : _w },
401
+ '/Ac/L1/Current' : {'initial' : None , 'textformat' : _a },
402
+ '/Ac/L1/Voltage' : {'initial' : None , 'textformat' : _v },
403
+ '/Ac/L1/Frequency' : {'initial' : None , 'textformat' : _hz },
404
+ '/Ac/L1/Energy/Forward' : {'initial' : None , 'textformat' : _kwh },
405
+ })
406
+
407
+ paths_dbus .update ({
408
+ '/Ac/L2/Power' : {'initial' : None , 'textformat' : _w },
409
+ '/Ac/L2/Current' : {'initial' : None , 'textformat' : _a },
410
+ '/Ac/L2/Voltage' : {'initial' : None , 'textformat' : _v },
411
+ '/Ac/L2/Frequency' : {'initial' : None , 'textformat' : _hz },
412
+ '/Ac/L2/Energy/Forward' : {'initial' : None , 'textformat' : _kwh },
413
+ })
414
+
415
+ paths_dbus .update ({
416
+ '/Ac/L3/Power' : {'initial' : None , 'textformat' : _w },
417
+ '/Ac/L3/Current' : {'initial' : None , 'textformat' : _a },
418
+ '/Ac/L3/Voltage' : {'initial' : None , 'textformat' : _v },
419
+ '/Ac/L3/Frequency' : {'initial' : None , 'textformat' : _hz },
420
+ '/Ac/L3/Energy/Forward' : {'initial' : None , 'textformat' : _kwh },
421
+ })
421
422
422
423
DbusMqttPvService (
423
424
servicename = 'com.victronenergy.pvinverter.mqtt_pv_' + str (config ['MQTT' ]['device_instance' ]),
0 commit comments