EPEVER wifi 2.4g RJ45 (solution)

hi!

so, I am trying to “hack” the China locked subj device.
by default it works with hncomm.epsolarpv.com:15000
after some mikrotik + wireshark tricks now it’s works with local python server.

here is settings:

here is sample of python client

from pymodbus.client import ModbusTcpClient
from pymodbus.transaction import ModbusRtuFramer as ModbusFramer
import logging

logging.basicConfig()
log = logging.getLogger()
# log.setLevel(logging.DEBUG)

host = "192.168.88.78"
port = 9999

  client = ModbusTcpClient(host, port=port, framer=ModbusFramer)
    success = client.connect()
    if not success:
        return False

    result = client.read_input_registers(0x3100, 8, slave=1)
    if (not result.isError()):
        pvVoltage = float(result.registers[0] / 100.0)
        pvCurrent = float(result.registers[1] / 100.0)
        pvPower = float(result.registers[2] / 100.0)

        print("0x3100: pvVoltage:",             pvVoltage,      "v")
        print("0x3101: pvCurrent:",             pvCurrent,      "a")
        print("0x3102: pvPower:",              pvPower,       "w")

0x3100: pvVoltage: 0.07 v
0x3101: pvCurrent: 0.0 a
0x3102: pvPower: 0.0 w

NOTICE! WARNING!

Every time after EPEVER wifi 2.4g RJ45 device is restarted, it goes to dumb mode.
For init you should manually send a “magic” command

def init():
  client.send(bytes.fromhex("20020000"))