Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOK 100ah 48v #35

Closed
garylankford8 opened this issue Jul 3, 2024 · 7 comments
Closed

SOK 100ah 48v #35

garylankford8 opened this issue Jul 3, 2024 · 7 comments

Comments

@garylankford8
Copy link

Works for SOK 100ah 48v server rack with version P16S100A-1B470-4.07 after reversing TX and RX pins from as shown in the example. tx_pin: GPIO17, rx_pin: GPIO16.

@syssi
Copy link
Owner

syssi commented Jul 3, 2024

Which RS485 protocol did you select? PACE_MODBUS?

@garylankford8
Copy link
Author

Yes, PACE_MODBUS...

So, I seem to be only getting data from the #1 (0x01) of 3 batteries using the RS485 port next to the CAN port. I guess that makes sense given the batteries are networked through the other RS485 ports. To monitor the other 2 batteries, do I need to replicate this system for each, or can I use the network port?

Sorry, old guy here... I can barely follow instructions, much less understand what is happening here!

JFYI, I am also running Solar Assistant from the RS232.

@syssi
Copy link
Owner

syssi commented Jul 4, 2024

Each battery pack should have a address selected by the dip switches. Please play around with this value at the YAML:

modbus_controller:
  - id: bms0
    # Slave address 0x01
    address: 0x01

Are you able to retrieve data from battery pack two if you use the slave address 0x02 here? If this is the case you can add additional modbus_controller instances to the YAML and additional sensor block.

This is a simple example how to monitor two battery packs:

substitutions:
  name: pace-bms
  bank0: pack1
  bank1: pack2

modbus:
  - id: modbus0
    uart_id: uart_0
    send_wait_time: 200ms

modbus_controller:
  - id: bms0
    # Slave address 0x01
    address: 0x01
    modbus_id: modbus0
    command_throttle: 200ms
    update_interval: 10s
  - id: bms1
    address: 0x02
    modbus_id: modbus0
    command_throttle: 200ms
    update_interval: 10s

sensor:
  - platform: modbus_controller
    modbus_controller_id: bms0
    name: "${bank0} total voltage"
    address: 1
    register_type: holding
    value_type: U_WORD
    unit_of_measurement: "V"
    device_class: voltage
    state_class: measurement
    accuracy_decimals: 2
    filters:
      - multiply: 0.01

  - platform: modbus_controller
    modbus_controller_id: bms1
    name: "${bank1} total voltage"
    address: 1
    register_type: holding
    value_type: U_WORD
    unit_of_measurement: "V"
    device_class: voltage
    state_class: measurement
    accuracy_decimals: 2
    filters:
      - multiply: 0.01

@garylankford8
Copy link
Author

YAML according to your example, I am now monitoring 3 SOK packs using one esp32/RS485 module in Home Assistant under esphome...

Still left to me to learn the complete utility, but all capabilities of pbmstools appear to be available.

I could hardly be more thrilled! Many thanks!

@garylankford8
Copy link
Author

Are you @syssi84 on PayPal?

@syssi
Copy link
Owner

syssi commented Jul 5, 2024

Yes

@syssi syssi closed this as completed Jul 5, 2024
@syssi
Copy link
Owner

syssi commented Jul 6, 2024

Many thanks for your support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants