Louisvdw / dbus-serialbattery

Battery Monitor driver for serial battery in VenusOS GX systems
MIT License
522 stars 164 forks source link

Multiple RS485 modules on the same interface #142

Closed Louisvdw closed 1 month ago

Louisvdw commented 2 years ago

Multiple RS485 modules on the same interface

seamaster101 commented 2 months ago

I’m but not around for another couple of days. When I get back I will try to test and report. JordanOn Jun 28, 2024, at 13:10, Manuel @.***> wrote: @ramack @nagstaku @seamaster101 @maxx8888 @TazerReloaded @andzie82 @ats-rozruch @stanhausc @NorthTown2022 @anaro-nicolas @BlueY21 Are you still interested in this?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

ramack commented 2 months ago

@ramack @nagstaku @seamaster101 @maxx8888 @TazerReloaded @andzie82 @ats-rozruch @stanhausc @NorthTown2022 @anaro-nicolas @BlueY21 Are you still interested in this?

Yes. Thanks for implementing it. I have it on my list for trying, but as my installation dine with 5 USB adapters and the housing is closed it will take me till summer vacation at least until I can work on it.

BlueY21 commented 2 months ago

I have three paralleled Renogy 100Ahr Smart Batteries connected to a Cerbo GX with one RS485-USB serial cable, using this version of dbus-serialbattery. I used the USB flash drive installation method. It seems to be working but reports a configuration error (warning).

I had the error in the config.ini file the first time I loaded this version. All of its parameters were loaded. I subsequently corrected the config.ini, replaced the original file in the root of the flash drive, and have rebooted several times. The warning persists and the configuration parameters displayed in the log files are still the values from the initial load. The corrected parameters in the new, current config.ini in the flash drive root are not being loaded during reboots.

Should I execute the uninstall script and reboot to reinstall? Maybe the parameters in the USB flash drive root config.ini file are only utilized in the initial install.

BlueY21 commented 2 months ago

@TheVodden https://github.com/TheVodden

Yes, my batteries' device addresses were already set to 0x30, 0x31, and 0x32. I wonder if the Renogy battery monitor and/or the BT2 Bluetooth module set them or if they are set by battery #1 when the batteries are first daisy-chained together with the RS485 cables.

After making the RS485-USB serial connection to the Cerbo and loading this new version from a USB flash drive, it just worked. I'm still using an RS485 splitter on the first battery to also connect the BT2 transmitter. Their transmissions sometimes collide but they both recover.

On Thu, Jun 27, 2024 at 9:52 AM TheVodden @.***> wrote:

Question for @TheVodden https://github.com/TheVodden

  • What is the Modbus address of the register on your Renogy batteries where you found the 0x30, 0x31, 0x32, and 0x33 device addresses? I plan to check/set mine tomorrow using a Modbus app. I'm thinking that the Renogy BT module I've been using may have set them similarly to your Renogy battery monitor.

The register number is 5223 and it's a holding register.

From what I've read, the BT2 and 485 battery monitor I have readdress the batteries the same, so yours are likely 0x30, 0x31, and 0x32

— Reply to this email directly, view it on GitHub https://github.com/Louisvdw/dbus-serialbattery/issues/142#issuecomment-2194744718, or unsubscribe https://github.com/notifications/unsubscribe-auth/BC63RO45SVW5CXE4AATUECLZJQKIVAVCNFSM5ZUQXESKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJZGQ3TINBXGE4A . You are receiving this because you commented.Message ID: @.***>

mr-manuel commented 2 months ago

It would be very useful, if you post also the warning/error messages else it will be difficult to understand what the problem is.

BlueY21 commented 2 months ago

There seems to be two issues. The config.ini in the USB flash drive root are not being picked-up on reboots and renogy.py is getting a data type error.

The parameters in the in the USB flash drive root\ config.ini file that differ from those being used are: BMS_TYPE = Renogy MAX_BATTERY_CHARGE_CURRENT = 20.0 MAX_BATTERY_DISCHARGE_CURRENT = 100.0 CELL_VOLTAGES_WHILE_CHARGING = 3.65, 3.50, 3.45, 3.30

