hoylabs / OpenDTU-OnBattery

Software for ESP32 to talk to Hoymiles/TSUN/Solenso Inverters, VE.Direct devices, battery management systems, and related peripherals
GNU General Public License v2.0
301 stars 63 forks source link

Added unit for MQTT battery voltage #1143

Closed vaterlangen closed 2 months ago

vaterlangen commented 2 months ago

Implemented the - at least for my setup - missing unit for battery voltage received via MQTT. It compiles locally , but could not test WebUI integration. and was successfully tested on my Fusion board

schlimmchen commented 2 months ago

Very nice, thank you! Do you believe that anybody would transport dV or cV over MQTT? I think those units are not needed. In other places we also only provide Milli or Kilo of a unit.

vaterlangen commented 2 months ago

Unfortunately, yes. Zendure Solarflow is publishing cV (at least if uncoupled from vendor cloud). I'm currently using the cV setting - the dV was only added for completeness.

schlimmchen commented 2 months ago

Oh, indeed, you already posted your example in the other PR. Well, then I agree that adding dV as well makes sense for completeness. I guess we won't need kV :grin:

I guess we need to explain this somewhere, as cV and dV are quite exotic. @Manos1966 Do you know a good place in the wiki to add an explanation, maybe an example of when to use dV or cV or mV?

Also, I see that you created this PR against the other PR, very nice!

Thanks again :heart:

Manos1966 commented 2 months ago

Hallo @schlimmchen

ich glaube wir haben heute keine mV Anzeige auf unserem WebUI... Ueber RS485 habe ich die Spannungsdifferenz der Batterie Zellen in mV, aber das haben wir ueber CANbus nicht.

centiVolts habe ich seit der Zeit der Uni nicht wieder gesehen 🙈

Habt Ihr vielleicht ein Beispiel eines Geraets, dass solche Daten liefert?

Manos1966 commented 2 months ago

Oh, ich habe gerade gesehen, die Erklärungen sind bereits im Code. Es wird also eine Option zum auswählen!

enum BatteryVoltageUnit { Volts = 0, DeciVolts = 1, CentiVolts = 2, MilliVolts = 3 }

Dann schlage ich vor: Ich warte bis die Release verteilt wird, mache ein Screenshot der Option und addiere ich mit entsprechende Erklärung im relevanten Bereich.

AndreasBoehm commented 2 months ago

ich glaube wir haben heute keine mV Anzeige auf unserem WebUI... Ueber RS485 habe ich die Spannungsdifferenz der Batterie Zellen in mV, aber das haben wir ueber CANbus nicht.

centiVolts habe ich seit der Zeit der Uni nicht wieder gesehen 🙈

Habt Ihr vielleicht ein Beispiel eines Geraets, dass solche Daten liefert?

Die Spannungsdiferenz der Batterie Zellen einer Pytes Batterie (verbunden über CAN0 wird in mV im WebUI angezeigt image

Manos1966 commented 2 months ago

OK, ich habe es hier addiert https://github.com/helgeerbe/OpenDTU-OnBattery/wiki/Pytes-Battery

github-actions[bot] commented 1 month ago

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns.