Depending on the capability of the devices, yes, look for existing open standard protocols like MQTT, RS232 / RS485, Modbus, etc
You might need a device between the inverter / battery management system to convert to something that HA can read (ie a serial I/O port)
If you're only wanting to read the energy, there are other choices like using current clamps with something like EmonPi from OpenEnergyMonitor - this is what I'm doing as my inverter is just not practically accessible.