I was connected to the Cerbo's internal WiFi access point. This is a repeating segment of the log (it's not the first after a reboot. I don't have one of those.):

2024-06-28 19:57:41.765432500 INFO:SerialBattery: 2024-06-28 19:57:41.766176500 INFO:SerialBattery:Starting dbus-serialbattery 2024-06-28 19:57:41.768280500 INFO:SerialBattery:Venus OS v3.11 2024-06-28 19:57:41.769406500 INFO:SerialBattery:dbus-serialbattery v1.3.20240623modbus

2024-06-28 19:57:57.779876500 INFO:SerialBattery:-- Testing BMS: 1 of 3 rounds 2024-06-28 19:57:57.780846500 INFO:SerialBattery:Testing Daly at address "\x30" 2024-06-28 19:57:57.936877500 ERROR:SerialBattery:>>> ERROR: No reply - returning 2024-06-28 19:57:57.937837500 INFO:SerialBattery:Testing Daly at address "\x30" 2024-06-28 19:57:58.078964500 ERROR:SerialBattery:>>> ERROR: No reply - returning 2024-06-28 19:57:58.080021500 INFO:SerialBattery:Testing Ecs at address "\x30" 2024-06-28 19:57:58.162488500 ERROR:SerialBattery:>>> ERROR: No reply - returning 2024-06-28 19:57:58.163778500 INFO:SerialBattery:Testing HeltecModbus at address "\x30" 2024-06-28 19:58:02.015715500 ERROR:SerialBattery:>>> ERROR: No reply - returning 2024-06-28 19:58:02.016651500 INFO:SerialBattery:Testing HLPdataBMS4S at address "\x30" 2024-06-28 19:58:02.839857500 ERROR:SerialBattery:>>> ERROR: No reply - returning 2024-06-28 19:58:02.840923500 INFO:SerialBattery:Testing Jkbms at address "\x30" 2024-06-28 19:58:03.141929500 ERROR:SerialBattery:>>> ERROR: No reply - returning 2024-06-28 19:58:03.145956500 INFO:SerialBattery:Testing Lifepower at address "\x30" 2024-06-28 19:58:03.452149500 ERROR:SerialBattery:>>> ERROR: No reply - returning 2024-06-28 19:58:03.456109500 INFO:SerialBattery:Testing LltJbd at address "\x30" 2024-06-28 19:58:03.740843500 ERROR:SerialBattery:>>> ERROR: No reply - returning 2024-06-28 19:58:03.744983500 INFO:SerialBattery:Testing Renogy at address "\x30" 2024-06-28 19:58:04.059170500 INFO:SerialBattery:RENOGY RBT100LFP12S-G1 2024-06-28 19:58:05.169084500 INFO:SerialBattery:Connection established to Renogy

2024-06-28 19:58:05.169865500 INFO:SerialBattery:-- Testing BMS: 1 of 3 rounds 2024-06-28 19:58:05.170927500 INFO:SerialBattery:Testing Daly at address "\x31" 2024-06-28 19:58:05.311827500 ERROR:SerialBattery:>>> ERROR: No reply - returning 2024-06-28 19:58:05.312774500 INFO:SerialBattery:Testing Daly at address "\x31" 2024-06-28 19:58:05.453793500 ERROR:SerialBattery:>>> ERROR: No reply - returning 2024-06-28 19:58:05.454823500 INFO:SerialBattery:Testing Ecs at address "\x31" 2024-06-28 19:58:05.880964500 ERROR:SerialBattery:>>> ERROR: No reply - returning 2024-06-28 19:58:05.881882500 INFO:SerialBattery:Testing HeltecModbus at address "\x31" 2024-06-28 19:58:08.783241500 ERROR:SerialBattery:>>> ERROR: No reply - returning 2024-06-28 19:58:08.784165500 INFO:SerialBattery:Testing HLPdataBMS4S at address "\x31" 2024-06-28 19:58:09.607828500 ERROR:SerialBattery:>>> ERROR: No reply - returning 2024-06-28 19:58:09.608876500 INFO:SerialBattery:Testing Jkbms at address "\x31" 2024-06-28 19:58:09.899321500 ERROR:SerialBattery:>>> ERROR: No reply - returning 2024-06-28 19:58:09.903050500 INFO:SerialBattery:Testing Lifepower at address "\x31" 2024-06-28 19:58:10.203888500 ERROR:SerialBattery:>>> ERROR: No reply - returning 2024-06-28 19:58:10.208080500 INFO:SerialBattery:Testing LltJbd at address "\x31" 2024-06-28 19:58:10.509161500 ERROR:SerialBattery:>>> ERROR: No reply - returning 2024-06-28 19:58:10.513348500 INFO:SerialBattery:Testing Renogy at address "\x31" 2024-06-28 19:58:10.832964500 INFO:SerialBattery:RENOGY RBT100LFP12S-G1 2024-06-28 19:58:11.841972500 INFO:SerialBattery:Connection established to Renogy

