fancyui / Gobel-Battery-HA-Addon

This add-on is designed to integrate your LiFePO4 Battery with Pace BMS with Home Assistant, providing you with real-time monitoring capabilities.
https://www.gobelpower.com
Apache License 2.0
4 stars 1 forks source link

Which BMS Type? #14

Open Aeroid opened 1 month ago

Aeroid commented 1 month ago

Hi, I'm having trouble starting the Addon and connecting to the BMS.

I've tried all of the options under bms_type (PACE_LV, JK_ESS, RN200, TDT, PACE_LV_V1). In most cases it throws "pacebms_rs232 - ERROR - An error occurred: Invalid command or response code: 46 42"

Directly connected to the BMS via serial on the PC I've used the "BmsTool HS2.0.3" using RS232 at 9600 baud. The tool showed that it used protocol "HS-PC-232-BP-V1.9". These are two GP-SR1-PC200 (kits) purchased early 2023. But I'm not sure which BMS type they are actually.

Using the Waveshare RS232 ETH (B). The serial connection works fine.

fancyui commented 1 month ago

An error occurred: Invalid command or response code: 46 42, Addon will show this error sometimes, it is due to abnormal data received, if batteries data shows correctly in the dashboard, this error can be ignored.

Aeroid commented 1 month ago

The Dashboard is completly empty and the add-on log is flooded with this error at high frequency.

PACE_LV_V1 or PACE_LV:

2024-10-08 19:00:10,723 - pacebms_rs232 - ERROR - An error occurred: Invalid command or response code: 46 42
2024-10-08 19:00:10,723 - pacebms_rs232 - DEBUG - Trying to prepare analog request
2024-10-08 19:00:10,723 - pacebms_rs232 - DEBUG - analog request: b'~25FF4642E002FFFCDA\r'
2024-10-08 19:00:10,724 - pacebms_rs232 - DEBUG - Trying to send analog request
2024-10-08 19:00:10,724 - pacebms_rs232 - DEBUG - analog request sent
2024-10-08 19:00:10,724 - pacebms_rs232 - DEBUG - Trying to receive analog data
2024-10-08 19:00:10,748 - bms_comm - DEBUG - Received data from BMS: ~25FF4642E002FFFCDA
2024-10-08 19:00:10,749 - pacebms_rs232 - DEBUG - analog data recieved: ~25FF4642E002FFFCDA
2024-10-08 19:00:10,749 - pacebms_rs232 - DEBUG - Trying to parse analog data
2024-10-08 19:00:10,749 - pacebms_rs232 - DEBUG - fields: ['25', 'FF', '46', '42', 'E0', '02', 'FF', 'FC', 'DA']
2024-10-08 19:00:10,750 - pacebms_rs232 - ERROR - An error occurred: Invalid command or response code: 46 42
2024-10-08 19:00:10,752 - pacebms_rs232 - DEBUG - Trying to prepare analog request
2024-10-08 19:00:10,753 - pacebms_rs232 - DEBUG - analog request: b'~25FF4642E002FFFCDA\r'
2024-10-08 19:00:10,753 - pacebms_rs232 - DEBUG - Trying to send analog request
2024-10-08 19:00:10,754 - pacebms_rs232 - DEBUG - analog request sent
2024-10-08 19:00:10,754 - pacebms_rs232 - DEBUG - Trying to receive analog data
2024-10-08 19:00:10,777 - bms_comm - DEBUG - Received data from BMS: ~25FF4642E002FFFCDA
2024-10-08 19:00:10,778 - pacebms_rs232 - DEBUG - analog data recieved: ~25FF4642E002FFFCDA
2024-10-08 19:00:10,778 - pacebms_rs232 - DEBUG - Trying to parse analog data
2024-10-08 19:00:10,778 - pacebms_rs232 - DEBUG - fields: ['25', 'FF', '46', '42', 'E0', '02', 'FF', 'FC', 'DA']
2024-10-08 19:00:10,778 - pacebms_rs232 - ERROR - An error occurred: Invalid command or response code: 46 42
2024-10-08 19:00:10,778 - pacebms_rs232 - DEBUG - Trying to prepare analog request
2024-10-08 19:00:10,779 - pacebms_rs232 - DEBUG - analog request: b'~25FF4642E002FFFCDA\r'
2024-10-08 19:00:10,779 - pacebms_rs232 - DEBUG - Trying to send analog request
2024-10-08 19:00:10,779 - pacebms_rs232 - DEBUG - analog request sent
2024-10-08 19:00:10,779 - pacebms_rs232 - DEBUG - Trying to receive analog data
2024-10-08 19:00:10,803 - bms_comm - DEBUG - Received data from BMS: ~25FF4642E002FFFCDA
2024-10-08 19:00:10,803 - pacebms_rs232 - DEBUG - analog data recieved: ~25FF4642E002FFFCDA
2024-10-08 19:00:10,804 - pacebms_rs232 - DEBUG - Trying to parse analog data
2024-10-08 19:00:10,804 - pacebms_rs232 - DEBUG - fields: ['25', 'FF', '46', '42', 'E0', '02', 'FF', 'FC', 'DA']

