venus-os_dbus-mqtt-grid
venus-os_dbus-mqtt-grid copied to clipboard
Typo capitalization - ac vs. Ac
There are some typos in dbus-mqtt-grid.py: should be first upper case
https://github.com/mr-manuel/venus-os_dbus-mqtt-grid/blob/668d174f0ab7d9c6a5f1aed8d6d83bb9231ae03a/dbus-mqtt-grid/dbus-mqtt-grid.py#L379
self._dbusservice["/ac/L1/PowerFactor"] = round(grid_L1_power_factor, 3) if grid_L1_power_factor is not None else None
^^^^
https://github.com/mr-manuel/venus-os_dbus-mqtt-grid/blob/668d174f0ab7d9c6a5f1aed8d6d83bb9231ae03a/dbus-mqtt-grid/dbus-mqtt-grid.py#L395
self._dbusservice["/ac/L2/PowerFactor"] = round(grid_L2_power_factor, 3) if grid_L2_power_factor is not None else None
^^^^
https://github.com/mr-manuel/venus-os_dbus-mqtt-grid/blob/668d174f0ab7d9c6a5f1aed8d6d83bb9231ae03a/dbus-mqtt-grid/dbus-mqtt-grid.py#L404
self._dbusservice["/ac/L3/PowerFactor"] = round(grid_L3_power_factor, 3) if grid_L3_power_factor is not None else None
^^^^
Thanks!
Maybe you should add a notice in the readme, that this option is only allowed to be set on a 3-phase-system. Otherwise venus os will throw an error.
Which option and what error?
Sending
{
"grid": {
"power": -148.9,
"voltage": 230.9,
"current": 0.847,
"frequency": 50,
"energy_forward": 13.824772000000001,
"energy_reverse": 41,
"L1": {
"power": -148.9,
"voltage": 230.9,
"current": 0.847,
"frequency": 50,
"power_factor": 0.7,
"energy_forward": 13.824772000000001,
"energy_reverse": 41
}
}
}
ends up in this
@4000000067ea881b04bab75c ERROR:root:Exception occurred: KeyError('/Ac/L1/PowerFactor'). You have to send all phase power values at the same time at startup.
@4000000067ea881b04c86744 ERROR:root:ERROR:The driver restarts now.
@4000000067ea881b15a724ec *** starting dbus-mqtt-grid ***
@olifrieda I was not able to reproduce it with your payload. I changed the code a bit. Could you retry with the latest nightly/file in the repo?