2024-06-28 19:58:11.842741500 INFO:SerialBattery:-- Testing BMS: 1 of 3 rounds 2024-06-28 19:58:11.843570500 INFO:SerialBattery:Testing Daly at address "\x32" 2024-06-28 19:58:11.985002500 ERROR:SerialBattery:>>> ERROR: No reply - returning 2024-06-28 19:58:11.985962500 INFO:SerialBattery:Testing Daly at address "\x32" 2024-06-28 19:58:12.126838500 ERROR:SerialBattery:>>> ERROR: No reply - returning 2024-06-28 19:58:12.127807500 INFO:SerialBattery:Testing Ecs at address "\x32" 2024-06-28 19:58:12.554175500 ERROR:SerialBattery:>>> ERROR: No reply - returning 2024-06-28 19:58:12.554824500 INFO:SerialBattery:Testing HeltecModbus at address "\x32" 2024-06-28 19:58:16.381738500 ERROR:SerialBattery:>>> ERROR: No reply - returning 2024-06-28 19:58:16.382687500 INFO:SerialBattery:Testing HLPdataBMS4S at address "\x32" 2024-06-28 19:58:17.205854500 ERROR:SerialBattery:>>> ERROR: No reply - returning 2024-06-28 19:58:17.207237500 INFO:SerialBattery:Testing Jkbms at address "\x32" 2024-06-28 19:58:17.502860500 ERROR:SerialBattery:>>> ERROR: No reply - returning 2024-06-28 19:58:17.506988500 INFO:SerialBattery:Testing Lifepower at address "\x32" 2024-06-28 19:58:17.792798500 ERROR:SerialBattery:>>> ERROR: No reply - returning 2024-06-28 19:58:17.797868500 INFO:SerialBattery:Testing LltJbd at address "\x32" 2024-06-28 19:58:18.090664500 ERROR:SerialBattery:>>> ERROR: No reply - returning 2024-06-28 19:58:18.094994500 INFO:SerialBattery:Testing Renogy at address "\x32" 2024-06-28 19:58:18.436854500 INFO:SerialBattery:RENOGY RBT100LFP12S-G1 2024-06-28 19:58:19.540997500 INFO:SerialBattery:Connection established to Renogy