I also tried the other options, but they don't connect at all, so I think PACE_LV_V1 should be right, but I would ask for some help to get them working.

JK_ESS + RN200:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
Pace BMS Monitor Starting...
Loading options.json
2024-10-08 19:11:07,458 - __main__ - INFO - interface: ethernet
2024-10-08 19:11:07,459 - __main__ - INFO - serial_port: /dev/ttyUSB0
2024-10-08 19:11:07,459 - __main__ - INFO - baud_rate: 9600
2024-10-08 19:11:07,459 - __main__ - INFO - ethernet_ip: 192.168.80.197
2024-10-08 19:11:07,460 - __main__ - INFO - ethernet_port: 4196
2024-10-08 19:11:07,461 - ha_mqtt - DEBUG - Initializing MQTT client
2024-10-08 19:11:07,461 - ha_mqtt - INFO - Connecting to MQTT broker at homeassistant.local:1883
2024-10-08 19:11:07,475 - ha_mqtt - INFO - Connected to MQTT broker successfully
2024-10-08 19:11:07,486 - bms_comm - INFO - Trying to connect BMS over 192.168.80.197:4196
2024-10-08 19:11:07,489 - bms_comm - INFO - Connected to BMS over Ethernet: 192.168.80.197:4196
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

TDT:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
Pace BMS Monitor Starting...
Loading options.json
2024-10-08 19:08:56,041 - __main__ - INFO - interface: ethernet
2024-10-08 19:08:56,041 - __main__ - INFO - serial_port: /dev/ttyUSB0
2024-10-08 19:08:56,041 - __main__ - INFO - baud_rate: 9600
2024-10-08 19:08:56,042 - __main__ - INFO - ethernet_ip: 192.168.80.197
2024-10-08 19:08:56,042 - __main__ - INFO - ethernet_port: 4196
2024-10-08 19:08:56,042 - ha_mqtt - DEBUG - Initializing MQTT client
2024-10-08 19:08:56,042 - ha_mqtt - INFO - Connecting to MQTT broker at homeassistant.local:1883
2024-10-08 19:08:56,054 - ha_mqtt - INFO - Connected to MQTT broker successfully
2024-10-08 19:08:56,062 - bms_comm - INFO - Trying to connect BMS over 192.168.80.197:4196
2024-10-08 19:08:56,064 - bms_comm - INFO - Connected to BMS over Ethernet: 192.168.80.197:4196
2024-10-08 19:08:56,064 - __main__ - INFO - TDT BMS Monitor Working...
2024-10-08 19:08:56,064 - __main__ - INFO - TDT BMS RS232 Working...
2024-10-08 19:08:56,065 - __main__ - INFO - Looking for valid packs...
2024-10-08 19:08:56,065 - tdtbms_rs232 - DEBUG - Trying to prepare pack quantity request
2024-10-08 19:08:56,066 - tdtbms_rs232 - DEBUG - pack quantity request: b'~250046900000FDA6\r'
2024-10-08 19:08:56,066 - tdtbms_rs232 - DEBUG - Trying to send pack quantity request
2024-10-08 19:08:56,066 - tdtbms_rs232 - DEBUG - pack quantity request sent
2024-10-08 19:08:56,067 - tdtbms_rs232 - DEBUG - Trying to receive pack quantity data
2024-10-08 19:08:56,089 - bms_comm - DEBUG - Received data from BMS: ~250046900000FDA6
2024-10-08 19:08:56,090 - tdtbms_rs232 - DEBUG - pack quantity data recieved: ~250046900000FDA6
2024-10-08 19:08:56,090 - tdtbms_rs232 - DEBUG - Trying to parse pack quantity data
2024-10-08 19:08:56,090 - tdtbms_rs232 - ERROR - An error occurred: Invalid LENID value
Traceback (most recent call last):
  File "/sensor.py", line 206, in <module>
    run()
  File "/sensor.py", line 182, in run
    pack_list = list(range(1, pack_quantity + 1))
                              ~~~~~~~~~~~~~~^~~
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
fancyui commented 3 weeks ago

