diy solar

diy solar

Simple Seplos BMS Protocol Decode Bash Script

I’m getting exactly the same thing, would appreciate any help you can on this.

Just get an Error Code 05….
 
./query_seplos.sh 4201
Sending "~20004642E00201FD36\r\n"
Error code 05

what is error 05?

Error code 5 is a command format error returned from the BMS, which probably means it didn't receive the query correctly. The most likely cause is that something else is accessing the serial device on your PI ( the script does no locking. ) If you're 100% sure that this isn't the case, check the wiring.
 
I finally find a solution for the "Error Code 05" that works for me.
I try to change the wire but nothing changed and seems that no other program control the serial device.
So i sniff the serial communication on windows and than on my raspberry device.
In the raspeberry, on my system, there is a problem with the line ending.
So i change this part of code
Bash:
SEND="~$SEND$SUM\r\n"
echo "Sending \"$SEND\""
read_serdata &
sleep 0.2
echo -e "$SEND" >$DEV
to
Bash:
SEND="~$SEND$SUM\r"
echo "Sending \"$SEND\""
read_serdata &
sleep 0.2
echo -ne "$SEND" >$DEV
and now everything seem to be ok.

This on "Raspberry Pi Model B Plus Rev 1.2" with "Raspbian GNU/Linux 11 (bullseye)".
 
@sidepipe this is working great for me on a Trophy 48V100E battery which somebody on this forum suggested had a Seplos BMS. Thanks! That said, does anybody know where to find the Seplos protocol documentation and maybe extend this script to capture the warning and errors values?

In my case I'm running this a script inside of NodeRed on a remote islanded solar system, pushing the results to MQTT, pulling them back down (via NoedRed) on a different server to stuff in InfluxDB and present in Grafana. Happy to share that flow if anybody is interested.

1683669765627.png
 
Last edited:
@sidepipe this is working great for me on a Trophy 48V100E battery which somebody on this forum suggested had a Seplos BMS. Thanks! That said, does anybody know where to find the Seplos protocol documentation and maybe extend this script to capture the warning and errors values?

In my case I'm running this a script inside of NodeRed on a remote islanded solar system, pushing the results to MQTT, pulling them back down (via NoedRed) on a different server to stuff in InfluxDB and present in Grafana. Happy to share that flow if anybody is interested.