2024-06-28 19:58:19.542915500 INFO:SerialBattery:dbusname_post = com.victronenergy.battery.ttyUSB00x30 2024-06-28 19:58:20.189326500 INFO:SerialBattery:Found existing battery with DeviceInstance = 1 2024-06-28 19:58:20.444273500 INFO:SerialBattery:DeviceInstance = 1 2024-06-28 19:58:20.446005500 INFO:SerialBattery:PID file created successfully: /var/tmp/dbus-serialbattery_1.pid 2024-06-28 19:58:20.446725500 INFO:SerialBattery:Used DeviceInstances = ['1', '2', '3'] 2024-06-28 19:58:20.447414500 INFO:SerialBattery:com.victronenergy.battery.ttyUSB0__0x30 2024-06-28 19:58:20.478904500 INFO:SerialBattery:publish config values = False 2024-06-28 19:58:20.479776500 INFO:SerialBattery:dbusname_post = com.victronenergy.battery.ttyUSB00x31 2024-06-28 19:58:21.095488500 INFO:SerialBattery:Found existing battery with DeviceInstance = 2 2024-06-28 19:58:21.319861500 INFO:SerialBattery:DeviceInstance = 2 2024-06-28 19:58:21.321572500 INFO:SerialBattery:PID file created successfully: /var/tmp/dbus-serialbattery_2.pid 2024-06-28 19:58:21.322342500 INFO:SerialBattery:Used DeviceInstances = ['1', '2', '3'] 2024-06-28 19:58:21.323062500 INFO:SerialBattery:com.victronenergy.battery.ttyUSB00x31 2024-06-28 19:58:21.346612500 INFO:SerialBattery:publish config values = False 2024-06-28 19:58:21.347405500 INFO:SerialBattery:dbusname_post = com.victronenergy.battery.ttyUSB0__0x32 2024-06-28 19:58:21.981250500 INFO:SerialBattery:Found existing battery with DeviceInstance = 3 2024-06-28 19:58:22.207769500 INFO:SerialBattery:DeviceInstance = 3 2024-06-28 19:58:22.209612500 INFO:SerialBattery:PID file created successfully: /var/tmp/dbus-serialbattery_3.pid 2024-06-28 19:58:22.210366500 INFO:SerialBattery:Used DeviceInstances = ['1', '2', '3'] 2024-06-28 19:58:22.211066500 INFO:SerialBattery:com.victronenergy.battery.ttyUSB00x32 2024-06-28 19:58:22.235548500 INFO:SerialBattery:publish config values = False

2024-06-28 19:58:22.236364500 INFO:SerialBattery:Polling data every 1.000 s

2024-06-28 19:58:22.238305500 INFO:SerialBattery:Battery Renogy connected to dbus from /dev/ttyUSB0 2024-06-28 19:58:22.239075500 INFO:SerialBattery:========== Settings

2024-06-28 19:58:22.239839500 INFO:SerialBattery:> Connection voltage: 14.1 V | Current: -0.85 A | SoC: 99.68386089879546% 2024-06-28 19:58:22.240448500 INFO:SerialBattery:> Cell count: 4 | Cells populated: 4 2024-06-28 19:58:22.241048500 INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True 2024-06-28 19:58:22.241707500 INFO:SerialBattery:> MIN CELL VOLTAGE: 2.900 V | MAX CELL VOLTAGE: 3.600 V| FLOAT CELL VOLTAGE: 3.375 V 2024-06-28 19:58:22.242312500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 60.0 A | MAX BATTERY DISCHARGE CURRENT: 300.0 A 2024-06-28 19:58:22.242903500 INFO:SerialBattery:> CVCM: True 2024-06-28 19:58:22.243501500 INFO:SerialBattery:> CCCM CV: True | DCCM CV: True 2024-06-28 19:58:22.244089500 INFO:SerialBattery:> CCCM T: True | DCCM T: True 2024-06-28 19:58:22.244669500 INFO:SerialBattery:> CCCM SOC: False | DCCM SOC: False 2024-06-28 19:58:22.245257500 INFO:SerialBattery:> CHARGE FET: None | DISCHARGE FET: None | BALANCE FET: None 2024-06-28 19:58:22.245833500 INFO:SerialBattery:Serial Number/Unique Identifier: PPTAH01051602058 2024-06-28 19:58:22.246426500 INFO:SerialBattery:Battery Renogy connected to dbus from /dev/ttyUSB0 2024-06-28 19:58:22.246968500 INFO:SerialBattery:========== Settings

