esphome / feature-requests

ESPHome Feature Request Tracker
https://esphome.io/
411 stars 26 forks source link

Support for setting the values of Charge/Discharge FETs of the daly_bms component. #1979

Open oryjkov opened 1 year ago

oryjkov commented 1 year ago

Describe the problem you have/What new integration you would like Add a way to enable/disable Charge and Discharge MOSFET status on the daly_bms integration. At the moment these are read only, but the hardware supports changing their status.

Daly phone app supports it when using the BT dongle.

This project seems to have the implementation: https://github.com/softwarecrash/DALY-BMS-to-MQTT/blob/2f8cb8ba92eeec58b494b76432b59cbef6c5fbc9/src/daly-bms-uart.cpp#L428

Add a feature to enable/disable FETs on the BMS.

Please describe your use case for this integration and alternatives you've tried:

Additional context

oryjkov commented 1 year ago

This is a hacky way to make it work with UART switch sending raw packets:

switch:
  - platform: uart
    name: "Charge MOSFET off"
    data: [0xA5, 0x80, 0xDA, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07]
  - platform: uart
    name: "Charge MOSFET on"
    data: [0xA5, 0x80, 0xDA, 0x08, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08]
  - platform: uart
    name: "Discharge MOSFET off"
    data: [0xA5, 0x80, 0xD9, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06]
  - platform: uart
    name: "Discharge MOSFET on"
    data: [0xA5, 0x80, 0xD9, 0x08, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07]