Open syssi opened 2 years ago
~2000
46
00
A0 LENID
60 LEN 96
00 1....2
01 3....4 1
0F 5....6 15 cells
00 7....8 Voltage 1
00 9...10 Voltage 2
00 11..12 Voltage 3
00 13..14 Voltage 4
00 15..16 Voltage 5
00 17..18 Voltage 6
00 19..20 Voltage 7
00 21..22 Voltage 8
00 23..24 Voltage 9
00 25..26 Voltage 10
00 27..28 Voltage 11
00 29..30 Voltage 12
00 31..32 Voltage 13
00 33..34 Voltage 14
00 35..36 Voltage 15
06 37..38 6 temperatures
00 39..40 Temperature 1
00 41..42 Temperature 2
00 43..44 Temperature 3
00 45..46 Temperature 4
00 47..48 Temperature 5
00 49..50 Temperature 6
00 51..52 Charge current?
00 53..54 Pack voltage?
14 55..56 Discharge current?
00 57..58 Status 1?
00 59..60 Status 2?
00 61..62 Status 3?
00 63..64 Status 4?
00 65..66 Status 5?
00 67..68
03 69..70
00 71..72
00 73..74
02 75..76
00 77..78
00 79..80
00 81..82 Unused 1
00 83..84 Unused 2
00 85..86 Unused 3
00 87..88 Unused 4
00 89..90 Unused 5
00 91..92 Unused 6
00 93..94 Unused 7
02 95..96 Unused 8
EB74
Hi! I managed to decode the alarms, but I can't send two messages to modbus. I've tried to send 2 commands in the update method in seplos_bms.cpp but this seems to break down the first command as i get no data in the response. Could you advice how to process two commands? I guess the code need to be changed to send one command, wait for response, process it and then send a second command and process it.
Could you share some more details? In best case some could. So it's easier for me to provide a good solution.
Yes, what i'm trying to do is to send 0x42 packet and then 0x44. In the file seplos_bms.cpp i've tried the following:
void SeplosBms::update() { this->send(0x42, this->pack_); this->send(0x44, this->pack_); }
After that, i'm getting the following response from the bms:
[10:43:04][W][seplos_bms:021]: Unhandled data received (data_len: 0x00): 20.00.46.03.00.00 (6)
This looks like the BMS received one single malformed packet.
I think that the update method should be something like:
void SeplosBms::update() {
this->send(0x42, this->pack_);
this>read(); // Get the response and process it
this->send(0x44, this->pack_);
this->read(); // Get the response and process it
}
Please add a delay
between the two calls just for poking around:
#include "esphome/core/hal.h"
this->send(0x42, this->pack_);
delay(150); // NOLINT
this->send(0x44, this->pack_);
All responses will be reported as the mentioned warning because there is no decoder available at the moment for this kind of response.
[10:43:04][W][seplos_bms:021]: Unhandled data received (data_len: 0x00): 20.00.46.03.00.00 (6)
The delay option is working! Right now the differentiation between telemetry and non telemetry frames is done by this condition
data.size() >= 44 && data[8] >= 8 && data[8] <= 16
Which is basically looking at size of the response and the number of cells, but the telecommand frames also have this data, so the on_telemetry_data_
method is triggered by both frames. There is no identification of the response frame. All the frames have the same header, except the lengh field, but that is not very precise to differentiate between frame types. For now, I think that reading and processing the response after sending it is the best approach.
For now, I think that reading and processing the response after sending it is the best approach.
Yes. The implementation must be improved on the long run here. We have to remember the last transmitted request and expect the dedicated response to avoid guessing the frame type by length.
Hello, i'm not a coder but found something maybe could help (please delete my post if useless) https://github.com/Louisvdw/dbus-serialbattery/blob/master/etc/dbus-serialbattery/bms/seplosv3.py
Have a good day ! :)
Hello, i supposed you point me to the part of code which is interesting but sorry i'm not a coder and i don't know what to do with this ..... I simply share here what i found while searching another way to get all datas from the bms.
That's fine. The link to the explicit method is just a pointer for myself.