View attachment 148551
Hi @smr.ruby
I would be highly interested in such a setup, though I have to confess that I am an HA newbie :)!
@roverga : many thanks to you! had issues with error code 05 - your workaround solved it! Now I just have to get that implemented into the SEPLOS_MQTT github stuff! That part currently gives me a headache :-(

Thanks in advance.
 
Last edited:
Hi @smr.ruby
I would be highly interested in such a setup, though I have to confess that I am an HA newbie :)!
@roverga : many thanks to you! had issues with error code 05 - your workaround solved it! Now I just have to get that implemented into the SEPLOS_MQTT github stuff! That part currently gives me a headache :-(

Thanks in advance.
I have also been having some issues with getting the SEPLOS_MQTT script working. I found that when byte4geek made the changes suggested by @roverga above, they missed one. See https://github.com/byte4geek/SEPLOS_MQTT/issues/10

After making that change, it is working for me on a 10E BMS.
 
This short message is just to let you know that I was able to use your script successfully on a Seplos BMS.
Thank you very much.
Like you, I'm sharing what I know how to do. Many people use my solar equipment management software.
I was able to easily integrate your script into Nodered which is used by my software.
Thank you very much.
Here's a link to my forum if you're interested

Capture d’écran du 2023-08-12 15-11-48.png

Capture d’écran du 2023-08-13 10-53-31.png
 
Hello,
Do you know if this script is working with the version 3 of the Seplos BMS ?
For the moment i got directly this error : "Failed to read start of input char (~), read ""
I have no line with "Sending...."
 
Hello,
Do you know if this script is working with the version 3 of the Seplos BMS ?
For the moment i got directly this error : "Failed to read start of input char (~), read ""
I have no line with "Sending...."
Not currently, I dont have access to the read register document yet. If nayone has this for the new V3 Seplos BMS that would be handy
 
Not currently, I dont have access to the read register document yet. If nayone has this for the new V3 Seplos BMS that would be handy
Here you go!
 

Attachments

  • BMS3.0 Modbus-RTU Protocol(01).pdf
    686.8 KB · Views: 17
Here you go!
Hello experts

Has anyone managed to address the V3 yet? Here I have a log from the communication between the Seplos BMS software and a V3 BMS. I would like to connect this in Node Red with RS485 Serial but at the moment I don't understand what I have to send so that the BMS answers me.
 

Attachments

  • output_2024-02-20_09-18-35.txt
    88 bytes · Views: 3
I'm getting this error instead
View attachment 135307

Any ideas?

I've followed these instructions by the way https://github.com/byte4geek/SEPLOS_MQTT

On a Raspberry PI3 and BMS 100A 10E (the new one)
Did you ever find a solution to this? I got it to fire at one point then nothing. I ran it twice, one after another, first got results, second got error. I rebooted, plugged in different USB...nothing.
I moved the adapter to a windows laptop with Seplos Monitor installed and worked first try, but the battery did respond rather slowly. It's the Version 2.0 BMS.
Ty in advanced
 
Hello experts

Has anyone managed to address the V3 yet? Here I have a log from the communication between the Seplos BMS software and a V3 BMS. I would like to connect this in Node Red with RS485 Serial but at the moment I don't understand what I have to send so that the BMS answers me.
I guess you were looking for text. The v3 talks modbus RTU. So you will ahve to find some block for nodered that can decode modbus.

In python this works to talk to seplos v3


# --------------------------------------------------------------------------- #
# import the various client implementations
# --------------------------------------------------------------------------- #
import pymodbus.client as ModbusClient
from pymodbus import (ExceptionResponse, Framer, ModbusException,
pymodbus_apply_logging_config)

client = ModbusClient.ModbusSerialClient(
'COM3',
framer='rtu',
# timeout=10,
# retries=3,
# retry_on_empty=False,
# strict=True,
baudrate=19200,
bytesize=8,
parity="N",
stopbits=1,
# handle_local_echo=False,
)

print("connect to server")
client.connect()
print("get and verify data")
try:

rr = client.read_input_registers(0x1700, 0x33, slave=0)
print ("client.read_input_registers(0x1700, 0x33, slave=0):")
print(rr)
rr = client.read_input_registers(0x1301, 0x01, slave=0)
print ("client.read_input_registers(0x1301, 0x01, slave=0):")
print(rr)
rr = client.read_input_registers(0x1000, 0x12, slave=0)
print ("client.read_input_registers(0x1000, 0x12, slave=0):")
print(rr)
rr = client.read_input_registers(0x1100, 0x1a, slave=0)
print ("client.read_input_registers(0x1100, 0x1a, slave=0):")
print(rr)
rr = client.read_input_registers(0x1300, 0x6a, slave=0)
print ("client.read_input_registers(0x1300, 0x6a, slave=0):")
print(rr)
rr = client.read_input_registers(0x1500, 0x04, slave=0)
print ("client.read_input_registers(0x1500, 0x04, slave=0):")
print(rr)
rr = client.read_coils(0x1200, 0x90, slave=0)
print ("client.read_coils(0x1200, 0x90, slave=0):")
print(rr)
rr = client.read_coils(0x1400, 0x50, slave=0)
print ("client.read_coils(0x1400, 0x50, slave=0):")
print(rr)
except ModbusException as exc:
print(f"Received ModbusException({exc}) from library")
client.close()
return
if rr.isError():
print(f"Received Modbus library error({rr})")
client.close()
return
if isinstance(rr, ExceptionResponse):
print(f"Received Modbus library exception ({rr})")
# THIS IS NOT A PYTHON EXCEPTION, but a valid modbus message
client.close()
print("close connection")
client.close()
 
Did you ever find a solution to this? I got it to fire at one point then nothing. I ran it twice, one after another, first got results, second got error. I rebooted, plugged in different USB...nothing.
I moved the adapter to a windows laptop with Seplos Monitor installed and worked first try, but the battery did respond rather slowly. It's the Version 2.0 BMS.
Ty in advanced
No, I ended up using the EspHome seplos integration for home assistant
 
Back
Top