2024-06-28 19:58:22.247675500 INFO:SerialBattery:> Connection voltage: 14.1 V | Current: -0.86 A | SoC: 99.68387354941977% 2024-06-28 19:58:22.248282500 INFO:SerialBattery:> Cell count: 4 | Cells populated: 4 2024-06-28 19:58:22.248974500 INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True 2024-06-28 19:58:22.249877500 INFO:SerialBattery:> MIN CELL VOLTAGE: 2.900 V | MAX CELL VOLTAGE: 3.600 V| FLOAT CELL VOLTAGE: 3.375 V 2024-06-28 19:58:22.250830500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 60.0 A | MAX BATTERY DISCHARGE CURRENT: 300.0 A 2024-06-28 19:58:22.251481500 INFO:SerialBattery:> CVCM: True 2024-06-28 19:58:22.252093500 INFO:SerialBattery:> CCCM CV: True | DCCM CV: True 2024-06-28 19:58:22.252680500 INFO:SerialBattery:> CCCM T: True | DCCM T: True 2024-06-28 19:58:22.253359500 INFO:SerialBattery:> CCCM SOC: False | DCCM SOC: False 2024-06-28 19:58:22.253900500 INFO:SerialBattery:> CHARGE FET: None | DISCHARGE FET: None | BALANCE FET: None 2024-06-28 19:58:22.254498500 INFO:SerialBattery:Serial Number/Unique Identifier: PPTAH01051602064 2024-06-28 19:58:22.255079500 INFO:SerialBattery:Battery Renogy connected to dbus from /dev/ttyUSB0 2024-06-28 19:58:22.255621500 INFO:SerialBattery:========== Settings

2024-06-28 19:58:22.256391500 INFO:SerialBattery:> Connection voltage: 14.1 V | Current: -0.8 A | SoC: 99.8729657007392% 2024-06-28 19:58:22.256951500 INFO:SerialBattery:> Cell count: 4 | Cells populated: 4 2024-06-28 19:58:22.258056500 INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True 2024-06-28 19:58:22.258880500 INFO:SerialBattery:> MIN CELL VOLTAGE: 2.900 V | MAX CELL VOLTAGE: 3.600 V| FLOAT CELL VOLTAGE: 3.375 V 2024-06-28 19:58:22.259603500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 60.0 A | MAX BATTERY DISCHARGE CURRENT: 300.0 A 2024-06-28 19:58:22.260344500 INFO:SerialBattery:> CVCM: True 2024-06-28 19:58:22.261065500 INFO:SerialBattery:> CCCM CV: True | DCCM CV: True 2024-06-28 19:58:22.261723500 INFO:SerialBattery:> CCCM T: True | DCCM T: True 2024-06-28 19:58:22.262395500 INFO:SerialBattery:> CCCM SOC: False | DCCM SOC: False 2024-06-28 19:58:22.263024500 INFO:SerialBattery:> CHARGE FET: None | DISCHARGE FET: None | BALANCE FET: None 2024-06-28 19:58:22.263648500 INFO:SerialBattery:Serial Number/Unique Identifier: PPTAH01051717261

2024-06-28 19:58:22.264249500 ERROR:SerialBattery:CONFIG ISSUE: Maximum value of CELL_VOLTAGES_WHILE_CHARGING (3.55 V) is lower than MAX_CELL_VOLTAGE (3.6 V). MAX_CELL_VOLTAGE will never be reached this way and battery will not change to float. Please check the configuration.

2024-06-28 19:58:37.526997500 WARNING:SerialBattery:Polling took too long. Set to 3.000 s

2024-06-28 19:58:39.918274500 ERROR:SerialBattery:>>> ERROR: Incorrect Reply 2024-06-28 19:58:40.935899500 Traceback (most recent call last): 2024-06-28 19:58:40.935907500 File "/opt/victronenergy/dbus-serialbattery/dbushelper.py", line 792, in publish_battery 2024-06-28 19:58:40.935911500 result = self.battery.refresh_data() 2024-06-28 19:58:40.935914500 File "/opt/victronenergy/dbus-serialbattery/bms/renogy.py", line 93, in refresh_data 2024-06-28 19:58:40.935917500 result = result and self.read_cell_data() 2024-06-28 19:58:40.935919500 File "/opt/victronenergy/dbus-serialbattery/bms/renogy.py", line 166, in read_cell_data 2024-06-28 19:58:40.936060500 cell_temp = unpack_from(">H", cell_temp_data, c * 2) 2024-06-28 19:58:40.936064500 TypeError: a bytes-like object is required, not 'bool'

