victronenergy / venus

Victron Energy Unix/Linux OS
https://github.com/victronenergy/venus/wiki
588 stars 75 forks source link

Fix custom names for BlueSolarchargers and Smart Solarchargers #619

Closed mpvader closed 4 years ago

mpvader commented 4 years ago

Current situation:

Implementation per Solar charger type:

In Venus OS, there is a fallback (only for VE.Direct devices) where the vedirect-interface driver will automatically store custom names in localsettings (= Flash on the GX Device) in case the VE.Direct product doesn't support the custom name VREG.

And note that for Smartsolar chargers with Roy his code stack, you can now have two different custom names: one on BLE, and one on Venus OS/VRM.

fix:

Update vedirect-interface to support the custom names (stored in local settings) in the VregLink D-Bus interface. Currently vedirect-interface only supports this fallback in the normal D-Bus interface (ie. the paths interface). This is a small change, can be done by Thiemo, and fixes most confusion when working with VictronConnect remotely.

tabreu commented 4 years ago

About: "properly fixing custom names in Roy his MPPT code stack is impossible, due to limited code size"

That is right, it won't fit on those chargers

mkuiken commented 4 years ago

The dongle will prioritize the custom name of the attached SmartSolar (if it has one) over any locally stored custom name. If the name is changed via BLE then the dongle will make a copy and use that copy when the attached SmartSolar indicates that it does not support VE_REG_DESCRIPTION1.

If the name is changed via any other interface on the SmartSolar then there will be a difference with the name stored in the dongle. But as long as the SmartSolar announces its new name to the dongle, then the dongle will prioritize this new name over its locally stored name.

The only situation in which the name stored in the dongle is "lost", is when the SmartSolar was not supporting custom name and then starts supporting it. But as far as I understand from Thiago is this not the case as the VE.Can has been supporting it from the beginning.

tabreu commented 4 years ago

Good to remember that the SmartSolar VE.Direct also do not support custom names. Only the VE.Can and the new VE.Direct only models will. The new VE.Direct only models are based on the VE.Can code and will replace some of the SmartSolar/BlueSolar VE.Direct models. Currently, only some L and XL models are being replaced.

jepefe commented 4 years ago

I noticed that when changing the custom name for example of a VE.Can MPPT from VictronConnect via MQTT, /CustomName on DBus doesn't change and Venus has to be restarted to get the new name in the gui. Changing the name via BLE works fine and the name in the Venus GUI is updated immediately.

tabreu commented 4 years ago

I'm afraid that is because the PGN 1F016 Configuration Information needs to be sent, when the custom name is changed on mppt, and it is not on the latest FW release. That is a known issue that will be fixed on the next release.

ThiemoVanEngelen commented 4 years ago

In this case, the MPPT was connected via VE.Direct. What happens is that the messages triggered via mqtt do not follow the normal handling so the answer is only sent back to mqtt not handled internally. This will also be fixed by me.