If port 502/TCP is open you can probably access it via Modbus protocol. Implementing a Modbus client is trivial.
My rebranded Fox ESS hardware has it enabled and there's even official documentation of the so-called "registers".