AISWEI Modbus Integration

Hi,

I have to integrate my Solplanet (AISWEI) Solar Inverter into home assistant, but I don’t quite get, why it isn’t working.
To be honest I am quite cluesless what I am doing wrong, so I will just post my configuration and log and hope someone can help me.

modbus.yaml

- name: aiswei_hub
  type: serial
  port: /dev/ttyUSB0
  baudrate: 2400
  bytesize: 8
  method: rtu
  parity: N
  stopbits: 1
  delay: 1
  message_wait_milliseconds: 30
  timeout: 1

  sensors:
    # PV Measurements
    - name: PV1_Voltage
      unique_id: PV1_Voltage
      device_address: 3
      address: 31319
      scan_interval: 5
      input_type: input
      unit_of_measurement: V
      scale: 0.1
      data_type: uint16

Error log:

2024-11-01 15:09:17.356 DEBUG (MainThread) [pymodbus.logging] Adding transaction 0
2024-11-01 15:09:17.356 DEBUG (MainThread) [pymodbus.logging] Resetting frame - Current Frame in buffer - 
2024-11-01 15:09:17.356 DEBUG (MainThread) [pymodbus.logging] send: 0x3 0x4 0x7a 0x57 0x0 0x1 0x98 0xe0
2024-11-01 15:09:17.384 DEBUG (MainThread) [pymodbus.logging] recv: 0x3 0x84 0x2 0x63 0x1 old_data:  addr=None
2024-11-01 15:09:17.384 DEBUG (MainThread) [pymodbus.logging] Processing: 0x3 0x84 0x2 0x63 0x1
2024-11-01 15:09:17.384 DEBUG (MainThread) [pymodbus.logging] Getting Frame - 0x84 0x2
2024-11-01 15:09:17.384 DEBUG (MainThread) [pymodbus.logging] Factory Response[132]
2024-11-01 15:09:17.384 DEBUG (MainThread) [pymodbus.logging] Frame advanced, resetting header!!
2024-11-01 15:09:17.384 DEBUG (MainThread) [pymodbus.logging] Getting transaction 0

The frame to read an input register should be as following:

Device ID
Function Code
Register Address Hi
Register Address Lo
Register Lengh
Register Lengh
CRC Lo
CRC Hi

and I revieve an Error which has that Frame:

Device ID 1 Byte
Function code + 0x80 1 Byte
Exception code 1 Byte
CRC(Lo) 1 Byte
CRC(Hi) 1 Byte

According to the documentation I think I get the error “0x02 Illegal address”;
but why is that?

I googled a bit and it looks like the address I am sending is indeed 31319?

If I do that right ([122×256]+87=31319)?