18.04.2024, 21:43
(This post was last modified: 18.04.2024, 21:50 by Domoticatorino.)
Dear Sirs,
I am trying to communicate with a Solar Inverter which use "Solarman V5 Protocol" which is describe as follow:
Solarman V5 is a proprietary protocol used by Solarman (IGEN-Tech) solar inverter data loggers. Solarman V5 is TCP-based, and is used by the data loggers for communicating both locally and with Solarman Cloud. Solarman data loggers use Hi-Flying HF-A11 SOCs which by default use port tcp/8899.
By sending a suitably formed packet to the data logging stick on this port, one can send and receive Modbus RTU frames directly to/from the inverter on port tcp/8899 without interfering with Solarman Cloud operations.
Hence I should manage the data read and extract only the modbus frame. Hence I should cut the first 6 byte of the Header in order to obtain a modbus frame without CRC. For example:
Receiving data: 0x03ED0000001F01031C5A483345533133304E43413437390000563330303047303430303135
Modbus frame extract without CRC is: 0x01031C5A483345533133304E434134373900005633303030473034303031357566
Hence I have to read modbus data 0x01031C5A483345533133304E434134373900005633303030473034303031357566.
Is it possible? Could you help me please?
I use this script to see what happened by modbus:
Logging is:
TEST MODBUS TCP 18.04.2024 23:49:39
* arg: 1
* nil
* arg: 2
* string: Too many data
I am trying to communicate with a Solar Inverter which use "Solarman V5 Protocol" which is describe as follow:
Solarman V5 is a proprietary protocol used by Solarman (IGEN-Tech) solar inverter data loggers. Solarman V5 is TCP-based, and is used by the data loggers for communicating both locally and with Solarman Cloud. Solarman data loggers use Hi-Flying HF-A11 SOCs which by default use port tcp/8899.
By sending a suitably formed packet to the data logging stick on this port, one can send and receive Modbus RTU frames directly to/from the inverter on port tcp/8899 without interfering with Solarman Cloud operations.
Hence I should manage the data read and extract only the modbus frame. Hence I should cut the first 6 byte of the Header in order to obtain a modbus frame without CRC. For example:
Receiving data: 0x03ED0000001F01031C5A483345533133304E43413437390000563330303047303430303135
Modbus frame extract without CRC is: 0x01031C5A483345533133304E434134373900005633303030473034303031357566
Hence I have to read modbus data 0x01031C5A483345533133304E434134373900005633303030473034303031357566.
Is it possible? Could you help me please?
I use this script to see what happened by modbus:
Code:
require('luamodbus')
mb = luamodbus.tcp()
mb:open('192.168.8.100', 8899)
res, err = mb:connect()
if res then
-- mb:setslave()
r1, r2 = mb:readregisters(1156, 1157)
log(r1, r2)
else
log('connect failed', err)
end
mb:close()
Logging is:
TEST MODBUS TCP 18.04.2024 23:49:39
* arg: 1
* nil
* arg: 2
* string: Too many data