hn / ginlong-solis

Solis inverter ESP8266 data logger, S3 WiFi stick reverse engineering and ESPhome firmware
90 stars 16 forks source link

Add support for ACR10R Single Phase Meter #44

Closed air-fuel-ratio closed 4 months ago

air-fuel-ratio commented 4 months ago

Review required.

For some reason if i enable this i cannot enable API encryption, i get EOF errors in the logs. With encryption off everything seems to work.

api:
  encryption:
    key: !secret api_encryption_key

image

air-fuel-ratio commented 4 months ago

Solves #42

hn commented 4 months ago

Thanks for contributing, that's really great!

Since I do not have a meter, I do not fully understand your setup yet. Please help to clarify the situation:

air-fuel-ratio commented 4 months ago

Thanks for contributing, that's really great!

Since I do not have a meter, I do not fully understand your setup yet. Please help to clarify the situation:

  • You're using the INV include for your inverter, right?
  • The ACR10R is connected via 2pin cable like this, right?
  • Your YAML reads ModBus registers 3251...3284 from the inverter (specifically not directly from the ACR10R meter), right?

Yes I include the inv yaml and the ac10r yaml. Yes meter is connected via 2 pin. Yes reading from the inverter not the meter. Inside the inverter you set the model of meter which is documented in the modbus PDF in the project read me.

hn commented 4 months ago

Ok thanks. I suggest:

hn commented 4 months ago

Please open an additional issue for the "For some reason if i enable this i cannot enable API encryption" problem.

air-fuel-ratio commented 4 months ago

Ok thanks. I suggest:

  • to change the include filename to solis-modbus-inv-addon-meter.yaml since the file is specific to INV inverters (enhances them, uses the internal EPM). It is not specific to the ACR10R meter (as far as I understand)
  • Change # Uncomment for optional inverter addons #acr10r: !include common/acr10r.yaml to # Uncomment for optional INV inverter addon #inv-meter: !include common/solis-modbus-inv-addon-meter.yaml
  • Unify formatting, e.g. address: 3256 #3257 -1 to address: 3256 # = 3257 - 1
  • Add your name to the top of the file, e.g. like @nextguyover did it here: https://github.com/hn/ginlong-solis/blob/master/solis-modbus-epm.yaml

This is specifically for the ACR10R which is single phase. There's also a 3 phase version which i did not include the values for. The inverter also has support for another model which im not familiar with but it would require slight modification to the values (resolution 0.001), i assume there's a single and 3 phase version also.

image

Any suggestions on naming based on this info?

hn commented 4 months ago

I suggest:

# Uncomment for optional INV inverter addon: 1ph meter ACR10R
#inv-acr10r-1ph: !include common/solis-modbus-inv-addon-acr10r-1ph.yaml

If the ModBus communication is no different between the 1ph/3ph models, one could probably leave out the “-1ph”, but maybe it's safe to start that way.

https://www.acrelenergy.com/products/acrel-acr10r-pv-solar-inverter-energy-meter/