AnotherDaniel / smahub

SMAHub is a flexible and modular solution for collecting data from SMA photovoltaic (PV) products and publishing it to various output channels, such as MQTT.
GNU General Public License v2.0
31 stars 11 forks source link

add plugin for sma ev charger #9

Closed derTim closed 1 year ago

derTim commented 1 year ago

That was easy, the SMA Charger 22kw is also running ennexOS and the data returned is quite similar to that of the Tripower X

Tested locally, and worked fine, I hope I didn't miss anything important.

Sample Output:

Key: Test.EVCharger.SERIAL.device_info.name, Value: EVC22-3AC-10
Key: Test.EVCharger.SERIAL.device_info.configuration_url, Value: https://10.0.0.90
Key: Test.EVCharger.SERIAL.device_info.identifiers, Value: SERIAL
Key: Test.EVCharger.SERIAL.device_info.model, Value: SMA-EVC22-3AC-10
Key: Test.EVCharger.SERIAL.device_info.manufacturer, Value: SMA
Key: Test.EVCharger.SERIAL.device_info.sw_version, Value: 1.2.23.R
Key: Test.EVCharger.SERIAL.ChaSess.WhIn, Value: 0
Key: Test.EVCharger.SERIAL.Chrg.ModSw, Value: 4718
Key: Test.EVCharger.SERIAL.GridMs.A.phsA, Value: (0, 'A')
Key: Test.EVCharger.SERIAL.GridMs.A.phsB, Value: (0, 'A')
Key: Test.EVCharger.SERIAL.GridMs.A.phsC, Value: (0, 'A')
Key: Test.EVCharger.SERIAL.GridMs.Hz, Value: (50, 'Hz')
Key: Test.EVCharger.SERIAL.GridMs.PhV.phsA, Value: (238.9, 'V')
Key: Test.EVCharger.SERIAL.GridMs.PhV.phsB, Value: (241.2, 'V')
Key: Test.EVCharger.SERIAL.GridMs.PhV.phsC, Value: (240.6, 'V')
Key: Test.EVCharger.SERIAL.GridMs.TotPF, Value: 1
Key: Test.EVCharger.SERIAL.GridMs.TotVA, Value: (0, 'VA')
Key: Test.EVCharger.SERIAL.GridMs.TotVAr, Value: (0, 'var')
Key: Test.EVCharger.SERIAL.InOut.GI1, Value: 0
Key: Test.EVCharger.SERIAL.Metering.GridMs.TotWIn, Value: 0
Key: Test.EVCharger.SERIAL.Metering.GridMs.TotWIn.ChaSta, Value: 0
Key: Test.EVCharger.SERIAL.Metering.GridMs.TotWhIn, Value: 2342
Key: Test.EVCharger.SERIAL.Metering.GridMs.TotWhIn.ChaSta, Value: 2342
Key: Test.EVCharger.SERIAL.Operation.EVeh.ChaStt, Value: 200111
Key: Test.EVCharger.SERIAL.Operation.EVeh.Health, Value: 307
Key: Test.EVCharger.SERIAL.Operation.Evt.Msg, Value: 302
Key: Test.EVCharger.SERIAL.Operation.Health, Value: 307
Key: Test.EVCharger.SERIAL.Wl.AcqStt, Value: 3369
Key: Test.EVCharger.SERIAL.Wl.ConnStt, Value: 307
Key: Test.EVCharger.SERIAL.Wl.SigPwr, Value: (-1, '%')
Key: Test.EVCharger.SERIAL.Wl.SoftAcsConnStt, Value: 308

I also changed the unit of the TotWh entities from 'kWh' to 'Wh' and added an additional 'TotkWh' entities with the conversion from 'kWh' to 'Wh' in the Homeassistant Sensor Configration.

Something that maybe should also be changed in the TripowerX plugin (as I got wrong readings with the default example).