syssi/esphome-pace-bms

Wrong Bitmask for status charging and discharging

ThHanika opened this issue · 3 comments

please correct your code example esp32-example.yaml :

binary_sensor:
  #  11  Status/Fault flag                     2 byte   R  uint16  Hex See ^3
  #      Bit 8: Status: Charging enabled/disabled
  - platform: modbus_controller
    modbus_controller_id: bms0
    name: "${name} charging"
    address: 11
    register_type: holding
    bitmask: 0x0100

  #      Bit 9: Status: Discharging enabled/disabled
  - platform: modbus_controller
    modbus_controller_id: bms0
    name: "${name} discharging"
    address: 11
    register_type: holding
    bitmask: 0x0200

BTW: This status is a working status. For enabled charging/discharging it is a better choice to use MOSFET-status

Your Example is tested and worked on Pace BMS P16S200A Firmwareversion 3.0
Full Version(Evaluated by esp32-example.yaml): P16S200A-21382-3.00T213822131800670H

syssi commented

Thanks for your feedback! Do you like to provide a pull request to contribute your improvement?

OK, I clone your project

Sorry for the delay. I've merged your contribution because it's already an improved. It can be polished over time.