2024-10-08 19:00:10,753 - pacebms_rs232 - DEBUG - analog request: b'~25FF4642E002FFFCDA\r' 2024-10-08 19:00:10,753 - pacebms_rs232 - DEBUG - Trying to send analog request 2024-10-08 19:00:10,754 - pacebms_rs232 - DEBUG - analog request sent 2024-10-08 19:00:10,754 - pacebms_rs232 - DEBUG - Trying to receive analog data 2024-10-08 19:00:10,777 - bms_comm - DEBUG - Received data from BMS: ~25FF4642E002FFFCDA 2024-10-08 19:00:10,778 - pacebms_rs232 - DEBUG - analog data recieved: ~25FF4642E002FFFCDA

request data and received data are same, configuration may be wrong.

PACE_LV is right.

Please check these: https://www.gobelpower.com/connection-rs232-to-ethernet_f53.html https://www.gobelpower.com/config-ethernet-option-2_f58.html

Also make sure baud rate is right in IOT device.

You can send me IOT device configuration screenshot here.

Aeroid commented 3 weeks ago

Thanks for comming back to this! Below are the configs for the addon (v.1.9.0) and the waveshare.

grafik

grafik

fancyui commented 3 weeks ago

Is baud rate 9600 right? did you try 115200?

Aeroid commented 3 weeks ago

Yes, 115200 baud also returns this.

2024-11-01 19:36:42,713 - pacebms_rs232 - DEBUG - Trying to prepare analog request
2024-11-01 19:36:42,713 - pacebms_rs232 - DEBUG - analog request: b'~25FF4642E002FFFCDA\r'
2024-11-01 19:36:42,714 - pacebms_rs232 - DEBUG - Trying to send analog request
2024-11-01 19:36:42,714 - pacebms_rs232 - DEBUG - analog request sent
2024-11-01 19:36:42,714 - pacebms_rs232 - DEBUG - Trying to receive analog data
2024-11-01 19:36:42,720 - bms_comm - DEBUG - Received data from BMS: ~25FF4642E002FFFCDA
2024-11-01 19:36:42,720 - pacebms_rs232 - DEBUG - analog data recieved: ~25FF4642E002FFFCDA
2024-11-01 19:36:42,720 - pacebms_rs232 - DEBUG - Trying to parse analog data
2024-11-01 19:36:42,721 - pacebms_rs232 - DEBUG - fields: ['25', 'FF', '46', '42', 'E0', '02', 'FF', 'FC', 'DA']
2024-11-01 19:36:42,721 - pacebms_rs232 - ERROR - Invalid command or response code: 46 42
2024-11-01 19:36:42,721 - pacebms_rs232 - DEBUG - analog data parsed: None
stromen1 commented 1 week ago

Is there anything new in this case? I have exactly the same problem.

Aeroid commented 1 week ago

No, sorry no progress. Don't know how to proceed. What's your setup?

stromen1 commented 4 days ago

Oh, that's not good. I have a Waveshare RS232 ETH (B) attached to my Pace BMS in the network