2024-06-28 19:58:40.936066500 ERROR:SerialBattery:>>> ERROR: Incorrect Reply 2024-06-28 19:58:41.705010500 Traceback (most recent call last): 2024-06-28 19:58:41.705020500 File "/opt/victronenergy/dbus-serialbattery/dbushelper.py", line 792, in publish_battery 2024-06-28 19:58:41.705024500 result = self.battery.refresh_data() 2024-06-28 19:58:41.705026500 File "/opt/victronenergy/dbus-serialbattery/bms/renogy.py", line 93, in refresh_data 2024-06-28 19:58:41.705030500 result = result and self.read_cell_data() 2024-06-28 19:58:41.705032500 File "/opt/victronenergy/dbus-serialbattery/bms/renogy.py", line 165, in read_cell_data 2024-06-28 19:58:41.705176500 cell_volts = unpack_from(">H", cell_volt_data, c * 2) 2024-06-28 19:58:41.705182500 TypeError: a bytes-like object is required, not 'bool'

2024-06-28 19:58:41.705184500 WARNING:SerialBattery:Polling took too long. Set to 5.000 s

2024-06-28 19:59:17.907487500 INFO:SerialBattery: 2024-06-28 19:59:17.908202500 INFO:SerialBattery:Starting dbus-serialbattery 2024-06-28 19:59:17.910386500 INFO:SerialBattery:Venus OS v3.11 2024-06-28 19:59:17.911110500 INFO:SerialBattery:dbus-serialbattery v1.3.20240623modbus

