nik247
Members
-
Joined
-
Last visited
Reputation Activity
-
nik247 reacted to pongo in Axpert MAX II 8K BMS problem with PylontechI implemented dynamic data from BMS to ModBus github/gianfrdp/esphome_yaml/jkbms-voltronic.simple.yaml.
EspHome reads relevant BMS data from MQTT and sends over RS485 ModBus RTU.
Tested reading values with a python script and it works. Now I'm going to attach it to inverter.
I cannot use esphome-jkbms and this implementation on the same ESP32 because esphome-jkbms use framework esp-idf, instead modbus-server
component I'm using is only compatible with framework arduino.
If I can port modbus-server to esp-idf, maybe I could use just one ESP32, without reading values from MQTT (another possible point of failure).
EDIT: I connected ESP32 to inverter, Axpert asks data, ESP32 responses but after some time goes in error 61 (communication lost).
Maybe I'm sending something wrong.
[15:12:58][I][ON_READ:187]: address=0x33, value=61 [15:12:58][D][uart_debug:114]: <<< 01:03:00:33:00:01:74:05 [15:12:58][D][uart_debug:114]: >>> 01:03:02:00:3D:79:95 This is from LIB protocol documentation:
But searching in another project I saw:
Response format is different:
| Slave Address | Function | Data Len n (1 byte) | n * bytes | CRC (2 bytes) |
vs
| Slave Address | Function | Data Len n (2 bytes) | 2 * n * bytes | CRC (2 bytes) |
Using "Modbus Slave" fot test:
DEBUG:pymodbus.transaction:Current transaction state - IDLE DEBUG:pymodbus.transaction:Running transaction 1 DEBUG:pymodbus.transaction:SEND: 0x1 0x3 0x0 0x33 0x0 0x1 0x74 0x5 DEBUG:pymodbus.client.sync:New Transaction state 'SENDING' DEBUG:pymodbus.transaction:Changing transaction state from 'SENDING' to 'WAITING FOR REPLY' DEBUG:pymodbus.transaction:Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY' DEBUG:pymodbus.transaction:RECV: 0x1 0x3 0x2 0x0 0x3d 0x79 0x95 DEBUG:pymodbus.framer.rtu_framer:Getting Frame - 0x3 0x2 0x0 0x3d seems response format ESP32 is sending is correct... so I don't understand why Voltronic reports error 61
jkbms-voltronic.simple.yaml