tsun-gen3-proxy icon indicating copy to clipboard operation
tsun-gen3-proxy copied to clipboard

Add support for TSUN Titan inverter

Open s-allius opened this issue 1 year ago • 1 comments

The TSUN titan inverter having a SNR starting with Y17, seems to use the solarman V5 protocol like the GEN3PLUS series. They also enforce SSL, so that we must use the client mode.

By polling the MODBUS register, we get an unexpected response:

'2024-08-12 11:30:21  INFO |  msg | <   Ctl: 0x4510 Msg: 'msg_command_req''
'2024-08-12 11:30:21 DEBUG | tracer | Send Modbus Command:('192.168.0.1', 8899):
  0000 | a5 17 00 10 45 42 51 ?? ?? ?? ?? 02 **b0 02** 00 00  | ....EBQF=.|.....
  0010 | 00 00 00 00 00 00 00 00 00 00 01 03 30 00 00 30  | ............0..0
  0020 | 4a de 05 15                                      | J...'
'2024-08-12 11:30:26  INFO |  msg | <   Ctl: 0x4510 Msg: 'msg_command_req''
'2024-08-12 11:30:26 DEBUG | tracer | Send Modbus Retrans:('192.168.0.1, 8899):
  0000 | a5 17 00 10 45 43 51 ?? ?? ?? ?? 02 **b0 02** 00 00  | ....ECQF=.|.....
  0010 | 00 00 00 00 00 00 00 00 00 00 01 03 30 00 00 30  | ............0..0
  0020 | 4a de 06 15                                      | J...'
'2024-08-12 11:30:27 DEBUG | tracer | Received from ('192.168.0.1', 8899):
  0000 | a5 10 00 10 15 42 52 ?? ?? ?? ?? 02 01 27 92 0f  | .....BRF=.|..'..
  0010 | 00 6e 05 00 00 5b 8a aa 66 **05 00** c7 15 

You can see some anomalies:

  1. The first MODBUS request isn't answered and we send a second one after 5 seconds. Maybe the timeout is too short?
  2. Maybe we use the wrong SensorType number, 0x02b0. (bold in log) which is fine for GEN3PLUS
  3. we got a (MODBUS?) response with 0x05 0x00, which is not a standard MODBUS response or exception

s-allius avatar Aug 12 '24 15:08 s-allius

Update:

  1. The timeout was to short for the error handling, since the error reply come after 6 seconds and our timeout was 5 seconds
  2. adapting the SensorType number don't help. It seems for me that this number will be ignored by the inverter in a MODBUS request
  3. With a invalid register range, I can reproduce the error response even on a GEN3PLUS inverter. That makes sense since the register layout of the GEN3 and GEN3PLUS inverters are only suitable for inverters with up to 4 inputs. The TITAN inverter have 6 inputs, so the need a different register layout.

s-allius avatar Aug 12 '24 18:08 s-allius