I also found this log segment in my notes: 2024-06-28 19:50:56.963972500 ERROR:SerialBattery:[Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0' 2024-06-28 19:50:56.979404500 Traceback (most recent call last): 2024-06-28 19:50:56.979413500 File "/opt/victronenergy/dbus-serialbattery/dbushelper.py", line 792, in publish_battery 2024-06-28 19:50:56.979417500 result = self.battery.refresh_data() 2024-06-28 19:50:56.979419500 File "/opt/victronenergy/dbus-serialbattery/bms/renogy.py", line 94, in refresh_data 2024-06-28 19:50:56.979423500 result = result and self.read_temp_data() 2024-06-28 19:50:56.979425500 File "/opt/victronenergy/dbus-serialbattery/bms/renogy.py", line 211, in read_temp_data 2024-06-28 19:50:56.979576500 self.temp2 = unpack(">H", temp2)[0] / 10 2024-06-28 19:50:56.979579500 TypeError: a bytes-like object is required, not 'bool' 2024-06-28 19:50:56.979582500 ERROR:SerialBattery:[Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0' 2024-06-28 19:50:56.979586500 ERROR:SerialBattery:[Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0' 2024-06-28 19:50:57.169072500 /opt/victronenergy/serial-starter/run-service.sh: line 15: kill: (1640) - No such process On Sun, Jun 30, 2024 at 12:43 AM Manuel ***@***.***> wrote: > It would be very useful, if you post also the warning/error messages else > it will be difficult to understand what the problem is. > > — > Reply to this email directly, view it on GitHub > , > or unsubscribe > > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> >
TheVodden commented 2 months ago

I wonder if the Renogy battery monitor and/or the BT2 Bluetooth module set them or if they are set by battery #1 when the batteries are first daisy-chained together with the RS485 cables.

I'm going to assume not.

These devices would need to be programmed as either a master or slave. All of the batteries would need to be slaves, leaving the controller/BT2 to be the master and the device that does the readdressing.

I'm still not clear on how this works given that initially all batteries would share a common address, but by virtue of Renogy magic, it works.

mr-manuel commented 2 months ago

@BlueY21 in your case it seems that the USB to RS485 adapter crashes and cannot handle that much communication. Which USB to RS485 are you using?

TheVodden commented 2 months ago

This is what I'm using

485 adapter

BlueY21 commented 2 months ago

I'm using the VICTRON_ENERGY NT-1057, RS485 to USB Interface Cable.

Another possibility: I also have a DSD TECH SH-RT102 RS485 Repeater Extender (splitter) between the battery 1 (0x30) RS485 port and the VE NT-1057 cable's RS485 end. A Renogy BT2 Bluetooth interface module is connected to the other splitter port. Collisions on the serial line could be causing the dbus restarts. Later this week when I'm onsite, I'll remove it to see if that helps.

On Sun, Jun 30, 2024 at 2:18 PM Manuel @.***> wrote:

@BlueY21 https://github.com/BlueY21 in your case it seems that the USB to RS485 adapter crashes and cannot handle that much communication. Which USB to RS485 are you using?

— Reply to this email directly, view it on GitHub https://github.com/Louisvdw/dbus-serialbattery/issues/142#issuecomment-2198641675, or unsubscribe https://github.com/notifications/unsubscribe-auth/BC63RO3BD5O6YDIXWS6QFZDZKBDXXAVCNFSM5ZUQXESKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJZHA3DIMJWG42Q . You are receiving this because you were mentioned.Message ID: @.***>

TheVodden commented 2 months ago

@BlueY21 i would remove the BT2

You shouldn't have 2 master devices on one network.

Quadron commented 2 months ago

Thank you so much @mr-manuel for implementing this! I haven't even gotten 1 battery talking to the GX yet, due to pin / cable issues. I gave up trying months ago, but will definitely give it a go again in the coming weeks.
Thank you @TheVodden for bringing this thread to my attention!

Quadron commented 2 months ago

I have gotten the first battery to communicate with my GX, that is a big improvement for me already. I have 4, and up to now have only used the renogy BT2 bluetooth adapter to read the data. My batteries don't seem to follow the sequential addresses 0x30, 0x31, 0x32 and 0x33. The log indicates 0x30 success but none of the other adresses. I'm going to try to retrieve those addresses with a windows modbus scan tool (https://store.chipkin.com/products/tools/cas-modbus-scanner), but as my experience with modbus is non existent I hope this will yield results. Any other programs I can try? I also have ubuntu running.

mr-manuel commented 2 months ago

@Quadron I opened a new issue for this else the focus of this issue is lost: https://github.com/Louisvdw/dbus-serialbattery/issues/1099

mr-manuel commented 1 month ago

This feature is now awailable in the master branch. Not every BMS was adopted and tested yet.

Quadron commented 1 month ago

I have updated to 1.4.20240714modbus and can confirm 4 Renogy Batteries on one adapter (using the victron ftdi usb). I did have to change config.ini to include USE_PORT_AS_UNIQUE_ID = True

bb12489 commented 1 month ago

I've tried to get this to work with my 4 Lifepower4 batteries, but for whatever reason the driver can only see ID's 0x01 (bat 1) and 0x03 (bat 3). It won't pickup bat 2 or 4. I've triple checked all my connections and the dip switch settings on each battery. Not sure what else to try at this point.

BlueY21 commented 1 month ago

Quadron, Now that you have all four (paralleled) Renogy batteries connected on one adaptor, do you set the charge and discharge current limits in the config.ini to the limits for a single battery or for the sum of all four batteries?

Quadron commented 1 month ago

Hi BlueY21,

I currently have the max charge an discharge rate set in the config for one battery. I don't have anything that can discharge at more than 50 amps, and my charger is also limited to 60A but I don't know what happens when I actually reach that.

As explained in the readme on github a battery aggregator is actually t needed to make VenusOS control charging and discharging of the whole pack. I have tried the Gigavolt aggregator, but with the renogy batteries is seems warning and alarm info from the BMS is not yet implemented in dbus-Serialbattery. When I use that aggregator charging and discharging is blocked bij the GX.... without it, and selecting one of the bmses as leading it works just fine, but the values in the victron overview pages are divided by 4. @mr-manuel In the console on my GX for each battery is says in IO: Charge allowed: No Discharge allowed: No Ballance allowed: No Is this because warnings and alarms are not yet implemented for renogy? I have the modbus registers etc and could define variables in renogy.py but actually reading them and acting on warnings is above my level of programming.

mr-manuel commented 1 month ago

@bb12489 please open a new issue for that.

@BlueY21 @Quadron you need a battery aggregator: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/general/install

@Quadron that could have multiple reasons. Check the parameters page and also this: https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/faq/#why-is-my-battery-not-switching-to-floatbulk Please open a new issue for that.

mr-manuel commented 1 month ago

Since the basic function was now implemented to support multiple batteries on the same interface, I will close this issue. Please open a new issue for every BMS where multiple batteries are not supported yet and where the batteries support this function (RS485/Mobus with address assignment).