I've noticed that people here are still wanting to monitor BMS signals (temps, voltages, status), dynamically control their charge rates, cap SoC (min and max), and automate this via Home Assistant using MQTT. Just putting some feelers out for a concept which I've floated before. Some here will remember my other work developing FoxESS v2 compatible BMS controllers, and this work is an offshoot of that, specifically the Home Assistant control.
The main issue for most has been the issue until now is not having a plug and play option which uses standard RJ45 cabling such that fitting only requires the unplugging of the BMS data cable and insertion of the interception device. This device would be mounted in a small enclosure with two RJ45 sockets, and use standard ethernet patch cables to connect to the battery.
Monitoring and control of the BMS is performed using a Man-in-the-Middle CAN bus device which intercepts specific BMS CAN bus traffic, and reports all values to Home Assistant using MQTT sub/pub or TCP polling using a local API over Wi-Fi. Safe tuning of charge and discharge rate is performed through value reductions only.
Why do this?
- Fine control over the charging and discharging profile of your batteries
- Simple automation of summer/winter/off-peak max/min SoC, DoD control
- Discharge inhibit when EV charging and during free energy sessions (IOG)
- Monitoring individual cell voltages, module temps, charge and discharge rates and limits
- Safe updating of FoxESS firmware without breaking your HA BMS integration
- No hammering the FoxESS EEPROM every time a setting is changed or HA automation triggers
- Optional RS485 providing Modbus RTU over Wi-Fi - depending on level of interest
- Can be powered via inverter COM port or USB - FoxESS model dependent
- Arduino Wi-Fi Manager and OTA for simple flashing

And automation to suit Octopus and EVSE agnostic integration

Example JSON payload
Code: Select all
{"uptime":5483289,"conn_uptime":47060,"soc":57.0,"volts":409.6,"cell_mv_high":3799,"cell_mv_low":3791,"cell_temp_high":26.0,"cell_temp_low":26.0,"dod":[15,80],"amps":0.0,"kwh":27.7,"charge":30.0,"discharge":30.0}
Code: Select all
- name: "kWh"
state_topic: "bms/ESP48CA43/state"
unique_id: "kwh_sensor"
value_template: "{{ value_json.kwh | float | round(2) | default(0.00) }}"
unit_of_measurement: "kWh"
json_attributes_topic: "BMS"
json_attributes_template: >
{"kwh": "{{ value_json.kwh }}"}
- name: "Min DoD"
state_topic: "bms/ESP48CA43/state"
unique_id: "min_dod_sensor"
value_template: "{{ value_json.dod | min }}"
unit_of_measurement: "%"
json_attributes_topic: "BMS"
json_attributes_template: >
{"min_dod": "{{ value_json.dod }}"}
- name: "Max DoD"
state_topic: "bms/ESP48CA43/state"
unique_id: "max_dod_sensor"
value_template: "{{ value_json.dod | max }}"
unit_of_measurement: "%"
json_attributes_topic: "BMS"
json_attributes_template: >
{"max_dod": "{{ value_json.dod }}"}
Happy to open-source the Arduino firmware so that the community can get involved. My design is mostly stateless which leaves all complexity and flexibility in Home Assistant. Hardware is a dual CAN bus ESP32-C6.
Interested Dave?