557 Commits
Author SHA1 Message Date
Sleeper85 e183d206bc PSRAM options 1.1.4 for ESP-IDF 5.5+ 2026-08-17 09:02:31 +02:00
Sleeper85 e6bfef665c Updated YamBMS display readme 2026-07-15 16:06:57 +02:00
Sleeper85 277cfd49bc Compliance with esphome PR_11969 (modbus_server send_wait_time) 2026-07-11 00:29:11 +02:00
Sleeper85 7d76d7c991 Compliance with esphome 2026.6.0 (modbus_server) 2026-07-11 00:16:36 +02:00
Sleeper85 69ac0294e1 Compliance with esphome PR_11781 (modbus_controller) 2026-07-11 00:05:53 +02:00
Sleeper85 8439fd6ffc Compliance with esphome PR_11969 (modbus send_wait_time) 2026-07-11 00:05:53 +02:00
Sleeper85 7df415153b Create RS485-protocol-pylon-low-voltage-V3.5-20190807.pdf 2026-07-11 00:05:53 +02:00
Sleeper85 456d8a9a7f Added T-Connect-Pro-Lite board 2026-07-11 00:05:53 +02:00
Sleeper85 ffddcc01be T-Connect boards doc updated 2026-07-11 00:05:53 +02:00
Sleeper85 f186f53da3 Uncomment cell balancing trigger voltage name 2026-07-02 11:37:46 +02:00
Sebastian 8073810b04 Adjust Rebulk SoC if higher than target SoC
With Automatic SoC Limit Mode set to Float and Rebulk SoC >= Automatic SoC Limit it won't work as expected because Rebulk SoC takes priority and switches to Bulk. This was reported in the forum: https://diysolarforum.com/threads/yambms-jk-bms-can-with-new-cut-off-charging-logic-open-source.79325/page-294#post-1848293

When Rebulk SoC >= Automatic SoC Limit and Automatic SoC Limit is enabled, set Rebulk SoC to Automatic SoC Limit - Auto SoC Limit Hysteresis - 5%. For example: Rebulk SoC = 85%, Automatic SoC Limit = 80%, Auto SoC Limit Hysteresis = 5% would result in Rebulk SoC = 70%.
2026-06-29 20:55:03 +02:00
Sleeper85 fbeb69208f New Blue Navy Overview design 1.1.2 2026-06-29 17:39:36 +02:00
Sleeper85 b88102bf85 Added invert_colors: true 2026-06-29 17:09:08 +02:00
Sleeper85 ef06261150 Fixed ${yambms_id} 2026-06-29 16:07:07 +02:00
Sleeper85 20a0906d15 Setup new mipi_spi display platform 2026-06-29 12:21:30 +02:00
Sleeper85 3da758fe00 Fixed yambms_id 2026-06-29 12:21:16 +02:00
Sleeper85 c2638b5e02 Update README.md 2026-06-29 02:07:29 +02:00
Sleeper85 50c6e3b246 YamBMS 1.7.0 examples 2026-06-29 01:54:55 +02:00
Sleeper85 48c7e779c0 YamBMS 1.7.0
* Partial rewrite of `yambms_core` and merging of C++ code into a single lambda in several stages with increased datas control.
  * Added LVGL display dashboard for Waveshare Touch-LCD 4.3" and 7" (Blue Navy 800x480 design)
  * Fixed [issue 10](https://github.com/Sleeper85/esphome-yambms/issues/10) Sending CAN bus data before the end of the combination process
  * Fixed [issue 154](https://github.com/Sleeper85/esphome-yambms/issues/154) Add `Enerkey Balancers` balance stop diff voltage setting (register 0x1A)
  * Fixed [issue 160](https://github.com/Sleeper85/esphome-yambms/issues/160) The SOH sensor is interpreted as a battery percentage
  * Fixed [issue 182](https://github.com/Sleeper85/esphome-yambms/issues/182) Compliance of Auto functions for YamBMS 1.7.0
  * Fixed [issue 268](https://github.com/Sleeper85/esphome-yambms/issues/268) [Add an option] The inverter is not sending ACK CAN ID 0x305
  * Fixed [issue 282](https://github.com/Sleeper85/esphome-yambms/issues/282) JK errors_bitmask has been removed
  * Merged [PR 281](https://github.com/Sleeper85/esphome-yambms/pull/281) Add WS Touch-LCD-4.3B board 
  * Merged [PR 261](https://github.com/Sleeper85/esphome-yambms/pull/261) Add LilyGo T-Connect Pro Lite board (without screen)
  * Merged [PR 259](https://github.com/Sleeper85/esphome-yambms/pull/259) Add support for Rebulk Days
  * Merged [PR 258](https://github.com/Sleeper85/esphome-yambms/pull/258) Auto EOC: Factor in Auto SoC Limit for battery capacity calculation
  * Merged [PR 255](https://github.com/Sleeper85/esphome-yambms/pull/255) Add support for Auto SoC Limit
  * Merged [PR 236](https://github.com/Sleeper85/esphome-yambms/pull/236) Switch to VictronMPPT-ESPHOME fork
  * Merged [PR 235](https://github.com/Sleeper85/esphome-yambms/pull/235) Basen: Add "Enable communication" switch
  * Merged [PR 200](https://github.com/Sleeper85/esphome-yambms/pull/200) Add M5Stack Tab5 with LVGL display
  * Merged [PR 199](https://github.com/Sleeper85/esphome-yambms/pull/199) Add Ecoworthy BMS integration for YamBMS
  * Merged [PR 194](https://github.com/Sleeper85/esphome-yambms/pull/194) Component Fault Registry & Advanced LED Control
  * Merged [PR 178](https://github.com/Sleeper85/esphome-yambms/pull/178) Basen BMS: Add heating control
  * Merged [PR 170](https://github.com/Sleeper85/esphome-yambms/pull/170) Add Freenove S3 board
  * Merged [PR 162](https://github.com/Sleeper85/esphome-yambms/pull/162) PACE Sensor Fixes
  * Merged [PR 158](https://github.com/Sleeper85/esphome-yambms/pull/158) Automatically disable shunt when connected BMSs are going offline
2026-06-29 01:45:49 +02:00
Sleeper85 9168ad0a7e Merge main into dev: accept all dev changes 2026-06-29 01:41:51 +02:00
Sleeper85 e5631954ec Update Changelog.md 2026-06-29 01:17:11 +02:00
Sleeper85 f764fa73e6 Update Troubleshooting.md 2026-06-29 01:17:05 +02:00
Sleeper85 e82ca7e677 Reorganization of LVGL display packages for greater clarity 2026-06-29 01:10:39 +02:00
Sleeper85 2fa0e40dbe Add balance stop diff voltage setting (register 0x1A) 2026-06-29 01:05:33 +02:00
Sleeper85 23d549ab38 Set esphome min_version to 2026.6.0 2026-06-28 19:51:51 +02:00
Sleeper85 b7c9a0ab85 New mipi_rgb display platform for WS-Touch-LCD boards 2026-06-28 19:51:51 +02:00
Sleeper85 5c0ee0c341 Remove ${name} from board_ESP32-P4_M5Stack-Tab5.yaml 2026-06-28 19:51:51 +02:00
Andrew Rankin 8f1a6dcc76 Tab5: ESPHome 2026.6 / LVGL 9.x compatibility (#285)
* Tab5 LVGL: remove invalid ticks(count:0) from current/power meters

The current_meter and power_meter scales set:
    ticks:
      count: 0

ESPHome's LVGL meter-scale schema requires ticks.count to be >= 2, so
this fails config validation with:
    value must be at least 2.  count: 0

Both gauges are intentionally tick-less (needle + colored arcs only), so
the ticks block serves no purpose. Removing it lets the Tab5 layout
compile while leaving the gauges visually unchanged.

* Tab5: move rotation display->lvgl for ESPHome 2026.6 compat

ESPHome 2026.6 rejects 'rotation' under display: when LVGL is used:
  use of 'rotation' in the display config is not compatible with LVGL,
  please set rotation in the LVGL config instead

Moved rotation: 90 into the lvgl: block. mipi_dsi has no hardware
rotation, so LVGL uses software rotation and now auto-transforms touch
coordinates (LvglComponent::rotate_coordinates). The gt911's manual
transform (swap_xy + mirror_y) would therefore double-rotate touch, so
it is removed and the calibration is swapped to panel-native orientation
(x 0..720, y 0..1280). Net touch mapping is unchanged.

* Tab5: replace deprecated meter 'r_mod' with LVGL 9.x equivalents

LVGL 9.4 removed lv_meter; ESPHome emulates it with lv_scale, which
dropped the 'r_mod' (radius modifier) indicator property:
  WARNING Property 'r_mod' is deprecated, use 'length' instead
  WARNING The 'r_mod' indicator property is not supported in LVGL 9.x
          and will be ignored

- Needle (line indicator): r_mod: 25 -> length: -25. ESPHome internally
  converts r_mod to length=-abs(r_mod) (meter.py), so a negative length
  reproduces the exact same needle; a positive 25 would not.
- Arcs: r_mod has no lv_scale equivalent and was already being ignored,
  so it is simply removed. No visual change.

Net rendering is unchanged; only the deprecation warnings are cleared.

* Tab5 (esphome sensors): use IndicatorLine::set_value, lv_meter removed

LVGL 9.4 removed the lv_meter widget and its C API, so the interval
lambda's lv_meter_set_indicator_value() no longer compiles:
  error: 'lv_meter_set_indicator_value' was not declared in this scope

ESPHome now emulates meter needles with the IndicatorLine compound, so
set the value via id(<needle>)->set_value(int). This matches the codegen
of the lvgl.indicator.update action already used by the _ha_sensors
variant; the _esphome variant just hadn't been migrated.
2026-06-28 15:53:28 +02:00
Sleeper85 a19890bc0d Added the canbus_link_timer_enabled option #268 2026-06-28 14:59:44 +02:00
Sleeper85 9bcb4d7177 New yambms_id format 2026-06-28 00:09:39 +02:00
Sleeper85 683499c8d7 Alignment of sensor names for component JK V3 2026-06-22 16:16:06 +02:00
Sleeper85 bee5abec64 Using a fake sensor instead of errors_bitmask_hex 2026-06-20 00:15:26 +02:00
Sleeper85 3d1ea45eb6 JK BLE - Sync latest changes from @syssi git 2026-06-18 23:40:19 +02:00
Sleeper85 06d60d3061 Merge branch 'dev' of https://github.com/Sleeper85/esphome-yambms into dev 2026-06-18 00:17:19 +02:00
Sleeper85 772a6324bf Dashboards 1.7.0 reorganized with Markdown cards 2026-06-18 00:17:12 +02:00
JD-Vaulta 1c8896571a Add WS-Touch-4.3B board (#281) 2026-06-17 15:10:40 +02:00
Sleeper85 7cb446914a Added ESPHome 2026.4 Warning 2026-04-19 08:42:24 +02:00
Sleeper85 f76fa033cf Added warning on parallel and series BMS 2026-04-17 08:51:50 +02:00
Sleeper85 0cca823d0c YamBMS 1.7.0 (fixed version) 2026-04-17 08:26:59 +02:00
Sleeper85 ad0480c5bb YamBMS 1.7.0 - Added sub-devices comments 2026-03-24 20:06:54 +01:00
Sleeper85 1a3bb55403 Dashboard 1.7.0 new Auto Functions tab 2026-03-24 01:24:18 +01:00
Sleeper85 f117319007 Improved Sub-Devices and entity names 2026-03-24 00:37:48 +01:00
Sebastian be772ab1fc Throttle/filter BMS sensors (#242) 2026-03-16 17:52:54 +01:00
Sebastian 62791addde Add support for Rebulk Days (#259)
This adds `Rebulk Days` which specify the number of days since last full charge to enter `Bulk` again. It works like `Rebulk SoC` or `Rebulk V.` and can be disabled by setting it to 0 days.
2026-03-16 17:38:28 +01:00
David Coulson 3b7238f3c7 Board file for LilyGo T-Connect Pro Lite (without screen) (#261) 2026-03-16 17:13:56 +01:00
Sebastian c5d9fdd66a Auto EOC: Factor in Auto SoC Limit for battery capacity calculation (#258) 2026-03-15 11:26:38 +01:00
Sebastian 11464f4ad2 Improve Auto SoC Limit function (#256)
- Disable when `Force Bulk` is active
- Disable when charging status is not `Bulk` or `Float`
- Add additional status messages to make clear what happens
2026-03-15 11:25:36 +01:00
Sebastian 78aff46702 Add support for Auto SoC Limit (#255) 2026-03-11 23:17:22 +01:00
Sleeper85 fc741b942d Create STUDY_2018_Analysis_and_modeling_of_calendar_aging_of_a_commercial_LiFePO4_graphite_cell.md 2026-03-11 21:40:19 +01:00
Sleeper85 8cbfc17ead Improved YamBMS core #249 2026-03-10 20:00:10 +01:00
Sleeper85 37fcfbbb5a Improved YamBMS core #182 #247 #249 2026-03-08 03:31:31 +01:00
Sleeper85 ef5bd4a45e Updated Current min_value 2026-03-07 18:38:17 +01:00
Sleeper85 6453906d70 YamBMS 1.7.0 HA Display 2026-02-27 01:24:41 +01:00
Andrew Rankin 22c89bb6fb Add M5Stack Tab5 with LVGL display (#200) 2026-02-25 19:41:09 +01:00
Sebastian dbd3675363 Auto CCL/DCL: Add division by zero/isnan checks (#244)
* Auto CCL: Add division by zero/isnan checks
* Auto DCL: Check values before calculation
* Auto CVL: isnan/value checks
2026-02-25 19:37:47 +01:00
Sebastian aad9f31f1f Value checks (#243)
* Add checks to avoid division by zero
* Auto float: Code cleanup
* Auto temp CCL/DCL: Check if battery capacity is 0
* Canbus: || vs. |
2026-02-25 19:35:13 +01:00
Sebastian 4c31809ec4 Auto EOC: Reset filtered current when disabled (#246) 2026-02-23 18:47:12 +01:00
Sleeper85 853f79e70c Update yambms_custom.yaml 2026-02-20 15:02:23 +01:00
Sleeper85 d6bfd3b2ce Added YamBMS Display section 2026-02-20 00:29:09 +01:00
Sebastian 0817a13485 Add fault registry calls to Modbus clients (#239) 2026-02-19 23:54:28 +01:00
Sleeper85 9257d3bc65 YamBMS 1.7.0 - HA Display 2026-02-19 23:28:23 +01:00
Sleeper85 a02a4cab7f YamBMS 1.7.0 - ESPHome Display 2026-02-19 23:28:04 +01:00
Sleeper85 9af9912fb8 Added trigger_on_initial_state: true 2026-02-19 23:03:23 +01:00
Sleeper85 ac64ace3cd YamBMS basic blue display 1.1.2 HA and ESPHome version 2026-02-19 23:01:34 +01:00
Sleeper85 93467e24f7 YamBMS 1.7.0 - DEMO simulation 2026-02-18 11:05:26 +01:00
Sleeper85 0fe37b7af2 Added default substitutions 2026-02-18 10:49:19 +01:00
Sleeper85 2b6ed1ee81 YamBMS 1.7.0 - LVGL display 800x480 2026-02-18 10:39:01 +01:00
Sleeper85 fcad4d6fc1 Added new LVGL display 800x400 basic blue 2026-02-18 10:36:17 +01:00
Sleeper85 dacf36e280 Fixed RS485 PYLON device_id 2026-02-17 11:46:57 +01:00
Sebastian 6a70079b3e Switch to VictronMPPT-ESPHOME fork (#236)
This fork includes the following improvements:
- Include PR 212: Checksum validation: Verify the checksum to detect
  transmission errors
- Improve logging: More log messages and output shunt ID
- Add online sensor and timeout parameter: Disconnects were not
  detected. This adds a binary_sensor that gets set to false if no
  data is received for specified time (default=5s).
- Fix throttle algorithm: Each frame type gets its own throttle
  handling.
- Use new Victron SmartShunt online status
2026-02-17 11:01:46 +01:00
Sebastian 1969f14892 Basen: Add "Enable communication" switch (#235)
Add switch to enable/disable communication with Basen BMS. For example
this can be used during maintenance to disable communication with the
selected battery.
2026-02-16 21:01:05 +01:00
Sleeper85 893741d8d0 Set esphome min_version to 2026.1.5 2026-02-16 15:24:36 +01:00
Sleeper85 040da87739 Set SEPLOS V3 extended as the default version #216 2026-02-16 15:18:29 +01:00
Sleeper85 d178ffa5c8 YamBMS 1.7.0 examples (2026.02.16) 2026-02-16 15:15:21 +01:00
Sleeper85 5841192281 Added Ecoworthy BMS (RS485) 2026-02-16 11:24:26 +01:00
Sleeper85 f38f12df00 Simplified list of supported inverters 2026-02-16 11:02:54 +01:00
Sleeper85 6fb2710095 Added canbus_extended_ack for Schneider XW Pro 2026-02-16 10:06:20 +01:00
Andrew Rankin 500d7fa8f6 Add Ecoworthy BMS integration for YamBMS (#199) 2026-02-15 22:49:43 +01:00
Sleeper85 e5d903005c Improved LP / RP examples 2026-02-15 22:11:47 +01:00
Sleeper85 ffb8a443bc Using variant instead of board 2026-02-15 21:32:07 +01:00
Sleeper85 d5c4e2b3e8 Improved readme : CAN bus link + Warning & Alarms 2026-02-15 20:08:01 +01:00
Sleeper85 5e492d44ef Updated DEMO examples 2026-02-15 13:47:40 +01:00
Sleeper85 247643195b Create bms_combine_DEMO.yaml 2026-02-15 13:33:09 +01:00
Sleeper85 f70359c0a8 SEPLOS V3 extended version 2026-02-13 16:15:19 +01:00
Sebastian bd380e83a7 Remove unused shunt Modbus registers charging/discharging power (#227) 2026-02-13 15:32:24 +01:00
Sleeper85 de35aa593c Fixed Force Bulk issue #215 2026-02-12 21:22:55 +01:00
Sleeper85 70e566d4ec DEMO dashboard 1.7.0 extended version 2026-02-12 21:05:44 +01:00
Sleeper85 7bf602fd1c Added BMS FAKE extended 2026-02-11 15:58:59 +01:00
MrPabloUK f405228fc4 Auto CCL & DCL - Re-implement Soft Current Ramp (#219) 2026-02-11 09:44:32 +01:00
Sleeper85 843cd70add YamBMS 1.7.0 dashboards 2026-02-11 02:07:03 +01:00
Sleeper85 b486f34a06 Create bms_demo_charge_simulation.yaml 2026-02-11 02:06:04 +01:00
Sleeper85 b4ff48d377 New BMS FAKE automated 2026-02-11 02:05:53 +01:00
Sleeper85 e47d478a65 Improved code + fixed issue #218 2026-02-11 01:59:52 +01:00
Sleeper85 16937f9e1f Added missing unit_of_measurement 2026-02-10 08:55:27 +01:00
Sleeper85 5f50f158ee Added yambms_debug logs 2026-02-09 23:59:25 +01:00
Sleeper85 084bd39926 Added TIP README folder 2026-02-09 08:32:20 +01:00
Sleeper85 d5ed9f3388 Delete CANBUS_protocol.md 2026-02-09 08:31:18 +01:00
Sleeper85 dbb7dcd779 Delete CANBUS_protocol.md 2026-02-09 08:29:46 +01:00
Sleeper85 2c4022d54c Updated ESPHome min_version 2026-02-09 08:27:36 +01:00
MrPabloUK d0ec5798e9 Auto CCL and DCL to new loop (#212)
* Auto CCL and DCL to new loop
* Refactor ratio calculation to use float
* Refactor to use float for performance and ram usage improvement
2026-02-08 19:17:05 +01:00
Sleeper85 881e9b5d28 Added ${yambms_id}_var_auto_ccl_soft_landing global var 2026-02-08 12:57:11 +01:00
Sleeper85 5ed95b0db9 Updated switch id name 2026-02-07 17:17:37 +01:00
Sebastian c4d7544235 Update modbus_id for balancer_modbus_server.yaml (#211) 2026-02-07 16:09:20 +01:00
Sleeper85 6836806bb0 Fixed issue #195 2026-02-07 13:54:25 +01:00
Sleeper85 29a0fe1dee Update bms_options_charging_logic.yaml 2026-02-07 13:53:23 +01:00
Sleeper85 98b815e3ee Fixed on_boot priority 2026-02-07 12:42:52 +01:00
SebastianandSleeper85 15284fe34a balancer_modbus_client.yaml: trigger_on_initial_state was present two times (#210)
Co-authored-by: Sleeper85 <153944466+Sleeper85@users.noreply.github.com>
2026-02-06 17:13:28 +01:00
Sleeper85 57f256a71d Modbus packages update for testing modbus dev PRs 2026-02-06 16:59:49 +01:00
Sebastian 0b52365492 Clamp Modbus client sensors to reasonable values (#209) 2026-02-06 16:08:28 +01:00
Sleeper85 0b2cd66bc5 Fixed comments identation 2026-02-06 11:34:50 +01:00
MrPabloUK 6634abed64 Fix link to LilyGo T-Connect in README (#207) 2026-02-06 00:55:20 +01:00
Sleeper85 2241ba5ea6 Removed YamBMS_LP_DEMO.yaml 2026-02-06 00:36:57 +01:00
Sebastian 80d5c9ab39 JK-BMS: Add temperature configuration (#205) 2026-02-06 00:30:59 +01:00
MrPabloUK e846ff8ea2 Update fault registry source sensors to trigger on initial state (#203) 2026-02-05 23:44:42 +01:00
MrPabloUK 2b1aa0f660 Update board configurations and add no LED control options (#206) 2026-02-05 23:40:32 +01:00
Sleeper85 4affade236 Update bms_options_charging_logic.yaml 2026-02-05 22:29:04 +01:00
Sleeper85 831fc11f13 Update bms_options_charging_logic.yaml 2026-02-05 22:27:02 +01:00
Sleeper85 8db17d6e64 Deleting unnecessary YAMLs 2026-02-05 21:41:02 +01:00
Sebastian 032b2e309b Workaround for RP2040 compile bug (#204) 2026-02-05 21:27:00 +01:00
Sleeper85 c988dfd91d YamBMS 1.7.0 PVbrain2 examples 2026-02-05 17:51:01 +01:00
Sleeper85 2f30d804bc Updated PVbrain2 board 2026-02-05 17:42:54 +01:00
Sleeper85 cfd178801f Updated and new board interfaces 2026-02-05 17:41:49 +01:00
Sleeper85 a57eef234c Removed PVbrain2 folder 2026-02-05 17:38:18 +01:00
MrPabloUK 9c664bd5fb RP2040 fix - remove global fault mask logging (#198) 2026-02-05 12:36:56 +01:00
Sleeper85 5279d40b87 Fixed shunt_status_led_id 2026-02-05 11:51:39 +01:00
Sleeper85 56a51cb534 Board and display code splitted 2026-02-05 11:47:43 +01:00
Sleeper85 3412d1d332 YamBMS 1.7.0 examples 2026-02-05 11:45:11 +01:00
MrPabloUK 447a18b832 Component Fault Registry & Advanced LED Control (#194) 2026-02-05 09:26:49 +01:00
Sleeper85 ed03d15d79 GPIOs header : pins that can be used without risk 2026-02-03 14:33:30 +01:00
Sebastian 9f5eccbfba Auto EOC to new CCL loop (#185) 2026-02-03 12:57:29 +01:00
Sleeper85 d9967fc2e5 Updated README References 2026-02-03 12:53:46 +01:00
Sleeper85 937c8b2981 Updated README References 2026-02-03 12:53:28 +01:00
Sleeper85 05f7cf2f4e Fixed issue #187 2026-02-02 14:25:40 +01:00
Sleeper85 d4e0ff02d6 Fixed issue #187 2026-02-02 14:25:04 +01:00
Sleeper85 b0a4c6c645 Fixed CCL and DCL init + added more yambms_debuglogs 2026-02-02 14:12:24 +01:00
Sleeper85 81afb1d054 Corrected display of the SOC and SOH unit 2026-02-02 12:53:13 +01:00
Sleeper85 3590e68ec2 Added more yambms_debug logs 2026-02-02 12:37:36 +01:00
Sleeper85 4165b23670 Improved bms_can_be_combined condition 2026-02-02 12:10:59 +01:00
Sleeper85 e6a47a8a91 Improved YamBMS initialized validation 2026-02-02 10:36:28 +01:00
Sleeper85 471a25b8e7 Added more yambms_debug logs 2026-02-01 18:37:02 +01:00
Sleeper85 434db0ebdc Improved YamBMS datas control + yambms_debug logs 2026-02-01 08:11:54 +01:00
Sleeper85 5741cf9eb3 LED Control Logic moved to the board itself 2026-01-31 19:34:14 +01:00
Sleeper85 54661754df Updated CAN bus link readme 2026-01-31 14:42:43 +01:00
Sleeper85 5c2ca5c35a Fixed the behavior observed in issue #180 2026-01-31 14:18:41 +01:00
Sleeper85 4a77e018d7 Freenove YAML renamed 2026-01-31 10:52:09 +01:00
MrPabloUK 6b6832cd34 Board Config Update - Remove Outdated Package (#181)
Remove reference to outdated RGB yaml
2026-01-31 00:24:39 +01:00
Txubelaxu a36e4579e2 Add Freenove S3 board
* Add Freenove S3 board
* New `mcp2515_clock` var
* Following PR New LED Control Logic #179
2026-01-30 19:49:34 +01:00
MrPabloUK d44f3921dd Added a new board_options_led_control.yaml file to manage LED behavior based on status sensors (#179)
- Adjusted light control logic to handle RGB settings and state changes more effectively.
- Introduced a new substitution `board_has_rgb` to indicate RGB functionality availability.
- Removed the deprecated `board_options_rgb_led_status.yaml` file.
- Enhanced CAN bus and RS485 configurations to include LED control based on device status.
- Updated T-Connect and YamBMS behaviour documentation
2026-01-30 19:31:36 +01:00
Sleeper85 089338ace1 New YamBMS 1.7.0 three steps lambdas 2026-01-30 16:56:04 +01:00
Sleeper85 ec2aec146b Create board_ESP32-S3_Super_Mini.yaml 2026-01-28 07:34:26 +01:00
Sleeper85 b9a6243f8f Create board_ESP32-S3_Super_Mini.yaml 2026-01-28 07:27:38 +01:00
Sebastian 5fdaa26eb8 Basen BMS: Add heating control (#178) 2026-01-27 21:14:20 +01:00
Sebastian 5b297a2db2 Basen BMS: Add heating control (#178) 2026-01-27 21:13:51 +01:00
Sebastian a9c8443a66 Provide connected BMS IDs to shunt (#158)
The `bms_ids` variable allows to provide an array of BMS IDs that are connected to this shunt.

If one or more BMS from this array are offline, the shunt is not used anymore (Combine = Disabled). This avoids returning a wrong SOC when not all batteries are online/available anymore.

If the BMS goes online again, the shunt is then used again.

This variable is optional. If not provided, the shunt work independently from the BMS online status.

Examples:
```
bms_ids: '{1}'
bms_ids: '{1, 2}'
bms_ids: '{4, 5, 6}'
```
2026-01-26 21:31:46 +01:00
MrPabloUK d8cd01cb8b Update Auto_temp-based_current.md (#176)
Corrected example discharging_rate_table.
2026-01-26 18:40:05 +01:00
MrPabloUK 60aaabc85b Update Auto_temp-based_current.md (#176)
Corrected example discharging_rate_table.
2026-01-26 18:39:32 +01:00
Sleeper85 ab134587c2 Removed ESPHome version warning 2026-01-23 10:27:37 +01:00
Sleeper85 71fe5c1822 Removed ESPHome version warning 2026-01-23 10:27:13 +01:00
Sleeper85 7c21cba4d1 Fixed JSON GET for esphome 2026.1 2026-01-22 22:29:53 +01:00
Sleeper85 95bb4ec4f0 Fixed JSON GET for esphome 2026.1 2026-01-22 22:29:04 +01:00
Sleeper85 e7bd49e139 Fixed issues #10 and #161 2026-01-21 13:03:40 +01:00
Sleeper85 edf75f0fbe Fixed issues #10 and #161 2026-01-21 13:03:13 +01:00
bradmatt275 c199848155 PACE Sensor Fixes (#162)
* Update unit_of_measurement from mV to V and apply scaling filter for voltage readings
* Change readings to use multiply instead of filters for scaling
* Changed number components to use lambda functions for value conversion
* Enhance online status binary sensor to validate BMS communication based on total voltage reading
* Update version numbers and update dates in YAML configuration files
2026-01-19 14:20:29 +01:00
bradmatt275 5f29d3c50d PACE Sensor Fixes (#162)
* Update unit_of_measurement from mV to V and apply scaling filter for voltage readings
* Change readings to use multiply instead of filters for scaling
* Changed number components to use lambda functions for value conversion
* Enhance online status binary sensor to validate BMS communication based on total voltage reading
* Update version numbers and update dates in YAML configuration files
2026-01-19 14:18:54 +01:00
Sleeper85 3075c9d78c Fixed web_server Max requested current (issue #159) 2026-01-16 00:32:15 +01:00
Sleeper85 2c6e5d759d Fixed web_server Max requested current (issue #159) 2026-01-16 00:32:00 +01:00
Sleeper85 deb373eb3f Merge pull request #157 from Sleeper85/dev
YamBMS 1.6.0
2026-01-15 20:17:10 +01:00
Sleeper85 4b7c0b17c4 Merge branch 'main' into dev 2026-01-15 20:16:12 +01:00
Sleeper85 91f1af4659 Updated FAKE Shunt and BMS vars 2026-01-15 19:56:39 +01:00
Sleeper85 db2e19586d Testing modbus PR_12614 2026-01-15 19:55:12 +01:00
Sleeper85 18d8306de5 YamBMS 1.6.0 readme 2026-01-15 18:54:26 +01:00
Sleeper85 49c4938052 YamBMS 1.6.0 DEMO firmware 2026-01-15 18:52:08 +01:00
Sleeper85 0266f518ee YamBMS 1.6.0 2026-01-14 21:55:03 +01:00
Sleeper85 93297a3140 Added temperature-based current derating reason 2026-01-14 20:15:24 +01:00
Sleeper85 00109a7c6e Improved DEMO/FAKE BMS and dashboard 2026-01-14 20:13:26 +01:00
Sleeper85 edbb20b719 Disabled the reboot after 15 minutes in case of WiFi unavailability 2026-01-14 15:51:51 +01:00
Sleeper85 0576a51842 Correction: AI was replaced with BI 2026-01-14 15:44:19 +01:00
Sebastian f924af33f4 Update temperature sensor filters to reduce noise (#155)
* Update BMS min/max temperature filters to filter out noise
* Add filters for Basen temperature sensors
  - Basen temperature sensors only have full integer resolution. Add additional filters to reduce noise.
* Update filter for min/max temperature
  - Change filters for min/max temperature to reduce noise introduced by changes in the lowest bit (0.1°C). Otherwise this noise will be forwarded by auto temp based current to the requrested charge/discharge current and therefore to the inverter.
2026-01-14 09:20:48 +01:00
Sleeper85 78e8b21977 Dual counter for entering and exiting the Cut-Off phase 2026-01-13 18:57:42 +01:00
Sleeper85 daf2e4fec3 Delete LP_BMS_example_SEPLOS_V3_RS485_sniffer.yaml 2026-01-13 17:57:25 +01:00
Sleeper85 b730958aa9 Fixed temp-based discharging_rate_table 2026-01-07 13:02:14 +01:00
Sleeper85 463798084c Fixed temp-based charging_rate_table 2026-01-06 21:44:51 +01:00
MrPabloUK 8490f9c4ad CCL, DCL and Auto Temp Current Control (#147)
* CCL, DCL and Auto Temp Current Control

* Added following:
- Update temperature based current derating, now uses calibrate_linear
- Revised CCL and DCL to correctly apply derating when multiple functions are enabled
- Added diagnostic sensor showing derating reason
* Changed referenced sensor for Auto DCP temperature derating
* Updated Auto Temp logic
* Add documentation, rename package
2026-01-06 18:01:45 +01:00
MrPabloUK c810ae8f10 Updated AutoCCL & AutoDCL explanation, real time control of AutoCVL (#144) 2025-12-30 22:12:18 +01:00
Sleeper85 bcde473157 Update MCU_default_GPIOs.png 2025-12-29 22:39:25 +01:00
Sleeper85 e57196ee5d Improved Interfaces Support Capacity section 2025-12-29 22:06:43 +01:00
Sleeper85 c5086d52ea Removing unnecessary links 2025-12-29 16:29:15 +01:00
Sleeper85 92c177be3b Horizontal alignment of images 2025-12-29 16:14:55 +01:00
Sleeper85 32b6e5e8c1 Update Charging_logic.md 2025-12-29 15:50:43 +01:00
Sleeper85 dc7470a008 Update Charging_logic.md 2025-12-29 15:46:46 +01:00
Sleeper85 0caee3801c Improved Cut-Off charging logic equation and documentation (PR #143) 2025-12-29 15:36:57 +01:00
Sleeper85 f3e77c327f Improved Board documentation 2025-12-29 13:49:30 +01:00
Sleeper85 1888ca31dc Added LilyGo and Waveshare readme 2025-12-28 23:53:41 +01:00
Sleeper85 1a7f83f9ec Documentation of the new calculation of the maximum current 2025-12-28 20:03:29 +01:00
Sleeper85 1da3bf9e59 Changed uart_esp_3 GPIOs 2025-12-25 19:24:00 +01:00
Sleeper85 6722216f86 Adjust bms_name to something unique #122 2025-12-23 21:15:21 +01:00
Sleeper85 f081a348e4 Updated Power gauge (-10kW to 10kW) 2025-12-23 20:13:25 +01:00
Sleeper85 a3bd991e2f Added bms_prefix for SEPLOS V3 for better sub_device support 2025-12-23 14:47:52 +01:00
Sleeper85 e70960cf88 Balancer sub_device YAMLs 2025-12-23 13:06:40 +01:00
Sleeper85 0a6e42e1de Changed sub_device version 2025-12-23 12:58:24 +01:00
Sleeper85 29d4078d1e JK RS485 sniffer_id is no longer required 2025-12-23 12:25:13 +01:00
Sleeper85 ab5feb1718 Fixed dashboards following sub_device PR #134 2025-12-23 12:25:13 +01:00
Sleeper85 a343ee32ab Fixed entity names following sub_device PR #134 2025-12-23 12:25:13 +01:00
Sleeper85 c0b4fee44f Removed non-functional BMS_example_SEPLOS_V3_RS485.yaml 2025-12-23 12:25:13 +01:00
Sleeper85 47027b0437 File name without PCS 2025-12-23 12:18:10 +01:00
MrPabloUK 1804d41f48 Fix JK powertube temp device id (#139) 2025-12-18 22:26:02 +01:00
Andrew Rankin 59cb64181e Correct min/max cells (#140) 2025-12-18 19:06:40 +00:00
Sleeper85 84eb560c66 Fixed bms and shunt modbus client sub_device_id 2025-12-18 00:21:32 +01:00
Sleeper85 6bc6b5b54e Added talk_pin substitution 2025-12-17 22:57:13 +01:00
Sleeper85 2745bf9168 YAML BMS examples renamed 2025-12-17 22:13:24 +01:00
Sleeper85 da8e3f0200 Fixed sub_device 2025-12-17 22:04:05 +01:00
Sleeper85 e8cdadce56 JK RS485 cell balancing trigger voltage name 2025-12-17 19:36:30 +01:00
Sleeper85 eaf65ded61 Increase LFP cv_min to 3.375 2025-12-17 19:22:19 +01:00
MrPabloUK 547b824b5e Sub device support (#134) 2025-12-17 00:42:53 +01:00
Sleeper85 a3fe73c3a2 Added the last PR #12421 2025-12-16 09:46:43 +01:00
Sleeper85 610309debf Fixed battery_capacity_remaining DEMO dashboard 2025-12-15 10:50:41 +01:00
Sleeper85 c55ba4785c Alignment of the DEMO dashboard with version 1.2.0 of BMS fake sensors 2025-12-15 10:39:01 +01:00
Andrew Rankin a9394095d2 [EG4] Swap away from esphome modbus component (#130)
* Rebase was a mess, so re-adding based on the dev branch.
* updates for the 1.6.0 release / dev branch to compile.
* Update external component source version
* Updated the external component source version from main to v1.0.0.
* Update external component source version to v1.0.0
* Add an example for EG4.
2025-12-15 10:06:21 +01:00
Sleeper85 a6536155c4 Merge branch 'dev' of https://github.com/Sleeper85/esphome-yambms into dev 2025-12-15 09:44:50 +01:00
Sleeper85 ea30ea145c BMS fake sensors 1.2.0 2025-12-15 09:39:27 +01:00
kolins-cz 7c5523eaf4 Add Studer XTM-4000 to supported inverters (#133) 2025-12-10 12:50:07 +00:00
Sleeper85 b2c5f65478 Reorganization of variables 2025-12-09 02:45:05 +01:00
Sleeper85 de6d37e308 YamBMS modbus dev YAMLs 2025-12-05 22:05:41 +01:00
Sleeper85 7e8b88f841 Fixed JK RS485 switch names (issue #123) 2025-12-04 21:33:49 +01:00
Sleeper85 93730d856d YamBMS 1.6.0 - Updated README 2025-12-01 23:12:10 +01:00
Sleeper85 942b7c6fbb Added JK RS485 talk_pin examples 2025-12-01 18:34:44 +01:00
Sleeper85 d1e976123b YamBMS 1.6.0 - dev branch example 2025-11-26 08:57:29 +01:00
Sleeper85 f4f2957558 Dashboards 1.6.0 - 2025.11.25 2025-11-26 08:54:00 +01:00
Sebastian b2f4fb5b87 Add explanation for Temperature-based current limitation calculation (#118) 2025-11-26 00:13:22 +01:00
Sebastian 147a176748 Round requested charge/discharge current to nearest integer (#117)
Because of temperature based current limitation, the requested charge/discharge current could be non-integer values. For the used high-power applications, sub 1A precision is not required and may add noise.
2025-11-26 00:11:53 +01:00
Sleeper85 9847a53755 New Multi-node BMS names 2025-11-26 00:07:16 +01:00
Sleeper85 9e196afef3 Remove the non-functional SEPLOS V3 version (#94) 2025-11-26 00:04:34 +01:00
Sleeper85 8ce4d7d255 YamBMS 1.6.0 - Fixed issue #116 2025-11-25 08:44:03 +01:00
Sleeper85 6cbf9d72d5 YamBMS 1.6.0 - Max requested current in A 2025-11-25 00:08:49 +01:00
Sleeper85 4fa50d1c5f Improved Remaining Capacity when using a shunt (#102) 2025-11-24 19:52:28 +01:00
Sleeper85 d635c9c0c8 Dashboards 1.6.0 - Temperature-based current limiting and remaining capacity 2025-11-24 19:03:21 +01:00
Sleeper85 e2de6d6724 Fixed update_interval 2025-11-24 17:02:10 +01:00
Sleeper85 428f9115c9 AtomS3 GPIOs for Atomic RS485 base (uart_esp_3) 2025-11-24 16:56:30 +01:00
Sleeper85 dcbf3e6b8a YamBMS 1.6.0 - 2025.11.23 2025-11-24 14:34:30 +01:00
Sleeper85 6107f9e365 Create bms_modbus_PACE_RS485_bms_full.yaml 2025-11-24 01:45:52 +01:00
Sleeper85 48cf6da6c2 Create board_options_itf_uart_flow_control.yaml 2025-11-23 23:49:31 +01:00
Sleeper85 af0ac536a2 Code standardization (auto functions) 2025-11-23 17:46:31 +01:00
Sleeper85 75c0a97659 ESPHome 2025.11 Warning 2025-11-23 10:57:37 +01:00
5hortCircuit 810f109592 Adding FLIP_C3 board (#112)
* Adding FLIP_C3 board

The FLIP_C3 is a simple ESP32-C3 board that has an integrated power supply that has a 60V input.  This board can be connected directly to a 48V battery and then be used with the M5Stack Isolated RS485 Unit (U094) to get a RS485 connection back to the master unit.  I successfully used 4 of these units to communicate with the JK-BMS B-Series BMS's.  The FLIP_C3 has an onboard 5V regulator that can power the RS485 module, 2 UART exposed on connectors that can be used for TTL to the BMS and TTL to the RS485 module. In the US it is available on Amazon, product page: https://wiki.vdbx.io/product/flip_c3

* Added missing GPIOs to FLIP_C3 board
2025-11-22 10:24:36 +01:00
5hortCircuit 59ad20f447 Adding FLIP_C3 board (#112)
* Adding FLIP_C3 board

The FLIP_C3 is a simple ESP32-C3 board that has an integrated power supply that has a 60V input.  This board can be connected directly to a 48V battery and then be used with the M5Stack Isolated RS485 Unit (U094) to get a RS485 connection back to the master unit.  I successfully used 4 of these units to communicate with the JK-BMS B-Series BMS's.  The FLIP_C3 has an onboard 5V regulator that can power the RS485 module, 2 UART exposed on connectors that can be used for TTL to the BMS and TTL to the RS485 module. In the US it is available on Amazon, product page: https://wiki.vdbx.io/product/flip_c3

* Added missing GPIOs to FLIP_C3 board
2025-11-22 10:20:19 +01:00
Sleeper85 5329ea6696 JK-PB Erase History Data function 2025-11-19 23:06:29 +01:00
Sleeper85 592a19e87c JK-PB Erase History Data function 2025-11-19 23:00:51 +01:00
Sleeper85 bcf7f3f9fa Added Waveshare ESP32-S3-RS485-CAN 2025-11-19 21:26:17 +01:00
Sleeper85 f2415bda61 Hardware highlighted and changelog moved 2025-11-19 21:25:10 +01:00
Sleeper85 a90071bd87 New BMS battery_capacity_remaining manipulated sensor (issue #96) 2025-11-17 00:12:04 +01:00
Sleeper85 0edda3cd66 Fixed link to Downgrading to 19.10 2025-11-16 15:23:54 +01:00
Sleeper85 46049be161 Fixed link to Downgrading to 19.10 2025-11-16 15:23:27 +01:00
Sleeper85 5dc31f29c5 Updated JK-PB readme with V19 warning and SoC 100% reset solution 1 and 2 2025-11-16 15:13:14 +01:00
Sleeper85 cba6716eeb Updated JK-PB readme with V19 warning and SoC 100% reset solution 1 and 2 2025-11-16 15:11:55 +01:00
Sleeper85 a1a2ce9e19 Improved SEPLOS V1 V2 examples 2025-11-15 00:19:38 +01:00
Sleeper85 68a7a6aac6 Added SEPLOS V3 sniffer version 2025-11-14 23:35:59 +01:00
Sleeper85 cc2e3fc0eb Replaced branch dev to main 2025-11-14 23:35:16 +01:00
Sleeper85 f1f22aa559 Added ESP32-S3_WS-ETH board 2025-11-14 23:32:02 +01:00
Sleeper85 866c4b39a0 Added talk_pin to ESP32-S3_WS-RS485-CAN board 2025-11-14 23:30:57 +01:00
Sleeper85 3e4c9e18af Delete lovelace-cards-contribution.png 2025-11-14 23:28:07 +01:00
Sleeper85 d6f211fdd3 Added Waveshare ESP32-S3-RS485-CAN 2025-11-14 23:27:10 +01:00
Sleeper85 fbea8d3ffc Hardware highlighted and changelog moved 2025-11-14 23:08:34 +01:00
Sleeper85 66cbb93397 Added Shunt Modbus FAKE 2025-10-25 13:12:18 +02:00
Sleeper85 beb9139d90 Fixed balance_trigger_voltage and equalizing IDs 2025-10-25 13:09:56 +02:00
Sleeper85 ff8ab4f21e Added Shunt Modbus FAKE 2025-10-25 13:07:33 +02:00
Sleeper85 19b4d22ea1 Added ${sniffer_id} to Broadcasting JK-PB settings to all BMS switch 2025-10-22 19:11:16 +02:00
Sleeper85 22c0336e8e Added ${sniffer_id} to Broadcasting JK-PB settings to all BMS switch 2025-10-22 19:10:48 +02:00
Sleeper85 67ef67995a Basen BMS: Use new binary sensors for charging/discharging 2025-10-21 14:03:08 +02:00
Sleeper85 072453e70c Merge pull request #99 from GHswitt/BasenUpdate
Basen: Use new binary sensors for charging/discharging
2025-10-20 15:04:10 +02:00
Sebastian ee28444a88 Basen: Use new binary sensors for charging/discharging allowed from Basen component 2025-10-14 23:23:26 +02:00
Sleeper85 e5645d3bfb Merge pull request #97 from GHswitt/PR_Basen_Talk_Pin
Add Basen controller version with talk/flow control pin
2025-10-06 20:46:59 +02:00
Sleeper85 b6f0515ec1 Merge pull request #97 from GHswitt/PR_Basen_Talk_Pin
Add Basen controller version with talk/flow control pin
2025-10-06 20:45:28 +02:00
Sleeper85 91d421af8d Create board_ESP32_iBMS_CAN_RS485_V3.3.yaml 2025-10-06 20:26:46 +02:00
Sleeper85 b72f2aa40e Update board_ESP32-S3_WS-ETH.yaml 2025-10-06 20:26:31 +02:00
Sebastian ae959c057e Add Basen controller version with talk/flow control pin 2025-10-06 20:05:05 +02:00
Sleeper85 a519338422 Create board_ESP32-S3_WS-ETH.yaml 2025-09-12 16:04:24 +02:00
Sleeper85 e105dc0dad Set MCP2515 SPI interface to spi3 2025-09-12 16:04:04 +02:00
Sleeper85 740f226954 Set MCP2515 SPI interface to spi3 2025-09-12 16:03:41 +02:00
Sleeper85 a94209f5cb Create board_ESP32-S3_WS-ETH.yaml 2025-09-12 16:02:24 +02:00
Sleeper85 2e6bd3dddc Update board_ESP32-S3_WS-RS485-CAN.yaml 2025-09-09 22:18:56 +02:00
Sleeper85 5e5b86dece Update board_ESP32-S3_WS-RS485-CAN.yaml 2025-09-09 21:59:33 +02:00
Sleeper85 0e3fdb5043 Create board_ESP32-S3_WS-RS485-CAN.yaml 2025-09-09 17:18:45 +02:00
Sleeper85 14d249d2d9 Added Waveshare ESP32-S3-RS485-CAN 2025-09-09 17:18:17 +02:00
Sleeper85 4e196395e1 Create board_ESP32-S3_WS-RS485-CAN.yaml 2025-09-09 17:12:01 +02:00
Sleeper85 b92bdfbb2a Added WS to the board name 2025-09-09 16:56:50 +02:00
Andrew Rankin d01de31f7a Adding EG4 LLV2 BMS (#85) 2025-09-09 16:10:35 +02:00
Andrew Rankin 8a1262e426 Adding EG4 LLV2 BMS (#85) 2025-09-09 16:08:32 +02:00
Sleeper85 64e5a4b177 ETH01-EVO - Comment version: latest 2025-09-04 23:17:28 +02:00
Sleeper85 7aefccb33b ETH01-EVO - Comment version: latest 2025-09-04 23:16:05 +02:00
Sleeper85 3984ccea0e JK BLE V14 - Fixed missing ${bms_name} 2025-08-21 10:59:18 +02:00
Sleeper85 324491e48d JK BLE V14 - Fixed missing ${bms_name} 2025-08-21 10:49:34 +02:00
Sleeper85 356bebbf33 Fixed double import bms_balancer.yaml 2025-08-15 15:17:28 +02:00
Sleeper85 36ab3f0ce5 Update YamBMS_Auto_EOC.png 2025-08-14 20:10:12 +02:00
Sleeper85 bcc36b78fd YamBMS 1.5.9 main YAML 2025-08-14 20:05:19 +02:00
Sleeper85 ffcc78f711 Fixed BMS balance trigger voltage number 2025-08-14 19:55:04 +02:00
Sleeper85 65a2729073 Merge pull request #76 from GHswitt
Add Auto EOC function
2025-08-14 18:53:02 +02:00
Sleeper85 083e0daf87 YamBMS 1.5.9 - Balancer example 2025-08-14 18:25:18 +02:00
Sleeper85 54b53294c2 Dashboards 1.5.9 - Balancer support 2025-08-14 17:38:19 +02:00
Sleeper85 28de17c39d Delete balancer_sensors_JK_BLE.yaml 2025-08-14 16:59:03 +02:00
Sleeper85 0f862b2d68 Added PACE BMS examples 2025-08-14 16:23:06 +02:00
Sleeper85 9c8892b069 Added PACE BMS support 2025-08-14 16:07:52 +02:00
Sleeper85 7548b75c2f Merge pull request #82 from GHswitt
Add support for external balancer
2025-08-14 16:01:13 +02:00
Sebastian 308fab7b6e Update Github addresses for BASEN and DEYE 2025-08-14 15:31:20 +02:00
Sebastian fffd7c6087 Add support for external balancer
This adds support for external balancers, for example NEEY using JK BLE.
2025-08-14 15:01:51 +02:00
Sleeper85 468c61a9dd Fixed JK RS485 dashboards status_online 2025-08-14 10:12:43 +02:00
Sleeper85 7aa033dd12 Fixed JK RS485 dashboards status_online 2025-08-14 10:09:34 +02:00
Sebastian c2f9a2b388 Auto EOC dashboards 2025-08-13 23:27:01 +02:00
Sebastian 60e96b1cd8 Add Auto EOC function
This function allows to set a target time when `Bulk` charging.
It limits the `Requested Charge Current (CCL)` so the battery should
reach full charge at the specified time.
2025-08-13 20:44:27 +02:00
Sleeper85 81bd0e7ab9 WT32-ETH01 added doc links 2025-08-13 18:50:01 +02:00
Sleeper85 39d0ad54d0 WT32-ETH01 added doc links 2025-08-13 18:48:06 +02:00
Sleeper85 c451514d4d Split YamBMS YAML and change version to 1.5.9 2025-08-13 18:11:04 +02:00
Sleeper85 19606eb860 Balancer integration example 2025-08-13 18:05:30 +02:00
Sleeper85 737cacdf09 WT32-EH01 binary LED 2025-08-13 00:08:18 +02:00
Sleeper85 7290a24946 YamBMS 1.5.8 - Added WiFi AP 2025-08-12 23:01:05 +02:00
Sleeper85 aa5dd3ec50 YamBMS 1.5.8 - Updated changelog 2025-08-12 22:59:32 +02:00
Sleeper85 4e06577eb0 WiFi and Web Server credentials 2025-08-12 22:11:58 +02:00
Sleeper85 df967ca5e9 Web server 1.1.3 2025-08-12 22:09:06 +02:00
Sleeper85 872abfcd97 WiFi AP 1.1.2 2025-08-12 22:07:05 +02:00
Sleeper85 c2cc9d2be0 Captive portal 1.1.2 2025-08-12 22:06:46 +02:00
Sleeper85 bc12a8e1a0 Updated YAML version 2025-08-12 21:31:00 +02:00
Sleeper85 b3f203bd58 Added Factory Reset button 2025-08-12 21:29:07 +02:00
Sleeper85 2eaf17633d ESP32_EVB replace clk_mode by clk 2025-08-12 19:02:32 +02:00
Sleeper85 e70819054c Create board_ESP32_WT32-ETH01.yaml 2025-08-12 19:01:45 +02:00
Sleeper85 d2eee689ee Create board_options_wifi_ap.yaml 2025-08-11 17:59:12 +02:00
Sleeper85 a851511d09 Allowing web_server to work without internet access 2025-08-11 17:58:49 +02:00
Sleeper85 b4e6262793 YamBMS 1.5.8 - Web Server v3 2025-08-11 16:18:29 +02:00
Sleeper85 99c92f17dc Auto Float - Fixed missing yambms_id 2025-08-11 15:38:23 +02:00
Sleeper85 a1b8572f3d Merge pull request #80 from GHswitt
BMS Modbus client: Return 0 when not online
2025-08-08 19:43:23 +02:00
Sleeper85 11e0e34ab9 Merge pull request #81 from GHswitt
Fix balance trigger voltage for Basen and Deye
2025-08-08 19:38:25 +02:00
Sleeper85 1506b02943 Merge pull request #77 from Fahmula
Prevent stale data on BMS disconnect
2025-08-08 19:33:38 +02:00
Sebastian e43bb74e52 Fix balance trigger voltage for Basen and Deye 2025-08-08 18:11:52 +02:00
Sebastian 2b9f92a5eb BMS Modbus client: Return 0 when not online
If main node comes up but the BMS Modbus server is not available, it may use invalid values (for example 65535 % SoC).
Add a check if Modbus server is online.
2025-08-07 22:04:20 +02:00
Fahmula a3ea2a2189 chore(yambms_rs485_pylon.yaml): Update version to 1.3.1 2025-08-06 22:53:30 +00:00
Fahmula db555b91b1 fix(yambms_rs485_pylon.yaml): Ensure inverter status updates when offline
Moves the update logic for the inverter_com_status sensor outside of the
conditional BMS check.

This ensures the status display is always kept in sync with the component's
state, even after the BMS has disconnected.
2025-08-06 22:51:12 +00:00
Fahmula b2dbaa3f4d fix(yambms_rs485_pylon.yaml): Prevent stale data on BMS disconnect
Previously, the data-forwarding logic would only execute if a BMS was
connected. When the BMS disconnected, the logic would halt, leaving
the proxy sensors with their last known values. This caused stale data
to be sent to the inverter.

This change refactors the YAML logic to explicitly handle the BMS
offline state.

When a BMS is no longer available, all numeric proxy sensors are now
invalidated by publishing `NAN`, and all binary alarm/protection
sensors are reset to `false`. This ensures the C++ component receives
a clear signal that the data is no longer valid, allowing its
fail-safe mechanisms to engage and stop communication.

This fix improves overall system robustness by preventing stale state
and ensuring a predictable response to a BMS disconnect.
2025-08-05 23:31:53 +00:00
Sleeper85 27c94803c9 Make itf canbus more configurable 2025-08-03 02:10:18 +02:00
Sleeper85 f2bcf8644b Merge branch 'main' of https://github.com/Sleeper85/esphome-yambms 2025-08-02 22:36:07 +02:00
Sleeper85 7d9c31e3e0 Updated YamBMS 1.5.8 changelog - PR #74 2025-08-02 22:35:55 +02:00
Sleeper85 f4b54c4acd Merge PR #74 from Fahmula
RS485 link status, Heartbeat and Requested Force Charge.

Successfully tested with Deye and Battery Lithium `12`.
2025-08-02 22:32:17 +02:00
fahmula e228d14d76 chore: Update version to 1.3.0 in YAML file 2025-08-02 16:07:56 -04:00
fahmula ea62827a93 feat: Add requested_force_charge to Pylontech RS485
Introduces a new configuration option requested_force_charge to the
Pylontech RS485 integration, allowing for external control of the
force charge request.
2025-08-02 15:56:06 -04:00
fahmula 76cab805a7 chore: Update version and date in YAML file to reflect latest changes 2025-08-02 13:22:38 -04:00
fahmula 36199a6ecb refactor: Update sensor IDs to use dynamic rs485_id for improved configuration 2025-08-02 13:22:38 -04:00
fahmula 31e138bf0d feat: Add inverter communication status sensor
Implement a new binary sensor to monitor the inverter communication status.
This sensor's state is dependent on the `rs485_switch_inverter_heartbeat_monitoring`
switch, only reporting the actual inverter communication status when
heartbeat monitoring is enabled.
2025-08-02 13:22:38 -04:00
fahmula 7909210390 fix: Remove redundant inverter communication status sensor 2025-08-02 13:22:38 -04:00
fahmula 3314d57a7d fix: Improve inverter communication status accuracy
Refactor inverter heartbeat and communication status handling to be
managed directly by the `pylontech_rs485` component. This provides a
more reliable and accurate indication of the inverter's communication
state, ensuring the true status is reflected.
2025-08-02 13:22:38 -04:00
fahmula 4b05008e78 Add some comments 2025-08-02 13:22:38 -04:00
fahmula 444c2fbf33 fix(rs485): hardcode inverter online timeout to 5s to avoid substitution errors 2025-08-02 13:22:38 -04:00
fahmula 941fcbf9f2 feat(rs485): add inverter heartbeat monitoring logic with status sensor 2025-08-02 13:22:38 -04:00
Sleeper85 03e91d2ed8 Create bms_modbus_JBD_BLE_full.yaml 2025-08-02 11:02:55 +02:00
Sleeper85 5ddf954d0f Updated YamBMS multi-node modbus YAMLs 2025-08-02 11:02:28 +02:00
Sleeper85 0829fc64b9 Update MCU_default_GPIOs.png 2025-07-31 20:54:55 +02:00
Sleeper85 0012b9ad78 Updated XIAO board name 2025-07-31 20:45:23 +02:00
Sleeper85 f6f564de01 MCU default GPIOs 2025-07-31 20:44:53 +02:00
Sleeper85 96eb7b5b7d Merge pull request #75 from GHswitt/PR_Round_CCL
Round auto_ccl/auto_dcl value
2025-07-30 21:41:10 +02:00
Sebastian e5491609b8 Round auto_ccl/auto_dcl value
Requested charge current had 0,1A steps before with Auto CCL/DCL enabled,
round to nearest full integral value.
2025-07-30 20:12:15 +02:00
Sleeper85 200e90461e YamBMS 1.5.8 - Ethernet board 2025-07-30 15:57:36 +02:00
Sleeper85 ee003598cd Improved JK-PB SoC 100% reset readme 2025-07-30 12:34:22 +02:00
Sleeper85 2d0a602e70 Improved Auto functions readme 2025-07-30 12:08:28 +02:00
Sleeper85 4c89aeef61 Dashboards 1.5.8 compatible with CANBUS / RS485 inverter communication protocol 2025-07-30 11:32:09 +02:00
Sleeper85 2a661fc667 Dashboard 1.5.8 - Fixed DEBUG title 2025-07-30 09:35:41 +02:00
Sleeper85 9c7c22444b Updated JK-PB doc about SoC 100% reset 2025-07-30 09:15:49 +02:00
Sleeper85 f4e9811805 YamBMS 1.5.8 - New YamBMS LP and RP documentation 2025-07-29 17:02:29 +02:00
Sleeper85 58a83bef64 YamBMS 1.5.8 - Demo Shunt + BMS 2025-07-28 20:34:30 +02:00
Sleeper85 2fdfd7aa91 YamBMS 1.5.8 - demo hostname 2025-07-28 20:22:46 +02:00
Sleeper85 7584426532 Example URL to the single-node folder 2025-07-28 18:22:37 +02:00
Sleeper85 48ffc4f15a Updated TIP message 2025-07-28 18:18:55 +02:00
Sleeper85 c55a17d306 Updated multi-node YAML examples 2025-07-28 18:02:44 +02:00
Sleeper85 e45184cc27 YamBMS 1.5.8 - reorganized YAML 2025-07-28 17:44:18 +02:00
Sleeper85 e44fc40eb5 Create board_options_itf_wk2168_spi.yaml 2025-07-28 17:41:44 +02:00
Sleeper85 c5c7540c85 Create board_options_itf_wk2168_i2c.yaml 2025-07-28 17:41:41 +02:00
Sleeper85 19f8c0b4f7 Added GPIOs substitutions 2025-07-28 17:41:33 +02:00
Sleeper85 25b286c4e8 New YAML regarding PSRAM 2025-07-28 17:40:25 +02:00
Sleeper85 8dc572cdba Updated PVbrain2 YAML 2025-07-28 17:34:18 +02:00
Sleeper85 964462ab5f Added new LP and RP example YAMLs 2025-07-28 17:32:50 +02:00
Sleeper85 cd7cb4c246 Remove configurations_examples folder 2025-07-28 17:30:59 +02:00
Sleeper85 c755dcce83 Create RP_BMS_example_DEMO_Shunt_and_BMS.yaml 2025-07-26 16:44:12 +02:00
Sleeper85 aa523ec148 Fixed online status for BMS SEPLOS V1 V2 2025-07-25 19:23:27 +02:00
Sleeper85 9d3996a4ea Update YamBMS 1.5.8 changelog 2025-07-25 09:38:19 +02:00
Sleeper85 73a43ea036 Added BMS SEPLOS V3 2025-07-24 22:30:11 +02:00
Sleeper85 ca43d7a310 Update README 2025-07-24 21:18:54 +02:00
Sleeper85 ed4dc7f522 Update JK-PB doc - 120 Ohm bus resistor and SoC 100% reset 2025-07-24 21:00:00 +02:00
Sleeper85 a3fa519f41 YamBMS DEMO fixed hostname 2025-07-24 20:17:37 +02:00
Sleeper85 e3ef26056e Davicom DM9051 SPI Ethernet Controller integrated in esphome 2025.7 2025-07-24 20:15:06 +02:00
Sleeper85 3cb9e1d60c JK RS485 dev component 2025-07-23 23:33:36 +02:00
Sleeper85 e93b68699d Dashboards 1.5.8 2025-07-14 00:00:19 +02:00
Sleeper85 c25d3eed21 YamBMS 1.5.8 2025-07-13 23:59:41 +02:00
Sleeper85 f2e6b57e75 YamBMS 1.5.8 - PR #72 from Fahmula/yambms-rs485
Added Pylontech RS485 inverter protocol
2025-07-13 23:42:25 +02:00
Sleeper85 2f1a82c3ad YamBMS 1.5.8 - PR #67 from GHswitt/PR/MaxCharge
Add options to restrict max. charge and discharge current.
2025-07-13 23:39:00 +02:00
Sleeper85 5da5cce67c YamBMS 1.5.7 updated changelog 2025-07-13 23:35:43 +02:00
Sebastian 77f657415a Add options to restrict max. charge and discharge current
This adds 'yambms_max_inverter_charge_current' and 'yambms_max_inverter_discharge_current' substitutions. They are used to restrict the range of the charge/discharge current for easier control when the battery currents are much higher than the inverter currents.
2025-07-12 21:00:14 +02:00
Fahmula 1597d99fcc refactor: Refactor RS485 Pylontech integration
Delete generic `board_options_itf_esp32_rs485.yaml` and replace its
usage with `board_options_itf_uart_4.yaml` in the main configuration.
Rename `yambms_rs485.yaml` to `yambms_rs485_pylon.yaml` to better
reflect its specific use for Pylontech. Update the `rs485` package
reference to `rs485_pylon` and introduce new variables
(`rs485_name`, `rs485_uart_id`, `rs485_uart_baud_rate`) for more
explicit configuration. Modify `yambms_rs485_pylon.yaml` to extend
the UART configuration and use the new `rs485_uart_id` for the
Pylontech component. This improves clarity and modularity.
2025-07-12 07:51:46 -04:00
Fahmula c3a80b9f8c feat: Add Pylontech RS485 inverter protocol
This commit introduces a new output driver for YamBMS, enabling communication with inverters that use the Pylontech RS485 protocol. This provides a robust alternative to the existing CANbus interface.

The implementation is architecturally identical to the proven CANbus pattern.

Key changes include:

*   **New Core Logic Package:** [`packages/yambms/yambms_rs485.yaml`](packages/yambms/yambms_rs485.yaml) contains the interval engine, proxy sensor definitions, and links core YamBMS data to the `esphome-pylontech-rs485` external component.

*   **New Reusable Board Option:** [`packages/board/board_options_itf_esp32_rs485.yaml`](packages/board/board_options_itf_esp32_rs485.yaml) defines a standard 9600 baud UART interface for connecting to the inverter.

*   **New Example Configuration:** [`YamBMS_RP_JK-BLE_to_Pylontech-RS485.yaml`](YamBMS_RP_JK-BLE_to_Pylontech-RS485.yaml) demonstrates a complete, working setup using the new packages.
2025-07-12 07:24:45 -04:00
Sleeper85 17b7500f0c YamBMS 1.5.7 updated changelog 2025-07-11 14:33:48 +02:00
Sleeper85 b9632e0eb5 Dashboards 1.5.7 - Replaced % with percent in entity names 2025-07-11 14:33:01 +02:00
Sleeper85 53d8a189b2 Replaced % with percent in entity names. 2025-07-11 14:31:24 +02:00
Sleeper85 53e754c753 FAKE Shunt 1.1.3 2025-07-11 14:28:15 +02:00
Sleeper85 5ba0a5cf26 Dashboards 1.5.7 - Max/Min cell voltage in color using macro 2025-07-10 14:46:07 +02:00
Sleeper85 34fda6c92a YamBMS 1.5.7 - Removed special characters in entity name 2025-07-10 13:13:02 +02:00
Sleeper85 5ffffb74b6 Merge pull request #71
Considerably shortens the file by 3x16 repetitions of same code to 3x2 repeats of same macro definition. If only there was a central key/tag to store macros in yaml, we only need to store the macro one time instead of six!

Things tested working on my end:
- configurable high and low cell voltage colours
- adjustable voltage spacing number
2025-07-10 10:15:45 +02:00
Shivam Maurya ef90c2de0d Update YamBMS_HA_Dashboards
DO NOT merge before Copy paste and testing the YAML works in HA dashboard editor.

Considerably shortens the file by 3x16 repetitions of same code to 3x2 repeats of same macro definition.
If only there was a central key/tag to store macros in yaml, we only need to store the macro one time instead of six!
2025-07-09 23:32:49 +05:30
Sleeper85 cdc86cc298 Added max requested charge/discharge current substitutions 2025-07-09 16:53:23 +02:00
Sleeper85 c18b9c8d55 YamBMS 1.5.7 - Added yambms_version substitution 2025-07-09 16:26:38 +02:00
Sleeper85 62b5844ec2 Delete yambms_custom.yaml 2025-07-09 16:25:04 +02:00
Sleeper85 4c6dba8add Dashboards 1.5.7 - Max/Min cell voltage in color with HA 2025.7 compatibility 2025-07-08 16:58:32 +02:00
Sleeper85 da0acaa3c5 Merge PR#70
Dashboards 1.5.7 - With rounded values and max/min cell voltage in color compatible HA `2025.7`
2025-07-08 14:10:32 +02:00
Sleeper85 2fa5b4d4f3 Dashboards 1.5.7 - With max/min cell voltage in color compatible HA 2025.7 2025-07-08 14:07:33 +02:00
Sleeper85 b143d9bd60 Dashboards 1.5.7 compatible HA core 2025.7 2025-07-08 13:37:57 +02:00
Shivam Maurya 1bacb100d1 Update YamBMS_HA_Dashboard_JK_UART-GPS_BLE_3xBMS.yaml
Copy paste and test  the YAML in HA dashboard editor before merging.

Add , rounded=True
and optimized cell voltage display formatting to ensure high/low cell indication works with newest HA 2025.7.1.
2025-07-08 13:15:53 +05:30
Sleeper85 d0e42a27a4 Create bms_options_auto_balance_switch.yaml 2025-07-07 20:53:18 +02:00
Sleeper85 965ad74127 Added JK balance switch ID 2025-07-07 20:28:06 +02:00
Sleeper85 85e3c90043 FAKE BMS charging and discharging power 2025-06-28 12:34:57 +02:00
Sleeper85 32b2dfc450 Merge branch 'main' of https://github.com/Sleeper85/esphome-yambms 2025-06-26 14:28:08 +02:00
Sleeper85 348f7f2e0c YamBMS 1.5.7 - Improved comments regarding entity id and display name 2025-06-26 14:28:03 +02:00
Sleeper85 a6e4f24df5 Update YamBMS_functions.md 2025-06-23 13:11:09 +02:00
Sleeper85 02dec09cfd Update YamBMS 1.5.7 changelog 2025-06-22 18:01:42 +02:00
Sleeper85 750cfd11a5 YamBMS 1.5.7 - Fixed: change Charge Status to Bulk when Force Charge is requested 2025-06-22 16:54:44 +02:00
Sleeper85 b5c05bf350 Update YamBMS 1.5.7 changelog 2025-06-22 14:32:32 +02:00
Sleeper85 b3333e4949 Defining state_class for all YamBMS sensors 2025-06-22 14:05:26 +02:00
Sleeper85 c00aa954f5 esphome min_version changed to 2025.6.0 2025-06-22 14:04:16 +02:00
Sleeper85 a0cfea8b5d YamBMS 1.5.7 2025-06-19 22:12:34 +02:00
Sleeper85 345181c185 YamBMS 1.5.7 - Auto Float function 2025-06-19 22:11:27 +02:00
Sleeper85 7c97912913 Dashboards 1.5.7 2025-06-19 22:08:45 +02:00
Sleeper85 06d2b0fda0 YamBMS 1.5.6 changelog update 2025-06-19 21:49:16 +02:00
Sleeper85 74e36b5a4f YamBMS 1.5.6 - RP20450 RPi Pico Shunts Modbus Server 2025-06-19 08:42:12 +02:00
Sleeper85 fa0f1960cc Merge pull request #51 from GHswitt/PR_RP2040_Shunts
Support for RP2040
2025-06-19 02:46:00 +02:00
Sebastian e6e31c165c Add RP2040 example as Modbus server node for five Victron shunts 2025-06-18 23:20:09 +02:00
Sebastian b7c3eddee4 Add RP2040 support 2025-06-18 23:19:57 +02:00
Sleeper85 92ce28c041 New shunt_base_minimal.yaml for SmartShunt UART minimal version 2025-06-18 08:57:48 +02:00
Sleeper85 9d9769a205 YamBMS 1.5.6 - BASEN RS485 2025-06-17 20:52:24 +02:00
Sleeper85 60c875df23 BMS BASEN RS485 1.1.2 2025-06-17 20:50:28 +02:00
Sleeper85 a10e0085d8 Delete YamBMS_LP_BASEN-RS485.yaml 2025-06-17 20:49:49 +02:00
Sleeper85 d487b756bf Merge pull request #56 from GHswitt/PR_BasengreenBMS
Add support for Basengreen BMS
2025-06-17 20:22:09 +02:00
Sleeper85 9b4596bc43 BMS SEPLOS V1 V2 - Remove bms_combine.yaml 2025-06-17 01:20:49 +02:00
Sleeper85 7a447450cc Improved YamBMS template sensors ( device_class / state_class ) 2025-06-17 00:56:01 +02:00
Sleeper85 0ecc1df3e0 BMS JBD - Fixed issue #65 and added YAML examples 2025-06-16 19:54:50 +02:00
Sleeper85 e9fee50967 BMS EPLOS V1 V2 - splitting the combine YAML to sensors and adding an example YAML 2025-06-16 19:50:10 +02:00
Sleeper85 39543e8b9f Restore shunt_sensors_Junctek_KHF_UART.yaml 1.1.4 2025-06-15 13:10:33 +02:00
Sebastian 88c64f6ba4 Add example for Basengreen BMS 2025-06-15 12:55:19 +02:00
Sebastian 27649631fb Add support for Basengreen BMS
This add support for Basengreen BMS connected via RS485.
See https://github.com/GHswitt/esphome-basen
2025-06-15 12:55:16 +02:00
Sleeper85 e5fc628957 Fixing unit_of_measurement and state_class (bms_base.yaml) 2025-06-15 11:20:24 +02:00
Sleeper85 e6896837de Update README.md 2025-06-14 10:27:16 +02:00
Sleeper85 a353a63ade Update LilyGo T-Connect Pro 2025-06-14 10:18:26 +02:00
Sleeper85 9c5a87fbe7 YamBMS 1.5.6 - Adding LilyGo T-Connect Pro 2025-06-14 10:17:52 +02:00
Sleeper85 9ccbeb6b94 Merge pull request #44 from GHswitt/T-Connect-Pro
Add support for LilyGo T-Connect Pro
2025-06-14 09:51:37 +02:00
Sebastian 1d3a195d9a Add support for LilyGo T-Connect Pro
Add board configuration for https://lilygo.cc/products/t-connect-pro
See also: https://github.com/Xinyuan-LilyGO/T-Connect-Pro/tree/main

Display is disabled by default as updating it is slow and increases
the loop time to >100ms.
2025-06-13 22:00:31 +02:00
Sleeper85 d9cddd2461 Dashboard 1.5.6 - Fixed SoH 2025-06-13 10:12:49 +02:00
Sleeper85 3f50bc224b YamBMS 1.5.6 changelog
n
2025-06-12 23:29:09 +02:00
Sleeper85 777aa40339 Dashboards 1.5.6 2025-06-12 23:11:58 +02:00
Sleeper85 37e65b3036 Merge branch 'main' of https://github.com/Sleeper85/esphome-yambms 2025-06-12 21:51:19 +02:00
Sleeper85 660ff99b5c YamBMS 1.5.6 2025-06-12 21:51:06 +02:00
Sleeper85 214568c6ff Board 1.5.6 2025-06-12 20:51:18 +02:00
Sleeper85 665c25619c Fake charging cycles not internal 2025-06-12 20:49:38 +02:00
Sleeper85 7547ddb780 Max cycles offset to 3000 2025-06-12 20:48:06 +02:00
Sleeper85 6c4e710f45 Base 1.5.6 2025-06-12 20:46:27 +02:00
Sleeper85 a14452eb8e Create MCU_ESP32-S3_YBoard.png 2025-06-12 20:45:01 +02:00
Sleeper85 60291dee68 Merge pull request #61 from GHswitt/PR_Modbus0
Set Modbus BMS values to 0 when BMS goes offline
2025-06-12 20:41:48 +02:00
Sebastian 4a2f6aace1 Set Modbus BMS values to 0 when BMS goes offline 2025-06-12 20:23:10 +02:00
Sleeper85 dec2f7e4f8 Merge pull request #62 from GHswitt/PR_Modbus_Charging_Cycles
Modbus client: Make charging cycles available again
2025-06-12 07:51:06 +02:00
Sebastian 4a8f60817d Modbus client: Make charging cycles available again 2025-06-11 23:22:52 +02:00
Sleeper85 d727463717 Updating Charging Cycles Offset function 2025-06-11 16:58:48 +02:00
Sleeper85 d7ed15c557 Requirements ESPHome 2025.5.0 2025-06-10 21:59:39 +02:00
Sleeper85 1bc7bdfd67 Merge pull request #60 from k2dp2k/main - YamBMS 1.5.6
* Compatibility with `esphome 2025.5.0`
  * Fixed [issue #55](https://github.com/Sleeper85/esphome-yambms/issues/55)
  * Added [feature #32](https://github.com/Sleeper85/esphome-yambms/issues/35) 
  * Added [feature #32](https://github.com/Sleeper85/esphome-yambms/issues/35)
  * New `board_ESP32-S3_YBoard_DJK.yaml` board
2025-06-10 21:57:31 +02:00
Sleeper85 5159e75d62 Update YamBMS 1.5.6 changelog 2025-06-10 21:54:26 +02:00
Sleeper85 8afc7d1eb4 YamBMS 1.5.6 changelog 2025-06-10 21:50:55 +02:00
Sleeper85 ee919ad1f0 Update yambms_canbus.yaml version 2025-06-10 21:45:21 +02:00
Sleeper85 95e0b240ca Update bms_sensors_DEYE_CAN_module_full.yaml version 2025-06-10 21:42:05 +02:00
Sleeper85 a4ccbde14a Update bms_charging_cycles_base.yaml version 2025-06-10 21:40:05 +02:00
Sleeper85 297eb96363 Update bms_battery_soh.yaml version 2025-06-10 21:38:36 +02:00
Sleeper85 82fbdd29f2 Update and rename YamBMS_RP_YBoard_JK-PB_RS485_Modbus_BLE_Shunt.yaml to YamBMS_LP_YBoard_JK-PB_RS485_Modbus.yaml 2025-06-10 21:36:08 +02:00
Sleeper85 0b9eb99e33 Delete .github/workflows/yamllint.yml 2025-06-10 21:31:13 +02:00
Sleeper85 b312d3eb3e Update yambms_config.yaml version 2025-06-10 21:30:03 +02:00
Sleeper85 3209ec910b Update device_base.yaml version 2025-06-10 21:28:58 +02:00
Sleeper85 9da27a5a8b Update yambms_auto_dcl.yaml version 2025-06-10 21:27:54 +02:00
Sleeper85 31260f3ace Update yambms_auto_cvl.yaml version 2025-06-10 21:27:21 +02:00
Sleeper85 0c731d52fc Update yambms_auto_cvl.yaml version 2025-06-10 21:26:21 +02:00
Sleeper85 afec9413dd Update yambms_auto_ccl.yaml version 2025-06-10 21:25:40 +02:00
Sleeper85 a2da3ac19c Update shunt_sensors_Junctek_KHF_UART.yaml version 2025-06-10 21:24:38 +02:00
Sleeper85 afc259c62c Update board_options_rgb_led_status.yaml version 2025-06-10 21:23:39 +02:00
Sleeper85 c2943bac36 Update board_options_cpu_freq_240_esp32.yaml version 2025-06-10 21:22:55 +02:00
Sleeper85 76ed9e0d48 Update board_options_cpu_freq_240_esp32-s3.yaml version 2025-06-10 21:22:28 +02:00
Sleeper85 f3e35028b8 Update board_ESP32_DevKitC_espBerry_2-CH-CAN.yaml version 2025-06-10 21:20:51 +02:00
Sleeper85 e1dd4202ae Update board_ESP32-S3_YBoard_DJK.yaml version 2025-06-10 21:20:20 +02:00
Sleeper85 1ea2e7d66f Update board_ESP32-S3_Touch-LCD-7.yaml version 2025-06-10 21:19:29 +02:00
Sleeper85 15179db113 Update board_ESP32-S3_Touch-LCD-4.3.yaml version 2025-06-10 21:19:01 +02:00
Sleeper85 83e74563b6 Update board_ESP32-S3_AtomS3_ili9xxx.yaml version 2025-06-10 21:18:26 +02:00
Sleeper85 f858597a2b Update board_ESP32-S3_AtomS3_WOD.yaml version 2025-06-10 21:17:57 +02:00
Sleeper85 5c20e87f50 Update board_ESP32-S3_AtomS3R.yaml version 2025-06-10 21:17:23 +02:00
Sleeper85 a67202a70f Update board_ESP32-S3_AtomS3.yaml version 2025-06-10 21:16:43 +02:00
Sleeper85 bdd8e234d9 Update bms_temperature_sensor_6.yaml version 2025-06-10 21:15:58 +02:00
Sleeper85 6d56f796a1 Update bms_temperature_sensor_5.yaml version 2025-06-10 21:15:28 +02:00
Sleeper85 76f6046961 Update bms_temperature_sensor_4.yaml version 2025-06-10 21:14:17 +02:00
Sleeper85 7c7097fa0b Update bms_temperature_sensor_2.yaml version 2025-06-10 21:13:32 +02:00
Sleeper85 86f39195e8 Update bms_sensors_JK_UART_4G-GPS_full.yaml version 2025-06-10 21:12:47 +02:00
Sleeper85 42973d9c9d Update bms_sensors_JK_RS485_Modbus_bms_standard.yaml version 2025-06-10 21:12:16 +02:00
Sleeper85 592274bc59 Update bms_sensors_JK_RS485_Modbus_bms_full.yaml version 2025-06-10 21:11:41 +02:00
Sleeper85 ab04cc92db Update bms_sensors_JK_RS485_Modbus_JK-B_standard.yaml version 2025-06-10 21:11:05 +02:00
Sleeper85 33056b2437 Update bms_sensors_JK_BLE_standard.yaml version 2025-06-10 21:10:09 +02:00
Sleeper85 c1597bd502 Update bms_sensors_JBD_UART_full.yaml version 2025-06-10 21:09:23 +02:00
Sleeper85 d65226a1f9 Update bms_sensors_JBD_BLE_full.yaml version 2025-06-10 21:08:28 +02:00
Sleeper85 558f1bfa47 Update bms_sensors_FAKE.yaml version 2025-06-10 21:07:39 +02:00
Sleeper85 1d71cf895e Update bms_sensors_DEYE_CAN_top_minimal.yaml version 2025-06-10 21:06:05 +02:00
Sleeper85 506e019d6f Update bms_sensors_DEYE_CAN_top_full.yaml 2025-06-10 21:05:22 +02:00
Sleeper85 2284b7db51 Update bms_sensors_DEYE_CAN_module_minimal.yaml version 2025-06-10 21:04:31 +02:00
Sleeper85 cf874f0a0f Update bms_errors_bitmask_JK_UART_4G-GPS.yaml version 2025-06-10 21:03:36 +02:00
Sleeper85 e76a7b4695 Update bms_errors_bitmask_JK_RS485_Modbus.yaml version 2025-06-10 21:02:33 +02:00
Sleeper85 844a74887e Update bms_errors_bitmask_JK_BLE.yaml version 2025-06-10 21:02:04 +02:00
Sleeper85 623c66839a Update bms_errors_bitmask_JBD.yaml version 2025-06-10 21:01:14 +02:00
Sleeper85 726fafd79f Update bms_errors_bitmask_DEYE_CAN.yaml version 2025-06-10 21:00:39 +02:00
Sleeper85 e60f802a68 Update bms_combine_modbus_client.yaml version 2025-06-10 21:00:17 +02:00
Sleeper85 60ed5c132c Update bms_combine_SEPLOS_V1_V2_RS485_bms_full.yaml version 2025-06-10 20:59:43 +02:00
Sleeper85 cd9bd987df Update bms_combine_JK_UART_4G-GPS_minimal.yaml version 2025-06-10 20:59:07 +02:00
Sleeper85 f7a39d6b55 Update bms_combine_JK_RS485_Modbus_sniffer_talk_pin.yaml version 2025-06-10 20:57:22 +02:00
Sleeper85 cea0d98e62 Update bms_combine_JK_RS485_Modbus_sniffer.yaml version 2025-06-10 20:56:41 +02:00
Sleeper85 ada25f475b Update bms_combine_JK_RS485_Modbus_bms_minimal.yaml version 2025-06-10 20:55:49 +02:00
Sleeper85 d0f252265e Update bms_combine_JK_RS485_DISPLAY_full.yaml version 2025-06-10 20:55:15 +02:00
Sleeper85 308ec5f032 Update bms_combine_JK_BLE_V14_full.yaml version 2025-06-10 20:54:14 +02:00
Sleeper85 e9d1239c01 Update bms_combine_DEYE_CAN_module_minimal.yaml version 2025-06-10 20:52:57 +02:00
Sleeper85 58c6429d9c Update bms_combine_DEYE_CAN_module_full.yaml version 2025-06-10 20:51:45 +02:00
Sleeper85 9c747934a4 Update bms_combine_JK_BLE_full.yaml version 2025-06-10 20:50:58 +02:00
Sleeper85 58c50ffe8b Update bms_combine_JK_BLE_minimal.yaml version 2025-06-10 20:48:55 +02:00
k2dp2k 43d70f647f Update YamBMS_RP_YBoard_JK-PB_RS485_Modbus_BLE_Shunt.yaml 2025-06-10 20:30:53 +02:00
k2dp2k 30d428c4fc Rename yam-board.yaml to YamBMS_RP_YBoard_JK-PB_RS485_Modbus_BLE_Shunt.yaml 2025-06-10 20:29:49 +02:00
k2dp2k b4887912af Merge pull request #11 from k2dp2k/codex/zustandsklasse-für-yambms-wiederherstellen
Fix state_class for BMS charging cycle sensor
2025-06-10 20:26:16 +02:00
k2dp2k c9b12fbe87 Set charging cycle sensor state_class to total 2025-06-10 20:25:31 +02:00
k2dp2k 060e44c07d Update device_base.yaml 2025-06-10 20:24:57 +02:00
k2dp2k c3b5f5f88a Update board_options_cpu_freq_240_esp32.yaml 2025-06-10 20:24:05 +02:00
k2dp2k 0272cea3ca Update board_options_cpu_freq_240_esp32-s3.yaml 2025-06-10 20:23:43 +02:00
k2dp2k 64e4c7f0e0 Update device_base.yaml 2025-06-10 20:22:34 +02:00
k2dp2k 7a1d68a3f3 Update device_base.yaml 2025-06-10 20:21:34 +02:00
k2dp2k 1939298992 Merge pull request #10 from k2dp2k/codex/header-in-geänderte-dateien-aktualisieren
Update headers after recent changes
2025-06-10 20:17:26 +02:00
k2dp2k 71a7643ca2 chore: update headers for recent changes 2025-06-10 20:16:56 +02:00
k2dp2k 2a26d7822d Update YamBMS_HA_Dashboard_JK_RS485_3xBMS.yaml 2025-06-08 23:41:10 +02:00
k2dp2k 492c81b9a3 Update YamBMS_HA_Dashboard_JK_RS485_3xBMS.yaml 2025-06-08 23:27:22 +02:00
k2dp2k 45c9cd2efc Merge pull request #9 from k2dp2k/codex/begrenze-charging-cycles-auf-200-und-update-cycle-capacity
Fix cycle capacity calculation
2025-06-08 23:09:20 +02:00
k2dp2k 124688e83f Limit cycle base and improve cycle capacity 2025-06-08 23:09:04 +02:00
k2dp2k 309b43b565 Merge pull request #8 from k2dp2k/codex/füge-manuelle-anpassung-des-cyclecounts-hinzu
Add manual cycle count adjustment
2025-06-08 22:45:56 +02:00
k2dp2k 7a78cf5672 Add adjustable cycle capacity 2025-06-08 22:45:08 +02:00
k2dp2k a11f2b75c8 Add adjustable charging cycles 2025-06-08 22:36:01 +02:00
k2dp2k c83d93874b Merge pull request #7 from k2dp2k/codex/restlaufzeit-zähler-hinzufügen
Add remaining time sensor
2025-06-08 22:30:22 +02:00
k2dp2k c426efa321 Add template sensor for remaining time 2025-06-08 22:30:10 +02:00
k2dp2k 0cabeeced8 Add remaining time sensor for Junctek shunt 2025-06-08 22:22:23 +02:00
k2dp2k 75e2ac8155 Merge pull request #6 from k2dp2k/codex/code-optimieren-im-verzeichnis-packages
Optimize display update timing
2025-06-08 22:11:23 +02:00
k2dp2k 7ca041c8c6 Improve display refresh rate 2025-06-08 22:10:58 +02:00
k2dp2k 0834b934d7 Merge pull request #5 from k2dp2k/codex/probleme-mit-yamllint-beheben
Fix yamllint issues
2025-06-08 22:05:07 +02:00
k2dp2k 679baa2068 chore: remove trailing whitespace for yamllint 2025-06-08 22:04:16 +02:00
k2dp2k 197ecd0957 Update yam-board.yaml 2025-06-08 22:01:06 +02:00
k2dp2k 37d2b3b320 Merge pull request #4 from k2dp2k/codex/datei-umbenennen-in-board_esp32-s3_yboard_djk.yaml
Rename board file
2025-06-08 21:58:36 +02:00
k2dp2k ce351bf7e8 Rename board_YamBoard_Deye_JK.yaml to board_ESP32-S3_YBoard_DJK.yaml 2025-06-08 21:58:10 +02:00
k2dp2k 2f53ed1eb2 meine configfile 2025-06-08 21:57:40 +02:00
k2dp2k 9e9024225d Merge pull request #3 from k2dp2k/codex/finde-probleme-und-mache-vorschläge
Fix docs typo and update DEYE CAN sensors
2025-06-08 21:52:45 +02:00
k2dp2k a74a69a740 Fix typo and DEYE CAN module calculation 2025-06-08 21:52:02 +02:00
k2dp2k 358a87ca2f Merge pull request #2 from k2dp2k/codex/fix-deprecation-warnings-in-esphome-configuration
Update to new ESPHome schema
2025-06-08 21:33:01 +02:00
k2dp2k 2139aee6d8 Update for ESPHome 2025.5 2025-06-08 21:32:49 +02:00
k2dp2k f0b79ad78c Merge pull request #1 from k2dp2k/codex/fehler-in-codebasis-suchen-und-beheben
Fix typo in modbus baud rate comments
2025-06-08 21:27:56 +02:00
k2dp2k a5ae54f8ad Fix Modbus baud rate comments and nominal voltage variable 2025-06-08 21:27:20 +02:00
k2dp2k 933003c4a9 Add files via upload 2025-06-08 21:19:12 +02:00
372 changed files with 41991 additions and 14160 deletions

No files matched your search

File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -1,5 +1,5 @@
# Updated : 2025.05.13
# Version : 1.5.5
# Updated : 2026.06.17
# Version : 1.7.0
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -24,9 +24,11 @@ views:
sections:
- type: grid
cards:
- type: heading
heading: YamBMS - Battery
- graph: line
type: sensor
entity: sensor.yambms_yambms_1_total_voltage
entity: sensor.yambms_1_total_voltage
detail: 2
layout_options:
grid_columns: 2
@@ -35,12 +37,12 @@ views:
hours_to_show: 8
- graph: line
type: sensor
entity: sensor.yambms_yambms_1_battery_soc
entity: sensor.yambms_1_battery_soc
detail: 2
name: SoC
hours_to_show: 8
- type: gauge
entity: sensor.yambms_yambms_1_current
entity: sensor.yambms_1_current
needle: true
severity:
green: 0
@@ -53,270 +55,451 @@ views:
grid_columns: 2
grid_rows: 3
- type: gauge
entity: sensor.yambms_yambms_1_power
entity: sensor.yambms_1_power
needle: true
severity:
green: 0
yellow: -2500
red: -5000
max: 5000
min: -5000
yellow: -5000
red: -10000
max: 10000
min: -10000
name: Power
layout_options:
grid_columns: 2
grid_rows: 3
- type: tile
entity: sensor.yambms_yambms_1_installed_battery_capacity
entity: sensor.yambms_1_installed_battery_capacity
name: Installed Battery Capacity
- type: tile
entity: sensor.yambms_yambms_1_battery_soh
entity: sensor.yambms_1_battery_soh
name: Battery SoH
- type: tile
entity: sensor.yambms_yambms_1_battery_capacity
entity: sensor.yambms_1_battery_capacity
name: Battery Capacity
- type: tile
entity: sensor.yambms_yambms_1_capacity_remaining
entity: sensor.yambms_1_capacity_remaining
name: Capacity Remaining
- type: tile
entity: sensor.yambms_yambms_1_delta_cell_voltage
entity: sensor.yambms_1_delta_cell_voltage
name: Delta Cell Voltage
- type: tile
entity: binary_sensor.yambms_yambms_1_bms_equalizing_state
entity: binary_sensor.yambms_1_equalizing_state
name: Equalizing state
- type: entities
entities:
- entity: sensor.yambms_yambms_1_max_cell_voltage
- entity: sensor.yambms_1_max_cell_voltage
name: Max Cell V.
- entity: sensor.yambms_yambms_1_max_voltage_cell
- entity: sensor.yambms_1_max_voltage_cell
name: Cell number
layout_options:
grid_columns: 2
grid_rows: 2
- type: entities
entities:
- entity: sensor.yambms_yambms_1_min_cell_voltage
- entity: sensor.yambms_1_min_cell_voltage
name: Min Cell V.
- entity: sensor.yambms_yambms_1_min_voltage_cell
- entity: sensor.yambms_1_min_voltage_cell
name: Cell number
layout_options:
grid_columns: 2
grid_rows: 2
- type: entities
entities:
- entity: sensor.yambms_yambms_1_max_temperature
- entity: sensor.yambms_1_max_temperature
name: Max temp.
- entity: sensor.yambms_yambms_1_max_temperature_sensor
- entity: sensor.yambms_1_max_temperature_sensor
name: Sensor number
layout_options:
grid_columns: 2
grid_rows: 2
- type: entities
entities:
- entity: sensor.yambms_yambms_1_min_temperature
- entity: sensor.yambms_1_min_temperature
name: Min temp.
- entity: sensor.yambms_yambms_1_min_temperature_sensor
- entity: sensor.yambms_1_min_temperature_sensor
name: Sensor number
layout_options:
grid_columns: 2
grid_rows: 2
title: YamBMS - Battery
column_span: 1
- type: grid
cards:
- type: heading
heading: YamBMS - Status
- type: tile
entity: binary_sensor.yambms_canbus_1_status
name: CANBUS Status
entity: binary_sensor.yambms_1_inverter_communication_status
name: Inverter comm. status
- type: tile
entity: binary_sensor.yambms_esp32_online_status
name: ESP32 Status
entity: binary_sensor.yambms_board_online_status
name: Board status
- type: tile
entity: sensor.yambms_yambms_1_charging_status
entity: sensor.yambms_1_charging_status
name: Charging Status
- type: tile
entity: sensor.yambms_yambms_1_last_complete_charge
entity: sensor.yambms_1_last_complete_charge
name: Last Complete Charge
- type: tile
entity: sensor.yambms_yambms_1_charging_instruction
entity: sensor.yambms_1_charging_instruction
name: Charging Instruction
- type: tile
entity: binary_sensor.yambms_yambms_1_discharging_instruction
entity: binary_sensor.yambms_1_discharging_instruction
name: Discharging Instruction
- type: tile
entity: sensor.yambms_yambms_1_alarm
entity: sensor.yambms_1_alarm
name: Alarm
- type: tile
entity: sensor.yambms_yambms_1_warning
entity: sensor.yambms_1_warning
name: Warning
- type: entities
entities:
- entity: sensor.yambms_yambms_1_bms_count
- entity: sensor.yambms_1_bms_count
name: BMS count
- entity: sensor.yambms_yambms_1_bms_combined
- entity: sensor.yambms_1_bms_combined
name: BMS combined
- entity: sensor.yambms_yambms_1_bms_blocking_charge
- entity: sensor.yambms_1_bms_blocking_charge
name: BMS blocking charge
- entity: sensor.yambms_yambms_1_bms_blocking_discharge
- entity: sensor.yambms_1_bms_blocking_discharge
name: BMS blocking discharge
- entity: sensor.yambms_yambms_1_bms_in_alarm
- entity: sensor.yambms_1_bms_in_alarm
name: BMS in alarm
layout_options:
grid_columns: 2
grid_rows: 4
- type: tile
entity: sensor.yambms_esp32_uptime
name: ESP32 Uptime
- type: entities
entities:
- entity: sensor.yambms_yambms_1_shunt_count
- entity: sensor.yambms_1_shunt_count
name: Shunt count
- entity: sensor.yambms_yambms_1_shunt_combined
- entity: sensor.yambms_1_shunt_combined
name: Shunt combined
layout_options:
grid_columns: 2
grid_rows: 3
grid_options:
columns: 6
rows: 4
- type: entities
entities:
- entity: sensor.yambms_yambms_1_requested_charge_voltage
- entity: sensor.yambms_1_requested_charge_voltage
name: Requested Charge Voltage
- entity: sensor.yambms_yambms_1_requested_charge_current
- entity: sensor.yambms_1_requested_charge_current
name: Requested Charge Current
- entity: sensor.yambms_yambms_1_requested_discharge_voltage
- entity: sensor.yambms_1_requested_discharge_voltage
name: Requested Discharge Voltage
- entity: sensor.yambms_yambms_1_requested_discharge_current
- entity: sensor.yambms_1_requested_discharge_current
name: Requested Discharge Current
- entity: binary_sensor.yambms_yambms_1_requested_force_charge
- entity: binary_sensor.yambms_1_requested_force_charge
name: Requested Force Charge
- type: tile
entity: sensor.yambms_yambms_1_running_version
name: Running version
- type: tile
entity: sensor.yambms_yambms_1_last_version
name: Last version
title: YamBMS - Status
column_span: 1
- title: Control
- type: grid
cards:
- type: heading
heading: YamBMS - Overview
heading_style: title
- type: markdown
content: |-
{% set on = '<font color="#4CAF50"><b>ON</b></font>' %}
{% set off = '<font color="#9e9e9e">OFF</font>' %}
<table>
<tr>
<td>CCL Derating Reason</td>
<td>{% set v = states('sensor.yambms_1_ccl_derating_reason') %}{% if v == 'No Derating' %}<font color="#4CAF50">{{ v }}</font>{% else %}<font color="#FFC107">{{ v }}</font>{% endif %} — {{ states('sensor.yambms_1_requested_charge_current')|float|round }} A</td>
</tr>
<tr>
<td>DCL Derating Reason</td>
<td>{% set v = states('sensor.yambms_1_dcl_derating_reason') %}{% if v == 'No Derating' %}<font color="#4CAF50">{{ v }}</font>{% else %}<font color="#FFC107">{{ v }}</font>{% endif %} — {{ states('sensor.yambms_1_requested_discharge_current')|float|round }} A</td>
</tr>
{% if is_state('switch.yambms_1_temperature_based_current_limitation','on') %}
<tr>
<td>Temp. Based Current Limit</td>
<td>{{ on }}</td>
</tr>
{% endif %}
{% if is_state('switch.yambms_1_automatic_charge_voltage','on') %}
<tr>
<td>Automatic Charge Voltage</td>
<td>{{ on }}</td>
</tr>
{% endif %}
{% if is_state('switch.yambms_1_automatic_charge_current','on') %}
<tr>
<td>Automatic Charge Current</td>
<td>{{ on }}</td>
</tr>
{% endif %}
{% if is_state('switch.yambms_1_automatic_discharge_current','on') %}
<tr>
<td>Automatic Discharge Current</td>
<td>{{ on }}</td>
</tr>
{% endif %}
{% if is_state('switch.yambms_1_automatic_eoc_current','on') %}
<tr>
<td>Automatic EOC Current</td>
<td>{% set eoc_status = states('sensor.yambms_1_auto_eoc_status') %}{% set eoc_val %}{{ states('number.yambms_1_auto_eoc_target_hour') | int }}:{{ '%02d' % (states('number.yambms_1_auto_eoc_target_minute') | int) }} — {{ eoc_status }}{% endset %}{% if eoc_status.startswith('Stop:') %}<font color="#FFC107">{{ eoc_val }}</font>{% elif eoc_status.startswith('Run') %}<font color="#4CAF50">{{ eoc_val }}</font>{% else %}{{ eoc_val }}{% endif %}</td>
</tr>
{% endif %}
{% if is_state('switch.yambms_1_automatic_soc_limit','on') %}
<tr>
<td>Automatic SoC Limit</td>
<td>{% set soc_status = states('sensor.yambms_1_auto_soc_limit_status') %}{% if soc_status.startswith('Stop:') %}<font color="#FFC107">{{ states('number.yambms_1_auto_soc_limit') }} % — {{ soc_status }}</font>{% elif soc_status == 'Run' %}<font color="#4CAF50">{{ states('number.yambms_1_auto_soc_limit') }} % — {{ soc_status }}</font>{% else %}{{ states('number.yambms_1_auto_soc_limit') }} % — {{ soc_status }}{% endif %}</td>
</tr>
{% endif %}
{% set rebulk_days = states('number.yambms_1_rebulk_days') | int %}
{% if rebulk_days != 0 %}
<tr>
<td>Rebulk Days</td>
<td>{% set last = strptime(states('sensor.yambms_1_last_complete_charge') | trim, '%H:%M %d %b %Y') %}{% set remaining = (last.date() + timedelta(days=rebulk_days) - now().date()).days %}{{ rebulk_days }} days — {% if remaining < 0 %}<font color="#F44336">{{ remaining | abs }} overdue</font>{% elif remaining == 0 %}<font color="#F44336">{{ remaining }} remaining</font>{% elif remaining <= 2 %}<font color="#FFC107">{{ remaining }} remaining</font>{% else %}<font color="#4CAF50">{{ remaining }} remaining</font>{% endif %}</td>
</tr>
{% endif %}
<tr>
<td>Rebulk SoC</td>
<td>{{ states('number.yambms_1_rebulk_soc')|float|round }} %</td>
</tr>
<tr>
<td>Rebulk Voltage</td>
<td>{{ states('number.yambms_1_rebulk_v')|float|round(2) }} V</td>
</tr>
</table>
- type: heading
heading: YamBMS - Diagnostic
heading_style: title
- type: markdown
content: |2
<table>
<tr>
<td>Uptime</td>
<td>{{ states('sensor.yambms_board_uptime') }}</td>
</tr>
<tr>
<td>Loop Time</td>
<td>{{ states('sensor.yambms_board_debug_loop_time')|float|round }} ms</td>
</tr>
<tr>
<td>Heap Free Memory</td>
<td>{{ states('sensor.yambms_board_debug_heap_free_percent')|float|round }} %</td>
</tr>
<tr>
<td>YamBMS Running version</td>
<td>{{ states('sensor.yambms_1_running_version') }}</td>
</tr>
<tr>
<td>YamBMS Last version</td>
<td>{{ states('sensor.yambms_1_last_version') }}</td>
</tr>
<tr>
<td>ESPHome Version</td>
<td>{{ states('sensor.yambms_board_esphome_version')[:8] }}</td>
</tr>
</table>
- title: Settings
cards:
- type: entity-filter
entities:
- entity: select.yambms_1_canbus_1_yambms_name
name: CANBUS YamBMS name
- entity: select.yambms_1_canbus_1_yambms_protocol
name: CANBUS YamBMS protocol
- entity: select.yambms_1_rs485_1_yambms_protocol
name: RS485 YamBMS protocol
conditions:
- condition: state
state_not: unavailable
card:
title: YamBMS - Inverter Comm. Protocol
- type: entities
entities:
- entity: select.yambms_canbus_1_bms_name
name: CANBUS 1 BMS Name
- entity: select.yambms_canbus_1_protocol
name: CANBUS 1 Protocol
title: YamBMS - CANBUS Protocol
- type: entities
entities:
- entity: switch.yambms_yambms_1_charge_enabled
name: YamBMS 1 Charge enabled
- entity: switch.yambms_yambms_1_discharge_enabled
name: YamBMS 1 Discharge enabled
- entity: binary_sensor.yambms_yambms_1_bms_charging_allowed
name: YamBMS 1 BMS Charging allowed
- entity: binary_sensor.yambms_yambms_1_bms_discharging_allowed
name: YamBMS 1 BMS Discharging allowed
- entity: switch.yambms_1_charge_enabled
name: Charge enabled
- entity: switch.yambms_1_discharge_enabled
name: Discharge enabled
- entity: binary_sensor.yambms_1_charging_allowed
name: Charging allowed
- entity: binary_sensor.yambms_1_discharging_allowed
name: Discharging allowed
title: YamBMS - Charge / Discharge switch
show_header_toggle: false
- type: entities
entities:
- entity: switch.yambms_yambms_1_automatic_charge_voltage
name: Automatic Charge Voltage
- entity: number.yambms_yambms_1_auto_cvl_boost_charge_v
name: Auto CVL Boost Charge V.
title: YamBMS - Auto CVL
- type: entities
entities:
- entity: sensor.yambms_yambms_1_charging_status
- entity: sensor.yambms_1_charging_status
name: Charging Status
- entity: sensor.yambms_yambms_1_charging_instruction
- entity: sensor.yambms_1_charging_instruction
name: Charging Instruction
- entity: switch.yambms_yambms_1_float_charge_enabled
- entity: switch.yambms_1_float_charge_enabled
name: Float charge enabled
- entity: switch.yambms_yambms_1_eoc_timer_enabled
- entity: switch.yambms_1_eoc_timer_enabled
name: EOC timer enabled
- entity: number.yambms_yambms_1_bulk_voltage
- entity: number.yambms_1_bulk_voltage
name: Bulk voltage
- entity: number.yambms_yambms_1_float_voltage
- entity: number.yambms_1_float_voltage
name: Float voltage
- entity: number.yambms_yambms_1_inverter_offset_v
- entity: number.yambms_1_inverter_offset_v
name: Inverter Offset V.
title: YamBMS - Charging Settings
show_header_toggle: false
- type: entities
entities:
- entity: switch.yambms_yambms_1_automatic_charge_current
name: Automatic Charge Current
- entity: switch.yambms_yambms_1_automatic_discharge_current
name: Automatic Discharge Current
title: YamBMS - Auto CCL / DCL
- type: entities
entities:
- entity: number.yambms_yambms_1_rebulk_soc
- entity: number.yambms_1_rebulk_soc
name: Rebulk SoC
- entity: number.yambms_yambms_1_rebulk_v
- entity: number.yambms_1_rebulk_v
name: Rebulk V.
- entity: switch.yambms_yambms_1_force_bulk_top_bal
name: Force Bulk (top bal)
- entity: number.yambms_1_rebulk_days
name: Rebulk Days
- entity: switch.yambms_1_force_bulk
name: Force Bulk
title: YamBMS - ReBulk
- type: entities
entities:
- entity: number.yambms_yambms_1_max_charge_current
name: Max charge current (%)
- entity: number.yambms_yambms_1_max_discharge_current
name: Max discharge current (%)
title: YamBMS - Max current (%)
- entity: number.yambms_1_max_requested_charge_current
name: Max charge current
- entity: number.yambms_1_max_requested_discharge_current
name: Max discharge current
- entity: switch.yambms_1_temperature_based_current_limitation
name: Temperature-based current limitation
- entity: sensor.yambms_1_ccl_derating_reason
name: CCL Derating Reason
- entity: sensor.yambms_1_dcl_derating_reason
name: DCL Derating Reason
title: YamBMS - Max requested current
- type: entities
entities:
- entity: switch.yambms_yambms_1_request_force_charge
- entity: switch.yambms_1_request_force_charge
name: Request force charge
- entity: number.yambms_yambms_1_request_force_charge_start_soc
- entity: number.yambms_1_request_force_charge_start_soc
name: Force charge Start SoC
- entity: number.yambms_yambms_1_request_force_charge_stop_soc
- entity: number.yambms_1_request_force_charge_stop_soc
name: Force charge Stop SoC
- entity: binary_sensor.yambms_yambms_1_requested_force_charge
- entity: binary_sensor.yambms_1_requested_force_charge
name: Requested Force Charge
title: YamBMS - Request force charge
- type: entities
entities:
- entity: sensor.yambms_yambms_1_requested_charge_voltage
- entity: sensor.yambms_1_requested_charge_voltage
name: Requested Charge Voltage
- entity: sensor.yambms_yambms_1_requested_discharge_voltage
- entity: sensor.yambms_1_requested_discharge_voltage
name: Requested Discharge Voltage
- entity: sensor.yambms_yambms_1_requested_charge_current
- entity: sensor.yambms_1_requested_charge_current
name: Requested Charge Current
- entity: sensor.yambms_yambms_1_requested_discharge_current
- entity: sensor.yambms_1_requested_discharge_current
name: Requested Discharge Current
title: YamBMS - Requested Values
- title: Auto Functions
cards:
- type: entities
entities:
- entity: sensor.yambms_yambms_1_last_complete_charge
name: Last Complete Charge
- entity: binary_sensor.yambms_esp32_online_status
name: ESP32 Online Status
- entity: sensor.yambms_esp32_uptime
name: ESP32 Uptime
- entity: sensor.yambms_esp32_esphome_version
name: ESP32 ESPHome version
- entity: button.yambms_esp32_restart
name: ESP32 Restart
title: YamBMS - Diagnostic
- entity: switch.yambms_1_automatic_charge_voltage
name: Automatic Charge Voltage
- entity: number.yambms_1_auto_cvl_boost_charge_v
name: Auto CVL Boost Charge V.
title: YamBMS - Auto CVL
- type: entities
entities:
- entity: binary_sensor.yambms_canbus_1_status
name: CANBUS 1 Status
- entity: switch.yambms_canbus_1_inverter_heartbeat_monitoring
name: CANBUS 1 Inverter Heartbeat Monitoring
- entity: sensor.yambms_canbus_1_inverter_heartbeat
name: CANBUS 1 Inverter Heartbeat
title: YamBMS - Inverter Heartbeat
- entity: select.yambms_1_automatic_float_voltage
name: Automatic Float Voltage
- entity: sensor.yambms_1_auto_float_voltage
name: Auto Float Voltage
- entity: number.yambms_1_auto_float_update_interval
name: Update Interval
- entity: number.yambms_1_auto_float_voltage_step
name: Voltage Step
title: YamBMS - Auto Float
- type: entities
entities:
- entity: sensor.yambms_debug_heap_free
- entity: switch.yambms_1_automatic_charge_current
name: Automatic Charge Current
- entity: switch.yambms_1_automatic_discharge_current
name: Automatic Discharge Current
title: YamBMS - Auto CCL / DCL
show_header_toggle: false
- type: entities
entities:
- entity: switch.yambms_1_automatic_soc_limit
name: Automatic SoC Limit
- entity: number.yambms_1_auto_soc_limit
name: SoC Limit
- entity: number.yambms_1_auto_soc_limit_hysteresis
name: SoC Limit Hysteresis
- entity: select.yambms_1_auto_soc_limit_mode
name: Auto SoC Limit Mode
- entity: sensor.yambms_1_auto_soc_limit_status
name: Auto SoC Limit Status
title: YamBMS - Auto SoC Limit
- type: entities
entities:
- entity: switch.yambms_1_automatic_eoc_current
name: Automatic EOC Current
- entity: sensor.yambms_1_auto_eoc_status
name: Status
- entity: sensor.yambms_1_auto_eoc_current
name: Required Current
- entity: number.yambms_1_auto_eoc_target_hour
name: Target hour
- entity: number.yambms_1_auto_eoc_target_minute
name: Target minute
- entity: number.yambms_1_auto_eoc_correction
name: Current Correction
- entity: number.yambms_1_auto_eoc_capacity_modifier
name: Capacity Modifier
- entity: number.yambms_1_auto_eoc_increase_stop_hours
name: Stop hours
- entity: number.yambms_1_auto_eoc_increase_stop_soc
name: Stop SoC
title: YamBMS - Auto EOC
- title: Diagnostic
cards:
- type: entity-filter
entities:
- entity: sensor.yambms_board_debug_free_psram_percent
name: Debug Free PSRAM (%)
- entity: sensor.yambms_board_debug_free_psram
name: Debug Free PSRAM
- entity: sensor.yambms_board_debug_heap_free_percent
name: Debug Heap free (%)
- entity: sensor.yambms_debug_heap_free_2
- entity: sensor.yambms_board_debug_heap_free
name: Debug Heap free
- entity: sensor.yambms_debug_heap_max_block
- entity: sensor.yambms_board_debug_heap_max_block_percent
name: Debug Heap max block (%)
- entity: sensor.yambms_debug_heap_max_block_2
- entity: sensor.yambms_board_debug_heap_max_block
name: Debug Heap max block
- entity: sensor.yambms_debug_loop_time
- entity: sensor.yambms_board_debug_loop_time
name: Debug Loop time
- entity: sensor.yambms_debug_reset_reason
- entity: sensor.yambms_board_debug_reset_reason
name: Debug Reset reason
title: YamBMS - DEBUG
- entity: sensor.yambms_board_uptime
name: Board Uptime
- entity: sensor.yambms_board_esphome_version
name: ESPHome version
- entity: button.yambms_board_restart
name: Board Restart
conditions:
- condition: state
state_not: unavailable
card:
title: YamBMS - Diagnostic
- type: entities
entities:
- entity: sensor.yambms_1_requested_charge_voltage
name: Requested Charge Voltage
- entity: sensor.yambms_1_requested_discharge_voltage
name: Requested Discharge Voltage
- entity: sensor.yambms_1_requested_charge_current
name: Requested Charge Current
- entity: sensor.yambms_1_requested_discharge_current
name: Requested Discharge Current
title: YamBMS - Requested Values
- type: entity-filter
entities:
- entity: binary_sensor.yambms_1_canbus_1_status
name: CANBUS Status
- entity: switch.yambms_1_canbus_1_inverter_heartbeat_monitoring
name: CANBUS Inverter Heartbeat Monitoring
- entity: sensor.yambms_1_canbus_1_inverter_heartbeat
name: CANBUS Inverter Heartbeat
- entity: binary_sensor.yambms_1_rs485_1_status
name: RS485 Status
- entity: switch.yambms_1_rs485_1_inverter_heartbeat_monitoring
name: RS485 Inverter Heartbeat Monitoring
- entity: sensor.yambms_1_rs485_1_inverter_heartbeat
name: RS485 Inverter Heartbeat
conditions:
- condition: state
state_not: unavailable
card:
title: YamBMS - Inverter Status & Heartbeat
type: masonry
+108 -117
View File
@@ -8,60 +8,111 @@
[!["Buy Me A Coffee"](https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg)](https://www.buymeacoffee.com/sleeper85)
> [!TIP]
> Not sure which YAML to choose ? ... `YamBMS_Remote_Packages_example.yaml` is a good basis for creating your custom YAML.
> Examples of BMS and Shunt imports can be found in the [configuration_examples](configuration_examples/) folder.
> You can mix different BMS models, the only condition is that they are numbered in order starting from `1`.
> This page contains many links to other README.
> If you don't find answers to your questions, [you'll find all the README in this folder](documents/README).
> [!IMPORTANT]
> The current code for `YamBMS` and other components needs to be fixed to work with `esphome 2025.5.0`.
> This will be done as soon as I have more time to devote to it. In the meantime, you should compile with `esphome 2025.4.2` or lower.
> [!TIP]
> Not sure which YAML to choose ? ... [YamBMS_Remote_Packages_example.yaml](YamBMS_Remote_Packages_example.yaml)
> is a good basis for creating your custom YAML.
> Examples of `BMS`, `Shunt` and `Balancer` packages can be found in the [examples](examples/single-node/) folder.
> You don't have to import a shunt or balancer but you must import at least `one BMS`.
> You can mix different `BMS` models, the only condition is that the `bms_id` are numbered in order starting from `1` !
> [!IMPORTANT]
> YamBMS only allows data merging from your **parallel-connected BMS units** !
> YamBMS **does not work with serial-connected BMS units** !
> YamBMS is not tied to a particular voltage, you can define the number of cells in series in your battery.
> [!IMPORTANT]
> The most important thing for proper functioning of YamBMS is that **the voltage of your BMS is well calibrated**.
> YamBMS logic is based on the `min_cell_voltage` and `max_cell_voltage` voltages of your BMS.
> If you use YamBMS, the internal charging logic of the `JK-PB BMS` will not be used.
> Please read the [documentation](README.md#contents) and the [setup instructions](documents/README/Schematic_and_setup_instructions.md).
> YamBMS logic is based on the `min_cell_voltage` and `max_cell_voltage` voltages of your `BMS`.
> If you use `YamBMS`, the internal charging logic of the `JK-PB BMS` will not be used.
> Please read the [documentation](README.md#contents) and the [setup instructions](documents/README/Hardware_and_schematic_instructions.md).
| ESPHome application to monitor BMS and communicate with inverters<br>supporting CAN bus protocol compatible with Pylontech, GoodWe, SMA,<br>Victron or Luxpower (EG4). | <a href="https://www.buymeacoffee.com/Sleeper85" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a> |
| :--- | --- |
| **Note: Pylontech uses 15S/48V and many others uses 16S/51.2V !**<br><br>Other battery profiles that utilise the **`PYLON`** protocol with different cell counts<br>may also work, e.g. Alpha Ess Smile, BYD Battery-Box LV Flex Lite.<br>Select the correct battery profile in the inverter to match your battery pack !<br>The **`ESP32`** communicates with the BMS using the **`BLE / UART / RS485`**<br>protocol and then sends the CAN bus frames to the inverter via the<br>[CAN bus transceiver](documents/README/Supported_devices.md#supported-can-bus-transceiver). | <a href="https://www.buymeacoffee.com/Sleeper85" target="_blank"><img src="images/BMC_QR.png" alt="Buy Me A Coffee" style="height: 217px !important;width: 217px !important;" ></a> |
| ESPHome application to `combine` information coming from<br>your `BMS / Balancer / Shunt` and adds a smart layer before<br>transmitting instructions to your inverter on `RS485 or CAN bus`<br>using the protocols `PYLON`, `SMA`, `Victron` or `LuxPower` (EG4). | <a href="https://www.buymeacoffee.com/Sleeper85" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a> |
| --- | --- |
| **Note: Pylontech uses 15S/48V and many others uses 16S/51.2V !**<br><br>Other battery profiles that utilise the **`PYLON`** protocol with different cell counts<br>may also work, e.g. Alpha Ess Smile, BYD Battery-Box LV Flex Lite.<br>Select the correct battery profile in the inverter to match your battery pack !<br><br>**DISCLAIMER:** Working with battery systems involves electrical hazards.<br>Please read the complete documentation before installation and use<br>this project at your own risk. | <a href="https://www.buymeacoffee.com/Sleeper85" target="_blank"><img src="images/BMC_QR.png" alt="Buy Me A Coffee" style="height: 217px !important;width: 217px !important;" ></a> |
**Sends over CAN bus to inverter:**
**Sends over CAN / RS485 bus to your inverter :**
- Battery Voltage
- Battery Current (+charge, -discharge)
- [State of Charge (SoC)](documents/README/YamBMS_behavior.md#state-of-charge) **`SoC 100% will be sent to your inverter only when the battery is fully charged`**
- State of Health (SoH)
- Max cell V. and ID
- Min cell V. and ID
- BMS temperature
- Charging voltage
- Charging max amps
- Discharge min voltage
- Discharge max amps
- Requested Charge Voltage
- Requested Charge Current
- Requested Discharge Voltage
- Requested Discharge Current
- Min Cell V. and Cell ID
- Max Cell V. and Cell ID
- Min temperature and sensor ID
- Max temperature and sensor ID
- Battery name
- Alarms: Cell over/under voltage, Charge/discharge over current, High/low Temp, BMS fault
**Note:** this code support `multi-BMS` and `multi-shunt` connection per inverter with a `single ESP32` and should work with inverters that support the CAN bus protocol `PYLON`, `SMA`, `Victron` or `LuxPower` (EG4). I'm only testing it with my `Deye SUN-6K-SG03-LP1-EU` inverter.
- Alarms & Warnings
**This project is still in development and testing...<br>**
[Dedicated topic on DIY Solar Forum](https://diysolarforum.com/threads/yambms-jk-bms-can-with-new-cut-off-charging-logic-open-source.79325/)
Come and discuss it on the [DIY Solar Forum dedicated topic](https://diysolarforum.com/threads/yambms-jk-bms-can-with-new-cut-off-charging-logic-open-source.79325/).
## Contents
1) [Supported devices](documents/README/Supported_devices.md)
2) [YamBMS behavior](documents/README/YamBMS_behavior.md)
3) [YamBMS functions](documents/README/YamBMS_functions.md)
4) [Charging logic](documents/README/Charging_logic.md)
5) [CAN bus protocol](documents/README/CANBUS_protocol.md)
6) [Schematic and setup instructions](documents/README/Schematic_and_setup_instructions.md)
7) [How to create your YamBMS YAML](documents/README/YamBMS_main_YAML_HowTo.md)
8) [Installation procedure](documents/README/Installation_procedure.md)
9) [Troubleshooting](documents/README/Troubleshooting.md)
2) [Hardware and schematic instructions](documents/README/Hardware_and_schematic_instructions.md)
3) [YamBMS behavior](documents/README/YamBMS_behavior.md)
4) [YamBMS functions](documents/README/YamBMS_functions.md)
5) [YamBMS charging logic](documents/README/Charging_logic.md)
6) [Installation procedure](documents/README/Installation_procedure.md)
7) [Troubleshooting](documents/README/Troubleshooting.md)
8) [Changelog](documents/README/Changelog.md)
## YamBMS
## YamBMS ( Yet another multi-BMS Merging Solution )
![Image](images/YamBMS_packaged_version.png "YamBMS packaged version")
![Image](images/YamBMS_Overview.png "YamBMS Overview")
## Home Assistant dashboard
Available in the [HomeAssistant_Dashboards](HomeAssistant_Dashboards/) folder.
![Image](images/YamBMS_HA_Dashboard.png "YamBMS HA Dashboard")
## YamBMS Display
> [!TIP]
> Tested with Waveshare ESP32-S3 Touch-LCD 4.3" and 7".
Currently only available for a resolution of **800x480**.
The display can retrieve information in two different ways :
| HA version (recommended) | ESPHome version |
| --- | --- |
| LVGL code executed on a **standalone MCU*** with informations coming from `Home Assistant` (only requires a WiFi connection). This does not overload your **YamBMS MCU***, which already has enough work to do. **Use this YAML =>** [YamBMS_RP_HA_Display.yaml](YamBMS_RP_HA_Display.yaml) | LVGL code executed on the **YamBMS MCU***. In this case, in addition to merging the datas from the `BMS`/`Balancer`/`Shunt` and managing communication with your `inverter`/`charger`, your **YamBMS MCU*** will be overloaded with executing the LVGL display. |
_MCU = an ESP32 / ESP32-S3 / ESP32-P4 / ..._
### YamBMS display
* HA version => [board_options_display_lvgl_package_800x480_blue_navy_ha_yambms.yaml](packages/board/board_options_display_lvgl_package_800x480_blue_navy_ha_yambms.yaml)
* ESPHome version => [board_options_display_lvgl_package_800x480_blue_navy_esphome.yaml](packages/board/board_options_display_lvgl_package_800x480_blue_navy_esphome.yaml)
![Image](images/YamBMS_Display.png "YamBMS Display")
### YamBMS + Overview display
> [!IMPORTANT]
> You will need to provide datas (non-YamBMS sensors) coming from your `inverter` / `charger`.
* HA version => [board_options_display_lvgl_package_800x480_blue_navy_ha_full.yaml](packages/board/board_options_display_lvgl_package_800x480_blue_navy_ha_full.yaml)
![Image](images/YamBMS_Display_Overview.png "YamBMS Display Overview")
## Hardware highlighted
This project works with various `ESP32` variants and also with the `Raspberry Pi Pico (RP2040)`.
Note that merging data from multiple BMS, balancers and shunts is resource-intensive, so I highly recommend a board based on the `ESP32-S3` with `PSRAM`.
| [LilyGo T-Connect](documents/README/Board_LilyGo_T-Connect.md) | [Waveshare RS485-CAN](documents/README/Board_Waveshare_ESP32-S3-RS485-CAN.md) | [M5Stack AtomS3R](documents/README/Board_M5Stack_AtomS3.md) |
| --- | --- | --- |
| - ESP32-S3<br>- 8MB PSRAM<br>- 3x RS485 port<br>- 1x CAN port<br>- 15x GPIOs | - ESP32-S3<br>- 8MB PSRAM<br>- 1x RS485 port<br>- 1x CAN port<br>- 1x SH1.0 connector<br>- 16x GPIOs | - ESP32-S3<br>- 8MB PSRAM<br>- 1x BASE port (**for adding RS485/CAN base**)<br>- 1x UNIT HY2.0 port (**for adding RS485/CAN unit**)<br>- 6x GPIOs |
| <img src="images/MCU_ESP32-S3_LilyGo-T-Connect_1.jpg" width="300"> | <img src="images/MCU_ESP32-S3_WS-RS485-CAN_2.png" width="300"> | <img src="images/MCU_AtomS3R.png" width="300"> |
### Single-node
@@ -73,29 +124,34 @@ You install `YamBMS` on a single ESP32 connected to your BMS and your inverter.
### Multi-node
Each BMS/Shunt turns into a `modbus server` with its own address.
Each BMS/Shunt/Balancer turns into a `modbus server` with its own address.
> [!IMPORTANT]
> The max number of `UART` BMS/Shunt per ESP32 is `2` (unless you use a UART expander) because you need to keep the last `UART` for the `RS485` network.
> The max number of `BLE` BMS/Shunt per ESP32 is `2`, ESP32-S3 / AtomS3 can supervise `3` BLE devices.
> The max number of `BLE` BMS/Shunt/Balancer per ESP32 is `2`, ESP32-S3 / AtomS3 can supervise `3` BLE devices.
YamBMS installs on `node1` as a `modbus client` to collect information from all your BMS.
The `node1` is also connected to your inverter via the `CAN bus`.
The BMS/Shunt are connected to other ESP32 nodes connected on a dedicated RS485 bus for YamBMS. Each BMS/Shunt becomes a `modbus server`.
The BMS/Shunt are connected to other ESP32 nodes connected on a dedicated RS485 bus for YamBMS. Each BMS/Shunt/Balancer becomes a `modbus server`.
The theoretical limit is `256` modbus server (BMS/Shunt) per `RS485 bus` but in reality this will depend on the capabilities of `node1` (YamBMS) which will have to combine all the BMS/Shunt together.
The theoretical limit is `256` modbus server (BMS/Shunt) per `RS485 bus` but in reality this will depend on the capabilities of `node1` (YamBMS) which will have to combine all the BMS/Shunt/Balancer together.
[You can find more information about creating your YAML in this How To.](documents/README/YamBMS_main_YAML_HowTo.md)
[You can find more information about creating your YAML in this How To.](documents/README/YamBMS_RP_YAML.md)
> [!TIP]
> If you have a lot of `BMS/Shunt` to combine, using an `ESP32-S3` or `AtomS3` for `node1` is recommended.
> If you have a lot of `BMS/Shunt/Balancer` to combine, using an `ESP32-S3` or `AtomS3` for `node1` is recommended.
![Image](images/YamBMS_multi-node_RS485_modbus.png "YamBMS multi-node RS485 modbus")
## Home Assistant
[@GHswitt](https://github.com/GHswitt) multi-node example :
![Image](images/YamBMS_HA_Dashboard.png "YamBMS HA Dashboard")
![Image](images/YamBMS_multi-node_RS485_modbus_example.png "YamBMS multi-node RS485 modbus example")
> [!NOTE]
> Some boards with integrated `RS485 transceiver` have already a 120 Ohm resistor installed, for example the `LilyGo T-CAN485`, `LilyGo T-Connect` and `LilyGo T-Connect Pro`.
> If these devices are used in the middle, this resistor must be removed!
> Otherwise transmission errors can occur.
## Try YamBMS with the DEMO firmware
@@ -117,7 +173,7 @@ rx_pin: 22 # to CAN board CRX (with 4.7K resistor except for SN65HVD230)
## Requirements
* [ESPHome 2024.6.0 or higher](https://github.com/esphome/esphome/releases)
* [ESPHome 2026.6.0 or higher](https://github.com/esphome/esphome/releases)
* ESP32 MCU (buying a board with ≥8MB flash is advised if you intend to monitor multiple BMS)
* CAN transceiver (only with TJA1050/TJA1051 => 4.7K resistor for 5V to 3V3 level shifing)
* BMS JK, JBD, Seplos (other BMS brands already integrated with ESPhome can be added easily)
@@ -128,7 +184,7 @@ rx_pin: 22 # to CAN board CRX (with 4.7K resistor except for SN65HVD230)
## Data collection
> [!NOTE]
> For your information, in May 2025 there were `94` YamBMS users.
> For your information, in January 2026 there were `160` YamBMS users.
If the ESP32 has an internet connection, the following data is sent to [this script](http://script.opentel.be/yambms.post.php)
for statistics collection. Only [@Sleeper85](https://github.com/Sleeper85) have access to this information for the production of statistics, the support and the update service.
@@ -144,76 +200,11 @@ for statistics collection. Only [@Sleeper85](https://github.com/Sleeper85) have
- Uptime
- Current date and time
## Changelog
* YamBMS 1.5.5 :
* New `main.yaml` with LP (local packages) and RP (remote packages) versions
* New `board.yaml` with modular UART/CAN interfaces
* The name of the JK `bms.yaml` is no longer linked to a specific model
* SoC calculation is now based on remaining capacity for more accuracy (BMS only) [issues #39](https://github.com/Sleeper85/esphome-yambms/issues/39)
* SoH calculation is moved to BMS level (for those who do not provide this information)
* Improvement of the Victron SmartShunt doc [issues #38](https://github.com/Sleeper85/esphome-yambms/issues/38)
* YamBMS 1.5.4 :
* New low SoC corrected at each BMS level (the corrected SoC is the one transmitted to YamBMS)
* New BMS dashboard
* New end of charge logic at each BMS level, the charge switch turns off when the cells are equalized (disabled by default)
* Fixed `errors_bitamsk` for JK-PB RS485, test OK with YamBMS (forked component)
* YamBMS 1.5.3 :
* Broadcasting JK-PB settings to all BMS set to OFF by default
* Reorganizing the `board` folder and YAMLs (device_base.yaml moved to board.yaml)
* `device_base.yaml` should no longer be part of `YamBMS_main.yaml`
* New `RGB LED status` light effects (red, green, blue, cyan) as an `options` packages for `board.yaml`
* Increased CPU frequency to `240Mhz` as an `options` packages for `board.yaml`
* Added `ESP32 Generic`, `LilyGo T-CAN485`, `LilyGo T-Connect` and `XIAO` boards
* Fixed SoC logic (low SoC will be detected at BMS level and no longer at YamBMS level)
* Simplified combination logic (removal of the combine switch) + dashboard update
* Check `Battery Capacity` is `> 0` before combining info (see [issue #14](https://github.com/Sleeper85/esphome-yambms/issues/14))
* Improved alarm logic with a common `YamBMS errors bitmask` for all BMS models (see OTP vs UTP bug reported by @ChrisG)
* Added [PR #7547](https://github.com/esphome/esphome/pull/7547) regarding publishing entities via the API
* Removed `captive_portal` because it increases the `loop time` too much
* `PSRAM` will no longer be enabled by default as this has a bad impact on `BLE BMS`
* YamBMS 1.5.2 :
* Added shunt `Online Status` binary_sensor
* Shunt combine condition based on the new binary_sensor `Online Status`
* Logger `baud_rate: 0` by default (frees the 3rd UART and avoids some bugs like "WK2168 with canbus" or "BLE client with RS485 modbus")
* Changed names of `bms` and `shunt` YAMLs for modbus `multi-node` solution
* Added shared configuration file to simplify main YAML (centralization of parameters)
* Simplification (fewer options) when importing `BMS / Shunt` YAMLs
* New `multi-node` solution using `RS485 modbus` to communicate information to YamBMS
* New board `espBerry` with `2-CH-CAN HAT`
* YamBMS 1.5.1 :
* The conditions for `combining` BMS and the `charging` and `discharging` instructions no longer have any relation with the `errors_bitmask` sensor, the new system relies on the three **binary_sensor** `online status`, `charging allowed` and `discharging allowed` being linked to the status of alarms and switches.
* The BMS combination procedure has been completely rewritten.
* Improved structure and ID names of `bms.yaml`.
* The `yambms.yaml` and `yambms_combine.yaml` global variable names have been changed for better code reading.
* Improved code regarding the CAN bus `esp_light` status for boards without integrated LED.
* New `Atom S3R` board and `Smartshunt BLE` shunt.
* New `JBD`, `Seplos V1 V2`, `JK-B RS485` (display port) and `FAKE` BMS.
* New `YamBMS DEMO` YAML and firmware offered to test and discover how `YamBMS` works.
* New management of temperature sensors (no longer limited to two sensors).
* **@Der_Hannes** fixed the AtomS3 `black screen` issue (with **esphome > 2024.7.3**) and developed new code for display management based on the [ili9xxx](https://esphome.io/components/display/ili9xxx.html) platform.
* `Auto CCL/DCL` functions have been fixed to work with `JK-PB` and `new JK-B` BMS, [see this issue](https://github.com/Sleeper85/esphome-yambms/issues/11).
* The `UVPR` and `OVPR` sensors are no longer used and replaced by `UVP` and `OVP` to ensure operation with all BMS.
* **@txubelaxu** fixed a bug in the `JK-PB RS485` component that could cause a false battery voltage value to be sent, [see this issue](https://github.com/Sleeper85/esphome-yambms/issues/10).
* Improved documentation, added a `HowTo` to create its main YAML, warning about galvanic isolation.
* CANBUS 2.3.7 : If there is no response from the inverter, the time before a new communication test has been reduced from `120s` to `60s`, added Victron `0x372` nbr. of modules `blocking charge/discharge`.
* YamBMS 1.4.5 : Changed the way to configure WiFi/Ethernet network, added `ESP32-C3 ETH01-EVO` ethernet board, reduction of the number of YAML bms files, UART `rx_buffer_size` is set to `512` by default for JK-B and JK-PB, new JK-BMS BLE sensors (last commits of @syssi) and new BLE `standard` version
* CANBUS 2.3.6 : Sending CAN frames stops immediately if there are no combined BMS
* YamBMS 1.4.4 : Multi-shunt support, Simplified and new YamBMS option `battery chemistry`, slider `min/max` values ​​are automatically configured based on the battery chemistry and cell count, added `YamBMS Fallback Hotspot`, added YamBMS `Update service`, added PVbrain2 and Atom Matrix board, added PSRAM settings YAML (not enabled by default), new MIN/MAX temperature sensor, added DC current icon, fixed dual sensor `Cell UVPR (MAX)` bug, Improved `combine` code, Breaking change : Atom S3 `GPIOs 1 and 2` reversed
* CANBUS 2.3.5 : New MIN/MAX temperature / sensor ID, Improved Victron protocol (online/offline battery modules, installed/available battery capacity)
* CANBUS 2.3.4 : Fixed bug of canbus link validation without inverter connected
* YamBMS 1.4.3 : Added Victron and Junctek KH-F `Shunt` support and `Requested Force Charge` function based on `SoC start/stop`, new `Total Daily Energy` sensors
* CANBUS 2.3.3 : Added `Automatic` BMS name selection and `Requested Force Charge` Bit 3/4/5 (PYLON 0x35C)
* CANBUS 2.3.2 : Added `LuxPower` protocol with updated `can_id` 0x355, 0x356, 0x359 and 0x35C
* CANBUS 2.3.1 : Improved the procedure for sending canbus frames with reduced loop time, rewritten of the canbus link validation code and added `Inverter Heartbeat Monitoring` function
* YamBMS 1.4.2 : Added new `Auto CVL Boost V.` and `Rebulk SoC` functions, new debug.yaml for ESP32 and ESP32-S3, improved code and comments
* YamBMS 1.4.1 : Rewriting of the alarm system, bug fixes and improvement of the charging logic (new status `Cut-Off`), icon allocation for each sensor, UART and CANBUS `!extend ${vars}`, New sensor `YamBMS Delta Cell V.`, Improved `Battery SOC` logic
* YamBMS 1.3.2 : New var `yambms_cell_count`, the BMS charge or discharge switches can be activated separately without causing the decombination of the BMS, new `minimal` version of the BMS YAML in order to reduce the loop time
* YamBMS 1.3.1 : First multi-BMS version named `YamBMS`
## References
* Thanks to [@syssi](https://github.com/syssi/esphome-jk-bms) for help and making many BMS components (JK, JBD, Seplos, Pace, etc.)
* Thanks to [@txubelaxu](https://github.com/txubelaxu/esphome-jk-bms) for help and making the `JK-PB RS485` component.
* Thanks to [@uksa007](https://www.patreon.com/Uksa007Codedevelopment) for making the original CANBUS code.
* Thanks to [@syssi](https://github.com/syssi/) for help and developing many BMS components (JK, JBD, Seplos, Pace, etc.).
* Thanks to [@txubelaxu](https://github.com/txubelaxu/) for help and developing the `JK_RS485` component.
* Thanks to [@shvm](https://github.com/shvmm), [@MrPabloUK](https://github.com/MrPabloUK) and [@GHswitt](https://github.com/GHswitt) for their multiple contributions.
* Thanks to [@Fahmula](https://github.com/Fahmula) for developing the `PYLON RS485` component.
* Thanks to [@uksa007](https://www.patreon.com/Uksa007Codedevelopment) for the development of the first CANBUS code.
* Thanks to all the [contributors](https://github.com/Sleeper85/esphome-yambms/graphs/contributors).
+242 -112
View File
@@ -1,5 +1,5 @@
# Updated : 2025.05.13
# Version : 1.5.5
# Updated : 2026.06.29
# Version : 1.7.0
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -17,15 +17,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
######################## YamBMS Local Packages Version #########################
######################## YamBMS Remote Packages Version ########################
# You need to copy the `packages` folder into the same folder as this YAML in order to compile it.
# You can compile this YAML directly without the `packages` folder.
# The packages will be automatically downloaded from GitHub.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# Don't forget to configure your WiFi credentials in the secrets.yaml
#
# If needed, configure a static IP here
# wifi:
# manual_ip:
@@ -36,47 +35,41 @@
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
level: DEBUG # VERBOSE / DEBUG / INFO / WARN
# baud_rate: 115200 # Send logs to the `hardware_uart` USB output (this consumes a UART interface)
# hardware_uart: UART0 # UART0 / USB_SERIAL_JTAG
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
- platform: esphome
# Uncomment:
# API: to monitor entities via Home Assistant
# MQTT: to monitor entities via another system
# Neither: to monitor entities only via `web_server` or nothing
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
# web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# Name
name: '' # Name that can be added as a second prefix after the friendly name, you can leave it blank.
hostname: 'yambms' # This is the name of the node. It should always be unique in your ESPHome network.
friendly_name : 'YamBMS Demo' # Prefix added in front of all entity names and also to classify them.
# This project uses the `sub-device` function of ESPHome to prefix entity names.
# This allows to group entities into logical devices that appear separately in Home Assistant.
hostname: 'yambms-demo' # Name of your ESPHome node registered on the IP network (DNS name must be unique)
friendly_name : 'YamBMS Demo' # Name of your board (prefix for board entities)
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: 'yambms1'
yambms_name: 'YamBMS 1'
yambms_id: '1' # Number without spaces
yambms_name: 'YamBMS Demo' # Prefix for YamBMS entities
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
@@ -98,78 +91,182 @@ substitutions:
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_discharge_current: '300' # in Ampere
# +-------------------------------------------------------------------------
# | Temperature-based current limitation
# | Can be disabled via the switch "Temperature-based current limitation"
# | This factor is applied to the battery capacity (Ah), not the current
# | maximum charge/discharge current. For example : 280Ah x 0.5 = 140A
# +-------------------------------------------------------------------------
# Temperature °C -> Charge Rate (0.0C to 1.0C)
yambms_charging_rate_table: |
{
{ -0.1, 0.00 },
{ 0.0, 0.05 },
{ 5.0, 0.12 },
{ 10.0, 0.30 },
{ 20.0, 0.50 },
{ 25.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# Temperature °C -> Discharge Rate (0.0C to 1.0C)
yambms_discharging_rate_table: |
{
{-30.0, 0.00 },
{-20.0, 0.50 },
{-10.0, 0.50 },
{ -5.0, 0.50 },
{ 0.0, 0.50 },
{ 5.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | Shunt Settings |
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
shunt_combine_interval: '1s' # frequency at which Shunt data is combined in YamBMS
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
bms_combine_interval: '1s' # frequency at which BMS data is combined in YamBMS
bms_cutoff_timer: '50s' # time during which the end of charge conditions must be respected (cut-off + cells not equalizing)
# +--------------------------------------+
# | Health & LED Assignment Logs |
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_LP_YAML.md
packages:
################ >>> CONFIG & CUSTOM LP <<< ################
# Local Packages intended for creating custom codes
# or sharing settings between several main.yaml
# yambms_config: !include yambms_config.yaml
# yambms_custom: !include yambms_custom.yaml
############### >>> UNCOMMENT YOUR BOARD <<< ###############
############### >>> ONLY ONE BOARD ! <<< ###############
# +------------------------------------------------------------------------------+
# | >>> UNCOMMENT YOUR BOARD
# | >>> ONLY ONE BOARD !
# +------------------------------------------------------------------------------+
# This list is incomplete, other board.yaml are available in the board folder
device_board: !include packages/board/board_ESP32_Generic.yaml
# device_board: !include packages/board/board_ESP32_DevKit-V1.yaml
# device_board: !include packages/board/board_ESP32_LilyGo-T-CAN485.yaml
# device_board: !include packages/board/board_ESP32_EVB.yaml
# device_board: !include packages/board/board_ESP32_Atom-Lite.yaml
# device_board: !include packages/board/board_ESP32-C3_DevKitM-1.yaml
# device_board: !include packages/board/board_ESP32-C3_ETH01-EVO.yaml
# device_board: !include packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml
# device_board: !include packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml
# device_board: !include packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml
# device_board: !include packages/board/board_ESP32-S3_AtomS3-Lite.yaml
# device_board: !include
# file: packages/board/board_ESP32-S3_AtomS3.yaml # board_ESP32-S3_AtomS3R.yaml
board: !include
file: 'packages/board/board_ESP32_Generic.yaml'
# file: 'packages/board/board_ESP32_Atom-Lite.yaml'
# file: 'packages/board/board_ESP32_DevKit-V1.yaml'
# file: 'packages/board/board_ESP32_EVB.yaml'
# file: 'packages/board/board_ESP32_iBMS_CAN_RS485_V3.3.yaml'
# file: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
# file: 'packages/board/board_ESP32-C3_DevKitM-1.yaml'
# file: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
# file: 'packages/board/board_ESP32-C3_FlipC3.yaml'
# file: 'packages/board/board_ESP32-S3_Generic.yaml'
# file: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
# file: 'packages/board/board_ESP32-S3_AtomS3.yaml'
# file: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
# file: 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml'
# file: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml'
# file: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
# file: 'packages/board/board_ESP32-S3_LilyGo-T-Connect-Pro.yaml'
# file: 'packages/board/board_ESP32-S3_WS-ETH.yaml'
# file: 'packages/board/board_ESP32-S3_WS-RS485-CAN.yaml'
# file: 'packages/board/board_ESP32-S3_WS-Touch-LCD-4.3.yaml'
# file: 'packages/board/board_ESP32-S3_WS-Touch-LCD-7.yaml'
# file: 'packages/board/board_ESP32-S3_XIAO.yaml'
# file: 'packages/board/board_ESP32-S3_YBoard.yaml'
# vars:
# server_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# network_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# +------------------------------------------------------------------------------+
# | >>> Board Display
# | >>> Uncomment the display that corresponds to your board
# +------------------------------------------------------------------------------+
# board_display: !include
# file: 'packages/board/board_options_display_128x128.yaml' # AtomS3 / AtomS3R
# file: 'packages/board/board_options_display_480x222.yaml' # LilyGo T-Connect Pro
# file: 'packages/board/board_options_display_lvgl_package_800x480_blue_navy_esphome.yaml' # WS Touch LCD 4.3" and 7"
# file: 'packages/board/board_options_display_lvgl_package_1280x720_Tab5_esphome.yaml' # M5Stack Tab5
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
########### >>> UNCOMMENT YOUR BOARD OPTIONS <<< ###########
captive_portal: !include packages/board/board_options_captive_portal.yaml
# uart_esp_1: !include packages/board/board_options_itf_uart_esp_1.yaml
# +------------------------------------------------------------------------------+
# | >>> Board Options
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
uart_esp_1: !include packages/board/board_options_itf_uart_esp_1.yaml
# UART 2 (uart_id: uart_esp_2)
# uart_esp_2: !include packages/board/board_options_itf_uart_esp_2.yaml
# UART 3 (uart_id: uart_esp_3)
# uart_esp_3: !include packages/board/board_options_itf_uart_esp_3.yaml
# ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
# UART flow control
# uart_flow_control: !include
# file: packages/board/board_options_itf_uart_flow_control.yaml
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
canbus_node_1: !include
file: packages/board/board_options_itf_canbus_esp32_can.yaml
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# MCP2515
# CAN transceiver - MCP2515
# canbus_node_2: !include
# file: packages/board/board_options_itf_canbus_mcp2515.yaml
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
############################################################
# PSRAM octal 80Mhz
# psram_octal_80Mhz: !include packages/board/board_options_PSRAM_octal_80Mhz.yaml
# Web Server
# web_server: !include packages/yambms/yambms_web_server.yaml
# WiFi AP @ 192.168.4.1
# wifi_ap: !include packages/board/board_options_wifi_ap.yaml
# Captive Portal @ 192.168.4.1
# captive_portal: !include packages/board/board_options_captive_portal.yaml
# +------------------------------------------------------------------------------+
# | >>> BMS / Balancer / Shunt
# +------------------------------------------------------------------------------+
# You don't have to import a shunt but you must import at least one BMS.
# You can mix different BMS models, the only condition is that the `bms_id` are numbered in order starting from 1 !
# >>> Copy your BMS / Balancer / Shunt packages here
# >>> You can find examples at this address :
# >>> https://github.com/Sleeper85/esphome-yambms/tree/main/examples/single-node/
shunt1: !include
file: packages/shunt/shunt_combine_FAKE.yaml
@@ -177,114 +274,147 @@ packages:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
# Shunt sensors values
shunt_voltage: '53.41' # V
shunt_current: '37.5' # A
shunt_power: '2003' # W
shunt_soc: '86' # %
shunt_voltage: '52.81' # V
shunt_current: '17.5' # A
shunt_power: '924' # W
shunt_soc: '50' # %
shunt_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms1: !include
file: packages/bms/bms_combine_FAKE.yaml
file: packages/bms/bms_combine_DEMO.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'BMS 1'
# BMS sensors values
bms_battery_capacity: '280' # Ah
bms_battery_capacity_remaining: '243' # Ah
bms_voltage: '53.45' # V
bms_current: '9.2' # A
bms_power: '492' # W
bms_soc: '87' # %
bms_soh: '99' # %
bms_soh: '98' # %
bms_min_cell_voltage: '3.339' # V
bms_min_voltage_cell: '2' # cell number 1~16
bms_max_cell_voltage: '3.341' # V
bms_max_voltage_cell: '11' # cell number 1~16
bms_temperature_sensor_1: '21.1' # °C
bms_temperature_sensor_2: '21.3' # °C
bms_temperature_sensor_3: '21.5' # °C
bms_temperature_sensor_4: '21.7' # °C
bms_min_temperature: '9.1' # °C
bms_max_temperature: '9.3' # °C
bms_max_charge_current: '100' # A
bms_max_discharge_current: '100' # A
bms_cell_ovp: '3.650' # V Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
bms_charging_cycles: '178' # charging cycles number Used to calculate the SoH
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms2: !include
file: packages/bms/bms_combine_FAKE.yaml
file: packages/bms/bms_combine_DEMO.yaml
vars:
bms_id: '2' # must be a number
bms_name: 'BMS 2'
# BMS sensors values
bms_battery_capacity: '280' # Ah
bms_battery_capacity_remaining: '238' # Ah
bms_voltage: '53.41' # V
bms_current: '11.3' # A
bms_power: '604' # W
bms_soc: '85' # %
bms_soh: '89' # %
bms_min_cell_voltage: '3.337' # V
bms_min_voltage_cell: '14' # cell number 1~16
bms_max_cell_voltage: '3.339' # V
bms_max_voltage_cell: '3' # cell number 1~16
bms_temperature_sensor_1: '21.8' # °C
bms_temperature_sensor_2: '21.6' # °C
bms_temperature_sensor_3: '21.4' # °C
bms_temperature_sensor_4: '21.2' # °C
bms_min_temperature: '15.1' # °C
bms_max_temperature: '15.3' # °C
bms_max_charge_current: '100' # A
bms_max_discharge_current: '100' # A
bms_cell_ovp: '3.650' # V Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
bms_charging_cycles: '226' # charging cycles number Used to calculate the SoH
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms3: !include
file: packages/bms/bms_combine_FAKE.yaml
file: packages/bms/bms_combine_DEMO.yaml
vars:
bms_id: '3' # must be a number
bms_name: 'BMS 3'
# BMS sensors values
bms_battery_capacity: '280' # Ah
bms_battery_capacity_remaining: '232' # Ah
bms_voltage: '53.37' # V
bms_current: '15.7' # A
bms_power: '838' # W
bms_soc: '83' # %
bms_soh: '79' # %
bms_min_cell_voltage: '3.334' # V
bms_min_voltage_cell: '7' # cell number 1~16
bms_max_cell_voltage: '3.336' # V
bms_max_voltage_cell: '9' # cell number 1~16
bms_temperature_sensor_1: '21.9' # °C
bms_temperature_sensor_2: '22.0' # °C
bms_temperature_sensor_3: '22.1' # °C
bms_temperature_sensor_4: '22.2' # °C
bms_min_temperature: '20.1' # °C
bms_max_temperature: '20.3' # °C
bms_max_charge_current: '100' # A
bms_max_discharge_current: '100' # A
bms_cell_ovp: '3.650' # V Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
bms_charging_cycles: '194' # charging cycles number Used to calculate the SoH
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> YamBMS
# +------------------------------------------------------------------------------+
yambms: !include packages/yambms/yambms.yaml
canbus1: !include
file: packages/yambms/yambms_canbus.yaml
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (ID 0x305) for 5s
# The Deye inverter sends the ACK (can_id 0x305) only when it receives the can_id 0x356
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
# +------------------------------------------------------------------------------+
# | >>> CAN bus to Inverter
# +------------------------------------------------------------------------------+
canbus1: !include
file: packages/yambms/yambms_canbus.yaml # yambms_canbus_web_server.yaml
vars:
canbus_id: '1' # Must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs for the ACK can_id 0x305 (required for Schneider XW Pro)
# +------------------------------------------------------------------------------+
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# rs485_pylon: !include
# file: packages/yambms/yambms_rs485_pylon.yaml # yambms_rs485_pylon_web_server.yaml
# vars:
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> DEBUG ( logger level must be DEBUG )
# +------------------------------------------------------------------------------+
device_debug: !include
file: packages/base/device_debug_ESP32.yaml
# file: packages/base/device_debug_ESP32_PSRAM.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
# Size of your PSRAM in bits
# 8Mb='8388608' | 6Mb='6291456' | 4Mb='4194304' | 2Mb='2097152' | NoPSRAM='0'
debug_psram_size: '8388608'
# +------------------------------------------------------------------------------+
# | >>> Add your custom packages below
# +------------------------------------------------------------------------------+
# Custom packages
# yambms_custom: !include yambms_custom.yaml
# +------------------------------------------------------------------------------+
# | >>> Add your custom YAML below
# +----- -------------------------------------------------------------------------+
# Custom YAML
-224
View File
@@ -1,224 +0,0 @@
# Updated : 2025.05.13
# Version : 1.5.5
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
######################## YamBMS Local Packages Version #########################
# You need to copy the `packages` folder into the same folder as this YAML in order to compile it.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# Don't forget to configure your WiFi credentials in the secrets.yaml
#
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
# web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# Name
name: '' # Name that can be added as a second prefix after the friendly name, you can leave it blank.
hostname: 'yambms' # This is the name of the node. It should always be unique in your ESPHome network.
friendly_name : 'YamBMS' # Prefix added in front of all entity names and also to classify them.
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: 'yambms1'
yambms_name: 'YamBMS 1'
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
shunt_combine_interval: '1s' # frequency at which Shunt data is combined in YamBMS
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
bms_combine_interval: '1s' # frequency at which BMS data is combined in YamBMS
bms_cutoff_timer: '50s' # time during which the end of charge conditions must be respected (cut-off + cells not equalizing)
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
############### >>> UNCOMMENT YOUR BOARD <<< ###############
############### >>> ONLY ONE BOARD ! <<< ###############
# This list is incomplete, other board.yaml are available in the board folder
# device_board: !include packages/board/board_ESP32_Generic.yaml
# device_board: !include packages/board/board_ESP32_DevKit-V1.yaml
device_board: !include packages/board/board_ESP32_LilyGo-T-CAN485.yaml
# device_board: !include packages/board/board_ESP32_EVB.yaml
# device_board: !include packages/board/board_ESP32_Atom-Lite.yaml
# device_board: !include packages/board/board_ESP32-C3_ETH01-EVO.yaml
# device_board: !include packages/board/board_ESP32-S3_DevKitC-1.yaml
# device_board: !include packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml
# device_board: !include packages/board/board_ESP32-S3_AtomS3-Lite.yaml
# device_board: !include
# file: packages/board/board_ESP32-S3_AtomS3.yaml # board_ESP32-S3_AtomS3R.yaml
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
########### >>> UNCOMMENT YOUR BOARD OPTIONS <<< ###########
# RS485
uart_esp_1: !include packages/board/board_options_itf_uart_esp_1.yaml
# ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
canbus_node_1: !include
file: packages/board/board_options_itf_canbus_esp32_can.yaml
vars:
canbus_node_id: 'canbus_inverter_1'
# MCP2515
canbus_node_2: !include
file: packages/board/board_options_itf_canbus_mcp2515.yaml
vars:
canbus_node_id: 'canbus_bms_1'
# If you do not want to use the default settings, uncomment the options below :
# canbus_can_id: '4'
# canbus_bitrate: '500kbps'
# spi_mosi_pin: '12'
# spi_miso_pin: '5'
# spi_clk_pin: '18'
# mcp2515_cs_pin: '32'
############################################################
# Deye BMS top unit (required)
bms_top: !include
file: packages/bms/bms_sensors_DEYE_CAN_top_full.yaml
vars:
# CAN BUS ID
canbus_id: 'canbus_bms_1'
deye_name: 'DEYE-Top 1'
deye_id: '1'
# Deye module 1
bms1: !include
file: packages/bms/bms_combine_DEYE_CAN_module_full.yaml
vars:
# CAN BUS ID
canbus_id: 'canbus_bms_1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'DEYE-BMS 1'
deye_id: '1'
deye_module_id: '0' # Modules are numbered with 0-9
# Deye module 2
bms2: !include
file: packages/bms/bms_combine_DEYE_CAN_module_full.yaml
vars:
# CAN BUS ID
canbus_id: 'canbus_bms_1'
# BMS vars
deye_id: '1'
bms_id: '2' # must be a number
bms_name: 'DEYE-BMS 2'
deye_module_id: '1' # Second module
yambms: !include packages/yambms/yambms.yaml
# yambms_custom: !include yambms_custom.yaml
canbus1: !include
file: packages/yambms/yambms_canbus.yaml
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (ID 0x305) for 5s
# The Deye inverter sends the ACK (can_id 0x305) only when it receives the can_id 0x356
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
device_debug: !include
file: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
-301
View File
@@ -1,301 +0,0 @@
# Updated : 2025.05.13
# Version : 1.5.5
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
######################## YamBMS Local Packages Version #########################
# You need to copy the `packages` folder into the same folder as this YAML in order to compile it.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# Don't forget to configure your WiFi credentials in the secrets.yaml
#
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
# web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# Name
name: '' # Name that can be added as a second prefix after the friendly name, you can leave it blank.
hostname: 'yambms' # This is the name of the node. It should always be unique in your ESPHome network.
friendly_name : 'YamBMS' # Prefix added in front of all entity names and also to classify them.
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: 'yambms1'
yambms_name: 'YamBMS 1'
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
shunt_combine_interval: '1s' # frequency at which Shunt data is combined in YamBMS
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
bms_combine_interval: '1s' # frequency at which BMS data is combined in YamBMS
bms_cutoff_timer: '50s' # time during which the end of charge conditions must be respected (cut-off + cells not equalizing)
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
################ >>> CONFIG & CUSTOM LP <<< ################
# Local Packages intended for creating custom codes
# or sharing settings between several main.yaml
# yambms_config: !include yambms_config.yaml
# yambms_custom: !include yambms_custom.yaml
############### >>> UNCOMMENT YOUR BOARD <<< ###############
############### >>> ONLY ONE BOARD ! <<< ###############
# This list is incomplete, other board.yaml are available in the board folder
# device_board: !include packages/board/board_ESP32_Generic.yaml
# device_board: !include packages/board/board_ESP32_DevKit-V1.yaml
# device_board: !include packages/board/board_ESP32_LilyGo-T-CAN485.yaml
# device_board: !include packages/board/board_ESP32_EVB.yaml
# device_board: !include packages/board/board_ESP32_Atom-Lite.yaml
# device_board: !include packages/board/board_ESP32-C3_DevKitM-1.yaml
# device_board: !include packages/board/board_ESP32-C3_ETH01-EVO.yaml
# device_board: !include packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml
# device_board: !include packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml
device_board: !include packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml
# device_board: !include packages/board/board_ESP32-S3_AtomS3-Lite.yaml
# device_board: !include
# file: packages/board/board_ESP32-S3_AtomS3.yaml # board_ESP32-S3_AtomS3R.yaml
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
########### >>> UNCOMMENT YOUR BOARD OPTIONS <<< ###########
uart_esp_1: !include packages/board/board_options_itf_uart_esp_1.yaml
# uart_esp_2: !include packages/board/board_options_itf_uart_esp_2.yaml
# uart_esp_3: !include packages/board/board_options_itf_uart_esp_3.yaml
# ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
canbus_node_1: !include
file: packages/board/board_options_itf_canbus_esp32_can.yaml
vars:
canbus_node_id: 'canbus_inverter_1'
# MCP2515
# canbus_node_2: !include
# file: packages/board/board_options_itf_canbus_mcp2515.yaml
# vars:
# canbus_node_id: 'canbus_inverter_1'
############################################################
# You don't have to import a shunt but you must import at least one BMS.
# shunt1: !include
# file: packages/shunt/shunt_combine_Victron_SmartShunt_UART.yaml # shunt_combine_Junctek_KHF_UART.yaml
# vars:
# shunt_id: '1' # must be a number
# shunt_name: 'Shunt 1'
# shunt_uart_id: 'uart_esp_3'
# The sniffer represents the ESP node connected to the JK-BMS PB RS485 bus
# If address 0x00 is not detected on the RS485 bus, the sniffer will act directly as a master BMS (mode 2, max 15 BMS)
# sniffer1: !include
# file: packages/bms/bms_combine_JK_RS485_Modbus_sniffer_talk_pin.yaml
# vars:
# sniffer_id: 'sniffer1'
# sniffer_protocol: 'JK02_32S'
# sniffer_uart_id: 'uart_esp_1'
# sniffer_talk_pin: 8 # ESP32: 4, ESP32-S3: 8, ESP32-C3: 10
sniffer1: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_sniffer.yaml
vars:
sniffer_id: 'sniffer1'
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_1'
# Mode2 : configure the DIP switches of your BMS from 0x01 to 0x0F (don't use the 0x00 address, maximum 15 BMS)
bms1: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_address: '0x01' # BMS 1 DIP switch
bms2: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_address: '0x02' # BMS 2 DIP switch
bms3: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '3' # must be a number
bms_name: 'JK-BMS 3'
bms_address: '0x03' # BMS 3 DIP switch
bms4: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '4' # must be a number
bms_name: 'JK-BMS 4'
bms_address: '0x04' # BMS 4 DIP switch
bms5: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '5' # must be a number
bms_name: 'JK-BMS 5'
bms_address: '0x05' # BMS 5 DIP switch
bms6: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '6' # must be a number
bms_name: 'JK-BMS 6'
bms_address: '0x06' # BMS 6 DIP switch
bms7: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '7' # must be a number
bms_name: 'JK-BMS 7'
bms_address: '0x07' # BMS 7 DIP switch
bms8: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '8' # must be a number
bms_name: 'JK-BMS 8'
bms_address: '0x08' # BMS 8 DIP switch
yambms: !include packages/yambms/yambms.yaml
canbus1: !include
file: packages/yambms/yambms_canbus.yaml
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (ID 0x305) for 5s
# The Deye inverter sends the ACK (can_id 0x305) only when it receives the can_id 0x356
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
device_debug: !include
file: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
+202 -98
View File
@@ -1,5 +1,5 @@
# Updated : 2025.05.13
# Version : 1.5.5
# Updated : 2026.06.29
# Version : 1.7.0
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -17,15 +17,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
######################## YamBMS Local Packages Version #########################
######################## YamBMS Remote Packages Version ########################
# You need to copy the `packages` folder into the same folder as this YAML in order to compile it.
# You can compile this YAML directly without the `packages` folder.
# The packages will be automatically downloaded from GitHub.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# Don't forget to configure your WiFi credentials in the secrets.yaml
#
# If needed, configure a static IP here
# wifi:
# manual_ip:
@@ -37,46 +36,40 @@
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
# baud_rate: 115200 # Send logs to the `hardware_uart` USB output (this consumes a UART interface)
# hardware_uart: UART0 # UART0 / USB_SERIAL_JTAG
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
- platform: esphome
# Uncomment:
# API: to monitor entities via Home Assistant
# MQTT: to monitor entities via another system
# Neither: to monitor entities only via `web_server` or nothing
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
# web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# Name
name: '' # Name that can be added as a second prefix after the friendly name, you can leave it blank.
hostname: 'pvbrain2' # This is the name of the node. It should always be unique in your ESPHome network.
friendly_name : 'YamBMS' # Prefix added in front of all entity names and also to classify them.
# This project uses the `sub-device` function of ESPHome to prefix entity names.
# This allows to group entities into logical devices that appear separately in Home Assistant.
hostname: 'pvbrain2' # Name of your ESPHome node registered on the IP network (DNS name must be unique)
friendly_name : 'PVbrain2' # Name of your board (prefix for board entities)
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: 'yambms1'
yambms_name: 'YamBMS 1'
yambms_id: '1' # Number without spaces
yambms_name: 'YamBMS 1' # Prefix for YamBMS entities
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
@@ -98,111 +91,222 @@ substitutions:
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_discharge_current: '300' # in Ampere
# +-------------------------------------------------------------------------
# | Temperature-based current limitation
# | Can be disabled via the switch "Temperature-based current limitation"
# | This factor is applied to the battery capacity (Ah), not the current
# | maximum charge/discharge current. For example : 280Ah x 0.5 = 140A
# +-------------------------------------------------------------------------
# Temperature °C -> Charge Rate (0.0C to 1.0C)
yambms_charging_rate_table: |
{
{ -0.1, 0.00 },
{ 0.0, 0.05 },
{ 5.0, 0.12 },
{ 10.0, 0.30 },
{ 20.0, 0.50 },
{ 25.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# Temperature °C -> Discharge Rate (0.0C to 1.0C)
yambms_discharging_rate_table: |
{
{-30.0, 0.00 },
{-20.0, 0.50 },
{-10.0, 0.50 },
{ -5.0, 0.50 },
{ 0.0, 0.50 },
{ 5.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | Shunt Settings |
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
shunt_combine_interval: '1s' # frequency at which Shunt data is combined in YamBMS
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
bms_combine_interval: '1s' # frequency at which BMS data is combined in YamBMS
bms_cutoff_timer: '50s' # time during which the end of charge conditions must be respected (cut-off + cells not equalizing)
# +--------------------------------------+
# | WK2168 UART expander |
# | Health & LED Assignment Logs |
# +--------------------------------------+
uart0_baudrate: '2400' #WKS {RJ45-UART0}
uart1_baudrate: '38400' #JSY193
uart2_baudrate: '19200' #SmartShunt
uart3_baudrate: '9600' #SRNE {RJ45-UART3}
uart4_baudrate: '115200' #JK-BMS 1
uart5_baudrate: '115200' #JK-BMS 2
uart6_baudrate: '115200' #Pylontech
uart7_baudrate: '9600' #EPEVER {RJ45-UART7}
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | UART expander WK2168 |
# +--------------------------------------+
uart0_baudrate: '2400' # uart_id : uart_${uart_hub_bus}_0 WKS {RJ45-UART0}
uart1_baudrate: '38400' # uart_id : uart_${uart_hub_bus}_1 JSY193
uart2_baudrate: '19200' # uart_id : uart_${uart_hub_bus}_2 SmartShunt
uart3_baudrate: '9600' # uart_id : uart_${uart_hub_bus}_3 SRNE {RJ45-UART3}
uart4_baudrate: '115200' # uart_id : uart_${uart_hub_bus}_4 JK-BMS 1
uart5_baudrate: '115200' # uart_id : uart_${uart_hub_bus}_5 JK-BMS 2
uart6_baudrate: '115200' # uart_id : uart_${uart_hub_bus}_6 Pylontech
uart7_baudrate: '9600' # uart_id : uart_${uart_hub_bus}_7 EPEVER {RJ45-UART7}
# +--------------------------------------+
# | PVbrain2 packages |
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_LP_YAML.md
packages:
device_board: !include packages/board/board_ESP32-S3_DevKitC-1_PVbrain2.yaml
board: !include
file: packages/board/board_ESP32-S3_DevKitC-1_PVbrain2.yaml
# vars:
# server_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# network_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# +------------------------------------------------------------------------------+
# | >>> Board Options
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
# uart_esp_1: !include packages/board/board_options_itf_uart_esp_1.yaml
# UART 2 (uart_id: uart_esp_2)
# uart_esp_2: !include packages/board/board_options_itf_uart_esp_2.yaml
# UART 3 (uart_id: uart_esp_3)
# uart_esp_3: !include packages/board/board_options_itf_uart_esp_3.yaml
# BUS
# bus_i2c0: !include pvbrain2/base/device_bus_i2c0.yaml # SX1509 and BME280/BMP280
bus_spi1: !include pvbrain2/base/device_bus_spi1.yaml # MCP2515
# bus_one_wire: !include pvbrain2/base/device_bus_one_wire.yaml # Dallas
# spi_bus: !include packages/board/board_options_itf_bus_spi.yaml # SPI bus for MCP2515
# i2c_bus: !include packages/board/board_options_itf_bus_i2c.yaml # I2C bus for SX1509 and BME280/BMP280
# one_wire_bus: !include packages/board/board_options_itf_bus_one_wire.yaml # One wire bus for Dallas Temperature Sensor
# Devices
# device_uart_esp: !include pvbrain2/base/device_uart_esp.yaml
device_wk2168_spi: !include pvbrain2/base/device_wk2168_spi.yaml
# device_wk2168_i2c: !include pvbrain2/base/device_wk2168_i2c.yaml
# device_sx1509: !include pvbrain2/base/device_sx1509.yaml
device_canbus_node1: !include pvbrain2/base/device_canbus_esp32can.yaml # canbus_node1
device_canbus_node2: !include pvbrain2/base/device_canbus_mcp2515.yaml # canbus_node2
# WK2168 UART/IO Expander
wk2168_spi: !include packages/board/board_options_itf_pvbrain2_wk2168_spi.yaml
# wk2168_i2c: !include packages/board/board_options_itf_pvbrain2_wk2168_i2c.yaml
# +--------------------------------------+
# | YamBMS packages |
# +--------------------------------------+
# SX1509 16 channel I/O Expander
# sx1509: !include packages/board/board_options_itf_pvbrain2_sx1509.yaml
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
canbus_node_1: !include
file: packages/board/board_options_itf_canbus_esp32_can.yaml
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
################ >>> CONFIG & CUSTOM LP <<< ################
# CAN transceiver - MCP2515
# canbus_node_2: !include
# file: packages/board/board_options_itf_canbus_mcp2515.yaml
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# Local Packages intended for creating custom codes
# or sharing settings between several main.yaml
# PSRAM octal 80Mhz
# psram_octal_80Mhz: !include packages/board/board_options_PSRAM_octal_80Mhz.yaml
# yambms_config: !include yambms_config.yaml
# yambms_custom: !include yambms_custom.yaml
# Web Server
# web_server: !include packages/yambms/yambms_web_server.yaml
# WiFi AP @ 192.168.4.1
# wifi_ap: !include packages/board/board_options_wifi_ap.yaml
# Captive Portal @ 192.168.4.1
# captive_portal: !include packages/board/board_options_captive_portal.yaml
# +------------------------------------------------------------------------------+
# | >>> BMS / Balancer / Shunt
# +------------------------------------------------------------------------------+
# You don't have to import a shunt but you must import at least one BMS.
# You can mix different BMS models, the only condition is that the `bms_id` are numbered in order starting from 1 !
shunt1: !include
file: packages/shunt/shunt_combine_Victron_SmartShunt_UART_expander.yaml # shunt_combine_Junctek_KHF_UART.yaml
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_uart_id: 'uart_${uart_hub_bus}_2'
# >>> Copy your BMS / Balancer / Shunt packages here
# >>> You can find examples at this address :
# >>> https://github.com/Sleeper85/esphome-yambms/tree/main/examples/single-node/
bms1: !include
file: packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_uart_id: 'uart_${uart_hub_bus}_4'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms2: !include
file: packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml
vars:
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_uart_id: 'uart_${uart_hub_bus}_5'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
# +------------------------------------------------------------------------------+
# | >>> YamBMS
# +------------------------------------------------------------------------------+
yambms: !include packages/yambms/yambms.yaml
canbus1: !include
file: packages/yambms/yambms_canbus.yaml
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_node1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (ID 0x305) for 5s
# The Deye inverter sends the ACK (can_id 0x305) only when it receives the can_id 0x356
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
# +------------------------------------------------------------------------------+
# | >>> CAN bus to Inverter
# +------------------------------------------------------------------------------+
canbus1: !include
file: packages/yambms/yambms_canbus.yaml # yambms_canbus_web_server.yaml
vars:
canbus_id: '1' # Must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs for the ACK can_id 0x305 (required for Schneider XW Pro)
# +------------------------------------------------------------------------------+
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# rs485_pylon: !include
# file: packages/yambms/yambms_rs485_pylon.yaml # yambms_rs485_pylon_web_server.yaml
# vars:
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> DEBUG ( logger level must be DEBUG )
# +------------------------------------------------------------------------------+
device_debug: !include
file: packages/base/device_debug_ESP32.yaml
# file: packages/base/device_debug_ESP32_PSRAM.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
# Size of your PSRAM in bits
# 8Mb='8388608' | 6Mb='6291456' | 4Mb='4194304' | 2Mb='2097152' | NoPSRAM='0'
debug_psram_size: '8388608'
# +------------------------------------------------------------------------------+
# | >>> Add your custom packages below
# +------------------------------------------------------------------------------+
# Custom packages
# yambms_custom: !include yambms_custom.yaml
# +------------------------------------------------------------------------------+
# | >>> Add your custom YAML below
# +----- -------------------------------------------------------------------------+
# Custom YAML
+219 -99
View File
@@ -1,5 +1,5 @@
# Updated : 2025.05.13
# Version : 1.5.5
# Updated : 2026.06.29
# Version : 1.7.0
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -17,15 +17,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
######################## YamBMS Local Packages Version #########################
######################## YamBMS Remote Packages Version ########################
# You need to copy the `packages` folder into the same folder as this YAML in order to compile it.
# You can compile this YAML directly without the `packages` folder.
# The packages will be automatically downloaded from GitHub.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# Don't forget to configure your WiFi credentials in the secrets.yaml
#
# If needed, configure a static IP here
# wifi:
# manual_ip:
@@ -37,46 +36,40 @@
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
# baud_rate: 115200 # Send logs to the `hardware_uart` USB output (this consumes a UART interface)
# hardware_uart: UART0 # UART0 / USB_SERIAL_JTAG
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
- platform: esphome
# Uncomment:
# API: to monitor entities via Home Assistant
# MQTT: to monitor entities via another system
# Neither: to monitor entities only via `web_server` or nothing
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
# web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# Name
name: '' # Name that can be added as a second prefix after the friendly name, you can leave it blank.
hostname: 'yambms' # This is the name of the node. It should always be unique in your ESPHome network.
friendly_name : 'YamBMS' # Prefix added in front of all entity names and also to classify them.
# This project uses the `sub-device` function of ESPHome to prefix entity names.
# This allows to group entities into logical devices that appear separately in Home Assistant.
hostname: 'yambms' # Name of your ESPHome node registered on the IP network (DNS name must be unique)
friendly_name : 'YamBMS' # Name of your board (prefix for board entities)
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: 'yambms1'
yambms_name: 'YamBMS 1'
yambms_id: '1' # Number without spaces
yambms_name: 'YamBMS 1' # Prefix for YamBMS entities
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
@@ -98,125 +91,252 @@ substitutions:
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_discharge_current: '300' # in Ampere
# +-------------------------------------------------------------------------
# | Temperature-based current limitation
# | Can be disabled via the switch "Temperature-based current limitation"
# | This factor is applied to the battery capacity (Ah), not the current
# | maximum charge/discharge current. For example : 280Ah x 0.5 = 140A
# +-------------------------------------------------------------------------
# Temperature °C -> Charge Rate (0.0C to 1.0C)
yambms_charging_rate_table: |
{
{ -0.1, 0.00 },
{ 0.0, 0.05 },
{ 5.0, 0.12 },
{ 10.0, 0.30 },
{ 20.0, 0.50 },
{ 25.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# Temperature °C -> Discharge Rate (0.0C to 1.0C)
yambms_discharging_rate_table: |
{
{-30.0, 0.00 },
{-20.0, 0.50 },
{-10.0, 0.50 },
{ -5.0, 0.50 },
{ 0.0, 0.50 },
{ 5.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | Shunt Settings |
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
shunt_combine_interval: '1s' # frequency at which Shunt data is combined in YamBMS
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
bms_combine_interval: '1s' # frequency at which BMS data is combined in YamBMS
bms_cutoff_timer: '50s' # time during which the end of charge conditions must be respected (cut-off + cells not equalizing)
# +--------------------------------------+
# | Health & LED Assignment Logs |
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_LP_YAML.md
packages:
################ >>> CONFIG & CUSTOM LP <<< ################
# Local Packages intended for creating custom codes
# or sharing settings between several main.yaml
# yambms_config: !include yambms_config.yaml
# yambms_custom: !include yambms_custom.yaml
############### >>> UNCOMMENT YOUR BOARD <<< ###############
############### >>> ONLY ONE BOARD ! <<< ###############
# +------------------------------------------------------------------------------+
# | >>> UNCOMMENT YOUR BOARD
# | >>> ONLY ONE BOARD !
# +------------------------------------------------------------------------------+
# This list is incomplete, other board.yaml are available in the board folder
device_board: !include packages/board/board_ESP32_Generic.yaml
# device_board: !include packages/board/board_ESP32_DevKit-V1.yaml
# device_board: !include packages/board/board_ESP32_LilyGo-T-CAN485.yaml
# device_board: !include packages/board/board_ESP32_EVB.yaml
# device_board: !include packages/board/board_ESP32_Atom-Lite.yaml
# device_board: !include packages/board/board_ESP32-C3_DevKitM-1.yaml
# device_board: !include packages/board/board_ESP32-C3_ETH01-EVO.yaml
# device_board: !include packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml
# device_board: !include packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml
# device_board: !include packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml
# device_board: !include packages/board/board_ESP32-S3_AtomS3-Lite.yaml
# device_board: !include
# file: packages/board/board_ESP32-S3_AtomS3.yaml # board_ESP32-S3_AtomS3R.yaml
board: !include
file: 'packages/board/board_ESP32_Generic.yaml'
# file: 'packages/board/board_ESP32_Atom-Lite.yaml'
# file: 'packages/board/board_ESP32_DevKit-V1.yaml'
# file: 'packages/board/board_ESP32_EVB.yaml'
# file: 'packages/board/board_ESP32_iBMS_CAN_RS485_V3.3.yaml'
# file: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
# file: 'packages/board/board_ESP32-C3_DevKitM-1.yaml'
# file: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
# file: 'packages/board/board_ESP32-C3_FlipC3.yaml'
# file: 'packages/board/board_ESP32-S3_Generic.yaml'
# file: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
# file: 'packages/board/board_ESP32-S3_AtomS3.yaml'
# file: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
# file: 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml'
# file: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml'
# file: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
# file: 'packages/board/board_ESP32-S3_LilyGo-T-Connect-Pro.yaml'
# file: 'packages/board/board_ESP32-S3_WS-ETH.yaml'
# file: 'packages/board/board_ESP32-S3_WS-RS485-CAN.yaml'
# file: 'packages/board/board_ESP32-S3_WS-Touch-LCD-4.3.yaml'
# file: 'packages/board/board_ESP32-S3_WS-Touch-LCD-7.yaml'
# file: 'packages/board/board_ESP32-S3_XIAO.yaml'
# file: 'packages/board/board_ESP32-S3_YBoard.yaml'
# vars:
# server_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# network_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# +------------------------------------------------------------------------------+
# | >>> Board Display
# | >>> Uncomment the display that corresponds to your board
# +------------------------------------------------------------------------------+
# board_display: !include
# file: 'packages/board/board_options_display_128x128.yaml' # AtomS3 / AtomS3R
# file: 'packages/board/board_options_display_480x222.yaml' # LilyGo T-Connect Pro
# file: 'packages/board/board_options_display_lvgl_package_800x480_blue_navy_esphome.yaml' # WS Touch LCD 4.3" and 7"
# file: 'packages/board/board_options_display_lvgl_package_1280x720_Tab5_esphome.yaml' # M5Stack Tab5
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
########### >>> UNCOMMENT YOUR BOARD OPTIONS <<< ###########
# +------------------------------------------------------------------------------+
# | >>> Board Options
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
uart_esp_1: !include packages/board/board_options_itf_uart_esp_1.yaml
uart_esp_2: !include packages/board/board_options_itf_uart_esp_2.yaml
uart_esp_3: !include packages/board/board_options_itf_uart_esp_3.yaml
# UART 2 (uart_id: uart_esp_2)
# uart_esp_2: !include packages/board/board_options_itf_uart_esp_2.yaml
# UART 3 (uart_id: uart_esp_3)
# uart_esp_3: !include packages/board/board_options_itf_uart_esp_3.yaml
# ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
# UART flow control
# uart_flow_control: !include
# file: packages/board/board_options_itf_uart_flow_control.yaml
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
canbus_node_1: !include
file: packages/board/board_options_itf_canbus_esp32_can.yaml
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# MCP2515
# CAN transceiver - MCP2515
# canbus_node_2: !include
# file: packages/board/board_options_itf_canbus_mcp2515.yaml
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
############################################################
# PSRAM octal 80Mhz
# psram_octal_80Mhz: !include packages/board/board_options_PSRAM_octal_80Mhz.yaml
# Web Server
# web_server: !include packages/yambms/yambms_web_server.yaml
# WiFi AP @ 192.168.4.1
# wifi_ap: !include packages/board/board_options_wifi_ap.yaml
# Captive Portal @ 192.168.4.1
# captive_portal: !include packages/board/board_options_captive_portal.yaml
# +------------------------------------------------------------------------------+
# | >>> BMS / Balancer / Shunt
# +------------------------------------------------------------------------------+
# You don't have to import a shunt but you must import at least one BMS.
# You can mix different BMS models, the only condition is that the `bms_id` are numbered in order starting from 1 !
shunt1: !include
file: packages/shunt/shunt_combine_Victron_SmartShunt_UART.yaml # shunt_combine_Junctek_KHF_UART.yaml
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_uart_id: 'uart_esp_3'
# >>> Copy your BMS / Balancer / Shunt packages here
# >>> You can find examples at this address :
# >>> https://github.com/Sleeper85/esphome-yambms/tree/main/examples/single-node/
bms1: !include
file: packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_uart_id: 'uart_esp_1'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms2: !include
file: packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml
vars:
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_uart_id: 'uart_esp_2'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
# +------------------------------------------------------------------------------+
# | >>> YamBMS
# +------------------------------------------------------------------------------+
yambms: !include packages/yambms/yambms.yaml
canbus1: !include
file: packages/yambms/yambms_canbus.yaml
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (ID 0x305) for 5s
# The Deye inverter sends the ACK (can_id 0x305) only when it receives the can_id 0x356
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
# +------------------------------------------------------------------------------+
# | >>> CAN bus to Inverter
# +------------------------------------------------------------------------------+
canbus1: !include
file: packages/yambms/yambms_canbus.yaml # yambms_canbus_web_server.yaml
vars:
canbus_id: '1' # Must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs for the ACK can_id 0x305 (required for Schneider XW Pro)
# +------------------------------------------------------------------------------+
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# rs485_pylon: !include
# file: packages/yambms/yambms_rs485_pylon.yaml # yambms_rs485_pylon_web_server.yaml
# vars:
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> DEBUG ( logger level must be DEBUG )
# +------------------------------------------------------------------------------+
device_debug: !include
file: packages/base/device_debug_ESP32.yaml
# file: packages/base/device_debug_ESP32_PSRAM.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
# Size of your PSRAM in bits
# 8Mb='8388608' | 6Mb='6291456' | 4Mb='4194304' | 2Mb='2097152' | NoPSRAM='0'
debug_psram_size: '8388608'
# +------------------------------------------------------------------------------+
# | >>> Add your custom packages below
# +------------------------------------------------------------------------------+
# Custom packages
# yambms_custom: !include yambms_custom.yaml
# +------------------------------------------------------------------------------+
# | >>> Add your custom YAML below
# +----- -------------------------------------------------------------------------+
# Custom YAML
+361
View File
@@ -0,0 +1,361 @@
# Updated : 2026.06.29
# Version : 1.7.0
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
######################## YamBMS Remote Packages Version ########################
# You can compile this YAML directly without the `packages` folder.
# The packages will be automatically downloaded from GitHub.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
# baud_rate: 115200 # Send logs to the `hardware_uart` USB output (this consumes a UART interface)
# hardware_uart: UART0 # UART0 / USB_SERIAL_JTAG
ota:
- platform: esphome
# Uncomment:
# API: to monitor entities via Home Assistant
# MQTT: to monitor entities via another system
# Neither: to monitor entities only via `web_server` or nothing
api:
reboot_timeout: 0s
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# This project uses the `sub-device` function of ESPHome to prefix entity names.
# This allows to group entities into logical devices that appear separately in Home Assistant.
hostname: 'yambms' # Name of your ESPHome node registered on the IP network (DNS name must be unique)
friendly_name : 'YamBMS' # Name of your board (prefix for board entities)
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: '1' # Number without spaces
yambms_name: 'YamBMS 1' # Prefix for YamBMS entities
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_discharge_current: '300' # in Ampere
# +-------------------------------------------------------------------------
# | Temperature-based current limitation
# | Can be disabled via the switch "Temperature-based current limitation"
# | This factor is applied to the battery capacity (Ah), not the current
# | maximum charge/discharge current. For example : 280Ah x 0.5 = 140A
# +-------------------------------------------------------------------------
# Temperature °C -> Charge Rate (0.0C to 1.0C)
yambms_charging_rate_table: |
{
{ -0.1, 0.00 },
{ 0.0, 0.05 },
{ 5.0, 0.12 },
{ 10.0, 0.30 },
{ 20.0, 0.50 },
{ 25.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# Temperature °C -> Discharge Rate (0.0C to 1.0C)
yambms_discharging_rate_table: |
{
{-30.0, 0.00 },
{-20.0, 0.50 },
{-10.0, 0.50 },
{ -5.0, 0.50 },
{ 0.0, 0.50 },
{ 5.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
# +--------------------------------------+
# | Health & LED Assignment Logs |
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_RP_YAML.md
packages:
remote_packages:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 60min
files:
# +------------------------------------------------------------------------------+
# | >>> UNCOMMENT YOUR BOARD
# | >>> ONLY ONE BOARD !
# +------------------------------------------------------------------------------+
- path: 'packages/board/board_ESP32_Generic.yaml'
# - path: 'packages/board/board_ESP32_Atom-Lite.yaml'
# - path: 'packages/board/board_ESP32_DevKit-V1.yaml'
# - path: 'packages/board/board_ESP32_EVB.yaml'
# - path: 'packages/board/board_ESP32_iBMS_CAN_RS485_V3.3.yaml'
# - path: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
# - path: 'packages/board/board_ESP32-C3_DevKitM-1.yaml'
# - path: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
# - path: 'packages/board/board_ESP32-C3_FlipC3.yaml'
# - path: 'packages/board/board_ESP32-S3_Generic.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect-Pro.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-ETH.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-RS485-CAN.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-4.3.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-7.yaml'
# - path: 'packages/board/board_ESP32-S3_XIAO.yaml'
# - path: 'packages/board/board_ESP32-S3_YBoard.yaml'
# vars:
# server_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# network_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# +------------------------------------------------------------------------------+
# | >>> Board Display
# | >>> Uncomment the display that corresponds to your board
# +------------------------------------------------------------------------------+
# - path: 'packages/board/board_options_display_128x128.yaml' # AtomS3 / AtomS3R
# - path: 'packages/board/board_options_display_480x222.yaml' # LilyGo T-Connect Pro
# - path: 'packages/board/board_options_display_lvgl_package_800x480_blue_navy_esphome.yaml' # WS Touch LCD 4.3" and 7"
# - path: 'packages/board/board_options_display_lvgl_package_1280x720_Tab5_esphome.yaml' # M5Stack Tab5
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
# +------------------------------------------------------------------------------+
# | >>> Board Options
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
# Web Server
# - path: 'packages/yambms/yambms_web_server.yaml'
# WiFi AP @ 192.168.4.1
# - path: 'packages/board/board_options_wifi_ap.yaml'
# Captive Portal @ 192.168.4.1
# - path: 'packages/board/board_options_captive_portal.yaml'
# +------------------------------------------------------------------------------+
# | >>> BMS / Balancer / Shunt
# +------------------------------------------------------------------------------+
# You don't have to import a shunt but you must import at least one BMS.
# You can mix different BMS models, the only condition is that the `bms_id` are numbered in order starting from 1 !
# >>> Copy your BMS / Balancer / Shunt packages here
# >>> You can find examples at this address :
# >>> https://github.com/Sleeper85/esphome-yambms/tree/main/examples/single-node/
# Basen controller
- path: packages/bms/bms_combine_BASEN_RS485_controller.yaml
vars:
basen_uart_id: 'uart_esp_1'
basen_uart_baud_rate: '9600'
basen_controller_id: "basen_controller_1"
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# Basen module 1
- path: packages/bms/bms_combine_BASEN_RS485_full.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'BASEN-BMS 1'
bms_address: '0x01'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# Basen module 2
- path: packages/bms/bms_combine_BASEN_RS485_full.yaml
vars:
bms_id: '2' # must be a number
bms_name: 'BASEN-BMS 2'
bms_address: '0x02'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> YamBMS
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms.yaml'
# +------------------------------------------------------------------------------+
# | >>> CAN bus to Inverter
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms_canbus.yaml' # yambms_canbus_web_server.yaml
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
# +------------------------------------------------------------------------------+
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# vars:
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> DEBUG ( logger level must be DEBUG )
# +------------------------------------------------------------------------------+
- path: packages/base/device_debug_ESP32.yaml
# - path: packages/base/device_debug_ESP32_PSRAM.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
# Size of your PSRAM in bits
# 8Mb='8388608' | 6Mb='6291456' | 4Mb='4194304' | 2Mb='2097152' | NoPSRAM='0'
debug_psram_size: '8388608'
# +------------------------------------------------------------------------------+
# | >>> Add your custom packages below
# +------------------------------------------------------------------------------+
# Custom packages
# yambms_custom: !include yambms_custom.yaml
# +------------------------------------------------------------------------------+
# | >>> Add your custom YAML below
# +----- -------------------------------------------------------------------------+
# Custom YAML
+370
View File
@@ -0,0 +1,370 @@
# Updated : 2026.06.29
# Version : 1.7.0
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
######################## YamBMS Remote Packages Version ########################
# You can compile this YAML directly without the `packages` folder.
# The packages will be automatically downloaded from GitHub.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
# baud_rate: 115200 # Send logs to the `hardware_uart` USB output (this consumes a UART interface)
# hardware_uart: UART0 # UART0 / USB_SERIAL_JTAG
ota:
- platform: esphome
# Uncomment:
# API: to monitor entities via Home Assistant
# MQTT: to monitor entities via another system
# Neither: to monitor entities only via `web_server` or nothing
api:
reboot_timeout: 0s
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# This project uses the `sub-device` function of ESPHome to prefix entity names.
# This allows to group entities into logical devices that appear separately in Home Assistant.
hostname: 'yambms' # Name of your ESPHome node registered on the IP network (DNS name must be unique)
friendly_name : 'YamBMS' # Name of your board (prefix for board entities)
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: '1' # Number without spaces
yambms_name: 'YamBMS 1' # Prefix for YamBMS entities
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_discharge_current: '300' # in Ampere
# +-------------------------------------------------------------------------
# | Temperature-based current limitation
# | Can be disabled via the switch "Temperature-based current limitation"
# | This factor is applied to the battery capacity (Ah), not the current
# | maximum charge/discharge current. For example : 280Ah x 0.5 = 140A
# +-------------------------------------------------------------------------
# Temperature °C -> Charge Rate (0.0C to 1.0C)
yambms_charging_rate_table: |
{
{ -0.1, 0.00 },
{ 0.0, 0.05 },
{ 5.0, 0.12 },
{ 10.0, 0.30 },
{ 20.0, 0.50 },
{ 25.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# Temperature °C -> Discharge Rate (0.0C to 1.0C)
yambms_discharging_rate_table: |
{
{-30.0, 0.00 },
{-20.0, 0.50 },
{-10.0, 0.50 },
{ -5.0, 0.50 },
{ 0.0, 0.50 },
{ 5.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
# +--------------------------------------+
# | Health & LED Assignment Logs |
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_RP_YAML.md
packages:
remote_packages:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 60min
files:
# +------------------------------------------------------------------------------+
# | >>> UNCOMMENT YOUR BOARD
# | >>> ONLY ONE BOARD !
# +------------------------------------------------------------------------------+
- path: 'packages/board/board_ESP32_Generic.yaml'
# - path: 'packages/board/board_ESP32_Atom-Lite.yaml'
# - path: 'packages/board/board_ESP32_DevKit-V1.yaml'
# - path: 'packages/board/board_ESP32_EVB.yaml'
# - path: 'packages/board/board_ESP32_iBMS_CAN_RS485_V3.3.yaml'
# - path: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
# - path: 'packages/board/board_ESP32-C3_DevKitM-1.yaml'
# - path: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
# - path: 'packages/board/board_ESP32-C3_FlipC3.yaml'
# - path: 'packages/board/board_ESP32-S3_Generic.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect-Pro.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-ETH.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-RS485-CAN.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-4.3.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-7.yaml'
# - path: 'packages/board/board_ESP32-S3_XIAO.yaml'
# - path: 'packages/board/board_ESP32-S3_YBoard.yaml'
# vars:
# server_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# network_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# +------------------------------------------------------------------------------+
# | >>> Board Display
# | >>> Uncomment the display that corresponds to your board
# +------------------------------------------------------------------------------+
# - path: 'packages/board/board_options_display_128x128.yaml' # AtomS3 / AtomS3R
# - path: 'packages/board/board_options_display_480x222.yaml' # LilyGo T-Connect Pro
# - path: 'packages/board/board_options_display_lvgl_package_800x480_blue_navy_esphome.yaml' # WS Touch LCD 4.3" and 7"
# - path: 'packages/board/board_options_display_lvgl_package_1280x720_Tab5_esphome.yaml' # M5Stack Tab5
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
# +------------------------------------------------------------------------------+
# | >>> Board Options
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
# - path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
- path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_bms_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
# Web Server
# - path: 'packages/yambms/yambms_web_server.yaml'
# WiFi AP @ 192.168.4.1
# - path: 'packages/board/board_options_wifi_ap.yaml'
# Captive Portal @ 192.168.4.1
# - path: 'packages/board/board_options_captive_portal.yaml'
# +------------------------------------------------------------------------------+
# | >>> BMS / Balancer / Shunt
# +------------------------------------------------------------------------------+
# You don't have to import a shunt but you must import at least one BMS.
# You can mix different BMS models, the only condition is that the `bms_id` are numbered in order starting from 1 !
# >>> Copy your BMS / Balancer / Shunt packages here
# >>> You can find examples at this address :
# >>> https://github.com/Sleeper85/esphome-yambms/tree/main/examples/single-node/
# Deye BMS top unit (required)
- path: 'packages/bms/bms_sensors_DEYE_CAN_top_full.yaml'
vars:
# CAN BUS ID
canbus_id: 'canbus_bms_1'
deye_name: 'DEYE-Top 1'
deye_id: '1'
# Deye module 1
- path: 'packages/bms/bms_combine_DEYE_CAN_module_full.yaml'
vars:
# CAN BUS ID
canbus_id: 'canbus_bms_1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'DEYE-BMS 1'
deye_id: '1'
deye_module_id: '0' # Modules are numbered with 0-9
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# Deye module 2
- path: 'packages/bms/bms_combine_DEYE_CAN_module_full.yaml'
vars:
# CAN BUS ID
canbus_id: 'canbus_bms_1'
# BMS vars
deye_id: '1'
bms_id: '2' # must be a number
bms_name: 'DEYE-BMS 2'
deye_module_id: '1' # Modules are numbered with 0-9
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> YamBMS
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms.yaml'
# +------------------------------------------------------------------------------+
# | >>> CAN bus to Inverter
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms_canbus.yaml' # yambms_canbus_web_server.yaml
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
# +------------------------------------------------------------------------------+
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# vars:
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> DEBUG ( logger level must be DEBUG )
# +------------------------------------------------------------------------------+
- path: packages/base/device_debug_ESP32.yaml
# - path: packages/base/device_debug_ESP32_PSRAM.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
# Size of your PSRAM in bits
# 8Mb='8388608' | 6Mb='6291456' | 4Mb='4194304' | 2Mb='2097152' | NoPSRAM='0'
debug_psram_size: '8388608'
# +------------------------------------------------------------------------------+
# | >>> Add your custom packages below
# +------------------------------------------------------------------------------+
# Custom packages
# yambms_custom: !include yambms_custom.yaml
# +------------------------------------------------------------------------------+
# | >>> Add your custom YAML below
# +----- -------------------------------------------------------------------------+
# Custom YAML
+367
View File
@@ -0,0 +1,367 @@
# Updated : 2026.06.29
# Version : 1.7.0
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
######################## YamBMS Remote Packages Version ########################
# You can compile this YAML directly without the `packages` folder.
# The packages will be automatically downloaded from GitHub.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
# baud_rate: 115200 # Send logs to the `hardware_uart` USB output (this consumes a UART interface)
# hardware_uart: UART0 # UART0 / USB_SERIAL_JTAG
ota:
- platform: esphome
# Uncomment:
# API: to monitor entities via Home Assistant
# MQTT: to monitor entities via another system
# Neither: to monitor entities only via `web_server` or nothing
api:
reboot_timeout: 0s
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# This project uses the `sub-device` function of ESPHome to prefix entity names.
# This allows to group entities into logical devices that appear separately in Home Assistant.
hostname: 'yambms' # Name of your ESPHome node registered on the IP network (DNS name must be unique)
friendly_name : 'YamBMS' # Name of your board (prefix for board entities)
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: '1' # Number without spaces
yambms_name: 'YamBMS 1' # Prefix for YamBMS entities
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_discharge_current: '300' # in Ampere
# +-------------------------------------------------------------------------
# | Temperature-based current limitation
# | Can be disabled via the switch "Temperature-based current limitation"
# | This factor is applied to the battery capacity (Ah), not the current
# | maximum charge/discharge current. For example : 280Ah x 0.5 = 140A
# +-------------------------------------------------------------------------
# Temperature °C -> Charge Rate (0.0C to 1.0C)
yambms_charging_rate_table: |
{
{ -0.1, 0.00 },
{ 0.0, 0.05 },
{ 5.0, 0.12 },
{ 10.0, 0.30 },
{ 20.0, 0.50 },
{ 25.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# Temperature °C -> Discharge Rate (0.0C to 1.0C)
yambms_discharging_rate_table: |
{
{-30.0, 0.00 },
{-20.0, 0.50 },
{-10.0, 0.50 },
{ -5.0, 0.50 },
{ 0.0, 0.50 },
{ 5.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
# +--------------------------------------+
# | Health & LED Assignment Logs |
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_RP_YAML.md
packages:
remote_packages:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 60min
files:
# +------------------------------------------------------------------------------+
# | >>> UNCOMMENT YOUR BOARD
# | >>> ONLY ONE BOARD !
# +------------------------------------------------------------------------------+
- path: 'packages/board/board_ESP32_Generic.yaml'
# - path: 'packages/board/board_ESP32_Atom-Lite.yaml'
# - path: 'packages/board/board_ESP32_DevKit-V1.yaml'
# - path: 'packages/board/board_ESP32_EVB.yaml'
# - path: 'packages/board/board_ESP32_iBMS_CAN_RS485_V3.3.yaml'
# - path: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
# - path: 'packages/board/board_ESP32-C3_DevKitM-1.yaml'
# - path: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
# - path: 'packages/board/board_ESP32-C3_FlipC3.yaml'
# - path: 'packages/board/board_ESP32-S3_Generic.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect-Pro.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-ETH.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-RS485-CAN.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-4.3.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-7.yaml'
# - path: 'packages/board/board_ESP32-S3_XIAO.yaml'
# - path: 'packages/board/board_ESP32-S3_YBoard.yaml'
# vars:
# server_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# network_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# +------------------------------------------------------------------------------+
# | >>> Board Display
# | >>> Uncomment the display that corresponds to your board
# +------------------------------------------------------------------------------+
# - path: 'packages/board/board_options_display_128x128.yaml' # AtomS3 / AtomS3R
# - path: 'packages/board/board_options_display_480x222.yaml' # LilyGo T-Connect Pro
# - path: 'packages/board/board_options_display_lvgl_package_800x480_blue_navy_esphome.yaml' # WS Touch LCD 4.3" and 7"
# - path: 'packages/board/board_options_display_lvgl_package_1280x720_Tab5_esphome.yaml' # M5Stack Tab5
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
# +------------------------------------------------------------------------------+
# | >>> Board Options
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
# Web Server
# - path: 'packages/yambms/yambms_web_server.yaml'
# WiFi AP @ 192.168.4.1
# - path: 'packages/board/board_options_wifi_ap.yaml'
# Captive Portal @ 192.168.4.1
# - path: 'packages/board/board_options_captive_portal.yaml'
# +------------------------------------------------------------------------------+
# | >>> BMS / Balancer / Shunt
# +------------------------------------------------------------------------------+
# You don't have to import a shunt but you must import at least one BMS.
# You can mix different BMS models, the only condition is that the `bms_id` are numbered in order starting from 1 !
# >>> Copy your BMS / Balancer / Shunt packages here
# >>> You can find examples at this address :
# >>> https://github.com/Sleeper85/esphome-yambms/tree/main/examples/single-node/
# EG4 Modbus
- path: 'packages/bms/bms_combine_EG4_RS485_modbus.yaml'
vars:
eg4_modbus_uart_id: 'uart_esp_1'
eg4_modbus_baud_rate: '9600'
# BMS 1
- path: 'packages/bms/bms_combine_EG4_LLV2_RS485_bms_full.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'EG4-BMS 1'
## BMS address must start at 2 with EG4 LLV2, ID 1 is a special case and has different output.
bms_address: 2 # BMS 1 modbus address
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_EG4_LLV2_RS485_bms_full.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'EG4-BMS 2'
bms_address: 3 # BMS 2 modbus address
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 3
- path: 'packages/bms/bms_combine_EG4_LLV2_RS485_bms_full.yaml'
vars:
bms_id: '3' # must be a number
bms_name: 'EG4-BMS 3'
bms_address: 4 # BMS 3 modbus address
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> YamBMS
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms.yaml'
# +------------------------------------------------------------------------------+
# | >>> CAN bus to Inverter
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms_canbus.yaml' # yambms_canbus_web_server.yaml
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
# +------------------------------------------------------------------------------+
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# vars:
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> DEBUG ( logger level must be DEBUG )
# +------------------------------------------------------------------------------+
- path: packages/base/device_debug_ESP32.yaml
# - path: packages/base/device_debug_ESP32_PSRAM.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
# Size of your PSRAM in bits
# 8Mb='8388608' | 6Mb='6291456' | 4Mb='4194304' | 2Mb='2097152' | NoPSRAM='0'
debug_psram_size: '8388608'
# +------------------------------------------------------------------------------+
# | >>> Add your custom packages below
# +------------------------------------------------------------------------------+
# Custom packages
# yambms_custom: !include yambms_custom.yaml
# +------------------------------------------------------------------------------+
# | >>> Add your custom YAML below
# +----- -------------------------------------------------------------------------+
# Custom YAML
+367
View File
@@ -0,0 +1,367 @@
# Updated : 2026.06.29
# Version : 1.7.0
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
######################## YamBMS Remote Packages Version ########################
# You can compile this YAML directly without the `packages` folder.
# The packages will be automatically downloaded from GitHub.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
# baud_rate: 115200 # Send logs to the `hardware_uart` USB output (this consumes a UART interface)
# hardware_uart: UART0 # UART0 / USB_SERIAL_JTAG
ota:
- platform: esphome
# Uncomment:
# API: to monitor entities via Home Assistant
# MQTT: to monitor entities via another system
# Neither: to monitor entities only via `web_server` or nothing
api:
reboot_timeout: 0s
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# This project uses the `sub-device` function of ESPHome to prefix entity names.
# This allows to group entities into logical devices that appear separately in Home Assistant.
hostname: 'yambms' # Name of your ESPHome node registered on the IP network (DNS name must be unique)
friendly_name : 'YamBMS' # Name of your board (prefix for board entities)
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: '1' # Number without spaces
yambms_name: 'YamBMS 1' # Prefix for YamBMS entities
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_discharge_current: '300' # in Ampere
# +-------------------------------------------------------------------------
# | Temperature-based current limitation
# | Can be disabled via the switch "Temperature-based current limitation"
# | This factor is applied to the battery capacity (Ah), not the current
# | maximum charge/discharge current. For example : 280Ah x 0.5 = 140A
# +-------------------------------------------------------------------------
# Temperature °C -> Charge Rate (0.0C to 1.0C)
yambms_charging_rate_table: |
{
{ -0.1, 0.00 },
{ 0.0, 0.05 },
{ 5.0, 0.12 },
{ 10.0, 0.30 },
{ 20.0, 0.50 },
{ 25.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# Temperature °C -> Discharge Rate (0.0C to 1.0C)
yambms_discharging_rate_table: |
{
{-30.0, 0.00 },
{-20.0, 0.50 },
{-10.0, 0.50 },
{ -5.0, 0.50 },
{ 0.0, 0.50 },
{ 5.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
# +--------------------------------------+
# | Health & LED Assignment Logs |
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_RP_YAML.md
packages:
remote_packages:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 60min
files:
# +------------------------------------------------------------------------------+
# | >>> UNCOMMENT YOUR BOARD
# | >>> ONLY ONE BOARD !
# +------------------------------------------------------------------------------+
- path: 'packages/board/board_ESP32_Generic.yaml'
# - path: 'packages/board/board_ESP32_Atom-Lite.yaml'
# - path: 'packages/board/board_ESP32_DevKit-V1.yaml'
# - path: 'packages/board/board_ESP32_EVB.yaml'
# - path: 'packages/board/board_ESP32_iBMS_CAN_RS485_V3.3.yaml'
# - path: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
# - path: 'packages/board/board_ESP32-C3_DevKitM-1.yaml'
# - path: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
# - path: 'packages/board/board_ESP32-C3_FlipC3.yaml'
# - path: 'packages/board/board_ESP32-S3_Generic.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect-Pro.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-ETH.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-RS485-CAN.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-4.3.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-7.yaml'
# - path: 'packages/board/board_ESP32-S3_XIAO.yaml'
# - path: 'packages/board/board_ESP32-S3_YBoard.yaml'
# vars:
# server_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# network_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# +------------------------------------------------------------------------------+
# | >>> Board Display
# | >>> Uncomment the display that corresponds to your board
# +------------------------------------------------------------------------------+
# - path: 'packages/board/board_options_display_128x128.yaml' # AtomS3 / AtomS3R
# - path: 'packages/board/board_options_display_480x222.yaml' # LilyGo T-Connect Pro
# - path: 'packages/board/board_options_display_lvgl_package_800x480_blue_navy_esphome.yaml' # WS Touch LCD 4.3" and 7"
# - path: 'packages/board/board_options_display_lvgl_package_1280x720_Tab5_esphome.yaml' # M5Stack Tab5
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
# +------------------------------------------------------------------------------+
# | >>> Board Options
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
# Web Server
# - path: 'packages/yambms/yambms_web_server.yaml'
# WiFi AP @ 192.168.4.1
# - path: 'packages/board/board_options_wifi_ap.yaml'
# Captive Portal @ 192.168.4.1
# - path: 'packages/board/board_options_captive_portal.yaml'
# +------------------------------------------------------------------------------+
# | >>> BMS / Balancer / Shunt
# +------------------------------------------------------------------------------+
# You don't have to import a shunt but you must import at least one BMS.
# You can mix different BMS models, the only condition is that the `bms_id` are numbered in order starting from 1 !
# >>> Copy your BMS / Balancer / Shunt packages here
# >>> You can find examples at this address :
# >>> https://github.com/Sleeper85/esphome-yambms/tree/main/examples/single-node/
# Ecoworthy Modbus - Include this ONCE per RS485 bus
- path: 'packages/bms/bms_combine_Ecoworthy_RS485_modbus.yaml'
vars:
ecoworthy_modbus_uart_id: 'uart_esp_1'
ecoworthy_modbus_baud_rate: '9600'
# BMS 1
- path: 'packages/bms/bms_combine_Ecoworthy_RS485.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'Ecoworthy-BMS 1'
bms_address: '0x01' # BMS 1 modbus address (usually 0x01 for master)
bms_max_charge_current: '100' # A. Max charge current
bms_max_discharge_current: '100' # A. Max discharge current
bms_cell_ovp: '3.650' # V. Cell over-voltage protection
bms_cell_uvp: '2.500' # V. Cell under-voltage protection
bms_balance_trigger_voltage: '0.030' # V. Balance trigger voltage
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_Ecoworthy_RS485.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'Ecoworthy-BMS 2'
bms_address: '0x02' # BMS 2 modbus address
bms_max_charge_current: '100' # A. Max charge current
bms_max_discharge_current: '100' # A. Max discharge current
bms_cell_ovp: '3.650' # V. Cell over-voltage protection
bms_cell_uvp: '2.500' # V. Cell under-voltage protection
bms_balance_trigger_voltage: '0.030' # V. Balance trigger voltage
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> YamBMS
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms.yaml'
# +------------------------------------------------------------------------------+
# | >>> CAN bus to Inverter
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms_canbus.yaml' # yambms_canbus_web_server.yaml
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
# +------------------------------------------------------------------------------+
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# vars:
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> DEBUG ( logger level must be DEBUG )
# +------------------------------------------------------------------------------+
- path: packages/base/device_debug_ESP32.yaml
# - path: packages/base/device_debug_ESP32_PSRAM.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
# Size of your PSRAM in bits
# 8Mb='8388608' | 6Mb='6291456' | 4Mb='4194304' | 2Mb='2097152' | NoPSRAM='0'
debug_psram_size: '8388608'
# +------------------------------------------------------------------------------+
# | >>> Add your custom packages below
# +------------------------------------------------------------------------------+
# Custom packages
# yambms_custom: !include yambms_custom.yaml
# +------------------------------------------------------------------------------+
# | >>> Add your custom YAML below
# +----- -------------------------------------------------------------------------+
# Custom YAML
+377
View File
@@ -0,0 +1,377 @@
# Updated : 2026.06.29
# Version : 1.7.0
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
######################## YamBMS Remote Packages Version ########################
# You can compile this YAML directly without the `packages` folder.
# The packages will be automatically downloaded from GitHub.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
# baud_rate: 115200 # Send logs to the `hardware_uart` USB output (this consumes a UART interface)
# hardware_uart: UART0 # UART0 / USB_SERIAL_JTAG
ota:
- platform: esphome
# Uncomment:
# API: to monitor entities via Home Assistant
# MQTT: to monitor entities via another system
# Neither: to monitor entities only via `web_server` or nothing
api:
reboot_timeout: 0s
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# This project uses the `sub-device` function of ESPHome to prefix entity names.
# This allows to group entities into logical devices that appear separately in Home Assistant.
hostname: 'yambms' # Name of your ESPHome node registered on the IP network (DNS name must be unique)
friendly_name : 'YamBMS' # Name of your board (prefix for board entities)
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: '1' # Number without spaces
yambms_name: 'YamBMS 1' # Prefix for YamBMS entities
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_discharge_current: '300' # in Ampere
# +-------------------------------------------------------------------------
# | Temperature-based current limitation
# | Can be disabled via the switch "Temperature-based current limitation"
# | This factor is applied to the battery capacity (Ah), not the current
# | maximum charge/discharge current. For example : 280Ah x 0.5 = 140A
# +-------------------------------------------------------------------------
# Temperature °C -> Charge Rate (0.0C to 1.0C)
yambms_charging_rate_table: |
{
{ -0.1, 0.00 },
{ 0.0, 0.05 },
{ 5.0, 0.12 },
{ 10.0, 0.30 },
{ 20.0, 0.50 },
{ 25.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# Temperature °C -> Discharge Rate (0.0C to 1.0C)
yambms_discharging_rate_table: |
{
{-30.0, 0.00 },
{-20.0, 0.50 },
{-10.0, 0.50 },
{ -5.0, 0.50 },
{ 0.0, 0.50 },
{ 5.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
# +--------------------------------------+
# | Health & LED Assignment Logs |
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_RP_YAML.md
packages:
remote_packages:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 60min
files:
# +------------------------------------------------------------------------------+
# | >>> UNCOMMENT YOUR BOARD
# | >>> ONLY ONE BOARD !
# +------------------------------------------------------------------------------+
- path: 'packages/board/board_ESP32_Generic.yaml'
# - path: 'packages/board/board_ESP32_Atom-Lite.yaml'
# - path: 'packages/board/board_ESP32_DevKit-V1.yaml'
# - path: 'packages/board/board_ESP32_EVB.yaml'
# - path: 'packages/board/board_ESP32_iBMS_CAN_RS485_V3.3.yaml'
# - path: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
# - path: 'packages/board/board_ESP32-C3_DevKitM-1.yaml'
# - path: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
# - path: 'packages/board/board_ESP32-C3_FlipC3.yaml'
# - path: 'packages/board/board_ESP32-S3_Generic.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect-Pro.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-ETH.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-RS485-CAN.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-4.3.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-7.yaml'
# - path: 'packages/board/board_ESP32-S3_XIAO.yaml'
# - path: 'packages/board/board_ESP32-S3_YBoard.yaml'
# vars:
# server_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# network_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# +------------------------------------------------------------------------------+
# | >>> Board Display
# | >>> Uncomment the display that corresponds to your board
# +------------------------------------------------------------------------------+
# - path: 'packages/board/board_options_display_128x128.yaml' # AtomS3 / AtomS3R
# - path: 'packages/board/board_options_display_480x222.yaml' # LilyGo T-Connect Pro
# - path: 'packages/board/board_options_display_lvgl_package_800x480_blue_navy_esphome.yaml' # WS Touch LCD 4.3" and 7"
# - path: 'packages/board/board_options_display_lvgl_package_1280x720_Tab5_esphome.yaml' # M5Stack Tab5
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
# +------------------------------------------------------------------------------+
# | >>> Board Options
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
# Web Server
# - path: 'packages/yambms/yambms_web_server.yaml'
# WiFi AP @ 192.168.4.1
# - path: 'packages/board/board_options_wifi_ap.yaml'
# Captive Portal @ 192.168.4.1
# - path: 'packages/board/board_options_captive_portal.yaml'
# +------------------------------------------------------------------------------+
# | >>> BMS / Balancer / Shunt
# +------------------------------------------------------------------------------+
# You don't have to import a shunt but you must import at least one BMS.
# You can mix different BMS models, the only condition is that the `bms_id` are numbered in order starting from 1 !
# >>> Copy your BMS / Balancer / Shunt packages here
# >>> You can find examples at this address :
# >>> https://github.com/Sleeper85/esphome-yambms/tree/main/examples/single-node/
# BMS 1
- path: 'packages/bms/bms_combine_JBD_UART_full.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'JBD-BMS 1'
bms_uart_id: 'uart_esp_1'
bms_rx_timeout: '150ms'
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
# LFP values example
bms_max_charge_current: '100' # A. Used to calculate maximum charge current
bms_max_discharge_current: '100' # A. Used to calculate maximum discharge current
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_JBD_BLE_full.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'JBD-BMS 2'
bms_ble_mac_address: 'C8:47:8C:10:7E:AA' # Your MAC address
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
# LFP values example
bms_max_charge_current: '100' # A. Used to calculate maximum charge current
bms_max_discharge_current: '100' # A. Used to calculate maximum discharge current
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> YamBMS
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms.yaml'
# +------------------------------------------------------------------------------+
# | >>> CAN bus to Inverter
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms_canbus.yaml' # yambms_canbus_web_server.yaml
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
# +------------------------------------------------------------------------------+
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# vars:
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> DEBUG ( logger level must be DEBUG )
# +------------------------------------------------------------------------------+
- path: packages/base/device_debug_ESP32.yaml
# - path: packages/base/device_debug_ESP32_PSRAM.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
# Size of your PSRAM in bits
# 8Mb='8388608' | 6Mb='6291456' | 4Mb='4194304' | 2Mb='2097152' | NoPSRAM='0'
debug_psram_size: '8388608'
# +------------------------------------------------------------------------------+
# | >>> Add your custom packages below
# +------------------------------------------------------------------------------+
# Custom packages
# yambms_custom: !include yambms_custom.yaml
# +------------------------------------------------------------------------------+
# | >>> Add your custom YAML below
# +----- -------------------------------------------------------------------------+
# Custom YAML
+407
View File
@@ -0,0 +1,407 @@
# Updated : 2026.06.29
# Version : 1.7.0
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
######################## YamBMS Remote Packages Version ########################
# You can compile this YAML directly without the `packages` folder.
# The packages will be automatically downloaded from GitHub.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
# baud_rate: 115200 # Send logs to the `hardware_uart` USB output (this consumes a UART interface)
# hardware_uart: UART0 # UART0 / USB_SERIAL_JTAG
ota:
- platform: esphome
# Uncomment:
# API: to monitor entities via Home Assistant
# MQTT: to monitor entities via another system
# Neither: to monitor entities only via `web_server` or nothing
api:
reboot_timeout: 0s
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# This project uses the `sub-device` function of ESPHome to prefix entity names.
# This allows to group entities into logical devices that appear separately in Home Assistant.
hostname: 'yambms' # Name of your ESPHome node registered on the IP network (DNS name must be unique)
friendly_name : 'YamBMS' # Name of your board (prefix for board entities)
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: '1' # Number without spaces
yambms_name: 'YamBMS 1' # Prefix for YamBMS entities
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_discharge_current: '300' # in Ampere
# +-------------------------------------------------------------------------
# | Temperature-based current limitation
# | Can be disabled via the switch "Temperature-based current limitation"
# | This factor is applied to the battery capacity (Ah), not the current
# | maximum charge/discharge current. For example : 280Ah x 0.5 = 140A
# +-------------------------------------------------------------------------
# Temperature °C -> Charge Rate (0.0C to 1.0C)
yambms_charging_rate_table: |
{
{ -0.1, 0.00 },
{ 0.0, 0.05 },
{ 5.0, 0.12 },
{ 10.0, 0.30 },
{ 20.0, 0.50 },
{ 25.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# Temperature °C -> Discharge Rate (0.0C to 1.0C)
yambms_discharging_rate_table: |
{
{-30.0, 0.00 },
{-20.0, 0.50 },
{-10.0, 0.50 },
{ -5.0, 0.50 },
{ 0.0, 0.50 },
{ 5.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
# +--------------------------------------+
# | Health & LED Assignment Logs |
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_RP_YAML.md
packages:
remote_packages:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 60min
files:
# +------------------------------------------------------------------------------+
# | >>> UNCOMMENT YOUR BOARD
# | >>> ONLY ONE BOARD !
# +------------------------------------------------------------------------------+
- path: 'packages/board/board_ESP32_Generic.yaml'
# - path: 'packages/board/board_ESP32_Atom-Lite.yaml'
# - path: 'packages/board/board_ESP32_DevKit-V1.yaml'
# - path: 'packages/board/board_ESP32_EVB.yaml'
# - path: 'packages/board/board_ESP32_iBMS_CAN_RS485_V3.3.yaml'
# - path: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
# - path: 'packages/board/board_ESP32-C3_DevKitM-1.yaml'
# - path: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
# - path: 'packages/board/board_ESP32-C3_FlipC3.yaml'
# - path: 'packages/board/board_ESP32-S3_Generic.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect-Pro.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-ETH.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-RS485-CAN.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-4.3.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-7.yaml'
# - path: 'packages/board/board_ESP32-S3_XIAO.yaml'
# - path: 'packages/board/board_ESP32-S3_YBoard.yaml'
# vars:
# server_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# network_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# +------------------------------------------------------------------------------+
# | >>> Board Display
# | >>> Uncomment the display that corresponds to your board
# +------------------------------------------------------------------------------+
# - path: 'packages/board/board_options_display_128x128.yaml' # AtomS3 / AtomS3R
# - path: 'packages/board/board_options_display_480x222.yaml' # LilyGo T-Connect Pro
# - path: 'packages/board/board_options_display_lvgl_package_800x480_blue_navy_esphome.yaml' # WS Touch LCD 4.3" and 7"
# - path: 'packages/board/board_options_display_lvgl_package_1280x720_Tab5_esphome.yaml' # M5Stack Tab5
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
# +------------------------------------------------------------------------------+
# | >>> Board Options
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
# Web Server
# - path: 'packages/yambms/yambms_web_server.yaml'
# WiFi AP @ 192.168.4.1
# - path: 'packages/board/board_options_wifi_ap.yaml'
# Captive Portal @ 192.168.4.1
# - path: 'packages/board/board_options_captive_portal.yaml'
# +------------------------------------------------------------------------------+
# | >>> BMS / Balancer / Shunt
# +------------------------------------------------------------------------------+
# You don't have to import a shunt but you must import at least one BMS.
# You can mix different BMS models, the only condition is that the `bms_id` are numbered in order starting from 1 !
# >>> Copy your BMS / Balancer / Shunt packages here
# >>> You can find examples at this address :
# >>> https://github.com/Sleeper85/esphome-yambms/tree/main/examples/single-node/
# RS485 Sniffer with talk_pin (WS-RS485-CAN and other RS485 boards with a flow_control_pin)
# - path: 'packages/bms/bms_combine_JK_RS485_Modbus_sniffer_talk_pin.yaml'
# vars:
# sniffer_protocol: 'JK02_32S'
# sniffer_uart_id: 'uart_esp_1'
# sniffer_talk_pin: ${talk_pin} # can be replaced by the GPIO number
# RS485 Sniffer
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_sniffer.yaml'
vars:
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_1'
# BMS 1
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_address: '0x01' # BMS 1 ( JK app `Device Addr.` setting )
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_address: '0x02' # BMS 2 ( JK app `Device Addr.` setting )
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 3
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
bms_id: '3' # must be a number
bms_name: 'JK-BMS 3'
bms_address: '0x03' # BMS 3 ( JK app `Device Addr.` setting )
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 4
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
bms_id: '4' # must be a number
bms_name: 'JK-BMS 4'
bms_address: '0x04' # BMS 4 ( JK app `Device Addr.` setting )
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 5
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
bms_id: '5' # must be a number
bms_name: 'JK-BMS 5'
bms_address: '0x05' # BMS 5 ( JK app `Device Addr.` setting )
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 6
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
bms_id: '6' # must be a number
bms_name: 'JK-BMS 6'
bms_address: '0x06' # BMS 6 ( JK app `Device Addr.` setting )
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 7
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
bms_id: '7' # must be a number
bms_name: 'JK-BMS 7'
bms_address: '0x07' # BMS 7 ( JK app `Device Addr.` setting )
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 8
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
bms_id: '8' # must be a number
bms_name: 'JK-BMS 8'
bms_address: '0x08' # BMS 8 ( JK app `Device Addr.` setting )
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> YamBMS
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms.yaml'
# +------------------------------------------------------------------------------+
# | >>> CAN bus to Inverter
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms_canbus.yaml' # yambms_canbus_web_server.yaml
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
# +------------------------------------------------------------------------------+
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# vars:
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> DEBUG ( logger level must be DEBUG )
# +------------------------------------------------------------------------------+
- path: packages/base/device_debug_ESP32.yaml
# - path: packages/base/device_debug_ESP32_PSRAM.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
# Size of your PSRAM in bits
# 8Mb='8388608' | 6Mb='6291456' | 4Mb='4194304' | 2Mb='2097152' | NoPSRAM='0'
debug_psram_size: '8388608'
# +------------------------------------------------------------------------------+
# | >>> Add your custom packages below
# +------------------------------------------------------------------------------+
# Custom packages
# yambms_custom: !include yambms_custom.yaml
# +------------------------------------------------------------------------------+
# | >>> Add your custom YAML below
# +----- -------------------------------------------------------------------------+
# Custom YAML
+407
View File
@@ -0,0 +1,407 @@
# Updated : 2026.06.29
# Version : 1.7.0
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
######################## YamBMS Remote Packages Version ########################
# You can compile this YAML directly without the `packages` folder.
# The packages will be automatically downloaded from GitHub.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
# baud_rate: 115200 # Send logs to the `hardware_uart` USB output (this consumes a UART interface)
# hardware_uart: UART0 # UART0 / USB_SERIAL_JTAG
ota:
- platform: esphome
# Uncomment:
# API: to monitor entities via Home Assistant
# MQTT: to monitor entities via another system
# Neither: to monitor entities only via `web_server` or nothing
api:
reboot_timeout: 0s
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# This project uses the `sub-device` function of ESPHome to prefix entity names.
# This allows to group entities into logical devices that appear separately in Home Assistant.
hostname: 'yambms' # Name of your ESPHome node registered on the IP network (DNS name must be unique)
friendly_name : 'YamBMS' # Name of your board (prefix for board entities)
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: '1' # Number without spaces
yambms_name: 'YamBMS 1' # Prefix for YamBMS entities
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_discharge_current: '300' # in Ampere
# +-------------------------------------------------------------------------
# | Temperature-based current limitation
# | Can be disabled via the switch "Temperature-based current limitation"
# | This factor is applied to the battery capacity (Ah), not the current
# | maximum charge/discharge current. For example : 280Ah x 0.5 = 140A
# +-------------------------------------------------------------------------
# Temperature °C -> Charge Rate (0.0C to 1.0C)
yambms_charging_rate_table: |
{
{ -0.1, 0.00 },
{ 0.0, 0.05 },
{ 5.0, 0.12 },
{ 10.0, 0.30 },
{ 20.0, 0.50 },
{ 25.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# Temperature °C -> Discharge Rate (0.0C to 1.0C)
yambms_discharging_rate_table: |
{
{-30.0, 0.00 },
{-20.0, 0.50 },
{-10.0, 0.50 },
{ -5.0, 0.50 },
{ 0.0, 0.50 },
{ 5.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
# +--------------------------------------+
# | Health & LED Assignment Logs |
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_RP_YAML.md
packages:
remote_packages:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 60min
files:
# +------------------------------------------------------------------------------+
# | >>> UNCOMMENT YOUR BOARD
# | >>> ONLY ONE BOARD !
# +------------------------------------------------------------------------------+
- path: 'packages/board/board_ESP32_Generic.yaml'
# - path: 'packages/board/board_ESP32_Atom-Lite.yaml'
# - path: 'packages/board/board_ESP32_DevKit-V1.yaml'
# - path: 'packages/board/board_ESP32_EVB.yaml'
# - path: 'packages/board/board_ESP32_iBMS_CAN_RS485_V3.3.yaml'
# - path: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
# - path: 'packages/board/board_ESP32-C3_DevKitM-1.yaml'
# - path: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
# - path: 'packages/board/board_ESP32-C3_FlipC3.yaml'
# - path: 'packages/board/board_ESP32-S3_Generic.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect-Pro.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-ETH.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-RS485-CAN.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-4.3.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-7.yaml'
# - path: 'packages/board/board_ESP32-S3_XIAO.yaml'
# - path: 'packages/board/board_ESP32-S3_YBoard.yaml'
# vars:
# server_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# network_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# +------------------------------------------------------------------------------+
# | >>> Board Display
# | >>> Uncomment the display that corresponds to your board
# +------------------------------------------------------------------------------+
# - path: 'packages/board/board_options_display_128x128.yaml' # AtomS3 / AtomS3R
# - path: 'packages/board/board_options_display_480x222.yaml' # LilyGo T-Connect Pro
# - path: 'packages/board/board_options_display_lvgl_package_800x480_blue_navy_esphome.yaml' # WS Touch LCD 4.3" and 7"
# - path: 'packages/board/board_options_display_lvgl_package_1280x720_Tab5_esphome.yaml' # M5Stack Tab5
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
# +------------------------------------------------------------------------------+
# | >>> Board Options
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
# Web Server
# - path: 'packages/yambms/yambms_web_server.yaml'
# WiFi AP @ 192.168.4.1
# - path: 'packages/board/board_options_wifi_ap.yaml'
# Captive Portal @ 192.168.4.1
# - path: 'packages/board/board_options_captive_portal.yaml'
# +------------------------------------------------------------------------------+
# | >>> BMS / Balancer / Shunt
# +------------------------------------------------------------------------------+
# You don't have to import a shunt but you must import at least one BMS.
# You can mix different BMS models, the only condition is that the `bms_id` are numbered in order starting from 1 !
# >>> Copy your BMS / Balancer / Shunt packages here
# >>> You can find examples at this address :
# >>> https://github.com/Sleeper85/esphome-yambms/tree/main/examples/single-node/
# RS485 Sniffer with talk_pin (WS-RS485-CAN and other RS485 boards with a flow_control_pin)
# - path: 'packages/bms/bms_combine_JK_RS485_Modbus_sniffer_talk_pin.yaml'
# vars:
# sniffer_protocol: 'JK02_32S'
# sniffer_uart_id: 'uart_esp_1'
# sniffer_talk_pin: ${talk_pin} # can be replaced by the GPIO number
# RS485 Sniffer
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_sniffer.yaml'
vars:
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_1'
# BMS 1
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_address: '0x01' # BMS 1 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_address: '0x02' # BMS 2 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 3
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
bms_id: '3' # must be a number
bms_name: 'JK-BMS 3'
bms_address: '0x03' # BMS 3 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 4
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
bms_id: '4' # must be a number
bms_name: 'JK-BMS 4'
bms_address: '0x04' # BMS 4 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 5
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
bms_id: '5' # must be a number
bms_name: 'JK-BMS 5'
bms_address: '0x05' # BMS 5 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 6
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
bms_id: '6' # must be a number
bms_name: 'JK-BMS 6'
bms_address: '0x06' # BMS 6 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 7
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
bms_id: '7' # must be a number
bms_name: 'JK-BMS 7'
bms_address: '0x07' # BMS 7 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 8
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
bms_id: '8' # must be a number
bms_name: 'JK-BMS 8'
bms_address: '0x08' # BMS 8 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> YamBMS
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms.yaml'
# +------------------------------------------------------------------------------+
# | >>> CAN bus to Inverter
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms_canbus.yaml' # yambms_canbus_web_server.yaml
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
# +------------------------------------------------------------------------------+
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# vars:
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> DEBUG ( logger level must be DEBUG )
# +------------------------------------------------------------------------------+
- path: packages/base/device_debug_ESP32.yaml
# - path: packages/base/device_debug_ESP32_PSRAM.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
# Size of your PSRAM in bits
# 8Mb='8388608' | 6Mb='6291456' | 4Mb='4194304' | 2Mb='2097152' | NoPSRAM='0'
debug_psram_size: '8388608'
# +------------------------------------------------------------------------------+
# | >>> Add your custom packages below
# +------------------------------------------------------------------------------+
# Custom packages
# yambms_custom: !include yambms_custom.yaml
# +------------------------------------------------------------------------------+
# | >>> Add your custom YAML below
# +----- -------------------------------------------------------------------------+
# Custom YAML
+362
View File
@@ -0,0 +1,362 @@
# Updated : 2026.06.29
# Version : 1.7.0
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
######################## YamBMS Remote Packages Version ########################
# You can compile this YAML directly without the `packages` folder.
# The packages will be automatically downloaded from GitHub.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
# baud_rate: 115200 # Send logs to the `hardware_uart` USB output (this consumes a UART interface)
# hardware_uart: UART0 # UART0 / USB_SERIAL_JTAG
ota:
- platform: esphome
# Uncomment:
# API: to monitor entities via Home Assistant
# MQTT: to monitor entities via another system
# Neither: to monitor entities only via `web_server` or nothing
api:
reboot_timeout: 0s
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# This project uses the `sub-device` function of ESPHome to prefix entity names.
# This allows to group entities into logical devices that appear separately in Home Assistant.
hostname: 'yambms' # Name of your ESPHome node registered on the IP network (DNS name must be unique)
friendly_name : 'YamBMS' # Name of your board (prefix for board entities)
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: '1' # Number without spaces
yambms_name: 'YamBMS 1' # Prefix for YamBMS entities
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_discharge_current: '300' # in Ampere
# +-------------------------------------------------------------------------
# | Temperature-based current limitation
# | Can be disabled via the switch "Temperature-based current limitation"
# | This factor is applied to the battery capacity (Ah), not the current
# | maximum charge/discharge current. For example : 280Ah x 0.5 = 140A
# +-------------------------------------------------------------------------
# Temperature °C -> Charge Rate (0.0C to 1.0C)
yambms_charging_rate_table: |
{
{ -0.1, 0.00 },
{ 0.0, 0.05 },
{ 5.0, 0.12 },
{ 10.0, 0.30 },
{ 20.0, 0.50 },
{ 25.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# Temperature °C -> Discharge Rate (0.0C to 1.0C)
yambms_discharging_rate_table: |
{
{-30.0, 0.00 },
{-20.0, 0.50 },
{-10.0, 0.50 },
{ -5.0, 0.50 },
{ 0.0, 0.50 },
{ 5.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
# +--------------------------------------+
# | Health & LED Assignment Logs |
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_RP_YAML.md
packages:
remote_packages:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 60min
files:
# +------------------------------------------------------------------------------+
# | >>> UNCOMMENT YOUR BOARD
# | >>> ONLY ONE BOARD !
# +------------------------------------------------------------------------------+
- path: 'packages/board/board_ESP32_Generic.yaml'
# - path: 'packages/board/board_ESP32_Atom-Lite.yaml'
# - path: 'packages/board/board_ESP32_DevKit-V1.yaml'
# - path: 'packages/board/board_ESP32_EVB.yaml'
# - path: 'packages/board/board_ESP32_iBMS_CAN_RS485_V3.3.yaml'
# - path: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
# - path: 'packages/board/board_ESP32-C3_DevKitM-1.yaml'
# - path: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
# - path: 'packages/board/board_ESP32-C3_FlipC3.yaml'
# - path: 'packages/board/board_ESP32-S3_Generic.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect-Pro.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-ETH.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-RS485-CAN.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-4.3.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-7.yaml'
# - path: 'packages/board/board_ESP32-S3_XIAO.yaml'
# - path: 'packages/board/board_ESP32-S3_YBoard.yaml'
# vars:
# server_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# network_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# +------------------------------------------------------------------------------+
# | >>> Board Display
# | >>> Uncomment the display that corresponds to your board
# +------------------------------------------------------------------------------+
# - path: 'packages/board/board_options_display_128x128.yaml' # AtomS3 / AtomS3R
# - path: 'packages/board/board_options_display_480x222.yaml' # LilyGo T-Connect Pro
# - path: 'packages/board/board_options_display_lvgl_package_800x480_blue_navy_esphome.yaml' # WS Touch LCD 4.3" and 7"
# - path: 'packages/board/board_options_display_lvgl_package_1280x720_Tab5_esphome.yaml' # M5Stack Tab5
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
# +------------------------------------------------------------------------------+
# | >>> Board Options
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
# - path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
# Web Server
# - path: 'packages/yambms/yambms_web_server.yaml'
# WiFi AP @ 192.168.4.1
# - path: 'packages/board/board_options_wifi_ap.yaml'
# Captive Portal @ 192.168.4.1
# - path: 'packages/board/board_options_captive_portal.yaml'
# +------------------------------------------------------------------------------+
# | >>> BMS / Balancer / Shunt
# +------------------------------------------------------------------------------+
# You don't have to import a shunt but you must import at least one BMS.
# You can mix different BMS models, the only condition is that the `bms_id` are numbered in order starting from 1 !
# >>> Copy your BMS / Balancer / Shunt packages here
# >>> You can find examples at this address :
# >>> https://github.com/Sleeper85/esphome-yambms/tree/main/examples/single-node/
# BMS 1
- path: 'packages/bms/bms_combine_JK_BLE_standard.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_ble_protocol_version: 'JK02_32S' # JK02_24S < hardware version 11.0 >= JK02_32S
bms_ble_mac_address: 'C8:47:8C:10:7E:AA'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_JK_BLE_standard.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_ble_protocol_version: 'JK02_32S' # JK02_24S < hardware version 11.0 >= JK02_32S
bms_ble_mac_address: 'C8:47:8C:EE:16:EA'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> YamBMS
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms.yaml'
# +------------------------------------------------------------------------------+
# | >>> CAN bus to Inverter
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms_canbus.yaml' # yambms_canbus_web_server.yaml
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
# +------------------------------------------------------------------------------+
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# vars:
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> DEBUG ( logger level must be DEBUG )
# +------------------------------------------------------------------------------+
- path: packages/base/device_debug_ESP32.yaml
# - path: packages/base/device_debug_ESP32_PSRAM.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
# Size of your PSRAM in bits
# 8Mb='8388608' | 6Mb='6291456' | 4Mb='4194304' | 2Mb='2097152' | NoPSRAM='0'
debug_psram_size: '8388608'
# +------------------------------------------------------------------------------+
# | >>> Add your custom packages below
# +------------------------------------------------------------------------------+
# Custom packages
# yambms_custom: !include yambms_custom.yaml
# +------------------------------------------------------------------------------+
# | >>> Add your custom YAML below
# +----- -------------------------------------------------------------------------+
# Custom YAML
+360
View File
@@ -0,0 +1,360 @@
# Updated : 2026.06.29
# Version : 1.7.0
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
######################## YamBMS Remote Packages Version ########################
# You can compile this YAML directly without the `packages` folder.
# The packages will be automatically downloaded from GitHub.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
# baud_rate: 115200 # Send logs to the `hardware_uart` USB output (this consumes a UART interface)
# hardware_uart: UART0 # UART0 / USB_SERIAL_JTAG
ota:
- platform: esphome
# Uncomment:
# API: to monitor entities via Home Assistant
# MQTT: to monitor entities via another system
# Neither: to monitor entities only via `web_server` or nothing
api:
reboot_timeout: 0s
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# This project uses the `sub-device` function of ESPHome to prefix entity names.
# This allows to group entities into logical devices that appear separately in Home Assistant.
hostname: 'yambms' # Name of your ESPHome node registered on the IP network (DNS name must be unique)
friendly_name : 'YamBMS' # Name of your board (prefix for board entities)
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: '1' # Number without spaces
yambms_name: 'YamBMS 1' # Prefix for YamBMS entities
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_discharge_current: '300' # in Ampere
# +-------------------------------------------------------------------------
# | Temperature-based current limitation
# | Can be disabled via the switch "Temperature-based current limitation"
# | This factor is applied to the battery capacity (Ah), not the current
# | maximum charge/discharge current. For example : 280Ah x 0.5 = 140A
# +-------------------------------------------------------------------------
# Temperature °C -> Charge Rate (0.0C to 1.0C)
yambms_charging_rate_table: |
{
{ -0.1, 0.00 },
{ 0.0, 0.05 },
{ 5.0, 0.12 },
{ 10.0, 0.30 },
{ 20.0, 0.50 },
{ 25.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# Temperature °C -> Discharge Rate (0.0C to 1.0C)
yambms_discharging_rate_table: |
{
{-30.0, 0.00 },
{-20.0, 0.50 },
{-10.0, 0.50 },
{ -5.0, 0.50 },
{ 0.0, 0.50 },
{ 5.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
# +--------------------------------------+
# | Health & LED Assignment Logs |
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_RP_YAML.md
packages:
remote_packages:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 60min
files:
# +------------------------------------------------------------------------------+
# | >>> UNCOMMENT YOUR BOARD
# | >>> ONLY ONE BOARD !
# +------------------------------------------------------------------------------+
- path: 'packages/board/board_ESP32_Generic.yaml'
# - path: 'packages/board/board_ESP32_Atom-Lite.yaml'
# - path: 'packages/board/board_ESP32_DevKit-V1.yaml'
# - path: 'packages/board/board_ESP32_EVB.yaml'
# - path: 'packages/board/board_ESP32_iBMS_CAN_RS485_V3.3.yaml'
# - path: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
# - path: 'packages/board/board_ESP32-C3_DevKitM-1.yaml'
# - path: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
# - path: 'packages/board/board_ESP32-C3_FlipC3.yaml'
# - path: 'packages/board/board_ESP32-S3_Generic.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect-Pro.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-ETH.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-RS485-CAN.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-4.3.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-7.yaml'
# - path: 'packages/board/board_ESP32-S3_XIAO.yaml'
# - path: 'packages/board/board_ESP32-S3_YBoard.yaml'
# vars:
# server_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# network_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# +------------------------------------------------------------------------------+
# | >>> Board Display
# | >>> Uncomment the display that corresponds to your board
# +------------------------------------------------------------------------------+
# - path: 'packages/board/board_options_display_128x128.yaml' # AtomS3 / AtomS3R
# - path: 'packages/board/board_options_display_480x222.yaml' # LilyGo T-Connect Pro
# - path: 'packages/board/board_options_display_lvgl_package_800x480_blue_navy_esphome.yaml' # WS Touch LCD 4.3" and 7"
# - path: 'packages/board/board_options_display_lvgl_package_1280x720_Tab5_esphome.yaml' # M5Stack Tab5
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
# +------------------------------------------------------------------------------+
# | >>> Board Options
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
- path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
# Web Server
# - path: 'packages/yambms/yambms_web_server.yaml'
# WiFi AP @ 192.168.4.1
# - path: 'packages/board/board_options_wifi_ap.yaml'
# Captive Portal @ 192.168.4.1
# - path: 'packages/board/board_options_captive_portal.yaml'
# +------------------------------------------------------------------------------+
# | >>> BMS / Balancer / Shunt
# +------------------------------------------------------------------------------+
# You don't have to import a shunt but you must import at least one BMS.
# You can mix different BMS models, the only condition is that the `bms_id` are numbered in order starting from 1 !
# >>> Copy your BMS / Balancer / Shunt packages here
# >>> You can find examples at this address :
# >>> https://github.com/Sleeper85/esphome-yambms/tree/main/examples/single-node/
# BMS 1
- path: 'packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_uart_id: 'uart_esp_1'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_uart_id: 'uart_esp_2'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> YamBMS
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms.yaml'
# +------------------------------------------------------------------------------+
# | >>> CAN bus to Inverter
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms_canbus.yaml' # yambms_canbus_web_server.yaml
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
# +------------------------------------------------------------------------------+
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# vars:
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> DEBUG ( logger level must be DEBUG )
# +------------------------------------------------------------------------------+
- path: packages/base/device_debug_ESP32.yaml
# - path: packages/base/device_debug_ESP32_PSRAM.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
# Size of your PSRAM in bits
# 8Mb='8388608' | 6Mb='6291456' | 4Mb='4194304' | 2Mb='2097152' | NoPSRAM='0'
debug_psram_size: '8388608'
# +------------------------------------------------------------------------------+
# | >>> Add your custom packages below
# +------------------------------------------------------------------------------+
# Custom packages
# yambms_custom: !include yambms_custom.yaml
# +------------------------------------------------------------------------------+
# | >>> Add your custom YAML below
# +----- -------------------------------------------------------------------------+
# Custom YAML
+357
View File
@@ -0,0 +1,357 @@
# Updated : 2026.06.29
# Version : 1.7.0
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
######################## YamBMS Remote Packages Version ########################
# You can compile this YAML directly without the `packages` folder.
# The packages will be automatically downloaded from GitHub.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
# baud_rate: 115200 # Send logs to the `hardware_uart` USB output (this consumes a UART interface)
# hardware_uart: UART0 # UART0 / USB_SERIAL_JTAG
ota:
- platform: esphome
# Uncomment:
# API: to monitor entities via Home Assistant
# MQTT: to monitor entities via another system
# Neither: to monitor entities only via `web_server` or nothing
api:
reboot_timeout: 0s
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# This project uses the `sub-device` function of ESPHome to prefix entity names.
# This allows to group entities into logical devices that appear separately in Home Assistant.
hostname: 'yambms' # Name of your ESPHome node registered on the IP network (DNS name must be unique)
friendly_name : 'YamBMS' # Name of your board (prefix for board entities)
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: '1' # Number without spaces
yambms_name: 'YamBMS 1' # Prefix for YamBMS entities
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_discharge_current: '300' # in Ampere
# +-------------------------------------------------------------------------
# | Temperature-based current limitation
# | Can be disabled via the switch "Temperature-based current limitation"
# | This factor is applied to the battery capacity (Ah), not the current
# | maximum charge/discharge current. For example : 280Ah x 0.5 = 140A
# +-------------------------------------------------------------------------
# Temperature °C -> Charge Rate (0.0C to 1.0C)
yambms_charging_rate_table: |
{
{ -0.1, 0.00 },
{ 0.0, 0.05 },
{ 5.0, 0.12 },
{ 10.0, 0.30 },
{ 20.0, 0.50 },
{ 25.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# Temperature °C -> Discharge Rate (0.0C to 1.0C)
yambms_discharging_rate_table: |
{
{-30.0, 0.00 },
{-20.0, 0.50 },
{-10.0, 0.50 },
{ -5.0, 0.50 },
{ 0.0, 0.50 },
{ 5.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
# +--------------------------------------+
# | Health & LED Assignment Logs |
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_RP_YAML.md
packages:
remote_packages:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 60min
files:
# +------------------------------------------------------------------------------+
# | >>> UNCOMMENT YOUR BOARD
# | >>> ONLY ONE BOARD !
# +------------------------------------------------------------------------------+
- path: 'packages/board/board_ESP32_Generic.yaml'
# - path: 'packages/board/board_ESP32_Atom-Lite.yaml'
# - path: 'packages/board/board_ESP32_DevKit-V1.yaml'
# - path: 'packages/board/board_ESP32_EVB.yaml'
# - path: 'packages/board/board_ESP32_iBMS_CAN_RS485_V3.3.yaml'
# - path: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
# - path: 'packages/board/board_ESP32-C3_DevKitM-1.yaml'
# - path: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
# - path: 'packages/board/board_ESP32-C3_FlipC3.yaml'
# - path: 'packages/board/board_ESP32-S3_Generic.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect-Pro.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-ETH.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-RS485-CAN.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-4.3.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-7.yaml'
# - path: 'packages/board/board_ESP32-S3_XIAO.yaml'
# - path: 'packages/board/board_ESP32-S3_YBoard.yaml'
# vars:
# server_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# network_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# +------------------------------------------------------------------------------+
# | >>> Board Display
# | >>> Uncomment the display that corresponds to your board
# +------------------------------------------------------------------------------+
# - path: 'packages/board/board_options_display_128x128.yaml' # AtomS3 / AtomS3R
# - path: 'packages/board/board_options_display_480x222.yaml' # LilyGo T-Connect Pro
# - path: 'packages/board/board_options_display_lvgl_package_800x480_blue_navy_esphome.yaml' # WS Touch LCD 4.3" and 7"
# - path: 'packages/board/board_options_display_lvgl_package_1280x720_Tab5_esphome.yaml' # M5Stack Tab5
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
# +------------------------------------------------------------------------------+
# | >>> Board Options
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
# Web Server
# - path: 'packages/yambms/yambms_web_server.yaml'
# WiFi AP @ 192.168.4.1
# - path: 'packages/board/board_options_wifi_ap.yaml'
# Captive Portal @ 192.168.4.1
# - path: 'packages/board/board_options_captive_portal.yaml'
# +------------------------------------------------------------------------------+
# | >>> BMS / Balancer / Shunt
# +------------------------------------------------------------------------------+
# You don't have to import a shunt but you must import at least one BMS.
# You can mix different BMS models, the only condition is that the `bms_id` are numbered in order starting from 1 !
# >>> Copy your BMS / Balancer / Shunt packages here
# >>> You can find examples at this address :
# >>> https://github.com/Sleeper85/esphome-yambms/tree/main/examples/single-node/
# Pace Modbus
- path: 'packages/bms/bms_combine_PACE_RS485_modbus.yaml'
vars:
pace_modbus_uart_id: 'uart_esp_1'
pace_modbus_baud_rate: '9600' # 9600 / 19200 ; please set the baudrate of your Pace BMS model here
# BMS 1
- path: 'packages/bms/bms_combine_PACE_RS485_bms_full.yaml'
vars:
bms_id: '1' # BMS id and modbus address
bms_name: 'PACE-BMS 1'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_PACE_RS485_bms_full.yaml'
vars:
bms_id: '2' # BMS id and modbus address
bms_name: 'PACE-BMS 2'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> YamBMS
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms.yaml'
# +------------------------------------------------------------------------------+
# | >>> CAN bus to Inverter
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms_canbus.yaml' # yambms_canbus_web_server.yaml
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
# +------------------------------------------------------------------------------+
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# vars:
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> DEBUG ( logger level must be DEBUG )
# +------------------------------------------------------------------------------+
- path: packages/base/device_debug_ESP32.yaml
# - path: packages/base/device_debug_ESP32_PSRAM.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
# Size of your PSRAM in bits
# 8Mb='8388608' | 6Mb='6291456' | 4Mb='4194304' | 2Mb='2097152' | NoPSRAM='0'
debug_psram_size: '8388608'
# +------------------------------------------------------------------------------+
# | >>> Add your custom packages below
# +------------------------------------------------------------------------------+
# Custom packages
# yambms_custom: !include yambms_custom.yaml
# +------------------------------------------------------------------------------+
# | >>> Add your custom YAML below
# +----- -------------------------------------------------------------------------+
# Custom YAML
@@ -0,0 +1,393 @@
# Updated : 2026.06.29
# Version : 1.7.0
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
######################## YamBMS Remote Packages Version ########################
# You can compile this YAML directly without the `packages` folder.
# The packages will be automatically downloaded from GitHub.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
# baud_rate: 115200 # Send logs to the `hardware_uart` USB output (this consumes a UART interface)
# hardware_uart: UART0 # UART0 / USB_SERIAL_JTAG
ota:
- platform: esphome
# Uncomment:
# API: to monitor entities via Home Assistant
# MQTT: to monitor entities via another system
# Neither: to monitor entities only via `web_server` or nothing
api:
reboot_timeout: 0s
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# This project uses the `sub-device` function of ESPHome to prefix entity names.
# This allows to group entities into logical devices that appear separately in Home Assistant.
hostname: 'yambms' # Name of your ESPHome node registered on the IP network (DNS name must be unique)
friendly_name : 'YamBMS' # Name of your board (prefix for board entities)
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: '1' # Number without spaces
yambms_name: 'YamBMS 1' # Prefix for YamBMS entities
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_discharge_current: '300' # in Ampere
# +-------------------------------------------------------------------------
# | Temperature-based current limitation
# | Can be disabled via the switch "Temperature-based current limitation"
# | This factor is applied to the battery capacity (Ah), not the current
# | maximum charge/discharge current. For example : 280Ah x 0.5 = 140A
# +-------------------------------------------------------------------------
# Temperature °C -> Charge Rate (0.0C to 1.0C)
yambms_charging_rate_table: |
{
{ -0.1, 0.00 },
{ 0.0, 0.05 },
{ 5.0, 0.12 },
{ 10.0, 0.30 },
{ 20.0, 0.50 },
{ 25.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# Temperature °C -> Discharge Rate (0.0C to 1.0C)
yambms_discharging_rate_table: |
{
{-30.0, 0.00 },
{-20.0, 0.50 },
{-10.0, 0.50 },
{ -5.0, 0.50 },
{ 0.0, 0.50 },
{ 5.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
# +--------------------------------------+
# | Health & LED Assignment Logs |
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_RP_YAML.md
packages:
remote_packages:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 60min
files:
# +------------------------------------------------------------------------------+
# | >>> UNCOMMENT YOUR BOARD
# | >>> ONLY ONE BOARD !
# +------------------------------------------------------------------------------+
- path: 'packages/board/board_ESP32_Generic.yaml'
# - path: 'packages/board/board_ESP32_Atom-Lite.yaml'
# - path: 'packages/board/board_ESP32_DevKit-V1.yaml'
# - path: 'packages/board/board_ESP32_EVB.yaml'
# - path: 'packages/board/board_ESP32_iBMS_CAN_RS485_V3.3.yaml'
# - path: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
# - path: 'packages/board/board_ESP32-C3_DevKitM-1.yaml'
# - path: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
# - path: 'packages/board/board_ESP32-C3_FlipC3.yaml'
# - path: 'packages/board/board_ESP32-S3_Generic.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect-Pro.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-ETH.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-RS485-CAN.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-4.3.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-7.yaml'
# - path: 'packages/board/board_ESP32-S3_XIAO.yaml'
# - path: 'packages/board/board_ESP32-S3_YBoard.yaml'
# vars:
# server_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# network_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# +------------------------------------------------------------------------------+
# | >>> Board Display
# | >>> Uncomment the display that corresponds to your board
# +------------------------------------------------------------------------------+
# - path: 'packages/board/board_options_display_128x128.yaml' # AtomS3 / AtomS3R
# - path: 'packages/board/board_options_display_480x222.yaml' # LilyGo T-Connect Pro
# - path: 'packages/board/board_options_display_lvgl_package_800x480_blue_navy_esphome.yaml' # WS Touch LCD 4.3" and 7"
# - path: 'packages/board/board_options_display_lvgl_package_1280x720_Tab5_esphome.yaml' # M5Stack Tab5
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
# +------------------------------------------------------------------------------+
# | >>> Board Options
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
# Web Server
# - path: 'packages/yambms/yambms_web_server.yaml'
# WiFi AP @ 192.168.4.1
# - path: 'packages/board/board_options_wifi_ap.yaml'
# Captive Portal @ 192.168.4.1
# - path: 'packages/board/board_options_captive_portal.yaml'
# +------------------------------------------------------------------------------+
# | >>> BMS / Balancer / Shunt
# +------------------------------------------------------------------------------+
# You don't have to import a shunt but you must import at least one BMS.
# You can mix different BMS models, the only condition is that the `bms_id` are numbered in order starting from 1 !
# >>> Copy your BMS / Balancer / Shunt packages here
# >>> You can find examples at this address :
# >>> https://github.com/Sleeper85/esphome-yambms/tree/main/examples/single-node/
# Seplos Modbus
- path: 'packages/bms/bms_combine_SEPLOS_V1_V2_RS485_modbus.yaml'
vars:
seplos_modbus_uart_id: 'uart_esp_1'
seplos_modbus_baud_rate: '9600' # 9600 / 19200 ; please set the baudrate of your Seplos BMS model here
# BMS 1
- path: 'packages/bms/bms_combine_SEPLOS_V1_V2_RS485_bms_full.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'SEPLOS-BMS 1'
bms_address: '0x01' # BMS 1 DIP switch
bms_protocol_version: '0x20' # Known protocol versions: 0x20 (Seplos), 0x26 (Boqiang)
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
# LFP values example
bms_max_charge_current: '100' # A. Used to calculate maximum charge current
bms_max_discharge_current: '100' # A. Used to calculate maximum discharge current
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_SEPLOS_V1_V2_RS485_bms_full.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'SEPLOS-BMS 2'
bms_address: '0x02' # BMS 2 DIP switch
bms_protocol_version: '0x20' # Known protocol versions: 0x20 (Seplos), 0x26 (Boqiang)
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
# LFP values example
bms_max_charge_current: '100' # A. Used to calculate maximum charge current
bms_max_discharge_current: '100' # A. Used to calculate maximum discharge current
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 3
- path: 'packages/bms/bms_combine_SEPLOS_V1_V2_RS485_bms_full.yaml'
vars:
bms_id: '3' # must be a number
bms_name: 'SEPLOS-BMS 3'
bms_address: '0x03' # BMS 2 DIP switch
bms_protocol_version: '0x20' # Known protocol versions: 0x20 (Seplos), 0x26 (Boqiang)
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
# LFP values example
bms_max_charge_current: '100' # A. Used to calculate maximum charge current
bms_max_discharge_current: '100' # A. Used to calculate maximum discharge current
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> YamBMS
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms.yaml'
# +------------------------------------------------------------------------------+
# | >>> CAN bus to Inverter
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms_canbus.yaml' # yambms_canbus_web_server.yaml
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
# +------------------------------------------------------------------------------+
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# vars:
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> DEBUG ( logger level must be DEBUG )
# +------------------------------------------------------------------------------+
- path: packages/base/device_debug_ESP32.yaml
# - path: packages/base/device_debug_ESP32_PSRAM.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
# Size of your PSRAM in bits
# 8Mb='8388608' | 6Mb='6291456' | 4Mb='4194304' | 2Mb='2097152' | NoPSRAM='0'
debug_psram_size: '8388608'
# +------------------------------------------------------------------------------+
# | >>> Add your custom packages below
# +------------------------------------------------------------------------------+
# Custom packages
# yambms_custom: !include yambms_custom.yaml
# +------------------------------------------------------------------------------+
# | >>> Add your custom YAML below
# +----- -------------------------------------------------------------------------+
# Custom YAML
@@ -0,0 +1,392 @@
# Updated : 2026.06.29
# Version : 1.7.0
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
######################## YamBMS Remote Packages Version ########################
# You can compile this YAML directly without the `packages` folder.
# The packages will be automatically downloaded from GitHub.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
# baud_rate: 115200 # Send logs to the `hardware_uart` USB output (this consumes a UART interface)
# hardware_uart: UART0 # UART0 / USB_SERIAL_JTAG
ota:
- platform: esphome
# Uncomment:
# API: to monitor entities via Home Assistant
# MQTT: to monitor entities via another system
# Neither: to monitor entities only via `web_server` or nothing
api:
reboot_timeout: 0s
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# This project uses the `sub-device` function of ESPHome to prefix entity names.
# This allows to group entities into logical devices that appear separately in Home Assistant.
hostname: 'yambms' # Name of your ESPHome node registered on the IP network (DNS name must be unique)
friendly_name : 'YamBMS' # Name of your board (prefix for board entities)
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: '1' # Number without spaces
yambms_name: 'YamBMS 1' # Prefix for YamBMS entities
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_discharge_current: '300' # in Ampere
# +-------------------------------------------------------------------------
# | Temperature-based current limitation
# | Can be disabled via the switch "Temperature-based current limitation"
# | This factor is applied to the battery capacity (Ah), not the current
# | maximum charge/discharge current. For example : 280Ah x 0.5 = 140A
# +-------------------------------------------------------------------------
# Temperature °C -> Charge Rate (0.0C to 1.0C)
yambms_charging_rate_table: |
{
{ -0.1, 0.00 },
{ 0.0, 0.05 },
{ 5.0, 0.12 },
{ 10.0, 0.30 },
{ 20.0, 0.50 },
{ 25.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# Temperature °C -> Discharge Rate (0.0C to 1.0C)
yambms_discharging_rate_table: |
{
{-30.0, 0.00 },
{-20.0, 0.50 },
{-10.0, 0.50 },
{ -5.0, 0.50 },
{ 0.0, 0.50 },
{ 5.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
# +--------------------------------------+
# | Health & LED Assignment Logs |
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_RP_YAML.md
packages:
remote_packages:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 60min
files:
# +------------------------------------------------------------------------------+
# | >>> UNCOMMENT YOUR BOARD
# | >>> ONLY ONE BOARD !
# +------------------------------------------------------------------------------+
- path: 'packages/board/board_ESP32_Generic.yaml'
# - path: 'packages/board/board_ESP32_Atom-Lite.yaml'
# - path: 'packages/board/board_ESP32_DevKit-V1.yaml'
# - path: 'packages/board/board_ESP32_EVB.yaml'
# - path: 'packages/board/board_ESP32_iBMS_CAN_RS485_V3.3.yaml'
# - path: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
# - path: 'packages/board/board_ESP32-C3_DevKitM-1.yaml'
# - path: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
# - path: 'packages/board/board_ESP32-C3_FlipC3.yaml'
# - path: 'packages/board/board_ESP32-S3_Generic.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect-Pro.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-ETH.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-RS485-CAN.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-4.3.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-7.yaml'
# - path: 'packages/board/board_ESP32-S3_XIAO.yaml'
# - path: 'packages/board/board_ESP32-S3_YBoard.yaml'
# vars:
# server_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# network_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# +------------------------------------------------------------------------------+
# | >>> Board Display
# | >>> Uncomment the display that corresponds to your board
# +------------------------------------------------------------------------------+
# - path: 'packages/board/board_options_display_128x128.yaml' # AtomS3 / AtomS3R
# - path: 'packages/board/board_options_display_480x222.yaml' # LilyGo T-Connect Pro
# - path: 'packages/board/board_options_display_lvgl_package_800x480_blue_navy_esphome.yaml' # WS Touch LCD 4.3" and 7"
# - path: 'packages/board/board_options_display_lvgl_package_1280x720_Tab5_esphome.yaml' # M5Stack Tab5
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
# +------------------------------------------------------------------------------+
# | >>> Board Options
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
# Web Server
# - path: 'packages/yambms/yambms_web_server.yaml'
# WiFi AP @ 192.168.4.1
# - path: 'packages/board/board_options_wifi_ap.yaml'
# Captive Portal @ 192.168.4.1
# - path: 'packages/board/board_options_captive_portal.yaml'
# +------------------------------------------------------------------------------+
# | >>> BMS / Balancer / Shunt
# +------------------------------------------------------------------------------+
# You don't have to import a shunt but you must import at least one BMS.
# You can mix different BMS models, the only condition is that the `bms_id` are numbered in order starting from 1 !
# >>> Copy your BMS / Balancer / Shunt packages here
# >>> You can find examples at this address :
# >>> https://github.com/Sleeper85/esphome-yambms/tree/main/examples/single-node/
# Seplos Parser
- path: 'packages/bms/bms_combine_SEPLOS_V3_RS485_modbus_sniffer.yaml'
vars:
seplos_uart_id: 'uart_esp_1'
seplos_baud_rate: '19200' # 9600 / 19200 ; please set the baudrate of your Seplos BMS model here
seplos_bms_count: '3' # Seplos V3 BMS count
seplos_update_interval: '3' # # Time in seconds, update interval for all data points
# BMS 1
- path: 'packages/bms/bms_combine_SEPLOS_V3_RS485_bms_full.yaml'
vars:
bms_id: '1'
bms_prefix: 'bms0' # DON'T CHANGE THIS NAME !
bms_name: 'SEPLOS-BMS 1'
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
bms_max_charge_current: '100' # A. The maximum current your BMS can handle
bms_max_discharge_current: '100' # A. The maximum current your BMS can handle
# LFP values example
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_SEPLOS_V3_RS485_bms_full.yaml'
vars:
bms_id: '2'
bms_prefix: 'bms1' # DON'T CHANGE THIS NAME !
bms_name: 'SEPLOS-BMS 2'
# Required settings cannot be retrieved from BMS
bms_max_charge_current: '100' # A. The maximum current your BMS can handle
bms_max_discharge_current: '100' # A. The maximum current your BMS can handle
# These values ​​must match your BMS settings
# LFP values example
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 3
- path: 'packages/bms/bms_combine_SEPLOS_V3_RS485_bms_full.yaml'
vars:
bms_id: '3'
bms_prefix: 'bms2' # DON'T CHANGE THIS NAME !
bms_name: 'SEPLOS-BMS 3'
# Required settings cannot be retrieved from BMS
bms_max_charge_current: '100' # A. The maximum current your BMS can handle
bms_max_discharge_current: '100' # A. The maximum current your BMS can handle
# These values ​​must match your BMS settings
# LFP values example
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> YamBMS
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms.yaml'
# +------------------------------------------------------------------------------+
# | >>> CAN bus to Inverter
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms_canbus.yaml' # yambms_canbus_web_server.yaml
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
# +------------------------------------------------------------------------------+
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# vars:
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> DEBUG ( logger level must be DEBUG )
# +------------------------------------------------------------------------------+
- path: packages/base/device_debug_ESP32.yaml
# - path: packages/base/device_debug_ESP32_PSRAM.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
# Size of your PSRAM in bits
# 8Mb='8388608' | 6Mb='6291456' | 4Mb='4194304' | 2Mb='2097152' | NoPSRAM='0'
debug_psram_size: '8388608'
# +------------------------------------------------------------------------------+
# | >>> Add your custom packages below
# +------------------------------------------------------------------------------+
# Custom packages
# yambms_custom: !include yambms_custom.yaml
# +------------------------------------------------------------------------------+
# | >>> Add your custom YAML below
# +----- -------------------------------------------------------------------------+
# Custom YAML
+375
View File
@@ -0,0 +1,375 @@
# Updated : 2026.06.29
# Version : 1.7.0
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
######################## YamBMS Remote Packages Version ########################
# You can compile this YAML directly without the `packages` folder.
# The packages will be automatically downloaded from GitHub.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
# baud_rate: 115200 # Send logs to the `hardware_uart` USB output (this consumes a UART interface)
# hardware_uart: UART0 # UART0 / USB_SERIAL_JTAG
ota:
- platform: esphome
# Uncomment:
# API: to monitor entities via Home Assistant
# MQTT: to monitor entities via another system
# Neither: to monitor entities only via `web_server` or nothing
api:
reboot_timeout: 0s
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# This project uses the `sub-device` function of ESPHome to prefix entity names.
# This allows to group entities into logical devices that appear separately in Home Assistant.
hostname: 'yambms' # Name of your ESPHome node registered on the IP network (DNS name must be unique)
friendly_name : 'YamBMS' # Name of your board (prefix for board entities)
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: '1' # Number without spaces
yambms_name: 'YamBMS 1' # Prefix for YamBMS entities
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_discharge_current: '300' # in Ampere
# +-------------------------------------------------------------------------
# | Temperature-based current limitation
# | Can be disabled via the switch "Temperature-based current limitation"
# | This factor is applied to the battery capacity (Ah), not the current
# | maximum charge/discharge current. For example : 280Ah x 0.5 = 140A
# +-------------------------------------------------------------------------
# Temperature °C -> Charge Rate (0.0C to 1.0C)
yambms_charging_rate_table: |
{
{ -0.1, 0.00 },
{ 0.0, 0.05 },
{ 5.0, 0.12 },
{ 10.0, 0.30 },
{ 20.0, 0.50 },
{ 25.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# Temperature °C -> Discharge Rate (0.0C to 1.0C)
yambms_discharging_rate_table: |
{
{-30.0, 0.00 },
{-20.0, 0.50 },
{-10.0, 0.50 },
{ -5.0, 0.50 },
{ 0.0, 0.50 },
{ 5.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
# +--------------------------------------+
# | Health & LED Assignment Logs |
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_RP_YAML.md
packages:
remote_packages:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 60min
files:
# +------------------------------------------------------------------------------+
# | >>> UNCOMMENT YOUR BOARD
# | >>> ONLY ONE BOARD !
# +------------------------------------------------------------------------------+
- path: 'packages/board/board_ESP32_Generic.yaml'
# - path: 'packages/board/board_ESP32_Atom-Lite.yaml'
# - path: 'packages/board/board_ESP32_DevKit-V1.yaml'
# - path: 'packages/board/board_ESP32_EVB.yaml'
# - path: 'packages/board/board_ESP32_iBMS_CAN_RS485_V3.3.yaml'
# - path: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
# - path: 'packages/board/board_ESP32-C3_DevKitM-1.yaml'
# - path: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
# - path: 'packages/board/board_ESP32-C3_FlipC3.yaml'
# - path: 'packages/board/board_ESP32-S3_Generic.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect-Pro.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-ETH.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-RS485-CAN.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-4.3.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-7.yaml'
# - path: 'packages/board/board_ESP32-S3_XIAO.yaml'
# - path: 'packages/board/board_ESP32-S3_YBoard.yaml'
# vars:
# server_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# network_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# +------------------------------------------------------------------------------+
# | >>> Board Display
# | >>> Uncomment the display that corresponds to your board
# +------------------------------------------------------------------------------+
# - path: 'packages/board/board_options_display_128x128.yaml' # AtomS3 / AtomS3R
# - path: 'packages/board/board_options_display_480x222.yaml' # LilyGo T-Connect Pro
# - path: 'packages/board/board_options_display_lvgl_package_800x480_blue_navy_esphome.yaml' # WS Touch LCD 4.3" and 7"
# - path: 'packages/board/board_options_display_lvgl_package_1280x720_Tab5_esphome.yaml' # M5Stack Tab5
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
# +------------------------------------------------------------------------------+
# | >>> Board Options
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
# Web Server
# - path: 'packages/yambms/yambms_web_server.yaml'
# WiFi AP @ 192.168.4.1
# - path: 'packages/board/board_options_wifi_ap.yaml'
# Captive Portal @ 192.168.4.1
# - path: 'packages/board/board_options_captive_portal.yaml'
# +------------------------------------------------------------------------------+
# | >>> BMS / Balancer / Shunt
# +------------------------------------------------------------------------------+
# You don't have to import a shunt but you must import at least one BMS.
# You can mix different BMS models, the only condition is that the `bms_id` are numbered in order starting from 1 !
# >>> Copy your BMS / Balancer / Shunt packages here
# >>> You can find examples at this address :
# >>> https://github.com/Sleeper85/esphome-yambms/tree/main/examples/single-node/
# Basen controller
- path: 'packages/bms/bms_combine_BASEN_RS485_controller.yaml'
vars:
basen_uart_id: 'uart_esp_1'
basen_uart_baud_rate: '9600'
basen_controller_id: "basen_controller_1"
# Basen module 1
- path: 'packages/bms/bms_combine_BASEN_RS485_full.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'BASEN-BMS 1'
bms_address: '0x01'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# Basen module 2
- path: 'packages/bms/bms_combine_BASEN_RS485_full.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'BASEN-BMS 2'
bms_address: '0x02'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# Balancer 1 linked to BMS 1
- path: 'packages/balancer/balancer_sensors_JK_NEEY_BLE.yaml'
vars:
bms_id: '1' # must match the BMS ID
balancer_name: 'Balancer 1'
balancer_ble_mac_address: 11:22:33:44:55:66
balancer_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# Balancer 2 linked to BMS 2
- path: 'packages/balancer/balancer_sensors_JK_NEEY_BLE.yaml'
vars:
bms_id: '2' # must match the BMS ID
balancer_name: 'Balancer 2'
balancer_ble_mac_address: 11:22:33:44:55:67
balancer_status_led_id: 'esp_light' # led used to show status. Default = esp_light, comment out or set to 'nullptr' to disable
# +------------------------------------------------------------------------------+
# | >>> YamBMS
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms.yaml'
# +------------------------------------------------------------------------------+
# | >>> CAN bus to Inverter
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms_canbus.yaml' # yambms_canbus_web_server.yaml
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
# +------------------------------------------------------------------------------+
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# vars:
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> DEBUG ( logger level must be DEBUG )
# +------------------------------------------------------------------------------+
- path: packages/base/device_debug_ESP32.yaml
# - path: packages/base/device_debug_ESP32_PSRAM.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
# Size of your PSRAM in bits
# 8Mb='8388608' | 6Mb='6291456' | 4Mb='4194304' | 2Mb='2097152' | NoPSRAM='0'
debug_psram_size: '8388608'
# +------------------------------------------------------------------------------+
# | >>> Add your custom packages below
# +------------------------------------------------------------------------------+
# Custom packages
# yambms_custom: !include yambms_custom.yaml
# +------------------------------------------------------------------------------+
# | >>> Add your custom YAML below
# +----- -------------------------------------------------------------------------+
# Custom YAML
+217 -133
View File
@@ -1,5 +1,5 @@
# Updated : 2025.05.13
# Version : 1.5.5
# Updated : 2026.06.29
# Version : 1.7.0
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -36,46 +36,40 @@
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
# baud_rate: 115200 # Send logs to the `hardware_uart` USB output (this consumes a UART interface)
# hardware_uart: UART0 # UART0 / USB_SERIAL_JTAG
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
- platform: esphome
# Uncomment:
# API: to monitor entities via Home Assistant
# MQTT: to monitor entities via another system
# Neither: to monitor entities only via `web_server` or nothing
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
# web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# Name
name: '' # Name that can be added as a second prefix after the friendly name, you can leave it blank.
hostname: 'yambms' # This is the name of the node. It should always be unique in your ESPHome network.
friendly_name : 'YamBMS Demo' # Prefix added in front of all entity names and also to classify them.
# This project uses the `sub-device` function of ESPHome to prefix entity names.
# This allows to group entities into logical devices that appear separately in Home Assistant.
hostname: 'yambms-demo' # Name of your ESPHome node registered on the IP network (DNS name must be unique)
friendly_name : 'YamBMS Demo' # Name of your board (prefix for board entities)
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: 'yambms1'
yambms_name: 'YamBMS 1'
yambms_id: '1' # Number without spaces
yambms_name: 'YamBMS Demo' # Prefix for YamBMS entities
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
@@ -97,227 +91,317 @@ substitutions:
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_discharge_current: '300' # in Ampere
# +-------------------------------------------------------------------------
# | Temperature-based current limitation
# | Can be disabled via the switch "Temperature-based current limitation"
# | This factor is applied to the battery capacity (Ah), not the current
# | maximum charge/discharge current. For example : 280Ah x 0.5 = 140A
# +-------------------------------------------------------------------------
# Temperature °C -> Charge Rate (0.0C to 1.0C)
yambms_charging_rate_table: |
{
{ -0.1, 0.00 },
{ 0.0, 0.05 },
{ 5.0, 0.12 },
{ 10.0, 0.30 },
{ 20.0, 0.50 },
{ 25.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# Temperature °C -> Discharge Rate (0.0C to 1.0C)
yambms_discharging_rate_table: |
{
{-30.0, 0.00 },
{-20.0, 0.50 },
{-10.0, 0.50 },
{ -5.0, 0.50 },
{ 0.0, 0.50 },
{ 5.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | Shunt Settings |
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
shunt_combine_interval: '1s' # frequency at which Shunt data is combined in YamBMS
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
bms_combine_interval: '1s' # frequency at which BMS data is combined in YamBMS
bms_cutoff_timer: '50s' # time during which the end of charge conditions must be respected (cut-off + cells not equalizing)
# +--------------------------------------+
# | Health & LED Assignment Logs |
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_RP_YAML.md
packages:
################ >>> CONFIG & CUSTOM LP <<< ################
# Local Packages intended for creating custom codes
# or sharing settings between several main.yaml
# yambms_config: !include yambms_config.yaml
# yambms_custom: !include yambms_custom.yaml
############### >>> UNCOMMENT YOUR BOARD <<< ###############
############### >>> ONLY ONE BOARD ! <<< ###############
board:
remote_packages:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
refresh: 60min
files:
# +------------------------------------------------------------------------------+
# | >>> UNCOMMENT YOUR BOARD
# | >>> ONLY ONE BOARD !
# +------------------------------------------------------------------------------+
- path: 'packages/board/board_ESP32_Generic.yaml'
# - path: 'packages/board/board_ESP32_DevKit-V1.yaml'
# - path: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
# - path: 'packages/board/board_ESP32_EVB.yaml'
# - path: 'packages/board/board_ESP32_Atom-Lite.yaml'
# - path: 'packages/board/board_ESP32_DevKit-V1.yaml'
# - path: 'packages/board/board_ESP32_EVB.yaml'
# - path: 'packages/board/board_ESP32_iBMS_CAN_RS485_V3.3.yaml'
# - path: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
# - path: 'packages/board/board_ESP32-C3_DevKitM-1.yaml'
# - path: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
# - path: 'packages/board/board_ESP32-C3_FlipC3.yaml'
# - path: 'packages/board/board_ESP32-S3_Generic.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect-Pro.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-ETH.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-RS485-CAN.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-4.3.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-7.yaml'
# - path: 'packages/board/board_ESP32-S3_XIAO.yaml'
# - path: 'packages/board/board_ESP32-S3_YBoard.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
# vars:
# server_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# network_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# +------------------------------------------------------------------------------+
# | >>> Board Display
# | >>> Uncomment the display that corresponds to your board
# +------------------------------------------------------------------------------+
# - path: 'packages/board/board_options_display_128x128.yaml' # AtomS3 / AtomS3R
# - path: 'packages/board/board_options_display_480x222.yaml' # LilyGo T-Connect Pro
# - path: 'packages/board/board_options_display_lvgl_package_800x480_blue_navy_esphome.yaml' # WS Touch LCD 4.3" and 7"
# - path: 'packages/board/board_options_display_lvgl_package_1280x720_Tab5_esphome.yaml' # M5Stack Tab5
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
# - path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
########### >>> UNCOMMENT YOUR BOARD OPTIONS <<< ###########
board_options:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# Captive Portal
- path: 'packages/board/board_options_captive_portal.yaml'
# UART 1
# +------------------------------------------------------------------------------+
# | >>> Board Options
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
# - path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# MCP2515
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
############################################################
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
# Web Server
# - path: 'packages/yambms/yambms_web_server.yaml'
# WiFi AP @ 192.168.4.1
# - path: 'packages/board/board_options_wifi_ap.yaml'
# Captive Portal @ 192.168.4.1
# - path: 'packages/board/board_options_captive_portal.yaml'
# +------------------------------------------------------------------------------+
# | >>> BMS / Balancer / Shunt
# +------------------------------------------------------------------------------+
shunt:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# Shunt 1
- path: 'packages/shunt/shunt_combine_FAKE.yaml'
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
# Shunt sensors values
shunt_voltage: '53.41' # V
shunt_current: '37.5' # A
shunt_power: '2003' # W
shunt_soc: '86' # %
shunt_voltage: '52.81' # V
shunt_current: '17.5' # A
shunt_power: '924' # W
shunt_soc: '50' # %
bms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# BMS 1
- path: 'packages/bms/bms_combine_FAKE.yaml'
- path: 'packages/bms/bms_combine_DEMO.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'BMS 1'
# BMS sensors values
bms_battery_capacity: '280' # Ah
bms_battery_capacity_remaining: '243' # Ah
bms_voltage: '53.45' # V
bms_current: '9.2' # A
bms_power: '492' # W
bms_soc: '87' # %
bms_soh: '98' # %
bms_min_cell_voltage: '3.339' # V
bms_min_voltage_cell: '2' # cell number 1~16
bms_max_cell_voltage: '3.341' # V
bms_max_voltage_cell: '11' # cell number 1~16
bms_temperature_sensor_1: '21.1' # °C
bms_temperature_sensor_2: '21.3' # °C
bms_temperature_sensor_3: '21.5' # °C
bms_temperature_sensor_4: '21.7' # °C
bms_min_temperature: '9.1' # °C
bms_max_temperature: '9.3' # °C
bms_max_charge_current: '100' # A
bms_max_discharge_current: '100' # A
bms_cell_ovp: '3.650' # V Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
bms_charging_cycles: '178' # charging cycles number Used to calculate the SoH
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_FAKE.yaml'
- path: 'packages/bms/bms_combine_DEMO.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'BMS 2'
# BMS sensors values
bms_battery_capacity: '280' # Ah
bms_battery_capacity_remaining: '238' # Ah
bms_voltage: '53.41' # V
bms_current: '11.3' # A
bms_power: '604' # W
bms_soc: '85' # %
bms_soh: '89' # %
bms_min_cell_voltage: '3.337' # V
bms_min_voltage_cell: '14' # cell number 1~16
bms_max_cell_voltage: '3.339' # V
bms_max_voltage_cell: '3' # cell number 1~16
bms_temperature_sensor_1: '21.8' # °C
bms_temperature_sensor_2: '21.6' # °C
bms_temperature_sensor_3: '21.4' # °C
bms_temperature_sensor_4: '21.2' # °C
bms_min_temperature: '15.1' # °C
bms_max_temperature: '15.3' # °C
bms_max_charge_current: '100' # A
bms_max_discharge_current: '100' # A
bms_cell_ovp: '3.650' # V Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
bms_charging_cycles: '226' # charging cycles number Used to calculate the SoH
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 3
- path: 'packages/bms/bms_combine_FAKE.yaml'
- path: 'packages/bms/bms_combine_DEMO.yaml'
vars:
bms_id: '3' # must be a number
bms_name: 'BMS 3'
# BMS sensors values
bms_battery_capacity: '280' # Ah
bms_battery_capacity_remaining: '232' # Ah
bms_voltage: '53.37' # V
bms_current: '15.7' # A
bms_power: '838' # W
bms_soc: '83' # %
bms_soh: '79' # %
bms_min_cell_voltage: '3.334' # V
bms_min_voltage_cell: '7' # cell number 1~16
bms_max_cell_voltage: '3.336' # V
bms_max_voltage_cell: '9' # cell number 1~16
bms_temperature_sensor_1: '21.9' # °C
bms_temperature_sensor_2: '22.0' # °C
bms_temperature_sensor_3: '22.1' # °C
bms_temperature_sensor_4: '22.2' # °C
bms_min_temperature: '20.1' # °C
bms_max_temperature: '20.3' # °C
bms_max_charge_current: '100' # A
bms_max_discharge_current: '100' # A
bms_cell_ovp: '3.650' # V Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
bms_charging_cycles: '194' # charging cycles number Used to calculate the SoH
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> YamBMS
# +------------------------------------------------------------------------------+
yambms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: 'packages/yambms/yambms.yaml'
canbus:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: 'packages/yambms/yambms_canbus.yaml'
# +------------------------------------------------------------------------------+
# | >>> CAN bus to Inverter
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms_canbus.yaml' # yambms_canbus_web_server.yaml
vars:
canbus_id: 'canbus1'
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (0x305 frame) for 5s
# The Deye inverter sends the ACK 0x305 only when it receives the 0x356 frame.
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
debug:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# +------------------------------------------------------------------------------+
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# vars:
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> DEBUG ( logger level must be DEBUG )
# +------------------------------------------------------------------------------+
- path: packages/base/device_debug_ESP32.yaml
# - path: packages/base/device_debug_ESP32_PSRAM.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
# Size of your PSRAM in bits
# 8Mb='8388608' | 6Mb='6291456' | 4Mb='4194304' | 2Mb='2097152' | NoPSRAM='0'
debug_psram_size: '8388608'
# +------------------------------------------------------------------------------+
# | >>> Add your custom packages below
# +------------------------------------------------------------------------------+
# Custom packages
# yambms_custom: !include yambms_custom.yaml
# +------------------------------------------------------------------------------+
# | >>> Add your custom YAML below
# +----- -------------------------------------------------------------------------+
# Custom YAML
+304
View File
@@ -0,0 +1,304 @@
# Updated : 2026.06.29
# Version : 1.7.0
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
######################## YamBMS Remote Packages Version ########################
# You can compile this YAML directly without the `packages` folder.
# The packages will be automatically downloaded from GitHub.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# If needed, configure a static IP here
# ethernet:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
# baud_rate: 115200 # Send logs to the `hardware_uart` USB output (this consumes a UART interface)
# hardware_uart: UART0 # UART0 / USB_SERIAL_JTAG
ota:
- platform: esphome
# Uncomment:
# API: to monitor entities via Home Assistant
# MQTT: to monitor entities via another system
# Neither: to monitor entities only via `web_server` or nothing
api:
reboot_timeout: 0s
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# This project uses the `sub-device` function of ESPHome to prefix entity names.
# This allows to group entities into logical devices that appear separately in Home Assistant.
hostname: 'yambms' # Name of your ESPHome node registered on the IP network (DNS name must be unique)
friendly_name : 'YamBMS' # Name of your board (prefix for board entities)
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: '1' # Number without spaces
yambms_name: 'YamBMS 1' # Prefix for YamBMS entities
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_discharge_current: '300' # in Ampere
# +-------------------------------------------------------------------------
# | Temperature-based current limitation
# | Can be disabled via the switch "Temperature-based current limitation"
# | This factor is applied to the battery capacity (Ah), not the current
# | maximum charge/discharge current. For example : 280Ah x 0.5 = 140A
# +-------------------------------------------------------------------------
# Temperature °C -> Charge Rate (0.0C to 1.0C)
yambms_charging_rate_table: |
{
{ -0.1, 0.00 },
{ 0.0, 0.05 },
{ 5.0, 0.12 },
{ 10.0, 0.30 },
{ 20.0, 0.50 },
{ 25.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# Temperature °C -> Discharge Rate (0.0C to 1.0C)
yambms_discharging_rate_table: |
{
{-30.0, 0.00 },
{-20.0, 0.50 },
{-10.0, 0.50 },
{ -5.0, 0.50 },
{ 0.0, 0.50 },
{ 5.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
# +--------------------------------------+
# | Health & LED Assignment Logs |
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_RP_YAML.md
packages:
remote_packages:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 60min
files:
# +------------------------------------------------------------------------------+
# | >>> UNCOMMENT YOUR BOARD
# | >>> ONLY ONE BOARD !
# +------------------------------------------------------------------------------+
- path: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-ETH.yaml'
# - path: 'packages/board/board_ESP32_EVB.yaml'
# vars:
# server_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# network_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# +------------------------------------------------------------------------------+
# | >>> Board Options
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
# Web Server
# - path: 'packages/yambms/yambms_web_server.yaml'
# WiFi AP @ 192.168.4.1
# - path: 'packages/board/board_options_wifi_ap.yaml'
# Captive Portal @ 192.168.4.1
# - path: 'packages/board/board_options_captive_portal.yaml'
# +------------------------------------------------------------------------------+
# | >>> BMS / Balancer / Shunt
# +------------------------------------------------------------------------------+
# You don't have to import a shunt but you must import at least one BMS.
# You can mix different BMS models, the only condition is that the `bms_id` are numbered in order starting from 1 !
# >>> Copy your BMS / Balancer / Shunt packages here
# >>> You can find examples at this address :
# >>> https://github.com/Sleeper85/esphome-yambms/tree/main/examples/single-node/h
# +------------------------------------------------------------------------------+
# | >>> YamBMS
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms.yaml'
# +------------------------------------------------------------------------------+
# | >>> CAN bus to Inverter
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms_canbus.yaml' # yambms_canbus_web_server.yaml
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
# +------------------------------------------------------------------------------+
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# vars:
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> DEBUG ( logger level must be DEBUG )
# +------------------------------------------------------------------------------+
- path: packages/base/device_debug_ESP32.yaml
# - path: packages/base/device_debug_ESP32_PSRAM.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
# Size of your PSRAM in bits
# 8Mb='8388608' | 6Mb='6291456' | 4Mb='4194304' | 2Mb='2097152' | NoPSRAM='0'
debug_psram_size: '8388608'
# +------------------------------------------------------------------------------+
# | >>> Add your custom packages below
# +------------------------------------------------------------------------------+
# Custom packages
# yambms_custom: !include yambms_custom.yaml
# +------------------------------------------------------------------------------+
# | >>> Add your custom YAML below
# +----- -------------------------------------------------------------------------+
# Custom YAML
+204
View File
@@ -0,0 +1,204 @@
# Updated : 2026.06.29
# Version : 1.7.0
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
######################## YamBMS Remote Packages Version ########################
# You can compile this YAML directly without the `packages` folder.
# The packages will be automatically downloaded from GitHub.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
# baud_rate: 115200 # Send logs to the `hardware_uart` USB output (this consumes a UART interface)
# hardware_uart: UART0 # UART0 / USB_SERIAL_JTAG
ota:
- platform: esphome
api: # This YAML only works with the API
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# This project uses the `sub-device` function of ESPHome to prefix entity names.
# This allows to group entities into logical devices that appear separately in Home Assistant.
hostname: 'yambms-display' # Name of your ESPHome node registered on the IP network (DNS name must be unique)
friendly_name : 'YamBMS Display' # Name of your board (prefix for board entities)
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_RP_YAML.md
packages:
remote_packages:
url: https://github.com/Sleeper85/esphome-yambms
ref: dev
refresh: 0s
files:
# +------------------------------------------------------------------------------+
# | >>> UNCOMMENT YOUR BOARD
# | >>> ONLY ONE BOARD !
# +------------------------------------------------------------------------------+
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-4.3.yaml' # 800x480
- path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-7.yaml' # 800x480
# - path: 'packages/board/board_ESP32-P4_M5Stack-Tab5.yaml' # 1280x720
# +------------------------------------------------------------------------------+
# | >>> Board Display
# | >>> Uncomment the display that corresponds to your board
# +------------------------------------------------------------------------------+
- path: 'packages/board/board_options_display_lvgl_package_800x480_blue_navy_ha_yambms.yaml' # 800x480 Blue Navy display - YamBMS pages
# - path: 'packages/board/board_options_display_lvgl_package_800x480_blue_navy_ha_full.yaml' # 800x480 Blue Navy display - Overview + YamBMS pages
# - path: 'packages/board/board_options_display_lvgl_package_1280x720_Tab5_ha.yaml' # 1280x720 Tab5 display
vars:
# Variables required for all display YAMLs
device_name: 'yambms' # The friendly_name of your YamBMS node is in lowercase; spaces are replaced by underscores
yambms_name: 'yambms_1' # The yambms_name of your YamBMS node is in lowercase; spaces are replaced by underscores
# +------------------------------------------------------------------------------+
# | >>> Uncomment the variables below to use the following YAMLs :
# | >>> board_options_display_lvgl_package_800x480_blue_navy_ha_full.yaml
# +------------------------------------------------------------------------------+
# Overview page inputs
# pv_power: your_pv_power
# pv_energy_today: your_pv_energy_today
# grid_power: your_grid_power # positive = import, negative = export
# grid_voltage: your_grid_voltage
# grid_frequency: your_grid_frequency
# grid_import_today: your_grid_import_today
# grid_export_today: your_grid_export_today
# bat_power: yambms_1_power # positive = charge, negative = discharge
# bat_soc: yambms_1_battery_soc
# bat_voltage: yambms_1_total_voltage
# bat_cell_count: yambms_1_cell_count
# bat_charging_phase: yambms_1_charging_status
# bat_charge_today: yambms_1_daily_charging_energy
# bat_discharge_today: yambms_1_daily_discharging_energy
# home_power: your_home_power
# home_daily_energy_total: your_home_daily_energy_total
# home_daily_energy_solar: your_home_daily_energy_solar
# home_daily_energy_grid: your_home_daily_energy_grid
# home_daily_energy_battery: yambms_1_daily_discharging_energy
# Overview page animation
# Max power = dot max speed
# anim_pv_power_max: 8000
# anim_grid_power_max: 6000
# anim_battery_power_max: 6000
# anim_home_power_max: 6000
# anim_duration_min: 800 # ms at max power
# anim_duration_max: 4000 # ms at nul power
# +------------------------------------------------------------------------------+
# | >>> Board Options
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
# - path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
# - path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
# Web Server
# - path: 'packages/yambms/yambms_web_server.yaml'
# WiFi AP @ 192.168.4.1
# - path: 'packages/board/board_options_wifi_ap.yaml'
# Captive Portal @ 192.168.4.1
# - path: 'packages/board/board_options_captive_portal.yaml'
# +------------------------------------------------------------------------------+
# | >>> DEBUG ( logger level must be DEBUG )
# +------------------------------------------------------------------------------+
# - path: packages/base/device_debug_ESP32.yaml
- path: packages/base/device_debug_ESP32_PSRAM.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
# Size of your PSRAM in bits
# 8Mb='8388608' | 6Mb='6291456' | 4Mb='4194304' | 2Mb='2097152' | NoPSRAM='0'
debug_psram_size: '8388608'
# +------------------------------------------------------------------------------+
# | >>> Add your custom packages below
# +------------------------------------------------------------------------------+
# Custom packages
# yambms_custom: !include yambms_custom.yaml
# +------------------------------------------------------------------------------+
# | >>> Add your custom YAML below
# +----- -------------------------------------------------------------------------+
# Custom YAML
-316
View File
@@ -1,316 +0,0 @@
# Updated : 2025.05.13
# Version : 1.5.5
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
######################## YamBMS Remote Packages Version ########################
# You can compile this YAML directly without the `packages` folder.
# The packages will be automatically downloaded from GitHub.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
# web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# Name
name: '' # Name that can be added as a second prefix after the friendly name, you can leave it blank.
hostname: 'yambms' # This is the name of the node. It should always be unique in your ESPHome network.
friendly_name : 'YamBMS' # Prefix added in front of all entity names and also to classify them.
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: 'yambms1'
yambms_name: 'YamBMS 1'
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
shunt_combine_interval: '1s' # frequency at which Shunt data is combined in YamBMS
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
bms_combine_interval: '1s' # frequency at which BMS data is combined in YamBMS
bms_cutoff_timer: '50s' # time during which the end of charge conditions must be respected (cut-off + cells not equalizing)
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
################ >>> CONFIG & CUSTOM LP <<< ################
# Local Packages intended for creating custom codes
# or sharing settings between several main.yaml
# yambms_config: !include yambms_config.yaml
# yambms_custom: !include yambms_custom.yaml
############### >>> UNCOMMENT YOUR BOARD <<< ###############
############### >>> ONLY ONE BOARD ! <<< ###############
board:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# - path: 'packages/board/board_ESP32_Generic.yaml'
# - path: 'packages/board/board_ESP32_DevKit-V1.yaml'
# - path: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
# - path: 'packages/board/board_ESP32_EVB.yaml'
# - path: 'packages/board/board_ESP32_Atom-Lite.yaml'
# - path: 'packages/board/board_ESP32-C3_DevKitM-1.yaml'
# - path: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml'
- path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
# - path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
########### >>> UNCOMMENT YOUR BOARD OPTIONS <<< ###########
board_options:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# UART 1
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
canbus_node_id: 'canbus_inverter_1'
# MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# canbus_node_id: 'canbus_inverter_1'
############################################################
# You don't have to import a shunt but you must import at least one BMS.
# shunt:
# url: https://github.com/Sleeper85/esphome-yambms
# ref: main
# refresh: 0s
# files:
# # Shunt 1
# - path: 'packages/shunt/shunt_combine_Victron_SmartShunt_UART.yaml' # shunt_combine_Junctek_KHF_UART.yaml
# vars:
# shunt_id: '1' # must be a number
# shunt_name: 'Shunt 1'
# shunt_uart_id: 'uart_esp_3'
bms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# RS485 Sniffer
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_sniffer.yaml'
vars:
sniffer_id: 'sniffer1'
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_1'
# BMS 1
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_address: '0x01' # BMS 1 ( JK app `Device Addr.` setting )
# BMS 2
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_address: '0x02' # BMS 2 ( JK app `Device Addr.` setting )
# BMS 3
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '3' # must be a number
bms_name: 'JK-BMS 3'
bms_address: '0x03' # BMS 3 ( JK app `Device Addr.` setting )
# BMS 4
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '4' # must be a number
bms_name: 'JK-BMS 4'
bms_address: '0x04' # BMS 4 ( JK app `Device Addr.` setting )
# BMS 5
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '5' # must be a number
bms_name: 'JK-BMS 5'
bms_address: '0x05' # BMS 5 ( JK app `Device Addr.` setting )
# BMS 6
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '6' # must be a number
bms_name: 'JK-BMS 6'
bms_address: '0x06' # BMS 6 ( JK app `Device Addr.` setting )
# BMS 7
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '7' # must be a number
bms_name: 'JK-BMS 7'
bms_address: '0x07' # BMS 7 ( JK app `Device Addr.` setting )
# BMS 8
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '8' # must be a number
bms_name: 'JK-BMS 8'
bms_address: '0x08' # BMS 8 ( JK app `Device Addr.` setting )
yambms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: 'packages/yambms/yambms.yaml'
canbus:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: 'packages/yambms/yambms_canbus.yaml'
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (0x305 frame) for 5s
# The Deye inverter sends the ACK 0x305 only when it receives the 0x356 frame.
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
debug:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
-316
View File
@@ -1,316 +0,0 @@
# Updated : 2025.05.13
# Version : 1.5.5
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
######################## YamBMS Remote Packages Version ########################
# You can compile this YAML directly without the `packages` folder.
# The packages will be automatically downloaded from GitHub.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
# web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# Name
name: '' # Name that can be added as a second prefix after the friendly name, you can leave it blank.
hostname: 'yambms' # This is the name of the node. It should always be unique in your ESPHome network.
friendly_name : 'YamBMS' # Prefix added in front of all entity names and also to classify them.
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: 'yambms1'
yambms_name: 'YamBMS 1'
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
shunt_combine_interval: '1s' # frequency at which Shunt data is combined in YamBMS
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
bms_combine_interval: '1s' # frequency at which BMS data is combined in YamBMS
bms_cutoff_timer: '50s' # time during which the end of charge conditions must be respected (cut-off + cells not equalizing)
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
packages:
################ >>> CONFIG & CUSTOM LP <<< ################
# Local Packages intended for creating custom codes
# or sharing settings between several main.yaml
# yambms_config: !include yambms_config.yaml
# yambms_custom: !include yambms_custom.yaml
############### >>> UNCOMMENT YOUR BOARD <<< ###############
############### >>> ONLY ONE BOARD ! <<< ###############
board:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# - path: 'packages/board/board_ESP32_Generic.yaml'
# - path: 'packages/board/board_ESP32_DevKit-V1.yaml'
# - path: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
# - path: 'packages/board/board_ESP32_EVB.yaml'
# - path: 'packages/board/board_ESP32_Atom-Lite.yaml'
# - path: 'packages/board/board_ESP32-C3_DevKitM-1.yaml'
# - path: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml'
- path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
# - path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
########### >>> UNCOMMENT YOUR BOARD OPTIONS <<< ###########
board_options:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# UART 1
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
canbus_node_id: 'canbus_inverter_1'
# MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# canbus_node_id: 'canbus_inverter_1'
############################################################
# You don't have to import a shunt but you must import at least one BMS.
# shunt:
# url: https://github.com/Sleeper85/esphome-yambms
# ref: main
# refresh: 0s
# files:
# # Shunt 1
# - path: 'packages/shunt/shunt_combine_Victron_SmartShunt_UART.yaml' # shunt_combine_Junctek_KHF_UART.yaml
# vars:
# shunt_id: '1' # must be a number
# shunt_name: 'Shunt 1'
# shunt_uart_id: 'uart_esp_3'
bms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# RS485 Sniffer
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_sniffer.yaml'
vars:
sniffer_id: 'sniffer1'
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_1'
# BMS 1
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_address: '0x01' # BMS 1 DIP switch
# BMS 2
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_address: '0x02' # BMS 2 DIP switch
# BMS 3
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '3' # must be a number
bms_name: 'JK-BMS 3'
bms_address: '0x03' # BMS 3 DIP switch
# BMS 4
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '4' # must be a number
bms_name: 'JK-BMS 4'
bms_address: '0x04' # BMS 4 DIP switch
# BMS 5
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '5' # must be a number
bms_name: 'JK-BMS 5'
bms_address: '0x05' # BMS 5 DIP switch
# BMS 6
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '6' # must be a number
bms_name: 'JK-BMS 6'
bms_address: '0x06' # BMS 6 DIP switch
# BMS 7
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '7' # must be a number
bms_name: 'JK-BMS 7'
bms_address: '0x07' # BMS 7 DIP switch
# BMS 8
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '8' # must be a number
bms_name: 'JK-BMS 8'
bms_address: '0x08' # BMS 8 DIP switch
yambms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: 'packages/yambms/yambms.yaml'
canbus:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: 'packages/yambms/yambms_canbus.yaml'
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (0x305 frame) for 5s
# The Deye inverter sends the ACK 0x305 only when it receives the 0x356 frame.
canbus_link_timer: '5s'
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
debug:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
+199 -118
View File
@@ -1,5 +1,5 @@
# Updated : 2025.05.13
# Version : 1.5.5
# Updated : 2026.06.29
# Version : 1.7.0
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -36,46 +36,40 @@
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
# baud_rate: 115200 # Send logs to the `hardware_uart` USB output (this consumes a UART interface)
# hardware_uart: UART0 # UART0 / USB_SERIAL_JTAG
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
- platform: esphome
# Uncomment:
# API: to monitor entities via Home Assistant
# MQTT: to monitor entities via another system
# Neither: to monitor entities only via `web_server` or nothing
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
# web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# Name
name: '' # Name that can be added as a second prefix after the friendly name, you can leave it blank.
hostname: 'pvbrain2' # This is the name of the node. It should always be unique in your ESPHome network.
friendly_name : 'YamBMS' # Prefix added in front of all entity names and also to classify them.
# This project uses the `sub-device` function of ESPHome to prefix entity names.
# This allows to group entities into logical devices that appear separately in Home Assistant.
hostname: 'pvbrain2' # Name of your ESPHome node registered on the IP network (DNS name must be unique)
friendly_name : 'PVbrain2' # Name of your board (prefix for board entities)
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: 'yambms1'
yambms_name: 'YamBMS 1'
yambms_id: '1' # Number without spaces
yambms_name: 'YamBMS 1' # Prefix for YamBMS entities
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
@@ -97,138 +91,225 @@ substitutions:
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_discharge_current: '300' # in Ampere
# +-------------------------------------------------------------------------
# | Temperature-based current limitation
# | Can be disabled via the switch "Temperature-based current limitation"
# | This factor is applied to the battery capacity (Ah), not the current
# | maximum charge/discharge current. For example : 280Ah x 0.5 = 140A
# +-------------------------------------------------------------------------
# Temperature °C -> Charge Rate (0.0C to 1.0C)
yambms_charging_rate_table: |
{
{ -0.1, 0.00 },
{ 0.0, 0.05 },
{ 5.0, 0.12 },
{ 10.0, 0.30 },
{ 20.0, 0.50 },
{ 25.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# Temperature °C -> Discharge Rate (0.0C to 1.0C)
yambms_discharging_rate_table: |
{
{-30.0, 0.00 },
{-20.0, 0.50 },
{-10.0, 0.50 },
{ -5.0, 0.50 },
{ 0.0, 0.50 },
{ 5.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | Shunt Settings |
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
shunt_combine_interval: '1s' # frequency at which Shunt data is combined in YamBMS
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
bms_combine_interval: '1s' # frequency at which BMS data is combined in YamBMS
bms_cutoff_timer: '50s' # time during which the end of charge conditions must be respected (cut-off + cells not equalizing)
# +--------------------------------------+
# | WK2168 UART expander |
# | Health & LED Assignment Logs |
# +--------------------------------------+
uart0_baudrate: '2400' #WKS {RJ45-UART0}
uart1_baudrate: '38400' #JSY193
uart2_baudrate: '19200' #SmartShunt
uart3_baudrate: '9600' #SRNE {RJ45-UART3}
uart4_baudrate: '115200' #JK-BMS 1
uart5_baudrate: '115200' #JK-BMS 2
uart6_baudrate: '115200' #Pylontech
uart7_baudrate: '9600' #EPEVER {RJ45-UART7}
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | UART expander WK2168 |
# +--------------------------------------+
uart0_baudrate: '2400' # uart_id : uart_${uart_hub_bus}_0 WKS {RJ45-UART0}
uart1_baudrate: '38400' # uart_id : uart_${uart_hub_bus}_1 JSY193
uart2_baudrate: '19200' # uart_id : uart_${uart_hub_bus}_2 SmartShunt
uart3_baudrate: '9600' # uart_id : uart_${uart_hub_bus}_3 SRNE {RJ45-UART3}
uart4_baudrate: '115200' # uart_id : uart_${uart_hub_bus}_4 JK-BMS 1
uart5_baudrate: '115200' # uart_id : uart_${uart_hub_bus}_5 JK-BMS 2
uart6_baudrate: '115200' # uart_id : uart_${uart_hub_bus}_6 Pylontech
uart7_baudrate: '9600' # uart_id : uart_${uart_hub_bus}_7 EPEVER {RJ45-UART7}
# +--------------------------------------+
# | PVbrain2 packages |
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_RP_YAML.md
packages:
pvbrain2:
remote_packages:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
refresh: 60min
files:
# Board
- path: 'packages/board/board_ESP32-S3_DevKitC-1_PVbrain2.yaml'
# vars:
# server_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# network_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# +------------------------------------------------------------------------------+
# | >>> Board Options
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
# - path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# BUS
# - path: 'pvbrain2/base/device_bus_i2c0.yaml' # SX1509 and BME280/BMP280
- path: 'pvbrain2/base/device_bus_spi1.yaml' # MCP2515
- path: 'pvbrain2/base/device_bus_one_wire.yaml' # Dallas
# Devices
# - path: 'pvbrain2/base/device_uart_esp.yaml'
- path: 'pvbrain2/base/device_wk2168_spi.yaml'
# - path: 'pvbrain2/base/device_wk2168_i2c.yaml'
# - path: 'pvbrain2/base/device_sx1509.yaml'
- path: 'pvbrain2/base/device_canbus_esp32can.yaml' # canbus_node1
- path: 'pvbrain2/base/device_canbus_mcp2515.yaml' # canbus_node2
# - path: 'packages/board/board_options_itf_bus_spi.yaml' # SPI bus for MCP2515
# - path: 'packages/board/board_options_itf_bus_i2c.yaml' # I2C bus for SX1509 and BME280/BMP280
# - path: 'packages/board/board_options_itf_bus_one_wire.yaml' # One wire bus for Dallas Temperature Sensor
# +--------------------------------------+
# | YamBMS packages |
# +--------------------------------------+
# WK2168 UART/IO Expander
- path: 'packages/board/board_options_itf_pvbrain2_wk2168_spi.yaml'
# - path: 'packages/board/board_options_itf_pvbrain2_wk2168_i2c.yaml'
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
# SX1509 16 channel I/O Expander
# - path: 'packages/board/board_options_itf_pvbrain2_sx1509.yaml'
################ >>> CONFIG & CUSTOM LP <<< ################
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# Local Packages intended for creating custom codes
# or sharing settings between several main.yaml
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
# yambms_config: !include yambms_config.yaml
# yambms_custom: !include yambms_custom.yaml
# Web Server
# - path: 'packages/yambms/yambms_web_server.yaml'
############################################################
# WiFi AP @ 192.168.4.1
# - path: 'packages/board/board_options_wifi_ap.yaml'
# Captive Portal @ 192.168.4.1
# - path: 'packages/board/board_options_captive_portal.yaml'
# +------------------------------------------------------------------------------+
# | >>> BMS / Balancer / Shunt
# +------------------------------------------------------------------------------+
# You don't have to import a shunt but you must import at least one BMS.
# You can mix different BMS models, the only condition is that the `bms_id` are numbered in order starting from 1 !
shunt:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# Shunt 1
- path: 'packages/shunt/shunt_combine_Victron_SmartShunt_UART_expander.yaml' # shunt_combine_Junctek_KHF_UART.yaml
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_uart_id: 'uart_${uart_hub_bus}_2'
bms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# BMS 1
- path: 'packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_uart_id: 'uart_${uart_hub_bus}_4'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
# BMS 2
- path: 'packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_uart_id: 'uart_${uart_hub_bus}_5'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
yambms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# >>> Copy your BMS / Balancer / Shunt packages here
# >>> You can find examples at this address :
# >>> https://github.com/Sleeper85/esphome-yambms/tree/main/examples/single-node/
# +------------------------------------------------------------------------------+
# | >>> YamBMS
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms.yaml'
canbus:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: 'packages/yambms/yambms_canbus.yaml'
# +------------------------------------------------------------------------------+
# | >>> CAN bus to Inverter
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms_canbus.yaml' # yambms_canbus_web_server.yaml
vars:
canbus_id: 'canbus1'
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_node1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (0x305 frame) for 5s
# The Deye inverter sends the ACK 0x305 only when it receives the 0x356 frame.
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
debug:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# +------------------------------------------------------------------------------+
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# vars:
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> DEBUG ( logger level must be DEBUG )
# +------------------------------------------------------------------------------+
- path: packages/base/device_debug_ESP32.yaml
# - path: packages/base/device_debug_ESP32_PSRAM.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
# Size of your PSRAM in bits
# 8Mb='8388608' | 6Mb='6291456' | 4Mb='4194304' | 2Mb='2097152' | NoPSRAM='0'
debug_psram_size: '8388608'
# +------------------------------------------------------------------------------+
# | >>> Add your custom packages below
# +------------------------------------------------------------------------------+
# Custom packages
# yambms_custom: !include yambms_custom.yaml
# +------------------------------------------------------------------------------+
# | >>> Add your custom YAML below
# +----- -------------------------------------------------------------------------+
# Custom YAML
@@ -0,0 +1,120 @@
# Updated : 2026.06.29
# Version : 1.7.0
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
######################## YamBMS Local Packages Version #########################
# You need to copy the `packages` folder into the same folder as this YAML in order to compile it.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
# baud_rate: 115200 # Send logs to the `hardware_uart` USB output (this consumes a UART interface)
# hardware_uart: UART0 # UART0 / USB_SERIAL_JTAG
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# This project uses the `sub-device` function of ESPHome to prefix entity names.
# This allows to group entities into logical devices that appear separately in Home Assistant.
hostname: 'yambms' # Name of your ESPHome node registered on the IP network (DNS name must be unique)
friendly_name : 'YamBMS' # Name of your board (prefix for board entities)
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '5s' # frequency at which Shunt data is refreshed
# +--------------------------------------+
# | Health & LED Assignment Logs |
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_LP_YAML.md
packages:
remote_packages:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 60min
files:
# board
- path: packages/board/board_RP2040_RPi_Pico.yaml
# vars:
# server_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# network_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# uart
- path: packages/board/board_options_itf_uart_1.yaml
- path: packages/board/board_options_itf_uart_2.yaml
- path: packages/board/board_options_itf_uart_3.yaml
- path: packages/board/board_options_itf_uart_4.yaml
- path: packages/board/board_options_itf_uart_5.yaml
- path: packages/board/board_options_itf_uart_6.yaml
# modbus
- path: packages/board/board_options_itf_modbus.yaml
vars:
modbus_role: 'server' # client / server
modbus_uart_id: 'uart_1' # RS485 board
modbus_baud_rate: '19200' # 9600 / 19200 / 11520
# shunt1
- path: packages/shunt/shunt_modbus_Victron_SmartShunt_UART_minimal.yaml
vars:
shunt_id: '1'
shunt_name: 'Shunt 1'
shunt_uart_id: 'uart_2'
shunt_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# shunt2
- path: packages/shunt/shunt_modbus_Victron_SmartShunt_UART_minimal.yaml
vars:
shunt_id: '2'
shunt_name: 'Shunt 2'
shunt_uart_id: 'uart_3'
shunt_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# shunt3
- path: packages/shunt/shunt_modbus_Victron_SmartShunt_UART_minimal.yaml
vars:
shunt_id: '3'
shunt_name: 'Shunt 3'
shunt_uart_id: 'uart_4'
shunt_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# shunt4
- path: packages/shunt/shunt_modbus_Victron_SmartShunt_UART_minimal.yaml
vars:
shunt_id: '4'
shunt_name: 'Shunt 4'
shunt_uart_id: 'uart_5'
shunt_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# shunt5
- path: packages/shunt/shunt_modbus_Victron_SmartShunt_UART_minimal.yaml
vars:
shunt_id: '5'
shunt_name: 'Shunt 5'
shunt_uart_id: 'uart_6'
shunt_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
+202 -136
View File
@@ -1,5 +1,5 @@
# Updated : 2025.05.13
# Version : 1.5.5
# Updated : 2026.06.29
# Version : 1.7.0
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -36,46 +36,40 @@
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
# baud_rate: 115200 # Send logs to the `hardware_uart` USB output (this consumes a UART interface)
# hardware_uart: UART0 # UART0 / USB_SERIAL_JTAG
ota:
platform: esphome
# Please use the native `api` component instead of the `mqtt` section.
# If you use Home Assistant, the native API is more lightweight.
# If there is no HA server connected to this API, the ESP32 reboots every 15 minutes to try to resolve the problem.
# The "reboot_timeout: 0s" option will keep your ESP32 up and running even if you lose connection to your HA server.
- platform: esphome
# Uncomment:
# API: to monitor entities via Home Assistant
# MQTT: to monitor entities via another system
# Neither: to monitor entities only via `web_server` or nothing
api:
reboot_timeout: 0s
# If you don't want to use ESPHome's native API you can use MQTT instead.
# In this case don't forget to remove the 'api:' section.
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# Please note that enabling this component will take up a lot of memory and may decrease
# stability and be the cause of reboot depending on the capabilities of the board used.
# web_server:
# port: 80
# log: false
# ota: false
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# Name
name: '' # Name that can be added as a second prefix after the friendly name, you can leave it blank.
hostname: 'yambms' # This is the name of the node. It should always be unique in your ESPHome network.
friendly_name : 'YamBMS' # Prefix added in front of all entity names and also to classify them.
# This project uses the `sub-device` function of ESPHome to prefix entity names.
# This allows to group entities into logical devices that appear separately in Home Assistant.
hostname: 'yambms' # Name of your ESPHome node registered on the IP network (DNS name must be unique)
friendly_name : 'YamBMS' # Name of your board (prefix for board entities)
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: 'yambms1'
yambms_name: 'YamBMS 1'
yambms_id: '1' # Number without spaces
yambms_name: 'YamBMS 1' # Prefix for YamBMS entities
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
@@ -97,174 +91,246 @@ substitutions:
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_discharge_current: '300' # in Ampere
# +-------------------------------------------------------------------------
# | Temperature-based current limitation
# | Can be disabled via the switch "Temperature-based current limitation"
# | This factor is applied to the battery capacity (Ah), not the current
# | maximum charge/discharge current. For example : 280Ah x 0.5 = 140A
# +-------------------------------------------------------------------------
# Temperature °C -> Charge Rate (0.0C to 1.0C)
yambms_charging_rate_table: |
{
{ -0.1, 0.00 },
{ 0.0, 0.05 },
{ 5.0, 0.12 },
{ 10.0, 0.30 },
{ 20.0, 0.50 },
{ 25.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# Temperature °C -> Discharge Rate (0.0C to 1.0C)
yambms_discharging_rate_table: |
{
{-30.0, 0.00 },
{-20.0, 0.50 },
{-10.0, 0.50 },
{ -5.0, 0.50 },
{ 0.0, 0.50 },
{ 5.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | Shunt Settings |
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
shunt_combine_interval: '1s' # frequency at which Shunt data is combined in YamBMS
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
bms_combine_interval: '1s' # frequency at which BMS data is combined in YamBMS
bms_cutoff_timer: '50s' # time during which the end of charge conditions must be respected (cut-off + cells not equalizing)
# +--------------------------------------+
# | Health & LED Assignment Logs |
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_main_YAML_HowTo.md
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_RP_YAML.md
packages:
################ >>> CONFIG & CUSTOM LP <<< ################
# Local Packages intended for creating custom codes
# or sharing settings between several main.yaml
# yambms_config: !include yambms_config.yaml
# yambms_custom: !include yambms_custom.yaml
############### >>> UNCOMMENT YOUR BOARD <<< ###############
############### >>> ONLY ONE BOARD ! <<< ###############
board:
remote_packages:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
refresh: 60min
files:
# +------------------------------------------------------------------------------+
# | >>> UNCOMMENT YOUR BOARD
# | >>> ONLY ONE BOARD !
# +------------------------------------------------------------------------------+
- path: 'packages/board/board_ESP32_Generic.yaml'
# - path: 'packages/board/board_ESP32_DevKit-V1.yaml'
# - path: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
# - path: 'packages/board/board_ESP32_EVB.yaml'
# - path: 'packages/board/board_ESP32_Atom-Lite.yaml'
# - path: 'packages/board/board_ESP32_DevKit-V1.yaml'
# - path: 'packages/board/board_ESP32_EVB.yaml'
# - path: 'packages/board/board_ESP32_iBMS_CAN_RS485_V3.3.yaml'
# - path: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
# - path: 'packages/board/board_ESP32-C3_DevKitM-1.yaml'
# - path: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
# - path: 'packages/board/board_ESP32-C3_FlipC3.yaml'
# - path: 'packages/board/board_ESP32-S3_Generic.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect-Pro.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-ETH.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-RS485-CAN.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-4.3.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-7.yaml'
# - path: 'packages/board/board_ESP32-S3_XIAO.yaml'
# - path: 'packages/board/board_ESP32-S3_YBoard.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
# vars:
# server_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# network_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# +------------------------------------------------------------------------------+
# | >>> Board Display
# | >>> Uncomment the display that corresponds to your board
# +------------------------------------------------------------------------------+
# - path: 'packages/board/board_options_display_128x128.yaml' # AtomS3 / AtomS3R
# - path: 'packages/board/board_options_display_480x222.yaml' # LilyGo T-Connect Pro
# - path: 'packages/board/board_options_display_lvgl_package_800x480_blue_navy_esphome.yaml' # WS Touch LCD 4.3" and 7"
# - path: 'packages/board/board_options_display_lvgl_package_1280x720_Tab5_esphome.yaml' # M5Stack Tab5
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
# - path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
########### >>> UNCOMMENT YOUR BOARD OPTIONS <<< ###########
board_options:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# UART 1
# +------------------------------------------------------------------------------+
# | >>> Board Options
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2
- path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3
- path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# MCP2515
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
############################################################
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
# Web Server
# - path: 'packages/yambms/yambms_web_server.yaml'
# WiFi AP @ 192.168.4.1
# - path: 'packages/board/board_options_wifi_ap.yaml'
# Captive Portal @ 192.168.4.1
# - path: 'packages/board/board_options_captive_portal.yaml'
# +------------------------------------------------------------------------------+
# | >>> BMS / Balancer / Shunt
# +------------------------------------------------------------------------------+
# You don't have to import a shunt but you must import at least one BMS.
# You can mix different BMS models, the only condition is that the `bms_id` are numbered in order starting from 1 !
shunt:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# Shunt 1
- path: 'packages/shunt/shunt_combine_Victron_SmartShunt_UART.yaml' # shunt_combine_Junctek_KHF_UART.yaml
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_uart_id: 'uart_esp_3'
# >>> Copy your BMS / Balancer / Shunt packages here
# >>> You can find examples at this address :
# >>> https://github.com/Sleeper85/esphome-yambms/tree/main/examples/single-node/
bms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# BMS 1
- path: 'packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_uart_id: 'uart_esp_1'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
# BMS 2
- path: 'packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_uart_id: 'uart_esp_2'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
# bms_options:
# url: https://github.com/Sleeper85/esphome-yambms
# ref: main
# refresh: 0s
# files:
# # BMS 1
# - path: 'packages/bms/bms_options_charging_logic.yaml'
# vars:
# bms_id: '1' # must be a number
# # BMS 2
# - path: 'packages/bms/bms_options_charging_logic.yaml'
# vars:
# bms_id: '2' # must be a number
yambms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# +------------------------------------------------------------------------------+
# | >>> YamBMS
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms.yaml'
canbus:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: 'packages/yambms/yambms_canbus.yaml'
# +------------------------------------------------------------------------------+
# | >>> CAN bus to Inverter
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms_canbus.yaml' # yambms_canbus_web_server.yaml
vars:
canbus_id: 'canbus1'
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (0x305 frame) for 5s
# The Deye inverter sends the ACK 0x305 only when it receives the 0x356 frame.
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
# +--------------------------------------+
# | DEBUG ( logger level must be DEBUG ) |
# +--------------------------------------+
debug:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# +------------------------------------------------------------------------------+
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# vars:
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> DEBUG ( logger level must be DEBUG )
# +------------------------------------------------------------------------------+
- path: packages/base/device_debug_ESP32.yaml
# - path: packages/base/device_debug_ESP32_PSRAM.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
# Size of your PSRAM in bits
# 8Mb='8388608' | 6Mb='6291456' | 4Mb='4194304' | 2Mb='2097152' | NoPSRAM='0'
debug_psram_size: '8388608'
# +------------------------------------------------------------------------------+
# | >>> Add your custom packages below
# +------------------------------------------------------------------------------+
# Custom packages
# yambms_custom: !include yambms_custom.yaml
# +------------------------------------------------------------------------------+
# | >>> Add your custom YAML below
# +----- -------------------------------------------------------------------------+
# Custom YAML
@@ -0,0 +1,336 @@
# Updated : 2026.06.29
# Version : 1.7.0
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
######################## YamBMS Remote Packages Version ########################
# You can compile this YAML directly without the `packages` folder.
# The packages will be automatically downloaded from GitHub.
# Don't forget to configure your WiFi credentials in the secrets.yaml
################################################################################
# If needed, configure a static IP here
# wifi:
# manual_ip:
# static_ip: 192.168.0.85
# gateway: 192.168.0.1
# subnet: 255.255.255.0
# dns1: 8.8.8.8
# dns2: 8.8.4.4
logger:
level: INFO # VERBOSE / DEBUG / INFO / WARN
# baud_rate: 115200 # Send logs to the `hardware_uart` USB output (this consumes a UART interface)
# hardware_uart: UART0 # UART0 / USB_SERIAL_JTAG
ota:
- platform: esphome
# Uncomment:
# API: to monitor entities via Home Assistant
# MQTT: to monitor entities via another system
# Neither: to monitor entities only via `web_server` or nothing
api:
reboot_timeout: 0s
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# +--------------------------------------+
# | Global Settings |
# +--------------------------------------+
substitutions:
# This project uses the `sub-device` function of ESPHome to prefix entity names.
# This allows to group entities into logical devices that appear separately in Home Assistant.
hostname: 'yambms' # Name of your ESPHome node registered on the IP network (DNS name must be unique)
friendly_name : 'YamBMS' # Name of your board (prefix for board entities)
# +--------------------------------------+
# | YamBMS Settings |
# +--------------------------------------+
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: '1' # Number without spaces
yambms_name: 'YamBMS 1' # Prefix for YamBMS entities
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_discharge_current: '300' # in Ampere
# +-------------------------------------------------------------------------
# | Temperature-based current limitation
# | Can be disabled via the switch "Temperature-based current limitation"
# | This factor is applied to the battery capacity (Ah), not the current
# | maximum charge/discharge current. For example : 280Ah x 0.5 = 140A
# +-------------------------------------------------------------------------
# Temperature °C -> Charge Rate (0.0C to 1.0C)
yambms_charging_rate_table: |
{
{ -0.1, 0.00 },
{ 0.0, 0.05 },
{ 5.0, 0.12 },
{ 10.0, 0.30 },
{ 20.0, 0.50 },
{ 25.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# Temperature °C -> Discharge Rate (0.0C to 1.0C)
yambms_discharging_rate_table: |
{
{-30.0, 0.00 },
{-20.0, 0.50 },
{-10.0, 0.50 },
{ -5.0, 0.50 },
{ 0.0, 0.50 },
{ 5.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# +--------------------------------------+
# | Shunt Settings |
# +--------------------------------------+
shunt_update_interval: '3s' # frequency at which Shunt data is refreshed
# +--------------------------------------+
# | BMS Settings |
# +--------------------------------------+
bms_update_interval: '3s' # frequency at which BMS data is refreshed, going below '3s' can cause problems
# +--------------------------------------+
# | Health & LED Assignment Logs |
# +--------------------------------------+
enable_led_logging: 'false' # Set to true to see if an led is assigned to a component correctly, logged every 60 seconds
enable_health_logging: 'false' # Set to true to see if component health for all component instances, logged every 60 seconds
# +--------------------------------------+
# | Packages |
# +--------------------------------------+
# PLEASE READ : https://github.com/Sleeper85/esphome-yambms/blob/main/documents/README/YamBMS_RP_YAML.md
packages:
remote_packages:
url: https://github.com/Sleeper85/esphome-yambms
ref: dev
refresh: 0s
files:
# +------------------------------------------------------------------------------+
# | >>> UNCOMMENT YOUR BOARD
# | >>> ONLY ONE BOARD !
# +------------------------------------------------------------------------------+
- path: 'packages/board/board_ESP32_Generic.yaml'
# - path: 'packages/board/board_ESP32_Atom-Lite.yaml'
# - path: 'packages/board/board_ESP32_DevKit-V1.yaml'
# - path: 'packages/board/board_ESP32_EVB.yaml'
# - path: 'packages/board/board_ESP32_iBMS_CAN_RS485_V3.3.yaml'
# - path: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
# - path: 'packages/board/board_ESP32-C3_DevKitM-1.yaml'
# - path: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
# - path: 'packages/board/board_ESP32-C3_FlipC3.yaml'
# - path: 'packages/board/board_ESP32-S3_Generic.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
# - path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml'
# - path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
# - path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect-Pro.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-ETH.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-RS485-CAN.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-4.3.yaml'
# - path: 'packages/board/board_ESP32-S3_WS-Touch-LCD-7.yaml'
# - path: 'packages/board/board_ESP32-S3_XIAO.yaml'
# - path: 'packages/board/board_ESP32-S3_YBoard.yaml'
# vars:
# server_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# network_status_led_id: 'virtual_status_light' # led used to show status. Default = esp_light, set specific led or set to 'virtual_status_light' to disable
# +------------------------------------------------------------------------------+
# | >>> Board Display
# | >>> Uncomment the display that corresponds to your board
# +------------------------------------------------------------------------------+
# - path: 'packages/board/board_options_display_128x128.yaml' # AtomS3 / AtomS3R
# - path: 'packages/board/board_options_display_480x222.yaml' # LilyGo T-Connect Pro
# - path: 'packages/board/board_options_display_lvgl_package_800x480_blue_navy_esphome.yaml' # WS Touch LCD 4.3" and 7"
# - path: 'packages/board/board_options_display_lvgl_package_1280x720_Tab5_esphome.yaml' # M5Stack Tab5
# vars:
# display_auto_next_page_interval: '5s'
# display_rotation: '0' # 0/90/180/270 rotation angle in degrees
# +------------------------------------------------------------------------------+
# | >>> Board Options
# | >>> Uncomment your interfaces and options
# +------------------------------------------------------------------------------+
# UART 1 (uart_id: uart_esp_1)
- path: 'packages/board/board_options_itf_uart_esp_1.yaml'
# UART 2 (uart_id: uart_esp_2)
# - path: 'packages/board/board_options_itf_uart_esp_2.yaml'
# UART 3 (uart_id: uart_esp_3)
# - path: 'packages/board/board_options_itf_uart_esp_3.yaml'
# UART flow control
# - path: 'packages/board/board_options_itf_uart_flow_control.yaml'
# vars:
# uart_id: 'uart_esp_1'
# uart_flow_control_pin: ${talk_pin}
# CAN transceiver - ESP32_CAN (TJA105x, SN65HVD230, M5Stack CAN base/unit)
- path: 'packages/board/board_options_itf_canbus_esp32_can.yaml'
vars:
# to bms = canbus_bms_1
# to inverter = canbus_inverter_1
canbus_node_id: 'canbus_inverter_1'
# CAN transceiver - MCP2515
# - path: 'packages/board/board_options_itf_canbus_mcp2515.yaml'
# vars:
# # to bms = canbus_bms_1
# # to inverter = canbus_inverter_1
# canbus_node_id: 'canbus_inverter_1'
# PSRAM octal 80Mhz
# - path: 'packages/board/board_options_PSRAM_octal_80Mhz.yaml'
# Web Server
# - path: 'packages/yambms/yambms_web_server.yaml'
# WiFi AP @ 192.168.4.1
# - path: 'packages/board/board_options_wifi_ap.yaml'
# Captive Portal @ 192.168.4.1
# - path: 'packages/board/board_options_captive_portal.yaml'
# +------------------------------------------------------------------------------+
# | >>> BMS / Balancer / Shunt
# +------------------------------------------------------------------------------+
# You don't have to import a shunt but you must import at least one BMS.
# You can mix different BMS models, the only condition is that the `bms_id` are numbered in order starting from 1 !
# >>> Copy your BMS / Balancer / Shunt packages here
# >>> You can find examples at this address :
# >>> https://github.com/Sleeper85/esphome-yambms/tree/main/examples/single-node/
# +------------------------------------------------------------------------------+
# | >>> YamBMS
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms.yaml'
# +------------------------------------------------------------------------------+
# | >>> CAN bus to Inverter
# +------------------------------------------------------------------------------+
- path: 'packages/yambms/yambms_canbus.yaml' # yambms_canbus_web_server.yaml
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# CAN frames sending will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305) before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer_enabled: 'true' # Set it to 'false' if your inverter/charger is not sending ACK (can_id 0x305) every `1s` as specified by the protocol
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs (required for Schneider XW Pro)
# +------------------------------------------------------------------------------+
# | >>> RS485 bus to Inverter
# +------------------------------------------------------------------------------+
# - path: 'packages/yambms/yambms_rs485_pylon.yaml' # yambms_rs485_pylon_web_server.yaml
# vars:
# rs485_id: '1' # Must be a number
# rs485_name: 'RS485 1'
# rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
# rs485_uart_baud_rate: '9600'
# rs485_update_timeout: '10s'
# rs485_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# +------------------------------------------------------------------------------+
# | >>> DEBUG ( logger level must be DEBUG )
# +------------------------------------------------------------------------------+
- path: packages/base/device_debug_ESP32.yaml
# - path: packages/base/device_debug_ESP32_PSRAM.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
# Size of your PSRAM in bits
# 8Mb='8388608' | 6Mb='6291456' | 4Mb='4194304' | 2Mb='2097152' | NoPSRAM='0'
debug_psram_size: '8388608'
# +------------------------------------------------------------------------------+
# | >>> Add your custom packages below
# +------------------------------------------------------------------------------+
# Custom packages
# yambms_custom: !include yambms_custom.yaml
# +------------------------------------------------------------------------------+
# | >>> Add your custom YAML below
# +----- -------------------------------------------------------------------------+
# Custom YAML
+157
View File
@@ -0,0 +1,157 @@
# Auto Temp-Based Current
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
The YamBMS `Auto Temp-Based Current` function is a software control designed to protect battery cells from damage due to charging or discharging at extreme temperatures.
It dynamically calculates a "Delta" (reduction value) that adjusts the configured maximum charge and discharge limits based on the thermal environment of the battery.
Lithium Iron Phosphate (LiFePO4) batteries have specific "C-rate" limits that change with temperature. For example, charging at 0°C may be prohibited or restricted to a very low current, while charging at 25°C allows for the full rated current.
This function automates that logic by:
- Monitoring the minimum and maximum cell temperatures.
- Filtering out sensor noise.
- Interpolating a safe C-rate from user-defined tables.
- Calculating the required current reduction (Delta).
### Sequence of Operation
1. Check Switch: Is the feature enabled?
2. Validate Data: Are sensors online and reporting valid numbers?
3. Filter: Apply EMA smoothing to the raw temperature values.
4. Lookup: Find the C-rate for the current temperature.
5. Calculate: Determine the current reduction needed.
6. Apply: Round the result and update the relevant globals.
## Core Logic
### EMA Filter
Battery cells have significant thermal mass; their temperature does not change instantly. However, digital sensors often jitter between values (e.g., bouncing between 6.8°C and 6.9°C).
To prevent the charge current unnecessary fluctuations, an Exponential Moving Average (EMA) is used:
$$S_t = (\alpha \times Y_t) + ((1 - \alpha) \times S_{t-1})$$
**Alpha** ($\alpha$) - Set to `0.05`. This provides a stable, slow-moving average that ignores minor sensor noise but tracks real thermal trends.
**Adaptive Filtering** - If the sensor jumps by more than 5°C (for example, during boot-up or BMS connection), the filter ignores the EMA logic and updates immediately to the new value to ensure safety.
### Linear Interpolation
Auto Temp uses a pair of mapping tables (`yambms_charging_rate_table` & `yambms_charging_rate_table`) to define the relationship between temperature and C-Rate for both charging and discharging.
The interpolation function calculates values between defined points in these tables:
For example:
- **Point A**: $0^\circ\text{C}$ = $0.0\text{C}$ (No charging)
- **Point B**: $10^\circ\text{C}$ = $0.1\text{C}$ (Slow charging)
If the actual battery temperature is $5^\circ\text{C}$, the code determines that 5 is exactly halfway between 0 and 10, so it outputs $0.05\text{C}$.
#### Logic Walkthrough
The function is written as a C++ lambda (a small, self-contained function) that takes two inputs: the mapping table (`m`) and the current temperature (`x`).
1. **Boundarys and checks**
```c++
if (m.empty()) return 0.0f;
if (x <= m.begin()->first) return m.begin()->second;
if (x >= m.rbegin()->first) return m.rbegin()->second;
```
- Empty table: If the table isn't loaded, it returns 0.
- Lower bound: If the temperature is colder than the first mapping entry (e.g., $-10^\circ\text{C}$ when the table starts at $0^\circ\text{C}$), it simply returns the rate for $0^\circ\text{C}$.
- Upper Bound: If the temperature is hotter than the last mapping entry, it returns the rate for the highest temperature defined.
2. **Bracketing the input temperature value**
```c++
auto it_upper = m.upper_bound(x);
auto it_lower = std::prev(it_upper);
```
The function looks through the mapping table to find the two points that encompass the current temperature.
For a temperature of $7^\circ\text{C}$, it finds the entries for $0^\circ\text{C}$ (lower) and $10^\circ\text{C}$ (upper).
3. **The Slope Calculation**
```c++
float x0 = it_lower->first, y0 = it_lower->second;
float x1 = it_upper->first, y1 = it_upper->second;
return y0 + (x - x0) * ((y1 - y0) / (x1 - x0));
```
This uses the standard slope-intercept formula ($y = mx + b$).
It calculates the slope (Rate of change): $\frac{\text{Change in C-Rate}}{\text{Change in Temp}}$, then multiplies that slope by the distance the current temperature is from the lower bracket.
Finally, it adds that result to the lower bracket C-rate.
#### Why Use Interpolation Instead of Simple Steps?
Without interpolation, current limits would jump abruptly when the cell temperature passes a threshold.
Stepped current limits:
- $4.9^\circ\text{C}$ = $14.0\text{A}$
- $5.0^\circ\text{C}$ = $33.6\text{A}$
This creates sudden changes in requested current that can stress equipment.
Interpolated current limits:
- $4.9^\circ\text{C}$ = $33.2\text{A}$
- $5.0^\circ\text{C}$ = $33.6\text{A}$
The current limit adjusts smoothly between C-rate thresholds as the battery temperature changes. This reduces current hunting and minimises equipment stress.
## The Delta Calculation
Unlike some systems that overwrite the maximum current, this function calculates a negative delta to be applied to a configured current limit.
$$\text{Target Current} = \text{Allowed Rate} \times \text{Battery Capacity (Ah)}$$
$$\text{Delta} = \text{Target Current} - \text{Max Configured Current}$$
Example:
- Battery Capacity: 280Ah
- Configured Max Charge Limit: 140A
- Interpolated Rate at 4.9°C: 0.12C
- Calculation: $(0.12 \times 280) - 140 = -106.4\text{A}$
- **Result:** The system requests a reduction of 106.4A, effectively setting the limit to 33.6A.
## Safety & Edge Cases
- The code contains a clamp that ensures the logic can only lower the current limit, never increase it beyond configured limits settings.
- If the `Temperature-based Current Limitation` switch is turned OFF, the Delta is immediately reset to 0 to prevent temperature based current restrictions.
- If any critical sensor (temperature or capacity) returns NaN (Not a Number), the system defaults the Delta to 0 to prevent unpredictable behavior.
## Configuration
The behavior is dictated by the following tables defined in the main YAML. These values represent the multiplier of the total Ah capacity (C-rate).
```YAML
# +-------------------------------------------------------------------------
# | Temperature-based current limitation
# | Can be disabled via the switch "Temperature-based current limitation"
# | This factor is applied to the battery capacity (Ah), not the current
# | maximum charge/discharge current. For example : 280Ah x 0.5 = 140A
# +-------------------------------------------------------------------------
# Temperature °C -> Charge Rate (0.0C to 1.0C)
yambms_charging_rate_table: |
{
{ 0.0, 0.05 },
{ 5.0, 0.12 },
{ 10.0, 0.30 },
{ 20.0, 0.50 },
{ 25.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
# Temperature °C -> Discharge Rate (0.0C to 1.0C)
yambms_discharging_rate_table: |
{
{-30.0, 0.00 },
{-20.0, 0.50 },
{-10.0, 0.50 },
{ -5.0, 0.50 },
{ 0.0, 0.50 },
{ 5.0, 0.50 },
{ 45.0, 0.50 },
{ 50.0, 0.50 },
{ 55.0, 0.50 },
{ 60.0, 0.00 }
}
```
These values can be adjusted as needed, including adding or removing rows - the function will handle these changes automatically.
+1 -1
View File
@@ -23,7 +23,7 @@ The `GPS` port sometimes called `RS485` is not an `RS485` port but `3V3 UART-TTL
│ O O O O │
│GND RX TX VBAT│
└────────────────┘
│ │ │ └ VBAT is full battery volatge eg. 56V (possible to use it via an isolated DC-DC converter)
│ │ │ └ VBAT is full battery voltage eg. 56V (possible to use it via an isolated DC-DC converter)
│ │ └──── TX to TTL-isolator AI (input)
│ └──────── RX to TTL-isolator AO (output)
└──────────── GND to TTL-isolator GND
+67 -6
View File
@@ -6,6 +6,11 @@
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
> [!WARNING]
> There is a known bug with the latest version of **JK firmware >= V19.10**.
> Using **DIP switch addresses 1 to 15** does not reliably guarantee that the **UART2 (RS485-2)** port protocol will be automatically configured to **001 - JK BMS RS485 Modbus V1.0**, which allows **YamBMS** to access BMS informations.
> YamBMS users have confirmed that it is possible to resolve this issue by performing an [Erase History Data](BMS_JK-PB.md#erase-history-data) from the JK app on a smartphone.
> [!IMPORTANT]
> The most important thing for proper functioning of YamBMS is that **the voltage of your BMS is well calibrated**.
> YamBMS logic is based on the `min_cell_voltage` and `max_cell_voltage` voltages of your BMS.
@@ -20,7 +25,7 @@
## JK-PB BMS protocol
The datas from this BMS can be retrieved from the `RS485-2 (UART2)` network using the component [JK_RS485](https://github.com/txubelaxu/esphome-jk-bms/blob/main/components/jk_rs485_bms/README.md) of [@txubelaxu](https://github.com/txubelaxu).
The datas from this BMS can be retrieved from the `RS485-1 (UART1)` or `RS485-2 (UART2)` network using the component [JK_RS485](https://github.com/Sleeper85/esphome-components/tree/main/components) originally developed by [@txubelaxu](https://github.com/txubelaxu).
The BMS DIP switches must be set from `1` to `15` (server mode) and connected to each other using the `RS485-2` network available on the **two ports at the right ends**. `YamBMS` also connects to one of these two ports.
@@ -85,11 +90,11 @@ The following CAN protocols are supported on the CAN port:
> [!TIP]
> This solution only requires an ESP32 with a CAN transceiver and a RS485 transceiver.
You are free to choose the hardware you want, the list below are 3 easy to use examples :
You are free to choose the hardware you want, the list below are 3 easy to use examples of **ESP32-S3 with PSRAM** :
- `AtomS3` with the isolated `Atomic CAN base` and `RS485 unit`
- [`LilyGo T-Connect`, ESP32-S3 with 3x RS485 and 1x CAN](https://github.com/Xinyuan-LilyGO/T-Connect)
- [`LilyGo T-CAN485`, ESP32 with 1x RS485 and 1x CAN](https://github.com/Xinyuan-LilyGO/T-CAN485)
- [Waveshare ESP32-S3-RS485-CAN](https://www.waveshare.com/esp32-s3-rs485-can.htm), ESP32-S3 with 1x RS485 and 1x CAN
- [LilyGo T-Connect](https://github.com/Xinyuan-LilyGO/T-Connect), ESP32-S3 with 3x RS485 and 1x CAN
- [M5Stack AtomS3R](https://docs.m5stack.com/en/core/AtomS3R), ESP32-S3 with the isolated [Atomic CAN base](https://docs.m5stack.com/en/atom/Atomic%20CAN%20Base) and [RS485 unit](https://docs.m5stack.com/en/unit/iso485)
See the [documentation about supported hardware](Supported_devices.md).
@@ -105,6 +110,11 @@ The example below uses an `AtomS3` (display) with the `Atomic CAN base` and `RS4
> Galvanic isolation of the `RS485` connection is strongly recommended.
> The diagrams below does not show the galvanic isolation of the `RS485` connection !
> [!IMPORTANT]
> If you are unable to read your BMS from the `RS485` bus, add a `120 Ohm`
> resistor between the `A` and `B` wires connected to your `RS485` board.
> This must be done with the `M5Stack RS485 unit`, some boards have a switch to enable the bus termination resistor.
**Note:** the choice of RS485 board is not related to the chosen ESP32.
### AtomS3 with unisolated RS485 board
@@ -142,13 +152,20 @@ The example below uses an `AtomS3` (display) with the `Atomic CAN base` and `RS4
## BMS DIP switch config (mode 2)
With mode 2, the sniffer (ESP32) will automatically take the address 0x00 and act as master BMS (max 15 BMS).
With `mode 2`, the sniffer (ESP32) will automatically take the address `0x00` and act as master BMS (max 15 BMS).
This is the preferred mode with YamBMS.
- BMS 1 RS485 address : 0x01
- BMS 2 RS485 address : 0x02
- BMS 3 RS485 address : 0x03
- etc.
## MODE 1 vs MODE 2
`MODE 1`. If there is a JK-BMS acting as REAL MASTER (i.e. it has set 0x00 address), the code will be sniffing all the traffic in the network. The problem is that there is some information that is NEVER in the sniffed traffic information (device info frame type 03): device-name, hw version, sw version, password, RCV Time, RFV Time... So, periodically, ESP code will act as a PSEUDO-MASTER to try to get this information. It works for every slave device, but not for master device. At this moment, master device does NOT broadcast by itself the "frame type 03" info. And it does not answer to a "frame type 03" request sent by PSEUDO MASTER.
`MODE 2`. If every JK-BMS are set as SLAVES (all of them), the ESP code will act as MASTER. So, if ESP code does not detect any REAL MASTER in the network, it will act as a MASTER. Remember to adapt DIP switches and the YAML (addresses) as well. Changing the addreses of the devices does not affect to the historic data gathered from that device, because the config is based on the NAME of the device and not on the address of the device. So, change the address, but not the name. In this mode, ESP will gather all the information (cell info, device settings and device info). If anytime, a REAL MASTER arrives to the network, ESP will detect it and will stop acting as MASTER.
## JK-PB RS485 functions
### Broadcasting JK-PB settings to all BMS
@@ -156,3 +173,47 @@ With mode 2, the sniffer (ESP32) will automatically take the address 0x00 and ac
![Image](../../images/YamBMS_JK-PB_RS485_Sniffer_Broadcast.png "Broadcasting JK-PB settings to all BMS")
When enabled, this function synchronizes the settings of all your BMS connected to the same RS485 network as soon as you make parameter changes.
## JK-PB SoC 100% reset
> [!NOTE]
> During the `Bulk` phase the YamBMS `SoC` cannot be more than `98%`.
> When the battery is fully charged, the average `SoC` of your BMS will be sent.
### Solution 1
The simplest solution is to disable the **Charging Float Mode** switch to disable the new **SoC 100% reset logic** described below in **Solution 2**. Your BMS will simply use the **SOC 100% V.** value, and the SoC will be reset to 100% as soon as a cell reaches this value.
![Image](../../images/BMS_JK-PB_Charging_Float_Mode.png "BMS JK-PB Charging Float Mode")
### Solution 2
The new `JK-PB` parameters `RCV` and `RCV timer` are not used by `YamBMS`, but you can adjust them to reach the `100%` faster, a little before `YamBMS` completes charging.
If you are instructing `YamBMS` to Bulk charge at `3.5V/cell`, configure the `JK-PB` parameters like this:
* JK RCV V. : `3.45V/cell`
* JK RCV timer to `0.1` hour
* JK SOC 100% V. : `3.449V`
This will reset the `SoC` to `100%` faster.
The `SoC` at the end of charge is easy to understand, it's the average `SoC` of your BMS, but it won't go higher than `98%` until charging is complete.
Then, when charging is complete before switching to `Float`, `YamBMS` will again send the average `SoC` of your BMS, which is assumed to have reached `100%`. It's up to you to ensure this is the case by configuring your BMS.
On the `YamBMS` side, disabling the `EOC Timer` (which will end charging after max `30min` in the `Cut-Off` phase without waiting for all `cells` to be `equalized`) will prolong charging until all your `cells` are `equalized` and the active balancer is no longer working for `60s`. This can give more time to the `JK-PB` to reset to `100%`.
![Image](../../images/BMS_JK-PB_SoC_100pct_Logic.png "Broadcasting JK-PB settings to all BMS")
## Erase History Data
The procedure below allows you to unblock the **UART2 (RS485-2)** port to restore normal behavior, depending on the DIP switch value :
* DIP switch **0** = protocol **015 - dedicated to the master BMS**
* DIP switches **1 to 15** = protocol **001 - JK BMS RS485 Modbus V1.0**
| 1. Generate a JK code | 2. Erase History Data | 3. Enter the code |
| --- | --- | --- |
| Go to [this page](https://mirofromdiro.github.io/JK-firmware-code/) to generate a new code valid for one hour. | In the JK smartphone app, click on the **Erase History Data** function. | Enter the **generated code** and then click **Verify**. |
| <img src="../../images/BMS_JK-PB_Erase_History_Data_1.jpg" width="300"> | <img src="../../images/BMS_JK-PB_Erase_History_Data_2.png" width="300"> | <img src="../../images/BMS_JK-PB_Erase_History_Data_3.png" width="300"> |
@@ -9,17 +9,21 @@
> [!IMPORTANT]
> BMS monitoring with `UART` or `RS485` is recommended.
## Number of BMS supported
## BMS Support Capacity
* 2x BMS with `Bluetooth` (BLE stack consumes significant amount of RAM on device and can cause crash and reboot)
* 3x `JK-B` BMS with `UART/RS485`
* several `JK-PB` BMS with `RS485` (already tested with 7 BMS)
Based on hardware limitations and testing, this board supports:
Note: these are theoretical limits, not all combinations have been tested.
| Communication Method | Maximum BMS | Notes |
|----------------------|-------------|-------|
| **RS485** | Multiple BMS | Best option for monitoring many BMS units |
| **UART** | 3× BMS | Must be connected to the GPIOs header |
| **Bluetooth (BLE)** | 3× BMS (ESP32-S3) | BLE stack consumes significant RAM, may cause crashes/reboots |
**Note:** These are theoretical limits. Not all combinations have been tested.
## UART/IO Expander
It would be possible to add one or more [WK2168 4x UART expander](https://esphome.io/components/weikai.html) to increase the number of BMS monitored with `UART`.
It would be possible to add one or more [WK2168 4x UART expander](https://esphome.io/components/weikai.html) to increase the number of `UART` port.
## Build your own PCB
+366
View File
@@ -0,0 +1,366 @@
# YamBMS - LilyGo T-Connect
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
> [!IMPORTANT]
> Make sure to order the version with **3x RS485** and **1x CAN**.
## Overview
The LilyGo T-Connect is a multi-functional development board based on the ESP32-S3-R8 chip, equipped with 8MB PSRAM and 16MB Flash, supporting Wi-Fi/Bluetooth dual-mode communication and RS485/CAN industrial protocols. This board is particularly well-suited for the YamBMS project thanks to its multiple communication interfaces including up to 3 RS485 ports and 1 CAN bus port.
**Key Features:**
- Multi-protocol Support: Supports up to three sets of RS485 and one set of CAN bus
- Industrial Communication: RS485 (UART protocol) and CAN bus (TWAI protocol)
- Flexible Configuration: Supports switching between CAN and RS485 modules
- Rich Interfaces: Integrated APA102 LED driver, QWIIC expansion interface
- Industrial Design: Wide voltage input (7V-12V DC), 4 positioning holes for easy installation
<img src="../..//images/MCU_ESP32-S3_LilyGo-T-Connect_1.jpg" width="500"> <img src="../..//images/MCU_ESP32-S3_LilyGo-T-Connect_2.jpg" width="500">
## Board Specifications
The T-Connect is available as a single version with the following specifications:
| Specification | Details |
|---------------|---------|
| Model | T-Connect |
| MCU | ESP32-S3-R8 |
| FLASH | 16MB |
| PSRAM | 8MB (Octal SPI) |
| RS485 | 3× Isolated RS485 interface |
| CAN Bus | 1× Isolated CAN interface |
| LED Driver | APA102 RGB |
| Wireless | Wi-Fi 802.11 b/g/n / Bluetooth 5.0 (BLE) |
| USB | Type-C (5V/500mA) |
| Power Input | 7V-12V DC |
| Expansion | 1× QWIIC Interface |
| Buttons | RESET + BOOT |
| Mounting | 4× 2mm positioning holes |
| Dimensions | 94×83×13mm |
**Note:** The T-Connect supports switching configuration between CAN and RS485 modules through onboard jumpers, allowing maximum flexibility with up to 3 RS485 ports + 1 CAN port simultaneously.
## Interfaces Support Capacity
Based on hardware limitations and testing, this board supports:
| Interface | Maximum | Notes |
|-----------|---------|-------|
| **CAN** | 1x bus | CAN bus to BMS or Inverter |
| **RS485** | 3x bus | Best option for monitoring many BMS of the same brand (**shared with UART**) |
| **UART** | 3× devices¹ | Must be connected to the **GPIOs header** (**shared with RS485**) |
| **Bluetooth (BLE)** | 3× devices¹ | BLE stack consumes significant RAM, may cause crashes/reboots |
¹ BMS / Balancer / Shunt
**Note:** These are theoretical limits. Not all combinations have been tested.
## UART/IO Expander
It would be possible to add one or more [WK2168 4x UART expander](https://esphome.io/components/weikai.html) to increase the number of `UART` port.
## Power Supply
The LilyGo T-Connect board can be powered using two methods:
### Option 1: USB-C Port
- Connect a USB-C cable to the USB-C port on the board
- Provides **5V / 500mA**
- Recommended for programming and testing
- Supports USB OTG functionality
### Option 2: External Power Supply (DC Input)
- Voltage range: **7V to 12V DC**
- Connect to the dedicated DC power terminal (usually labeled VIN/GND or PWR)
- Recommended for permanent installations and industrial environments
- Provides stable power for all communication interfaces
- Internal voltage regulator steps down to 5V and 3.3V for the ESP32-S3
**Important:** Do not power the board simultaneously through USB-C and the external DC terminal to avoid potential damage to the power regulation circuitry.
## Port Identification
### Communication Ports Layout
The T-Connect board features 4 communication ports that share pins through a switching mechanism. The board supports up to **3 RS485 ports + 1 CAN port** simultaneously through proper configuration.
**Pin Assignment :**
| Port | TX Pin | RX Pin | Protocol |
|------|--------|--------|----------|
| Port 1 | IO4 | IO5 | RS485 |
| Port 2 | IO6 | IO7 | RS485 |
| Port 3 | IO17 | IO18 | RS485 |
| Port 4 | IO9 | IO10 | CAN |
### RS485 ports
The RS485 ports are positioned at locations **No.1** to **No.3** (see photo at the beginning of this page).
**RS485 Terminal Pinout:**
- **SG** - Signal Ground (for shield connection and noise immunity)
- **L** - RS485 A (Data+)
- **H** - RS485 B (Data-)
- **DG** - Data Ground (common reference ground)
### CAN port
The CAN bus port is positioned at location **No.4** (see photo at the beginning of this page).
**CAN Terminal Pinout:**
- **SG** - Signal Ground (for shield connection and noise immunity)
- **L** - CAN L (CAN Low)
- **H** - CAN H (CAN High)
- **DG** - Data Ground (common reference ground)
## Wiring Instructions
### Connecting RS485 Devices
To connect an RS485 device to any of the configured RS485 ports:
| RS485 | Terminal Block |
|-------|----------------|
| - | SG : Shield/Signal Ground (optional but recommended) |
| A + | L (RS485 A, Data+ non-inverting) |
| B - | H (RS485 B, Data- inverting) |
| GND | DG : Data/Device Ground (optional but recommended) |
**Wiring Steps:**
1. Identify the A and B wires from your RS485 device (often labeled as D+/D- or A/B)
2. Connect the **A wire (D+)** to the **L pin** of the RS485 port
3. Connect the **B wire (D-)** to the **H pin** of the RS485 port
4. **Connect the ground wire** to the **DG pin** for common reference (highly recommended)
5. If using **shielded cable**, connect the shield to the **SG pin** (recommended for noisy environments)
**Ground Connection Best Practices:**
- **Always connect DG (Data Ground)** to provide a common reference between devices
- This prevents communication errors caused by ground potential differences
- Over long distances or in industrial environments, ground connection is critical
- RS485 can tolerate -7V to +12V common mode voltage, but proper grounding prevents issues
**Shield Connection (for shielded cables):**
- Connect the cable shield to **SG (Signal Ground)** at one end only to avoid ground loops
- In electrically noisy environments, shield connection significantly improves noise immunity
- The shield should be connected at the end closest to earth ground
**Important Notes:**
- RS485 polarity matters: swapping A and B will prevent communication
- If communication fails, try swapping the A and B connections
- Use twisted pair cable for RS485 connections to reduce noise and interference
- The board supports UART protocol for RS485 communication
- According to official testing: RS485 operates at **115200 baud rate** with a **communication distance up to 35 meters**
### Connecting CAN Bus Devices
To connect a CAN bus device to the CAN port:
| CAN bus | Terminal Block |
|---------|----------------|
| - | SG : Shield/Signal Ground (optional but recommended) |
| CAN L | L (CAN Low) |
| CAN H | H (CAN High) |
| GND | DG : Data/Device Ground (optional but recommended) |
**Wiring Steps:**
1. Identify the CAN H and CAN L wires from your CAN device
2. Connect the **CAN H wire** to the **H pin** of the CAN port
3. Connect the **CAN L wire** to the **L pin** of the CAN port
4. **Connect the ground wire** to the **DG pin** for common reference (optional but recommended)
5. If using **shielded cable**, connect the shield to the **SG pin** (recommended for noisy environments)
**Ground Connection Best Practices:**
- **Always connect DG (Data Ground)** to provide a common reference between devices
- Ground connection is especially important for CAN bus to prevent communication failures
- Helps maintain proper common mode voltage range
- Essential for long cable runs or installations with multiple power sources
**Shield Connection (for shielded cables):**
- Connect the cable shield to **SG (Signal Ground)** at one end only to avoid ground loops
- In electrically noisy industrial environments, shield connection is highly recommended
- Many CAN applications in automotive and industrial settings require shielded cables
**Important Notes:**
- CAN bus requires proper termination at both ends of the bus (see Termination Resistors section)
- Use twisted pair cable specifically designed for CAN bus (recommended impedance: 120Ω)
- The board uses TWAI (Two-Wire Automotive Interface) protocol for CAN communication
- According to official testing: CAN operates at **500 kbps** with a **communication distance up to 35 meters**
- Maximum cable length depends on baud rate (shorter distances for higher speeds)
## Additional Features
### APA102 LED Driver
The T-Connect includes an onboard APA102 LED driver for controlling RGB light strips:
**Pin Assignment:**
- **APA102_DATA**: GPIO8
- **APA102_CLOCK**: GPIO3
This allows direct control of addressable RGB LED strips without additional hardware.
The YamBMS board configuration allows control of each addressable led (numbered 1 through 4, top to bottom).
| Led | ID | Description |
| --- | --- | --- |
All | esp_light | All 4 leds treated as a single led
Led 1 | led_1 | The top led on the board
Led 2 | led_2 | The second from top led on the board
Led 3 | led_3 | The second from bottom led on the board
Led 4 | led_4 | The bottom led on the board
### QWIIC Expansion Interface
The T-Connect features a **QWIIC interface** for easy connection to the QWIIC ecosystem of I2C sensors and modules, enabling simple plug-and-play expansion without soldering.
### Mounting
The board includes **4× 2mm positioning holes** for secure mounting in enclosures or on DIN rails, ideal for permanent industrial installations.
## Bus Termination
Both RS485 and CAN bus networks require termination resistors to prevent signal reflections and ensure reliable communication.
### Important Note About Termination
**The T-Connect board does not appear to have built-in switchable termination resistors** based on the official documentation. Users will need to add external termination resistors when required.
### RS485 Termination Requirements
RS485 networks require **120Ω termination resistors** at both ends of the bus:
**When You Need Termination:**
- At the **first and last devices** on the RS485 bus
- For cable runs longer than a few meters
- In electrically noisy environments
**How to Add External Termination:**
- Connect a 120Ω resistor between the A (L pin) and B (H pin) terminals
- Only install termination at the two endpoints of the bus
- If the T-Connect is in the middle of the network, do not add termination
### CAN Bus Termination Requirements
CAN bus networks require exactly **two 120Ω termination resistors** (one at each end):
**Critical CAN Termination Rules:**
- Exactly **two 120Ω resistors** must be present on the entire CAN bus
- One resistor at each physical end of the bus
- Without proper termination, CAN communication will fail
- With proper termination, you should measure ~60Ω between CAN H and CAN L
**How to Add External Termination:**
- Connect a 120Ω resistor between CAN H (H pin) and CAN L (L pin) terminals
- Only install at the two endpoints of the CAN bus
- Many CAN devices (like inverters) have built-in termination - check your device documentation
**Tip:** For point-to-point connections (e.g., T-Connect ↔ Inverter), you typically need termination at both ends. Check if your inverter has built-in termination before adding external resistors.
## Typical YamBMS Configuration
For a typical YamBMS setup with the LilyGo T-Connect board:
1. **Power Supply:**
- For bench testing: Connect USB-C cable (5V/500mA)
- For permanent installation: Connect 12V DC to the external power terminal (recommended)
2. **BMS Communication:**
- Connect your BMS (e.g., JK, JBD, SEPLOS, PACE, BASEN) to RS485 ports (No.1 to No.3)
- Wire according to: **L=RS485 A**, **H=RS485 B**, **DG=Ground**
- Connect shield to SG if using shielded cable
3. **Inverter Communication:**
- Connect your inverter (e.g., Deye, Sofar, Growatt, Victron) to the CAN port (No.4)
- Wire according to: **L=CAN L**, **H=CAN H**, **DG=Ground**
- Connect shield to SG if using shielded cable
- Typical CAN speed: 500 kbps
4. **Bus Termination:**
- **RS485:** Add external 120Ω resistor between L and H pins if the T-Connect is at the end of the RS485 bus
- **CAN:** Check if your inverter has built-in termination. If not, add external 120Ω resistor between CAN H and CAN L
- For point-to-point connections, you typically need termination at both devices
## Additional Resources
### Official Documentation
- [LilyGo T-Connect Official Wiki](https://wiki.lilygo.cc/get_started/en/High_speed/T-Connect/T-Connect.html)
- [LilyGo Official Store](https://lilygo.cc/products/t-connect)
- [LilyGo Official GitHub](https://github.com/Xinyuan-LilyGO)
- [T-Connect GitHub Repository](https://github.com/Xinyuan-LilyGO/T-Connect)
### Datasheets & Schematics
- [ESP32-S3 Datasheet](https://www.espressif.com/sites/default/files/documentation/esp32-s3_datasheet_en.pdf)
- [T-Connect V1.0 Schematic (PDF)](https://github.com/Xinyuan-LilyGO/T-Connect/blob/main/project/T-Connect_V1.0.pdf)
- [TD501MCANFD Datasheet](https://github.com/Xinyuan-LilyGO/T-Connect-Pro/blob/main/information/TD501MCANFD_MORNSUN.pdf)
- [TD501D485H-A Datasheet](https://github.com/Xinyuan-LilyGO/T-Connect-Pro/blob/main/information/TD501D485H-A_K-CUT.pdf)
## Troubleshooting
### No Communication on RS485
- Verify the port is configured for RS485 mode (check jumper settings)
- Verify correct A/B wiring (L=A, H=B). Try swapping if communication fails
- Check baud rate matches between devices (tested at 115200 for T-Connect)
- **Add external 120Ω termination resistors** at both ends of the RS485 bus if not already present
- Test cable continuity and check for damaged twisted pair cable
- Maximum tested distance: 35 meters at 115200 baud
### No Communication on CAN Bus
- Verify the port is configured for CAN mode (check jumper settings)
- Verify CAN H and CAN L are correctly connected (H to H pin, L to L pin)
- **Ensure exactly two 120Ω termination resistors are present** on the entire CAN bus (add external resistors if needed)
- Verify CAN bus speed matches all devices (tested at 500 kbps for T-Connect)
- Measure resistance between CAN H and CAN L with multimeter (should be ~60Ω with proper termination)
- Check TWAI protocol configuration in your software
- Maximum tested distance: 35 meters at 500 kbps
### Board Not Powering Up
- Check power supply voltage (7-12V DC for external power, 5V for USB-C)
- Verify polarity of external power connection (check + and - terminals)
- Try powering via USB-C for testing
- Check for short circuits on terminal blocks
- Inspect for damaged components or solder bridges
### Programming/Upload Issues
- Hold down the **BOOT button** while uploading firmware
- Verify USB cable supports data transfer (not charge-only cable)
- Check that correct COM port is selected in Arduino IDE or PlatformIO
- Ensure USB CDC is enabled in Arduino IDE settings
- Try different USB cable or USB port on your computer
### Termination Resistor Tips
- **RS485:** Use 1/4W 120Ω resistors between L and H pins at both bus ends
- **CAN:** Use 1/4W 120Ω resistors between CAN H and CAN L at both bus ends
- Verify termination with multimeter: ~60Ω for CAN, ~60Ω for RS485 (when measured across the entire bus)
- Many devices have built-in termination - check documentation before adding external resistors
## Comparison with Other Boards
### Waveshare ESP32-S3-RS485-CAN vs LilyGo T-Connect
| Feature | Waveshare | LilyGo T-Connect |
|---------|-----------|------------------|
| RS485 Ports | 1 (isolated) | Up to 3 (isolated) |
| CAN Ports | 1 (isolated) | 1 (isolated) |
| Built-in Termination | ✅ Yes (120Ω jumper-selectable) | ❌ No (external resistors required) |
| Power Isolation | ✅ Yes | ❌ No |
| Signal Isolation | ✅ Yes (RS485 & CAN) | ✅ Yes (RS485 & CAN up to 2500V) |
| Enclosure | ✅ DIN rail ABS case included | ❌ No enclosure |
| Power Input | 7-36V DC or USB-C | 7-12V DC or USB-C |
| LED Indicators | PWR, RS485 TX/RX, CAN | PWR, APA102 support |
| Price | Moderate | Moderate |
| Best For | Single RS485 + CAN with isolation | Multiple RS485 + CAN with isolation |
**Summary:** The Waveshare board excels in **industrial-grade protection and built-in termination**, while the LilyGo offers **more RS485 ports and configuration flexibility**. Choose based on your specific needs:
- **Waveshare**: Best for harsh environments, built-in termination, ease of installation
- **LilyGo**: Best for multiple RS485 devices, flexible configuration, compact size
---
**License:** This documentation is part of the YamBMS project and is licensed under GPLv3.
**Disclaimer:** Always verify specifications and wiring with the official LilyGo documentation before deployment. This guide is community-created and may not reflect the latest product revisions.
+474
View File
@@ -0,0 +1,474 @@
# YamBMS - M5Stack AtomS3
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
> [!IMPORTANT]
> **GPIO Limitation:** AtomS3 provides **very few GPIOs**. This solution works best for:
> - **Supervising multiple RS485 BMS**
> - Limited number of UART BMS (3 maximum)
> - Applications where compact size is priority
## Overview
The M5Stack **AtomS3** combined with the **Atomic CAN Base** provides a compact and powerful solution for YamBMS applications. This combination offers CAN bus communication with isolation, a built-in display, and expandability through additional M5Stack units.
**Key Features:**
- Compact design (24×24×13mm AtomS3 footprint)
- ESP32-S3 with 8MB Flash
- Built-in 0.85" IPS display (128×128 pixels)
- Isolated CAN bus communication (up to 1Mbps)
- 6-axis IMU (MPU6886)
- Expandable with M5Stack Units (RS485, CAN, etc.)
- Programmable button
- Multiple development platforms supported
## Board Variants & Components
### AtomS3 Controllers
Choose one AtomS3 controller to clip onto the Atomic CAN Base:
| [AtomS3 Lite](https://docs.m5stack.com/en/core/AtomS3%20Lite) | [AtomS3](https://docs.m5stack.com/en/core/AtomS3) | [AtomS3R (8MB PSRAM)](https://docs.m5stack.com/en/core/AtomS3R) |
|-----|-----|-----|
| <img src="../../images/MCU_AtomS3_Lite.png" width="300"> | <img src="../../images/MCU_AtomS3.png" width="300"> | <img src="../../images/MCU_AtomS3R.png" width="300"> |
| Model | Flash | PSRAM | Display | IMU | Best For |
|-------|-------|-------|---------|-----|----------|
| **[AtomS3 Lite](https://docs.m5stack.com/en/core/AtomS3%20Lite)** (C124) | 8MB | No | 0.85" IPS | MPU6886 | Budget projects |
| **[AtomS3](https://docs.m5stack.com/en/core/AtomS3)** (C123) | 8MB | No | 0.85" IPS | MPU6886 | Standard applications |
| **[AtomS3R](https://docs.m5stack.com/en/core/AtomS3R)** (C126) | 8MB | **8MB** | 0.85" IPS | MPU6886 | **Recommended** (extra RAM) |
**Recommendation:** Choose **AtomS3R (C126)** if using Bluetooth BLE for BMS communication, as the extra 8MB PSRAM helps prevent crashes when the BLE stack consumes significant RAM.
### Base & Communication Units
| [Atomic CAN Base](https://docs.m5stack.com/en/atom/Atomic%20CAN%20Base) | [CAN Unit](https://docs.m5stack.com/en/unit/can) | [RS485 Unit](https://docs.m5stack.com/en/unit/iso485) |
|-----|-----|-----|
| <img src="../../images/CAN_Transceiver_M5Stack_Atomic_CAN_Base.png" width="300"> | <img src="../../images/CAN_Transceiver_M5Stack_CAN_Unit.png" width="300"> | <img src="../../images/RS485_Transceiver_M5stack_SKU-U094_RS485_Isolated_Unit.png" width="300"> |
| Component | Type | Features | Use Case |
|-----------|------|----------|----------|
| **[Atomic CAN Base](https://docs.m5stack.com/en/atom/Atomic%20CAN%20Base)** (A103) | CAN Base | Isolated CAN, up to 1Mbps, 110 nodes | **Recommended** for inverter |
| **[CAN Unit](https://docs.m5stack.com/en/unit/can)** (U085) | HY2.0 Unit | Isolated CAN via Grove port | Alternative CAN solution |
| **[RS485-ISO Unit](https://docs.m5stack.com/en/unit/iso485)** (U094) | HY2.0 Unit | Isolated RS485, up to 500kbps, 256 nodes | For RS485 BMS or multi-node |
## Interfaces Support Capacity
Based on hardware limitations and testing, this board supports:
| Interface | Maximum | Notes |
|-----------|---------|-------|
| **CAN** | 1x bus | CAN bus to BMS or Inverter (**after adding a CAN base/unit**) |
| **RS485** | 1x bus | Best option for monitoring many BMS of the same brand (**after adding a RS485 base/unit**) |
| **UART** | 3× devices¹ | CAN be connected to the **HY2.0 interface** or **Atomic Base GPIOs header** (**shared with RS485**) |
| **Bluetooth (BLE)** | 3× devices¹ | BLE stack consumes significant RAM, may cause crashes/reboots |
¹ BMS / Balancer / Shunt
**Note:** These are theoretical limits. Not all combinations have been tested. For large installations with many BMS units, consider boards with more GPIOs like the LilyGo T-Connect or Waveshare ESP32-S3-RS485-CAN.
## AtomS3 Specifications
### Hardware Specifications
| Specification | Details |
|---------------|---------|
| **Microcontroller** | ESP32-S3FN8 |
| **Processor** | Xtensa 32-bit LX7 dual-core @ up to 240MHz |
| **Flash** | 8MB |
| **PSRAM** | None (AtomS3 Lite/AtomS3) / 8MB Octal SPI (AtomS3R) |
| **Display** | 0.85" IPS LCD, 128×128 resolution |
| **UART** | 1x HY2.0 interface (not isolated) |
| **IMU** | MPU6886 (6-axis gyro + accel, I2C 0x68) |
| **Button** | 1× Programmable button |
| **Infrared** | IR transmitter built-in |
| **USB** | USB Type-C (power + programming) |
| **DC-DC** | SY8089 (5V to 3.3V) |
| **Power Input** | 5V via USB Type-C |
| **Operating Temp** | 0°C ~ 40°C |
| **Dimensions** | 24.0 × 24.0 × 12.9mm |
| **Weight** | 6.9g |
### GPIO Pinout
**Available GPIOs (Bottom Pins):**
- **G5** / **G6** / **G7** / **G8** / **G38** / **G39**
- Power: **5V**, **3.3V**, **GND**
**HY2.0-4P Expansion Port:**
| Pin | Color | Function |
|-----|-------|----------|
| 1 | Black | GND |
| 2 | Red | 5V |
| 3 | Yellow | G2 |
| 4 | White | G1 |
**Internal Connections:**
| Peripheral | GPIO Pins | Notes |
|------------|-----------|-------|
| **LCD Display** | MOSI: G21, SCK: G17, CS: G15, RS: G33, RST: G34, BL: G16 | SPI interface |
| **MPU6886 (IMU)** | SDA: G38, SCL: G39 | I2C address 0x68 |
| **IR Transmitter** | Built-in | For infrared control |
## Atomic CAN Base Specifications
### Hardware Specifications
| Specification | Details |
|---------------|---------|
| **CAN Transceiver** | CA-IS3050G (isolated) |
| **Maximum Rate** | 1 Mbps |
| **Supported Nodes** | Up to 110 nodes |
| **Loop Delay** | 150ns (low) |
| **Common-mode Voltage** | -12V to +12V |
| **Isolation** | Built-in isolated DC-DC |
| **Protection** | Signal protection + electrical line protection |
| **External Port** | VH3.96-4P terminal block |
| **Operating Temp** | 0°C ~ 40°C |
| **Dimensions** | 24 × 48 × 18mm |
| **Weight** | 11.1g |
### Atomic CAN Base Pinout
The Atomic CAN Base connects to AtomS3 through the bottom pins:
| Pin | LEFT | RIGHT | Pin |
|-----|------|-------|-----|
| | | 1 | 3.3V |
| | 2 | 3 | UART_TX (CAN_TX) |
| | 4 | 5 | UART_RX (CAN_RX) |
| 5V | 6 | 7 | |
| GND | 8 | 9 | |
**CAN Terminal Block (VH3.96-4P):**
- **CAN H** (CAN High)
- **CAN L** (CAN Low)
- **GND** (Ground)
**Note:** The exact UART pins used depend on configuration. Check the schematic for GPIO assignment.
## RS485-ISO Unit Specifications
If you need RS485 communication (e.g., for RS485 BMS, multi-node), add the **RS485-ISO Unit (U094)**:
| Specification | Details |
|---------------|---------|
| **Isolation Chip** | CA-IS3082W |
| **Maximum Rate** | 500 kbps |
| **Supported Nodes** | Up to 256 nodes |
| **Isolation Voltage** | 1000V RMS |
| **Protection** | Fail-safe, Overcurrent, Thermal shutdown, ±15kV ESD |
| **Connection** | HY2.0-4P Grove cable to AtomS3 |
| **Terminal** | VH-3.96 4P (A, B, GND, +V) |
| **Dimensions** | 56.0 × 24.0 × 10.2mm |
| **Weight** | 9.1g |
**RS485-ISO Unit Pinout:**
| HY2.0-4P | Black | Red | Yellow | White |
|----------|-------|-----|--------|-------|
| PORT.C | GND | 5V | UART_RX | UART_TX |
**Termination Resistor:** The RS485-ISO Unit includes a **120Ω termination resistor** (provided separately) that can be connected when the unit is at an endpoint of the RS485 bus.
## Wiring Instructions
### Connecting CAN Bus (Atomic CAN Base)
The Atomic CAN Base provides **isolated CAN communication** via a VH3.96-4P terminal block.
| CAN bus | Terminal Block (VH3.96-4P) |
|---------|----------------------------|
| CAN H | H (CAN High) |
| CAN L | L (CAN Low) |
| GND | GND (optional) |
**Wiring Steps:**
1. Clip the AtomS3 onto the Atomic CAN Base (ensure proper alignment)
2. Identify CAN H and CAN L wires from your inverter or CAN device
3. Connect **CAN H** to **H** (CAN H terminal)
4. Connect **CAN L** to **L** (CAN L terminal)
5. Connect **GND** to **GND** for common reference (optional)
**CAN Bus Best Practices:**
- The Atomic CAN Base features **built-in isolation** for protection
- CAN bus operates at up to **1 Mbps** data rate
- Supports up to **110 nodes** on the bus
- Use twisted pair cable (120Ω impedance recommended)
- **Termination:** Add 120Ω resistors at both ends of the CAN bus
- If the AtomS3 is at an endpoint, connect a termination resistor
- Check if your inverter has built-in termination before adding external resistors
### Connecting RS485 (RS485-ISO Unit)
If using the RS485-ISO Unit for RS485 devices:
| RS485 | Terminal Block (VH3.96-4P) |
|-------|-----------------------------|
| A + | A (Data+ non-inverting) |
| B - | B (Data- inverting) |
| GND | GND (Ground reference) |
**Wiring Steps:**
1. Connect the RS485-ISO Unit to the AtomS3 via the **HY2.0-4P Grove cable** (Yellow=RX, White=TX)
2. Identify A and B wires from your RS485 device (often labeled D+/D- or A/B)
3. Connect **RS485 A (D+)** to **Pin 1** (A terminal)
4. Connect **RS485 B (D-)** to **Pin 2** (B terminal)
5. Connect **GND** to **Pin 3** for common reference (recommended)
**RS485 Best Practices:**
- The RS485-ISO Unit features **1000V isolation** for protection
- RS485 operates at up to **500 kbps** data rate
- Supports up to **256 nodes** on the bus
- Use twisted pair cable for noise immunity
- **Termination:** Connect the included **120Ω resistor** between A and B if the unit is at an endpoint
- The unit includes **fail-safe protection** (outputs high if input is open or shorted)
## Power Supply
### AtomS3 Power Options
**USB Type-C Power:**
- Connect a USB Type-C cable for **5V power**
- Recommended for programming, debugging, and testing
- Built-in **SY8089 DC-DC converter** steps down 5V to 3.3V for ESP32-S3
- Typical power consumption: 150-300mA (idle to active WiFi)
**External 5V via HY2.0-4P Grove port:**
- Useful when powering the entire assembly from an external 5V supply
## Programming & Development
### Entering Download Mode
If you have trouble uploading firmware to the AtomS3:
**Manual Download Mode:**
1. **Press and hold the RESET button** (about 2 seconds)
2. Wait until the **internal green LED lights up**
3. **Release the button**
4. The device is now in download mode and ready for flashing
![Download Mode Animation](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/products/core/AtomS3/download%20mode1.gif)
### LCD Backlight Control
**Important:** The PWM signal frequency for the LCD backlight driver should be **500Hz**. A frequency that is too high may cause abnormal brightness adjustment functionality.
**Backlight GPIO:** G16
## Display Features
### Screen Specifications
| Specification | Details |
|---------------|---------|
| **Size** | 0.85 inch IPS LCD |
| **Resolution** | 128 × 128 pixels |
| **Color Depth** | 65K colors |
| **Driver IC** | GC9107 |
| **Interface** | SPI |
| **Backlight** | PWM controlled (GPIO16) |
### Display Control Parameters
The AtomS3's display can be controlled with the following parameters (useful for YamBMS display management):
**Backlight Settings:**
- **Backlight control**: Manual brightness control (0-100%)
- **Backlight max level**: Limit the maximum brightness in general
- **Backlight auto-dim level**: Desired brightness when dimmed down (set to 0 to switch off screen completely)
- **Backlight auto-dim time**: Time in minutes after which the screen will dim down (set to 0 to disable auto-dimming)
**Behavior Notes:**
- Device restores last screen brightness after boot
- Auto-dim timer does not start automatically - it gets initially started by pressing the screen button
- Button press bumps brightness to 100% until the timer dims down again
- This provides a lightweight solution without complex automation
## IMU (MPU6886)
The AtomS3 includes a built-in **MPU6886** 6-axis IMU:
| Sensor | Details |
|--------|---------|
| **Model** | MPU6886 |
| **Interface** | I2C (address 0x68) |
| **Pins** | SDA: GPIO38, SCL: GPIO39 |
| **Features** | 3-axis gyroscope + 3-axis accelerometer |
**Use Cases for YamBMS:**
- Orientation detection
- Vibration monitoring
- Installation angle verification
- Advanced motion-based alerts (optional)
**Note:** The I2C pins on the back of the AtomS3 share the same bus with the MPU6886.
## Typical YamBMS Configuration
### Configuration 1: AtomS3 + Atomic CAN Base + RS485-ISO Unit (Full Setup)
**Best for:** Multiple RS485 BMS + inverter via CAN
**Components:**
- AtomS3R (recommended)
- Atomic CAN Base (A103)
- RS485-ISO Unit (U094)
**Connections:**
1. Clip AtomS3R onto Atomic CAN Base
2. Connect inverter to CAN terminal (CAN H/L)
3. Connect RS485-ISO Unit to AtomS3 via Grove cable (HY2.0-4P)
4. Connect BMS RS485 bus to RS485 terminals (A/B)
5. Power via USB Type-C
6. Add termination resistors at bus endpoints
**GPIO Usage:**
- CAN: Uses UART pins via Atomic CAN Base
- RS485: Uses G1/G2 via HY2.0-4P Grove port
- Display: Internal SPI (pre-configured)
### Configuration 2: BLE + CAN (Compact Wireless BMS)
**Best for:** 2-3 BLE devices + inverter via CAN
**Components:**
- AtomS3R (8MB PSRAM required for stable BLE)
- Atomic CAN Base (A103)
**Connections:**
1. Clip AtomS3R onto Atomic CAN Base
2. Connect inverter to CAN terminal
3. Configure BMS via Bluetooth (up to 3× BMS maximum)
4. Power via USB Type-C
**Limitations:**
- BLE stack consumes significant RAM
- May cause crashes/reboots with >2 BMS
- No physical RS485 connection
## Troubleshooting
### AtomS3 Not Entering Download Mode
- **Solution:** Press and hold RESET button (~2 seconds) until green LED lights up, then release
- Try different USB cable (must support data transfer)
- Check USB drivers are installed
### CAN Bus Communication Issues
- Verify CAN H and CAN L are correctly connected (not swapped)
- Check that CAN bus has **exactly two 120Ω termination resistors** (one at each end)
- Verify CAN bus speed matches inverter (typically 500kbps)
- Measure resistance between CAN H and CAN L (should be ~60Ω with proper termination)
- Check isolation: the Atomic CAN Base has built-in isolation, but verify connections
### RS485 Communication Issues
- Verify A and B wiring (try swapping if communication fails)
- Check baud rate matches all RS485 devices
- Ensure ground (GND) is connected for common reference
- Add 120Ω termination resistor at RS485-ISO Unit if at bus endpoint
- The RS485-ISO Unit has **fail-safe protection** - if input is open/shorted, receiver outputs high
### BLE Connection Issues (Bluetooth BMS)
- AtomS3R (8MB PSRAM) strongly recommended for BLE
- BLE stack consumes significant RAM - limit to 3 BMS maximum
- May cause crashes/reboots if too many BLE connections
- Consider switching to RS485 for multiple BMS units
### Display Issues
- **Backlight frequency:** Ensure PWM frequency is **500Hz** (not higher)
- **Brightness control:** Use manual control via button or software
- **Auto-dim not working:** Timer requires manual activation by pressing button after boot
### GPIO Limitation Issues
- **Problem:** Not enough GPIOs for all sensors/devices
- **Solution:** Use I2C-based sensors (shares I2C bus with IMU)
- **Alternative:** Consider boards with more GPIOs (LilyGo T-Connect, Waveshare ESP32-S3-RS485-CAN)
## Additional Resources
### Official M5Stack Documentation
- [AtomS3 Official Docs](https://docs.m5stack.com/en/core/AtomS3)
- [AtomS3 Lite Official Docs](https://docs.m5stack.com/en/core/AtomS3%20Lite)
- [AtomS3R Official Docs](https://docs.m5stack.com/en/core/AtomS3R)
- [Atomic CAN Base Official Docs](https://docs.m5stack.com/en/atom/Atomic%20CAN%20Base)
- [RS485-ISO Unit Official Docs](https://docs.m5stack.com/en/unit/iso485)
### Schematics & Datasheets
- [AtomS3 Schematic PDF](https://m5stack-doc.oss-cn-shenzhen.aliyuncs.com/472/Sch_M5_AtomS3_v1.0.pdf)
- [AtomS3 IMU Schematic PDF](https://m5stack-doc.oss-cn-shenzhen.aliyuncs.com/472/Sch_AtomS3_IMU.pdf)
- [ESP32-S3 Datasheet](https://m5stack-doc.oss-cn-shenzhen.aliyuncs.com/472/esp32-s3_datasheet_en.pdf)
- [MPU6886 Datasheet](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/MPU-6886-000193%2Bv1.1_GHIC_en.pdf)
- [CA-IS3050G Datasheet](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/unit/CA-IS3050G.pdf) (CAN transceiver)
- [CA-IS3082W Datasheet](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/unit/IS3082W.pdf) (RS485 transceiver)
### Software Libraries
- [M5AtomS3 Arduino Library](https://github.com/m5stack/M5AtomS3)
- [M5Unified Library](https://github.com/m5stack/M5Unified)
- [AtomS3 Factory Firmware](https://github.com/m5stack/M5AtomS3-UserDemo)
### Where to Buy
- [M5Stack Official Store](https://m5stack.com/)
- [M5Stack AliExpress](https://m5stack.aliexpress.com/store/911661199)
- [M5Stack Amazon](https://www.amazon.com/shops/m5stack)
- [M5Stack Distributors](https://m5stack.com/distributor)
## Product Comparison
### AtomS3 vs Other YamBMS Boards
| Feature | AtomS3 + Atomic CAN | LilyGo T-Connect | Waveshare ESP32-S3-RS485-CAN |
|---------|---------------------|------------------|------------------------------|
| **Size** | Very compact (24×24mm) | Medium (94×83mm) | Medium with DIN rail case |
| **Display** | ✅ 0.85" IPS (128×128) | ❌ No | ❌ No |
| **RS485 Ports** | 1 (via Unit) | Up to 3 | 1 (isolated) |
| **CAN Ports** | 1 (isolated) | 1 | 1 (isolated) |
| **Isolation** | ✅ Yes (CAN + RS485 Unit) | ✅ Yes (both) | ✅ Yes (both) |
| **Termination** | External | External | ✅ 120Ω jumper-selectable |
| **GPIOs** | ⚠️ Very limited | Moderate | Moderate |
| **PSRAM** | Optional (AtomS3R: 8MB) | 8MB | 8MB |
| **Best For** | Compact installations, display needed, RS485 BMS | Multiple RS485 ports | Industrial, built-in termination |
| **Price** | Moderate (modular) | Moderate | Moderate |
**When to Choose AtomS3:**
- ✅ Compact size is critical
- ✅ Built-in display desired
- ✅ Modular expansion preferred
- ✅ BMS via RS485 (multiple units)
- ❌ Need many GPIOs
- ❌ Need multiple RS485 ports simultaneously
## FAQ
**Q: Which AtomS3 variant should I choose?**
A: For YamBMS, we recommend **AtomS3R (C126)** with 8MB PSRAM if using Bluetooth BLE, as it provides extra RAM to prevent crashes. For RS485-only applications, AtomS3 or AtomS3 Lite is sufficient.
**Q: Can I use multiple RS485 and CAN simultaneously?**
A: Yes, but with limitations. AtomS3 has very few GPIOs. You can use Atomic CAN Base (CAN) + RS485-ISO Unit (RS485) simultaneously, but additional expansion is limited.
**Q: How many BMS can I monitor via UART?**
A: Maximum 3× BMS via UART. The 2nd and 3rd UARTs requires soldering connections on the Atomic CAN Base.
**Q: Does the Atomic CAN Base require external termination resistors?**
A: The Atomic CAN Base does not have built-in switchable termination. You must add external 120Ω resistors at both ends of the CAN bus.
**Q: Why does my BLE connection crash after adding the 3rd BMS?**
A: The BLE stack consumes significant RAM. Use AtomS3R (8MB PSRAM) and limit to 3 BMS maximum.
**Q: Can I power the AtomS3 from the CAN bus?**
A: No, you should power the AtomS3 via USB Type-C (5V). The CAN bus voltage is not suitable for directly powering the device.
**Q: How do I control the screen backlight?**
A: Use PWM on GPIO16 at 500Hz frequency. Brightness can be controlled manually, and auto-dim requires button activation to start the timer.
---
**License:** This documentation is part of the YamBMS project and follows the same GPLv3 license.
**Acknowledgments:** Based on official M5Stack documentation and community contributions.
@@ -0,0 +1,377 @@
# YamBMS - Waveshare ESP32-S3-RS485-CAN
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
> [!IMPORTANT]
> This board uses a `flow_control_pin`, also called a `talk_pin` in the YamBMS documentation and used to manage the direction of data transmission for RS485 transceiver that do not handle this automatically. This `talk_pin` must be specified in your YAML.
## Overview
The Waveshare ESP32-S3-RS485-CAN is an industrial-grade WiFi wireless communicator based on the ESP32-S3 microcontroller. This board is designed for professional IoT applications with built-in isolation and protection circuits, making it particularly well-suited for the YamBMS project thanks to its robust RS485 and CAN bus interfaces.
**Key Features:**
- Industrial-grade design with multiple protection circuits
- Isolated RS485 and CAN interfaces
- Built-in 120Ω termination resistors (jumper-selectable)
- Digital isolation to prevent signal interference
- Power supply isolation for stable operation
- Wide voltage input range (7-36V DC)
- DIN rail mountable protective enclosure
<img src="../..//images/MCU_ESP32-S3_WS-RS485-CAN_1.png" width="500"> <img src="../..//images/MCU_ESP32-S3_WS-RS485-CAN_2.png" width="500">
## Board Specifications
| Specification | Details |
|-----|-----|
| Microcontroller | ESP32-S3-WROOM-1 |
| Processor | Xtensa 32-bit LX7 dual-core @ up to 240MHz |
| FLASH | 16MB |
| PSRAM | 8MB |
| Wireless | Wi-Fi 802.11 b/g/n (2.4GHz) / Bluetooth 5.0 (LE) |
| RS485 | 1× Isolated RS485 interface |
| CAN Bus | 1× Isolated CAN interface |
| UART | 1x SH1.0 interface (not isolated) |
| Power Input (DC Terminal) | 7-36V DC (wide range) |
| Power Input (USB) | 5V via USB Type-C |
| Isolation | Power isolation + Optocoupler isolation |
| Termination | 120Ω resistors (jumper-selectable for RS485 & CAN) |
| LED Indicators | PWR, RS485 TX/RX, CAN |
| Enclosure | Rail-mounted ABS protective case |
| Programming | USB Type-C (firmware download & debugging) |
## Interfaces Support Capacity
Based on hardware limitations and testing, this board supports:
| Interface | Maximum | Notes |
|-----------|---------|-------|
| **CAN** | 1x bus | CAN bus to BMS or Inverter |
| **RS485** | 1x bus | Best option for monitoring many BMS of the same brand |
| **UART** | 3× devices¹ | Can be connected to the **SH1.0 interface** or **GPIOs header** (**shared with RS485**) |
| **Bluetooth (BLE)** | 3× devices¹ | BLE stack consumes significant RAM, may cause crashes/reboots |
¹ BMS / Balancer / Shunt
**Note:** These are theoretical limits. Not all combinations have been tested.
## UART/IO Expander
It would be possible to add one or more [WK2168 4x UART expander](https://esphome.io/components/weikai.html) to increase the number of `UART` port.
## Power Supply
The Waveshare ESP32-S3-RS485-CAN can be powered using two methods:
### Option 1: USB Type-C Port
- Connect a USB Type-C cable to the USB port
- Provides **5V** power
- Recommended for programming, debugging, and testing
- Convenient for development and troubleshooting
### Option 2: External DC Power Supply (Screw Terminal)
- Voltage range: **7V to 36V DC** (wide range)
- Connect to the dedicated power screw terminal
- Recommended for permanent installations and industrial environments
- Provides stable power with built-in voltage regulator
- **Built-in power supply isolation** provides stable isolated voltage
- No extra power supply required for the isolated terminal
**Important:**
- The board features integrated power isolation for enhanced safety and reliability
- Suitable for harsh industrial environments with voltage fluctuations
- Do not exceed the 36V maximum input voltage
## Port Identification and Pinout
### RS485 Port
The RS485 interface is **isolated** and clearly labeled on the board.
**RS485 GPIO Pins (Internal):**
- **TX (GPIO17)**: RS485 transmit data
- **RX (GPIO18)**: RS485 receive data
- **EN (GPIO21)**: RS485 transceiver enable (automatic switching) `talk_in`
**RS485 Terminal Block Pinout:**
The RS485 port typically has a **2-pin screw terminal block**:
- **A (or +)**: RS485 A / Data+ (non-inverting)
- **B (or -)**: RS485 B / Data- (inverting)
**RS485 Features:**
- **Isolated interface** to avoid external signal interference
- **Automatic transceiver mode switching** (no manual DE/RE control needed)
- Supports RS485 Modbus and other industrial protocols
- **LED indicators**:
- Green LED: Lights up when RS485 transmits data
- Blue LED: Lights up when RS485 receives data
### CAN Port
The CAN interface is **isolated** and clearly labeled on the board.
**CAN GPIO Pins (Internal):**
- **TX (GPIO15)**: CAN transmit (TWAI TX)
- **RX (GPIO16)**: CAN receive (TWAI RX)
**CAN Terminal Block Pinout:**
The CAN port typically has a **2-pin screw terminal block**:
- **H (or CANH)**: CAN High
- **L (or CANL)**: CAN Low
**CAN Features:**
- **Isolated CAN interface** for easy access to various CAN devices
- Uses ESP32-S3 TWAI (Two-Wire Automotive Interface) controller
- **LED indicator**: Blinks during CAN data transmission
## Wiring Instructions
### Connecting RS485 Devices
To connect an RS485 device to the RS485 port:
| RS485 | Terminal Block |
|-------|----------------|
| A + | RS485 A+ (Data+ non-inverting) |
| B - | RS485 B- (Data- inverting) |
**Wiring Steps:**
1. Identify the A and B wires from your RS485 device (may be labeled as D+/D-, A/B, or +/-)
2. Connect the **A wire (D+ / Data+)** to the **A+ terminal**
3. Connect the **B wire (D- / Data-)** to the **B- terminal**
4. Connect the **ground wire** to the **GND terminal** for common reference
**RS485 Best Practices:**
- **Always connect the ground (GND)** to provide a common reference between devices
- The board features **automatic transceiver mode switching**, no manual control needed
- RS485 polarity matters: if communication fails, try swapping A and B connections
- Use twisted pair cable (recommended) to reduce noise and interference
- The **isolation protects** the ESP32-S3 from high-voltage interference on the RS485 bus
- Monitor communication using the **green (TX) and blue (RX) LED indicators**
### Connecting CAN Bus Devices
To connect a CAN device to the CAN port:
| CAN bus | Terminal Block |
|---------|----------------|
| CAN H | CAN H (CAN High) |
| CAN L | CAN L (CAN Low) |
**Wiring Steps:**
1. Identify the CAN H and CAN L wires from your CAN device
2. Connect the **CAN H wire** to the **H (CANH) terminal**
3. Connect the **CAN L wire** to the **L (CANL) terminal**
4. Connect the **ground wire** to the **GND terminal** for common reference (optional)
**CAN Bus Best Practices:**
- **Always connect the ground (GND)** for proper common mode voltage reference
- The board uses the ESP32-S3 **TWAI (Two-Wire Automotive Interface)** controller
- CAN bus requires proper termination (see Termination Resistors section below)
- Use twisted pair cable specifically designed for CAN bus (120Ω impedance)
- The **isolation protects** the ESP32-S3 from electrical noise on the CAN bus
- Monitor CAN communication using the **CAN LED indicator** (blinks during transmission)
- Typical CAN bus speeds: 125 kbps, 250 kbps, 500 kbps, or 1 Mbps
## Termination Resistors
One of the **key advantages** of the Waveshare ESP32-S3-RS485-CAN is its **built-in 120Ω termination resistors** that can be enabled or disabled via **jumpers**.
### RS485 Termination
The board includes an **onboard 120Ω RS485 termination resistor**.
**How to Enable RS485 Termination:**
1. Locate the **RS485 termination jumper** on the board (typically labeled "RS485 120R" or similar)
2. **Move the jumper cap to the "120R" position** to enable the termination resistor
3. **Move the jumper cap to the "NC" (No Connection) position** to disable termination
**When to Enable RS485 Termination:**
- Enable termination if the board is at **one of the two endpoints** of the RS485 bus
- RS485 networks require **120Ω termination at both ends** of the bus
- If the board is in the **middle** of the network, keep termination disabled (NC position)
- For short cable runs (<10 meters), termination may be optional but is still recommended
**FAQ Note:** If RS485 communication is not working, the Waveshare wiki recommends: *"Please move the jumper cap to 120R and try again. Some RS485 devices require a 120R resistor to be connected in series."*
### CAN Bus Termination
The board includes an **onboard 120Ω CAN termination resistor**.
**How to Enable CAN Termination:**
1. Locate the **CAN termination jumper** on the board (typically labeled "CAN 120R" or similar)
2. **Move the jumper cap to the "120R" position** to enable the termination resistor
3. **Move the jumper cap to the "NC" (No Connection) position** to disable termination
**When to Enable CAN Termination:**
- Enable termination if the board is at **one of the two endpoints** of the CAN bus
- CAN bus requires **exactly two 120Ω termination resistors** on the entire bus (one at each end)
- If the board is in the **middle** of the network, keep termination disabled (NC position)
- With proper termination, you should measure ~60Ω between CAN H and CAN L
**Termination Tips:**
- Always check termination settings before troubleshooting communication issues
- Many CAN devices (like inverters) have built-in termination - verify before adding more
- Incorrect termination is a common cause of CAN communication failures
## LED Indicators
The board includes several LED indicators for monitoring system status:
| LED | Color | Function |
|-----|-------|----------|
| **PWR** | Red/Green | Power indicator - lights up when board is powered |
| **RS485 TX** | Green | Lights up when RS485 port **sends** data |
| **RS485 RX** | Blue | Lights up when RS485 port **receives** data |
| **CAN** | Yellow/Green | Blinks during CAN bus **data transmission** |
These indicators are extremely useful for troubleshooting communication issues in real-time.
## Typical YamBMS Configuration
For a typical YamBMS setup with the Waveshare ESP32-S3-RS485-CAN:
1. **Power Supply:**
- For bench testing: Connect USB Type-C cable (5V)
- For permanent installation: Connect 12V or 24V DC to screw terminal (recommended)
2. **BMS Communication (RS485):**
- Connect your BMS (e.g., JK, JBD, SEPLOS, PACE, BASEN) to the RS485 port
- Wire according to: **A=RS485 A (Data+)**, **B=RS485 B (Data-)**, **GND=Ground**
- **Enable RS485 termination (120R jumper)** if the board is at the end of the RS485 bus
- If the BMS is the only RS485 device, enable termination
3. **Inverter Communication (CAN):**
- Connect your inverter (e.g., Deye, Sofar, Growatt, Victron) to the CAN port
- Wire according to: **H=CAN H**, **L=CAN L**, **GND=Ground**
- **Enable CAN termination (120R jumper)** if the inverter is at the end of the CAN bus
- For point-to-point (board ↔ inverter), typically both ends need termination
- Check if your inverter has built-in termination before enabling
4. **Verification:**
- Power on the board - the **PWR LED** should light up
- Monitor RS485 communication using **green (TX) and blue (RX) LEDs**
- Monitor CAN communication using the **CAN LED** (should blink during transmission)
5. **GPIO Pin Configuration:**
- RS485: TX=GPIO17, RX=GPIO18, EN=GPIO21
- CAN: TX=GPIO15, RX=GPIO16
## Protective Enclosure
The Waveshare ESP32-S3-RS485-CAN comes with a **rail-mounted ABS protective enclosure**:
**Enclosure Features:**
- Industrial-grade ABS plastic case
- **DIN rail mountable** for easy installation in electrical cabinets
- Protects the board from dust, moisture, and physical damage
- Provides professional appearance for industrial installations
- Easy to install and safe to use
**Installation:**
- The case clips onto standard 35mm DIN rails
- Suitable for use in control panels, switchboards, and industrial enclosures
## Programming and Development
### Entering Download Mode
If you have trouble uploading firmware:
1. **Long press the BOOT button**
2. While holding BOOT, **press the RESET button**
3. **Release RESET**, then release BOOT
4. The module will enter download mode
5. Now you can upload your firmware
This solves most download/flashing issues.
### Web Interface Demo
Waveshare provides demo firmware with a web interface:
- Default WiFi AP name: **ESP32-S3-RS485-CAN**
- Default password: **waveshare**
- The web interface allows control of RS485 and CAN ports
- You can get the device IP via Bluetooth debugging assistant
## Additional Resources
### Official Waveshare Documentation
- [Waveshare ESP32-S3-RS485-CAN Product Page](https://www.waveshare.com/esp32-s3-rs485-can.htm)
- [Waveshare ESP32-S3-RS485-CAN Wiki](https://www.waveshare.com/wiki/ESP32-S3-RS485-CAN)
- [Schematic Diagram](https://www.waveshare.com/wiki/ESP32-S3-RS485-CAN#Schematic) (available on wiki)
### Datasheets
- [ESP32-S3 Datasheet](https://files.waveshare.com/upload/f/f7/Esp32-s3_datasheet_en_(1).pdf)
- [ESP32-S3 Technical Reference Manual](https://files.waveshare.com/wiki/common/Esp32-s3_technical_reference_manual_en.pdf)
## Troubleshooting
### RS485 Communication Issues
- **Check termination jumper** - move to "120R" position if board is at bus endpoint
- Verify correct A/B wiring - try swapping if needed
- Check that **ground (GND) is connected** between devices
- Monitor **green (TX) and blue (RX) LEDs** to verify data transmission
- Ensure baud rate matches between all RS485 devices
- Test cable continuity and check for damaged twisted pair cable
### CAN Bus Communication Issues
- **Check termination jumper** - move to "120R" position if board is at bus endpoint
- Verify exactly **two 120Ω termination resistors** are present on entire CAN bus
- Check correct CAN H and CAN L wiring
- Verify **ground (GND) is connected** for common mode voltage reference
- Measure resistance between CAN H and CAN L (should be ~60Ω with proper termination)
- Monitor **CAN LED** - it should blink during transmission
- Verify CAN bus speed matches all devices (typically 125k, 250k, 500k, or 1Mbps)
### Upload/Programming Issues
- **Enter download mode** using BOOT + RESET button sequence (see Programming section)
- Verify USB cable supports data transfer (not charge-only)
- Check correct COM port is selected in IDE
- Try different USB cable or USB port on computer
- Ensure USB drivers are installed (CH343P chip)
### Power Issues
- Verify power supply voltage is within **7-36V DC** range (or 5V via USB)
- Check **PWR LED** lights up when powered
- Verify polarity of DC power connection
- Do not exceed 36V maximum input voltage
- The board's power isolation should prevent most power-related issues
### Isolation Issues
- The board has **built-in isolation** for both power and communication interfaces
- If experiencing interference issues, verify:
- Ground connections are properly made
- Shielded cables are used in noisy environments
- Isolation jumpers are correctly configured
## Comparison with Other Boards
### Waveshare ESP32-S3-RS485-CAN vs LilyGo T-Connect
| Feature | Waveshare | LilyGo T-Connect |
|---------|-----------|------------------|
| RS485 Ports | 1 (isolated) | Up to 3 (isolated) |
| CAN Ports | 1 (isolated) | 1 (isolated) |
| Built-in Termination | ✅ Yes (120Ω jumper-selectable) | ❌ No (external resistors required) |
| Power Isolation | ✅ Yes | ❌ No |
| Signal Isolation | ✅ Yes (RS485 & CAN) | ✅ Yes (RS485 & CAN up to 2500V) |
| Enclosure | ✅ DIN rail ABS case included | ❌ No enclosure |
| Power Input | 7-36V DC or USB-C | 7-12V DC or USB-C |
| LED Indicators | PWR, RS485 TX/RX, CAN | PWR, APA102 support |
| Price | Moderate | Moderate |
| Best For | Single RS485 + CAN with isolation | Multiple RS485 + CAN with isolation |
**Summary:** The Waveshare board excels in **industrial-grade protection and built-in termination**, while the LilyGo offers **more RS485 ports and configuration flexibility**. Choose based on your specific needs:
- **Waveshare**: Best for harsh environments, built-in termination, ease of installation
- **LilyGo**: Best for multiple RS485 devices, flexible configuration, compact size
---
**License:** This documentation is part of the YamBMS project and follows the same GPLv3 license.
**Disclaimer:** Always verify specifications and wiring with the official Waveshare documentation before deployment. This guide is community-created and may not reflect the latest product revisions.
+191
View File
@@ -0,0 +1,191 @@
# YamBMS changelog
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
* YamBMS 1.7.0 :
* Partial rewrite of `yambms_core` and merging of C++ code into a single lambda in several stages with increased datas control.
* Added LVGL display dashboard for Waveshare Touch-LCD 4.3" and 7" (Blue Navy 800x480 design)
* Fixed [issue 10](https://github.com/Sleeper85/esphome-yambms/issues/10) Sending CAN bus data before the end of the combination process
* Fixed [issue 154](https://github.com/Sleeper85/esphome-yambms/issues/154) Add `Enerkey Balancers` balance stop diff voltage setting (register 0x1A)
* Fixed [issue 160](https://github.com/Sleeper85/esphome-yambms/issues/160) The SOH sensor is interpreted as a battery percentage
* Fixed [issue 182](https://github.com/Sleeper85/esphome-yambms/issues/182) Compliance of Auto functions for YamBMS 1.7.0
* Fixed [issue 268](https://github.com/Sleeper85/esphome-yambms/issues/268) [Add an option] The inverter is not sending ACK CAN ID 0x305
* Fixed [issue 282](https://github.com/Sleeper85/esphome-yambms/issues/282) JK errors_bitmask has been removed
* Merged [PR 281](https://github.com/Sleeper85/esphome-yambms/pull/281) Add WS Touch-LCD-4.3B board
* Merged [PR 261](https://github.com/Sleeper85/esphome-yambms/pull/261) Add LilyGo T-Connect Pro Lite board (without screen)
* Merged [PR 259](https://github.com/Sleeper85/esphome-yambms/pull/259) Add support for Rebulk Days
* Merged [PR 258](https://github.com/Sleeper85/esphome-yambms/pull/258) Auto EOC: Factor in Auto SoC Limit for battery capacity calculation
* Merged [PR 255](https://github.com/Sleeper85/esphome-yambms/pull/255) Add support for Auto SoC Limit
* Merged [PR 236](https://github.com/Sleeper85/esphome-yambms/pull/236) Switch to VictronMPPT-ESPHOME fork
* Merged [PR 235](https://github.com/Sleeper85/esphome-yambms/pull/235) Basen: Add "Enable communication" switch
* Merged [PR 200](https://github.com/Sleeper85/esphome-yambms/pull/200) Add M5Stack Tab5 with LVGL display
* Merged [PR 199](https://github.com/Sleeper85/esphome-yambms/pull/199) Add Ecoworthy BMS integration for YamBMS
* Merged [PR 194](https://github.com/Sleeper85/esphome-yambms/pull/194) Component Fault Registry & Advanced LED Control
* Merged [PR 178](https://github.com/Sleeper85/esphome-yambms/pull/178) Basen BMS: Add heating control
* Merged [PR 170](https://github.com/Sleeper85/esphome-yambms/pull/170) Add Freenove S3 board
* Merged [PR 162](https://github.com/Sleeper85/esphome-yambms/pull/162) PACE Sensor Fixes
* Merged [PR 158](https://github.com/Sleeper85/esphome-yambms/pull/158) Automatically disable shunt when connected BMSs are going offline
* YamBMS 1.6.0 :
* New dashboards `1.6.0`
* Added `iBMS V3.3` board
* Updated `JK-PB` readme with **V19** warning and SoC 100% reset solution 1 and 2
* Added board option `UART flow control` allows you to activate a `talk_pin` for the UART of your choice (e.g. WS-RS485-CAN)
* Added AtomS3 GPIOs for `Atomic RS485 base` (uart_esp_3)
* Disabled the `reboot_timeout` after 15 minutes in case of WiFi unavailability
* New `Hardware highlighted` documentation (LilyGo / Waveshare / M5Stack)
* New readme for **LilyGo T-Connect, WS RS485-CAN and M5Stack AtomS3** boards
* Improved documentation.
* Fixed [issue 83](https://github.com/Sleeper85/esphome-yambms/issues/83) Add esphome-pace-bms
* Fixed [issue 94](https://github.com/Sleeper85/esphome-yambms/issues/94) Multi-BMS Seplos V3 don't work
* Fixed [issue 96](https://github.com/Sleeper85/esphome-yambms/issues/96) Improve the SoC returned at the end of discharge
* Fixed [issue 100](https://github.com/Sleeper85/esphome-yambms/issues/100) Improve the BMS Seplos V1 V2 examples
* Fixed [issue 102](https://github.com/Sleeper85/esphome-yambms/issues/102) Improve Remaining Capacity when using a shunt
* Added [issue 106](https://github.com/Sleeper85/esphome-yambms/issues/106) [FEATURE REQUEST] Temperature-based current limiting
* Fixed [issue 108](https://github.com/Sleeper85/esphome-yambms/issues/108) [WARNING] esphome::select::Select::state` is deprecated
* Fixed [issue 122](https://github.com/Sleeper85/esphome-yambms/issues/122) Adjust `bms_name` in all example YAML to something unique
* Fixed [issue 128](https://github.com/Sleeper85/esphome-yambms/issues/128) Align the names of the shunt entities
* Fixed [issue 142](https://github.com/Sleeper85/esphome-yambms/issues/142) Maximum capacity needs to be increased for `JK_RS485` BMS
* Merged [PR 76](https://github.com/Sleeper85/esphome-yambms/pull/76) Add `Auto EOC` function
* Merged [PR 82](https://github.com/Sleeper85/esphome-yambms/pull/82) Add support for external balancer
* Merged [PR 85](https://github.com/Sleeper85/esphome-yambms/pull/85) Adding `EG4 LLV2` BMS
* Merged [PR 97](https://github.com/Sleeper85/esphome-yambms/pull/97) Add `Basen controller` version with talk/flow control pin
* Merged [PR 99](https://github.com/Sleeper85/esphome-yambms/pull/99) Basen: Use new binary sensors for charging/discharging
* Merged [PR 112](https://github.com/Sleeper85/esphome-yambms/pull/112) Adding `FLIP_C3` board
* Merged [PR 117](https://github.com/Sleeper85/esphome-yambms/pull/117) Round requested charge/discharge current to nearest integer
* Change [PR 119](https://github.com/Sleeper85/esphome-yambms/pull/119) Updated `Power` gauge (-10kW to 10kW)
* Merged [PR 133](https://github.com/Sleeper85/esphome-yambms/pull/133) Add `Studer XTM-4000` to supported inverters
* Merged [PR 142](https://github.com/Sleeper85/esphome-yambms/pull/142) Sub device support
* Merged [PR 143](https://github.com/Sleeper85/esphome-yambms/pull/143) Improved `Cut-Off charging` logic equation and documentation
* Merged [PR 147](https://github.com/Sleeper85/esphome-yambms/pull/147) Improved `CCL`, `DCL` and `Temp-based` current control
* Merged [PR 155](https://github.com/Sleeper85/esphome-yambms/pull/155) Update temperature sensor filters to reduce noise
* YamBMS 1.5.8 :
* New Dashboards `1.5.8` compatible with `CANBUS` and `RS485` inverter communication protocol
* Added BMS `SEPLOS V3` (beta)
* Added YamBMS `Web Server v3`
* Added `WiFi AP`
* `WiFi AP` and `Web Server` credentials centralized in `secrets.yaml`
* Added `WT32-ETH01` board
* Fixed [issue 8](https://github.com/Sleeper85/esphome-yambms/issues/8) ETH01-EVO board - Davicom DM9051 SPI Ethernet Controller is now integrated in esphome `2025.7`
* Fixed [issue 24](https://github.com/Sleeper85/esphome-yambms/issues/24) [JK-PB] SoC never reaches 100%
* Fixed [issue 63](https://github.com/Sleeper85/esphome-yambms/issues/63) [JK RS485 component] Fix *.*_SCHEMA deprecations
* Merged [PR 67](https://github.com/Sleeper85/esphome-yambms/pull/67) Add options to restrict max. charge and discharge current
* Merged [PR 72](https://github.com/Sleeper85/esphome-yambms/pull/72) Add Pylontech RS485 inverter protocol
* Merged [PR 74](https://github.com/Sleeper85/esphome-yambms/pull/74) `PYLON RS485` link status, Heartbeat and Requested Force Charge
* Merged [PR 75](https://github.com/Sleeper85/esphome-yambms/pull/75) Round `Auto CCL` / `Auto DCL` values
* Merged [PR 77](https://github.com/Sleeper85/esphome-yambms/pull/77) `PYLON RS485` prevent stale data on BMS disconnect
* Merged [PR 80](https://github.com/Sleeper85/esphome-yambms/pull/80) BMS Modbus client: Return 0 when not online
* Merged [PR 81](https://github.com/Sleeper85/esphome-yambms/pull/81) Fix balance trigger voltage for Basen and Deye
* YamBMS 1.5.7 :
* Adapted the default `min/max` values ​​for the `Float` slider
* Merged [PR 53](https://github.com/Sleeper85/esphome-yambms/pull/53) Add feature `Auto Float Voltage`
* New dashboard for `Auto Float Voltage` function
* Defining `state_class` for all YamBMS sensors
* Set esphome `min_version` to `2025.6.0`
* Fixed: change `Charge Status` to `Bulk` when `Force Charge` is requested
* Merged [PR 70](https://github.com/Sleeper85/esphome-yambms/pull/70) Dashboards compatible with `HA 2025.7`
* Merged [PR 70](https://github.com/Sleeper85/esphome-yambms/pull/71) Dashboard `max/min` cell voltage in color using macro
* Removed all special characters in entities name + dashboards correction
* YamBMS 1.5.6 :
* Fixed [issue 58](https://github.com/Sleeper85/esphome-yambms/issues/58) Compilation problem with `esphome 2025.5.0`
* Fixed [issue 55](https://github.com/Sleeper85/esphome-yambms/issues/55) New CPU frequency option
* Fixed [issue 65](https://github.com/Sleeper85/esphome-yambms/issues/65) JBD Circular dependency error
* Fixed [issue 35](https://github.com/Sleeper85/esphome-yambms/issues/35) BMS Charging Cycles Offset
* Merged [PR 51](https://github.com/Sleeper85/esphome-yambms/pull/51) Support for RP2040 RPi Pico
* Merged [PR 56](https://github.com/Sleeper85/esphome-yambms/pull/56) Add support for Basengreen BMS
* Merged [PR 60](https://github.com/Sleeper85/esphome-yambms/pull/60) Fixes for new ESPHome and add of BMS Cycle Count offset
* Merged [PR 61](https://github.com/Sleeper85/esphome-yambms/pull/61) Set Modbus BMS values to 0 when BMS goes offline
* New `board_ESP32-S3_Touch-LCD-4.3.yaml` board
* New `board_ESP32-S3_Touch-LCD-7.yaml` board
* New `board_ESP32-S3_YBoard_DJK.yaml` board
* New `board_RP2040_RPi_Pico.yaml` board
* YamBMS 1.5.5 :
* New `main.yaml` with LP (local packages) and RP (remote packages) versions
* New `board.yaml` with modular UART/CAN interfaces
* The name of the JK `bms.yaml` is no longer linked to a specific model
* SoC calculation is now based on remaining capacity for more accuracy (BMS only) [issues #39](https://github.com/Sleeper85/esphome-yambms/issues/39)
* SoH calculation is moved to BMS level (for those who do not provide this information)
* Improvement of the Victron SmartShunt doc [issues #38](https://github.com/Sleeper85/esphome-yambms/issues/38)
* YamBMS 1.5.4 :
* New low SoC corrected at each BMS level (the corrected SoC is the one transmitted to YamBMS)
* New BMS dashboard
* New end of charge logic at each BMS level, the charge switch turns off when the cells are equalized (disabled by default)
* Fixed `errors_bitamsk` for JK-PB RS485, test OK with YamBMS (forked component)
* YamBMS 1.5.3 :
* Broadcasting JK-PB settings to all BMS set to OFF by default
* Reorganizing the `board` folder and YAMLs (device_base.yaml moved to board.yaml)
* `device_base.yaml` should no longer be part of `YamBMS_main.yaml`
* New `RGB LED status` light effects (red, green, blue, cyan) as an `options` packages for `board.yaml`
* Increased CPU frequency to `240Mhz` as an `options` packages for `board.yaml`
* Added `ESP32 Generic`, `LilyGo T-CAN485`, `LilyGo T-Connect` and `XIAO` boards
* Fixed SoC logic (low SoC will be detected at BMS level and no longer at YamBMS level)
* Simplified combination logic (removal of the combine switch) + dashboard update
* Check `Battery Capacity` is `> 0` before combining info (see [issue #14](https://github.com/Sleeper85/esphome-yambms/issues/14))
* Improved alarm logic with a common `YamBMS errors bitmask` for all BMS models (see OTP vs UTP bug reported by @ChrisG)
* Added [PR #7547](https://github.com/esphome/esphome/pull/7547) regarding publishing entities via the API
* Removed `captive_portal` because it increases the `loop time` too much
* `PSRAM` will no longer be enabled by default as this has a bad impact on `BLE BMS`
* YamBMS 1.5.2 :
* Added shunt `Online Status` binary_sensor
* Shunt combine condition based on the new binary_sensor `Online Status`
* Logger `baud_rate: 0` by default (frees the 3rd UART and avoids some bugs like "WK2168 with canbus" or "BLE client with RS485 modbus")
* Changed names of `bms` and `shunt` YAMLs for modbus `multi-node` solution
* Added shared configuration file to simplify main YAML (centralization of parameters)
* Simplification (fewer options) when importing `BMS / Shunt` YAMLs
* New `multi-node` solution using `RS485 modbus` to communicate information to YamBMS
* New board `espBerry` with `2-CH-CAN HAT`
* YamBMS 1.5.1 :
* The conditions for `combining` BMS and the `charging` and `discharging` instructions no longer have any relation with the `errors_bitmask` sensor, the new system relies on the three **binary_sensor** `online status`, `charging allowed` and `discharging allowed` being linked to the status of alarms and switches.
* The BMS combination procedure has been completely rewritten.
* Improved structure and ID names of `bms.yaml`.
* The `yambms.yaml` and `yambms_combine.yaml` global variable names have been changed for better code reading.
* Improved code regarding the CAN bus `esp_light` status for boards without integrated LED.
* New `Atom S3R` board and `Smartshunt BLE` shunt.
* New `JBD`, `Seplos V1 V2`, `JK-B RS485` (display port) and `FAKE` BMS.
* New `YamBMS DEMO` YAML and firmware offered to test and discover how `YamBMS` works.
* New management of temperature sensors (no longer limited to two sensors).
* **@Der_Hannes** fixed the AtomS3 `black screen` issue (with **esphome > 2024.7.3**) and developed new code for display management based on the [ili9xxx](https://esphome.io/components/display/ili9xxx.html) platform.
* `Auto CCL/DCL` functions have been fixed to work with `JK-PB` and `new JK-B` BMS, [see this issue](https://github.com/Sleeper85/esphome-yambms/issues/11).
* The `UVPR` and `OVPR` sensors are no longer used and replaced by `UVP` and `OVP` to ensure operation with all BMS.
* **@txubelaxu** fixed a bug in the `JK-PB RS485` component that could cause a false battery voltage value to be sent, [see this issue](https://github.com/Sleeper85/esphome-yambms/issues/10).
* Improved documentation, added a `HowTo` to create its main YAML, warning about galvanic isolation.
* CANBUS 2.3.7 : If there is no response from the inverter, the time before a new communication test has been reduced from `120s` to `60s`, added Victron `0x372` nbr. of modules `blocking charge/discharge`.
* YamBMS 1.4.5 : Changed the way to configure WiFi/Ethernet network, added `ESP32-C3 ETH01-EVO` ethernet board, reduction of the number of YAML bms files, UART `rx_buffer_size` is set to `512` by default for JK-B and JK-PB, new JK-BMS BLE sensors (last commits of @syssi) and new BLE `standard` version
* CANBUS 2.3.6 : Sending CAN frames stops immediately if there are no combined BMS
* YamBMS 1.4.4 : Multi-shunt support, Simplified and new YamBMS option `battery chemistry`, slider `min/max` values ​​are automatically configured based on the battery chemistry and cell count, added `YamBMS Fallback Hotspot`, added YamBMS `Update service`, added PVbrain2 and Atom Matrix board, added PSRAM settings YAML (not enabled by default), new MIN/MAX temperature sensor, added DC current icon, fixed dual sensor `Cell UVPR (MAX)` bug, Improved `combine` code, Breaking change : Atom S3 `GPIOs 1 and 2` reversed
* CANBUS 2.3.5 : New MIN/MAX temperature / sensor ID, Improved Victron protocol (online/offline battery modules, installed/available battery capacity)
* CANBUS 2.3.4 : Fixed bug of canbus link validation without inverter connected
* YamBMS 1.4.3 : Added Victron and Junctek KH-F `Shunt` support and `Requested Force Charge` function based on `SoC start/stop`, new `Total Daily Energy` sensors
* CANBUS 2.3.3 : Added `Automatic` BMS name selection and `Requested Force Charge` Bit 3/4/5 (PYLON 0x35C)
* CANBUS 2.3.2 : Added `LuxPower` protocol with updated `can_id` 0x355, 0x356, 0x359 and 0x35C
* CANBUS 2.3.1 : Improved the procedure for sending canbus frames with reduced loop time, rewritten of the canbus link validation code and added `Inverter Heartbeat Monitoring` function
* YamBMS 1.4.2 : Added new `Auto CVL Boost V.` and `Rebulk SoC` functions, new debug.yaml for ESP32 and ESP32-S3, improved code and comments
* YamBMS 1.4.1 : Rewriting of the alarm system, bug fixes and improvement of the charging logic (new status `Cut-Off`), icon allocation for each sensor, UART and CANBUS `!extend ${vars}`, New sensor `YamBMS Delta Cell V.`, Improved `Battery SOC` logic
* YamBMS 1.3.2 : New var `yambms_cell_count`, the BMS charge or discharge switches can be activated separately without causing the decombination of the BMS, new `minimal` version of the BMS YAML in order to reduce the loop time
* YamBMS 1.3.1 : First multi-BMS version named `YamBMS`
+10 -4
View File
@@ -1,4 +1,4 @@
# YamBMS - Charging Logic
# YamBMS charging logic
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
@@ -19,11 +19,11 @@ The charging voltage and current correspond to the default values in the YAML sc
Source: [Charging Marine Lithium Battery Banks](https://nordkyndesign.com/charging-marine-lithium-battery-banks)
Special thanks to [@shvmm](https://github.com/shvmm) for creating the equations.
Special thanks to [@shvmm](https://github.com/shvmm) for deriving the equations.
Note: The equations below are valid for other chemistries like Li-ion and LTO but with other CVmin and CVmax values.
Note: The equations below can be adopted for other chemistries like Li-ion and LTO with specific CVmin and CVmax values.
![Image](../../images/YamBMS_Cut-Off_Charging_Logic_for_LFP_Equation.png "JK-BMS-CAN Cut-Off Charging Logic_for LFP Equation")
<img src="../..//images/YamBMS_Cut-Off_Charging_Logic_Equation.png" width="500"> <img src="../..//images/YamBMS_Cut-Off_Charging_Logic_Plot.png" width="500">
## Cut-Off Charging Logic Diagram (what's happening in the yellow diamond)
@@ -37,6 +37,8 @@ Note: The diagram below is valid for other chemistries like Li-ion and LTO but w
- CV min : 3.37 V
- CV max : 3.65 V
To enter the **Cut-Off phase** the only condition is that **cutoff_voltage > cv_min**.
![Image](../../images/YamBMS_LFP_Cut-Off_Values.png "LFP Cut-Off Values")
## Li-ion Cut-Off Values
@@ -45,6 +47,8 @@ Note: The diagram below is valid for other chemistries like Li-ion and LTO but w
- CV min : 3.90 V
- CV max : 4.20 V
To enter the **Cut-Off phase** the only condition is that **cutoff_voltage > cv_min**.
![Image](../../images/YamBMS_Li-ion_Cut-Off_Values.png "Li-ion Cut-Off Values")
## LTO Cut-Off Values
@@ -53,4 +57,6 @@ Note: The diagram below is valid for other chemistries like Li-ion and LTO but w
- CV min : 2.55 V
- CV max : 2.85 V
To enter the **Cut-Off phase** the only condition is that **cutoff_voltage > cv_min**.
![Image](../../images/YamBMS_LTO_Cut-Off_Values.png "LTO Cut-Off Value")
+1 -1
View File
@@ -15,7 +15,7 @@
┌─────────────┐ ┌──────────┐ ┌───────────┐
│ | 3V3/5V--V1>│ |<V2---3V3---<| |
│ DEVICE │<RX-------AO<│ UART-TTL │<AI-------TX<| ESP32 |
│ BMS / Shunt │>TX-------AI>│ ISOLATOR │>BO-------RX>| |
│ BMS / Shunt │>TX-------BI>│ ISOLATOR │>BO-------RX>| |
│ │<----GND---->│ │<----GND---->| |
└─────────────┘ └──────────┘ └───────────┘
```
@@ -1,4 +1,4 @@
# YamBMS - CAN bus protocol
# YamBMS - Hardware and schematic instructions
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
@@ -6,8 +6,25 @@
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
## CAN bus protocol table
## Default GPIOs
![Image](../../images/CAN_Protocol_Table.png "ANBUS protocol table")
![Image](../../images/MCU_default_GPIOs.png)
Note: the following IDs are not implemented: 0x35B, 0x360, 0x378, 0x380 and 0x381.
## BMS
* [JK-B BMS](BMS_JK-B.md)
* [JK-PB BMS](BMS_JK-PB.md)
* [JK RS485 DISPLAY](BMS_JK_RS485_DISPLAY.md)
## Shunts
* [Victron SmartShunt](Shunt_Victron_SmartShunt.md)
## Communication interfaces
* [RS485 bus](Interface_RS485_bus.md)
* [CAN bus](Interface_CAN_bus.md)
## Others
* [Galvanic isolation](Galvanic_isolation.md)
+76 -14
View File
@@ -6,11 +6,68 @@
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
## Installation procedure
## Make your YAML
> [!TIP]
> Not sure which YAML to choose ? ... [YamBMS_Remote_Packages_example.yaml](../../YamBMS_Remote_Packages_example.yaml)
> is a good basis for creating your custom YAML.
> Examples of `BMS` and `Shunt` packages can be found in the [examples](../../examples/single-node/) folder.
> You don't have to import a shunt but you must import at least `one BMS`.
> You can mix different `BMS` models, the only condition is that the `bms_id` are numbered in order starting from `1` !
* [YamBMS LP (Local Packages) HowTo](YamBMS_LP_YAML.md)
* [YamBMS RP (Remote Packages) HowTo](YamBMS_RP_YAML.md)
## Installation from the `ESPHome Builder` add-on of your `Home Assistant` server
> [!TIP]
> This method is the easiest for beginners.
**Prerequisites:** install the `ESPHome Builder` add-on in your `Home Assistant` server.
![Image](../../images/ESPHome_Builder_Overview.png "ESPHome Builder")
### 1. Enter your WiFi credentials in the `SECRETS` YAML in the top right corner
Copy, past and enter your credentials :
```YAML
# WiFi
wifi_ssid: YourSSID
wifi_password: YourPassword
domain: .local
# WiFi AP
wifi_ap_ssid: YamBMS
wifi_ap_password: Y4mBM$85
# Web Server
web_server_username: yambms
web_server_password: Y4mBM$85
```
### 2. Add your `ESP32` by clicking on `+ NEW DEVICE` at the bottom right
Follow the procedure displayed on the screen.
### 3. `EDIT` your newly added ESP32 and copy your `YamBMS RP` YAML
> [!IMPORTANT]
> If your ESP32 already contains `API` or `OTA` keys, don't forget to add them to your YAML.
### 4. Install your YAML `Wirelessly` or via `USB` port
Follow the procedure displayed on the screen.
### 5. Optional but recommended, add the ESP32 in your `Home Assistant` server
In Home Assistant under **" Settings > Devices and services > Add Intergration "** select ESPHome add device `yambms` if found or supply ip address of ESP32.
## Installation from a Windows, Mac or Linux computer
### 1. Install ESPHome on your computer
Before you can flash your ESP32 you need to install the [ESPHome 2025.3.0 or higher](https://github.com/esphome/esphome/releases) command line application.<br>
Before you can flash your ESP32 you need to install the [ESPHome 2025.11.0 or higher](https://github.com/esphome/esphome/releases) command line application.<br>
[Follow these instructions for installation on Windows, Mac or Linux.](https://esphome.io/guides/installing_esphome)
> [!TIP]
@@ -25,15 +82,15 @@ pip3 install esphome
### 2. Download all YAML files to your computer
> [!TIP]
> This step is not necessary if you are compiling the `Remote Packages` version of the YAML.
> The `packages` folder is not necessary if you are compiling the `Remote Packages` version of the YAML.
You can do this from the command line or in your preferred method.
You need to gather the following three points in the same folder. If you are compiling from your HA server use the `Samba Share` add-on so that you can copy the `packages` folder to the `esphome` folder on the HA server.
1) the `packages` folder
1) the `packages` folder (not necessary with `RP` YAMLs)
2) your `secrets.yaml`
3) your [custom](YamBMS_main_YAML_HowTo.md) `main.yaml`
3) your custom `main.yaml`
```bash
# Clone this external component
@@ -41,19 +98,24 @@ git clone https://github.com/Sleeper85/esphome-yambms.git
cd esphome-yambms
```
### 3. Enter your WiFi credentials in the secrets.yaml files
### 3. Enter your WiFi credentials in the `secrets.yaml` files
```yaml
```YAML
# WiFi
wifi_ssid: YourSSID
wifi_password: YourPassword
domain : .local
domain: .local
# WiFi AP
wifi_ap_ssid: YamBMS
wifi_ap_password: Y4mBM$85
# Web Server
web_server_username: yambms
web_server_password: Y4mBM$85
```
### 4. Install the YamBMS application into your ESP32
Create a copy of `YamBMS_Remote_Packages_example.yaml` and modify it to match your configuration.
Examples of BMS imports can be found in the [configuration_examples](configuration_examples/) folder.
You can mix different BMS models, the only condition is that they are numbered in order starting from `1`.
### 4. Install the `YamBMS.yaml` into your ESP32
```bash
# install your YamBMS.yaml
@@ -64,7 +126,7 @@ esphome run YamBMS.yaml
esphome run YamBMS.yaml --device 192.168.x.x
```
### 5. Optional but recommended, add the ESP32 in your Home Assistant server
### 5. Optional but recommended, add the ESP32 in your `Home Assistant` server
In Home Assistant under **" Settings > Devices and services > Add Intergration "** select ESPHome add device `yambms` if found or supply ip address of ESP32.
+608
View File
@@ -0,0 +1,608 @@
# YamBMS - CAN bus
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
## Overview
**CAN (Controller Area Network)** is a robust vehicle bus standard designed for reliable communication in harsh environments. Originally developed for automotive applications, CAN bus is now widely used in industrial automation, energy management systems, and battery management applications.
In the YamBMS ecosystem, CAN bus is primarily used to communicate between the ESP32 controller and the solar inverter, transmitting battery status information to enable proper charge/discharge control.
![CAN_bus](../../images/YamBMS_CAN_bus.png)
**Key Features:**
- Multi-master communication protocol
- High immunity to electrical interference
- Built-in error detection and fault confinement
- Data rates up to 1 Mbps
- Supports up to 110 nodes (depending on transceiver)
- Differential signaling for noise immunity
## CAN bus protocol table
![CAN_bus_protocol_table](../../images/CAN_Protocol_Table.png)
Note: the following IDs are not implemented: 0x35B, 0x360, 0x378, 0x380 and 0x381.
## CAN Bus Fundamentals
### What is CAN Bus?
CAN bus uses a **two-wire differential signaling system**:
- **CAN H (CAN High)**: Dominant state high, recessive state ~2.5V
- **CAN L (CAN Low)**: Dominant state low, recessive state ~2.5V
**Differential Signaling:**
```
Differential Signal = CAN H - CAN L
Dominant bit (0): CAN H = ~3.5V, CAN L = ~1.5V → Difference = +2V
Recessive bit (1): CAN H = ~2.5V, CAN L = ~2.5V → Difference = 0V
```
This differential approach provides excellent **common-mode noise rejection**, allowing reliable communication even in electrically noisy environments like solar installations with high-voltage batteries and inverters.
### CAN Bus Speed & Distance
The maximum cable length depends on the communication speed:
| Baud Rate | Maximum Distance | Typical Use Case |
|-----------|------------------|------------------|
| 1 Mbps | 40 meters | Short, high-speed networks |
| 500 kbps | 100 meters | **Typical for solar inverters** |
| 250 kbps | 250 meters | Medium-distance industrial |
| 125 kbps | 500 meters | Long-distance, lower speed |
| 50 kbps | 1000 meters | Very long distance |
**YamBMS Typical Configuration:** Most solar inverters use **500 kbps** for CAN bus communication.
### CAN Bus Topology
**Linear Bus (Daisy Chain) - CORRECT:**
```
[Device 1]───[Device 2]───[Device 3]───[Device 4]
↑ ↑
120Ω termination 120Ω termination
```
**Important Rules:**
- ✅ **Linear topology** (daisy chain)
- ✅ **Two termination resistors** (120Ω each at both ends)
- ❌ **NOT star topology** (causes signal reflections)
- ❌ **NOT ring topology** (not supported)
- ❌ **NOT multiple branch points** (stub length < 30cm if unavoidable)
## CAN Bus Wiring
### Standard 3-Wire Configuration
**Recommended wiring for CAN bus:**
```
CAN Bus 3-Wire Configuration
=============================
Device 1 Device 2 Device 3
├─ CAN H ────────────── CAN H ────────────── CAN H
├─ CAN L ────────────── CAN L ────────────── CAN L
└─ GND ──────────────── GND ──────────────── GND
```
### Pin Identification
**Common CAN Terminal Labeling:**
- **CAN H** / **CANH** / **H** / **+** = CAN High
- **CAN L** / **CANL** / **L** / **-** = CAN Low
- **GND** / **GND** / **G** / **Signal Ground** = Ground reference
**Important:** Always verify with your device documentation, as some manufacturers may use different labeling conventions.
### Cable Requirements
**Recommended Cable Specifications:**
- **Type:** Twisted pair cable designed for CAN bus
- **Characteristic Impedance:** 120Ω (this matches the termination resistors)
- **Gauge:** 24 AWG to 20 AWG (depending on distance and current)
- **Shielding:** Shielded cable recommended for electrically noisy environments
- **Quality:** Use cables certified for CAN bus applications
### Ground Connection - CRITICAL INFORMATION
> [!IMPORTANT]
> **Should you connect the GND wire on CAN bus?**
**Answer: YES - STRONGLY RECOMMENDED**
#### Why Ground Connection is Important
While CAN uses differential signaling and can theoretically work without a ground connection, **in practice you should ALWAYS connect the ground wire**. Here's why:
**1. Common Mode Voltage Range**
- CAN transceivers tolerate **-7V to +12V** common mode voltage
- Over long distances or with separate power supplies, ground potential differences can **exceed this range**
- Without GND connection: risk of **transceiver damage** and communication failure
**2. Distance Considerations**
- Even over a few meters, ground potential differences can develop
- Over hundreds of meters, differences of several volts are common
- GND wire equalizes these potential differences
**3. Multiple Power Sources**
- ESP32 and inverter have separate power supplies
- Different power supplies = different ground potentials
- GND connection provides common reference
**4. Electrical Noise Protection**
- High-voltage batteries and inverters generate electrical noise
- Switching power supplies create transients
- GND helps stabilize the common mode voltage
**5. Shielded Cable Grounding**
- If using shielded cable (recommended), the shield should be grounded
- Improves electromagnetic interference (EMI) immunity
- Shield should be grounded at **one end only** to avoid ground loops
#### When GND Can Be Omitted (NOT RECOMMENDED)
**Very limited cases where GND might work without connection:**
- Distance **< 2 meters**
- **Common power supply** (same PSU for all devices)
- Clean electrical environment (bench testing only)
**However:** Even in these cases, it's **better to connect GND** to ensure reliability!
#### Isolated CAN Transceivers
**Question:** If my board has isolated CAN (e.g., Waveshare, M5Stack), do I still need to connect GND?
**Answer:** **YES - Still recommended!**
```
Board with CAN Isolation
=========================
ESP32 Side Isolation CAN Bus Side
(non-isolated) ═══════════ (isolated)
├─ CAN H ──→ to Inverter
├─ CAN L ──→ to Inverter
└─ GND ──→ to Inverter (RECOMMENDED!)
Isolation protects the ESP32, but devices on the isolated side
of the CAN bus still need a common ground reference!
```
**Explanation:**
- **Isolation** protects your ESP32 from voltage spikes and noise on the CAN bus
- Devices on the **isolated side** (inverter, etc.) still benefit from a common GND reference
- Without GND: communication may be unstable despite isolation
### Wiring Best Practices
**DO:**
- ✅ Use twisted pair cable (CAN H and CAN L twisted together)
- ✅ Keep cable runs as short as practical
- ✅ Use proper CAN bus cable (120Ω impedance)
- ✅ Connect GND wire between all devices
- ✅ Add termination resistors at both ends
- ✅ Avoid running CAN cables parallel to power cables
- ✅ Use shielded cable in noisy environments
**DON'T:**
- ❌ Use random cable (cat5, speaker wire, etc.)
- ❌ Create star or ring topologies
- ❌ Exceed maximum cable length for your baud rate
- ❌ Add more than two 120Ω termination resistors
- ❌ Omit GND connection
- ❌ Create long stubs (branches) from the main bus
## Termination Resistors
### Why Termination is Necessary
**Signal Reflections:**
- When an electrical signal travels down a cable and reaches the end, it reflects back
- These reflections cause signal distortion and communication errors
- **Termination resistors** absorb the signal energy, preventing reflections
**The 120Ω Standard:**
- CAN bus cable has a characteristic impedance of 120Ω
- Termination resistors match this impedance
- Result: clean signal transmission without reflections
### Proper Termination Configuration
**Correct: Exactly TWO 120Ω resistors at both ends**
```
CORRECT Termination
===================
120Ω 120Ω
║ ║
[Device 1]───[Device 2]───[Device 3]───[Device 4]
└─── Start of bus End of bus ───┘
```
**How to verify termination:**
1. Disconnect all devices from the CAN bus
2. Measure resistance between CAN H and CAN L with a multimeter
3. **Expected result: ~60Ω** (two 120Ω resistors in parallel = 60Ω)
```
Termination Math:
=================
Two 120Ω resistors in parallel:
R_total = (R1 × R2) / (R1 + R2)
R_total = (120 × 120) / (120 + 120)
R_total = 14400 / 240 = 60Ω
```
### Common Termination Mistakes
**❌ WRONG: No termination**
```
[Device 1]───[Device 2]───[Device 3]
```
**Result:** Signal reflections, communication errors, unreliable operation
**❌ WRONG: Only one termination resistor**
```
120Ω
║
[Device 1]───[Device 2]───[Device 3]
```
**Result:** Partial reflections, reduced noise immunity
**❌ WRONG: Termination in the middle**
```
120Ω
║
[Device 1]───[Device 2]───[Device 3]
```
**Result:** Both ends are unterminated, causing reflections from both directions
**❌ WRONG: More than two termination resistors**
```
120Ω 120Ω 120Ω
║ ║ ║
[Device 1]───[Device 2]───[Device 3]
```
**Result:** Total impedance too low (~40Ω), excessive current draw, poor signal quality
### Built-in vs External Termination
**Boards with Built-in Termination (Jumper-Selectable):**
Some boards have onboard 120Ω resistors that can be enabled via jumpers:
- **Waveshare ESP32-S3-RS485-CAN**: Jumper for CAN termination (120R/NC)
- Many industrial CAN interfaces
- Some inverters have built-in switchable termination
**Boards without Built-in Termination:**
Some boards require external termination resistors:
- **LilyGo T-Connect**: No built-in CAN termination
- **M5Stack Atomic CAN Base**: No built-in switchable termination
- External 120Ω resistor must be connected between CAN H and CAN L
**How to add external termination:**
```
Physical Connection:
====================
120Ω Resistor
┌─────┐
CAN H ─────┤ ├───── CAN L
└─────┘
```
**Where to buy termination resistors:**
- 1/4W or 1/2W 120Ω resistors from any electronics supplier
- Pre-made CAN termination plugs (with VH or screw terminals)
- DeviceNet/CANopen termination resistors
### Determining Termination Configuration
**For a typical YamBMS setup (ESP32 ↔ Inverter):**
```
Point-to-point CAN connection:
===============================
120Ω (if available) 120Ω (check inverter)
║ ║
[ESP32 Board]───────────────────────[Solar Inverter]
└─ Start End ─┘
```
**Steps:**
1. **Check your ESP32 board:**
- Does it have built-in termination? (check docs/jumpers)
- If yes: enable it (move jumper to 120R position)
- If no: add external 120Ω resistor between CAN H and CAN L
2. **Check your inverter:**
- Most inverters have built-in termination (check manual)
- Some have a termination switch or jumper
- If no built-in termination: add external 120Ω resistor
3. **Verify with multimeter:**
- Power off all devices
- Measure between CAN H and CAN L
- Should read ~60Ω
## Common CAN Bus Issues & Troubleshooting
### No Communication on CAN Bus
**Symptoms:**
- No data received from inverter
- ESP32 cannot send data
- CAN bus appears "dead"
**Troubleshooting Steps:**
1. **Check Wiring**
- ✓ CAN H to CAN H, CAN L to CAN L (not swapped)
- ✓ GND connected between devices
- ✓ No loose connections
- ✓ Cable integrity (no breaks)
2. **Verify Termination**
- Power off all devices
- Measure resistance between CAN H and CAN L
- Should be ~60Ω (two 120Ω resistors in parallel)
- If not 60Ω: check termination resistor configuration
3. **Check Baud Rate**
- ESP32 and inverter must use same baud rate
- Common rates: 500 kbps (most common), 250 kbps, 125 kbps
- Check inverter manual for supported baud rate
- Verify ESP32 code configuration
4. **Verify Power**
- Both devices powered on
- Correct voltage levels (5V for ESP32, as per inverter specs)
- Check power supply stability
5. **Check Cable Length**
- Is cable length within limits for your baud rate?
- 500 kbps → max 100 meters
- 1 Mbps → max 40 meters
### Intermittent Communication Errors
**Symptoms:**
- Communication works sometimes, fails other times
- Occasional corrupted messages
- Random disconnections
**Possible Causes & Solutions:**
1. **Poor Termination**
- Measure resistance: should be exactly ~60Ω
- Check termination resistors are securely connected
- Verify only two 120Ω resistors present
2. **Ground Potential Differences**
- **Solution:** Ensure GND wire is connected between all devices
- Check GND continuity with multimeter
- Verify no high resistance in GND path
3. **Electrical Noise**
- Use shielded cable
- Route CAN cable away from power cables
- Connect shield to earth ground at one end only
- Check for nearby sources of EMI (switching PSUs, motors, etc.)
4. **Cable Quality Issues**
- Replace with proper CAN bus cable (120Ω impedance)
- Avoid using random cables (cat5, speaker wire, etc.)
- Check for damaged or kinked cables
5. **Too Many Nodes**
- CAN transceiver limited to 110 nodes (CA-IS3050G)
- In practice, fewer is better for reliability
- Typical YamBMS: 2-3 devices only
### CAN Bus Completely Non-Functional
**Symptoms:**
- No communication at all
- Multimeter shows unexpected voltages
- CAN transceiver very hot
**Critical Checks:**
1. **Correct Polarity**
- CAN H to CAN H, CAN L to CAN L
- **Not swapped!**
- Some transceivers are damaged by reverse polarity
2. **Over-Termination**
- Too many termination resistors (>2) causes excessive current
- Measure total resistance: should be ~60Ω, not ~40Ω or less
- Remove extra termination resistors
3. **Short Circuit**
- Check for shorts between CAN H and CAN L
- Check for shorts to GND or power rails
- Inspect terminal blocks for debris or solder bridges
4. **Damaged Transceiver**
- If voltage spikes occurred (no isolation), transceiver may be damaged
- Replace board or transceiver IC
- Consider using isolated CAN transceiver for future protection
### Measuring CAN Bus with Multimeter
**Idle Bus (Recessive State):**
```
CAN H: ~2.5V
CAN L: ~2.5V
Differential: ~0V
```
**Active Bus (Mixed Dominant/Recessive):**
```
CAN H: fluctuating between ~2.5V and ~3.5V
CAN L: fluctuating between ~2.5V and ~1.5V
Differential: varies
```
**If you see:**
- CAN H = 0V or 5V continuously → Problem with transceiver or power
- CAN L = 0V or 5V continuously → Problem with transceiver or power
- No voltage fluctuation → No activity on bus (check if devices are transmitting)
## YamBMS-Specific CAN Configuration
### Typical YamBMS CAN Setup
**Hardware:**
- ESP32-S3 board with CAN transceiver (LilyGo, Waveshare, M5Stack)
- Solar inverter with CAN bus interface (Deye, Sofar, Growatt, Victron, etc.)
- Twisted pair CAN cable (120Ω impedance)
- Two 120Ω termination resistors (may be built-in)
**Software:**
- YamBMS firmware configured for CAN output
- CAN baud rate: typically 500 kbps (check inverter manual)
- CAN protocol: Pylontech, SMA, Victron, or custom
**Wiring Example:**
```
YamBMS ESP32-S3 Solar Inverter
(with CAN transceiver) (with CAN interface)
┌─────────────────┐ ┌──────────────────┐
│ CAN H ──────────┼────────────────┤ CAN H │
│ CAN L ──────────┼────────────────┤ CAN L │
│ GND ────────────┼────────────────┤ GND │
└─────────────────┘ └──────────────────┘
120Ω ↑ ↑ 120Ω
(if at endpoint) (check inverter)
```
### Inverter-Specific Notes
**Most Common CAN Speeds:**
- **Deye/Sunsynk**: 500 kbps (Pylontech protocol)
- **Growatt**: 500 kbps (Pylontech protocol)
- **Sofar**: 500 kbps (Pylontech protocol)
- **Victron**: 500 kbps (Victron VE.Can protocol)
- **SMA**: 500 kbps (SMA CAN protocol)
**Always verify in your inverter's manual!**
### Common CAN Protocols for Battery Communication
- **Pylontech**: Most common, supported by many inverters
- **SMA**: Used by SMA inverters
- **Victron**: VE.Can protocol for Victron systems
- **LG Resu**: Protocol used by LG battery systems
- **BYD**: BYD battery protocol
YamBMS can typically emulate Pylontech or other protocols depending on your inverter.
## Advanced Topics
### CAN Bus Isolation
**What is CAN Isolation?**
- Galvanic isolation between the ESP32 and the CAN bus
- Protects the ESP32 from voltage spikes, ground loops, and noise
- Uses opto-isolators or isolated DC-DC converters
**Benefits:**
- Protects expensive ESP32 boards from damage
- Improves noise immunity
- Allows operation with ground potential differences
- Reduces risk of ground loops
**Boards with Isolated CAN:**
- ✅ Waveshare ESP32-S3-RS485-CAN (isolated)
- ✅ M5Stack Atomic CAN Base (isolated, CA-IS3050G)
- ❌ Some cheaper CAN modules (not isolated)
**Recommendation:** Always prefer isolated CAN transceivers for battery/inverter applications!
### CAN Bus Sniffing & Debugging
**Tools for CAN Bus Analysis:**
- **CAN USB Adapter**: PCAN-USB, CANable, SLCAN
- **Logic Analyzer**: Saleae, DSLogic with CAN protocol decoder
- **Oscilloscope**: For low-level signal analysis
**Software Tools:**
- **can-utils** (Linux): Command-line CAN tools
- **SavvyCAN**: GUI-based CAN analyzer
- **Wireshark**: With SocketCAN plugin for Linux
**Basic CAN Sniffing (Linux example):**
```bash
# View CAN traffic
candump can0
# Send a CAN frame
cansend can0 123#DEADBEEF
# Log CAN traffic to file
candump -l can0
```
### CAN FD (Flexible Data-Rate)
**What is CAN FD?**
- Enhanced version of CAN bus
- Higher data rates (up to 5 Mbps for data phase)
- Larger payload (up to 64 bytes vs 8 bytes for classical CAN)
**YamBMS Note:**
- Most solar inverters use **Classical CAN** (not CAN FD)
- ESP32-S3 TWAI controller supports Classical CAN
- CAN FD support requires specific transceivers and software
- Not commonly needed for battery/inverter communication
## Safety & Best Practices
### Electrical Safety
⚠️ **WARNING:**
- CAN bus in battery systems operates near **high-voltage DC batteries**
- Always disconnect battery before working on CAN wiring
- Use properly insulated tools
- Verify no voltage on CAN bus before connecting/disconnecting
### Installation Best Practices
**DO:**
- ✅ Plan your wiring layout before installation
- ✅ Use proper crimping tools for terminal connections
- ✅ Label wires clearly (CAN H, CAN L, GND)
- ✅ Secure cables with cable ties to prevent movement
- ✅ Protect cables from sharp edges and abrasion
- ✅ Document your wiring configuration
- ✅ Test with multimeter before powering on
**DON'T:**
- ❌ Work on live circuits
- ❌ Use damaged or frayed cables
- ❌ Mix CAN cables with high-voltage power cables in same conduit
- ❌ Exceed voltage/current ratings of your components
- ❌ Modify inverter wiring without consulting manual
## Sources
- [CAN Bus Wikipedia](https://en.wikipedia.org/wiki/CAN_bus)
- [ISO 11898 Standard (CAN Specification)](https://www.iso.org/standard/63648.html)
- [Microchip CAN Bus Basics](https://www.microchip.com/design-centers/can)
- [Texas Instruments: Introduction to CAN](https://www.ti.com/lit/an/sloa101b/sloa101b.pdf)
---
**License:** This documentation is part of the YamBMS project and follows the same GPLv3 license.
**Disclaimer:** Always consult your device manuals and follow electrical safety procedures. This guide is for educational purposes.
+820
View File
@@ -0,0 +1,820 @@
# YamBMS - RS485 bus
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
## Overview
**RS485** (also known as TIA/EIA-485) is a robust serial communication standard designed for long-distance, multi-point industrial communication in electrically noisy environments. It is one of the most widely used communication protocols in industrial automation, building automation, and battery management systems.
In the YamBMS ecosystem, RS485 is primarily used to communicate with **JK-PB BMS units** (inverter BMS) and other industrial sensors over long distances with excellent noise immunity.
![RS485_bus](../../images/YamBMS_RS485_bus.png)
**Key Features:**
- Multi-point communication (up to 32-256 nodes depending on transceiver)
- Long distance capability (up to 1200 meters)
- High noise immunity via differential signaling
- Data rates up to 10 Mbps (typically 9600-115200 baud for BMS)
- Half-duplex communication (one direction at a time)
- Simple 2-wire or 3-wire configuration
## RS485 Fundamentals
### What is RS485?
RS485 uses a **two-wire differential signaling system**:
- **A (Data+)**: Also called D+, non-inverting line
- **B (Data-)**: Also called D-, inverting line
**Differential Signaling:**
```
Differential Signal = A - B
Logic '0' (space): A > B by at least +200mV
Logic '1' (mark): A < B by at least -200mV
Typical levels:
Logic '0': A = +3V, B = -1V → Difference = +4V
Logic '1': A = -1V, B = +3V → Difference = -4V
```
This differential approach provides excellent **common-mode noise rejection**, meaning that electrical noise affecting both wires equally is ignored, making RS485 extremely reliable in industrial environments.
### RS485 Speed & Distance
The maximum cable length depends on the communication speed:
| Baud Rate | Maximum Distance | Typical Use Case |
|-----------|------------------|------------------|
| 10 Mbps | 12 meters | Short, very high speed |
| 1 Mbps | 50 meters | High speed local networks |
| 115200 bps | ~500 meters | **Common for JK-B BMS** |
| 9600 bps | ~1200 meters | **Common for JK-PB BMS**, long distance |
| 2400 bps | ~1200 meters | Very long distance, slower speed |
**YamBMS Typical Configurations:**
- **JK-B BMS (UART)**: 115200 baud
- **JK-PB BMS (RS485)**: 9600 baud
- **Modbus devices**: 9600, 19200, or 38400 baud
### RS485 vs RS232
| Feature | RS232 | RS485 |
|---------|-------|-------|
| **Distance** | ~15 meters | Up to 1200 meters |
| **Speed** | Up to 115200 bps | Up to 10 Mbps |
| **Topology** | Point-to-point only | Multi-drop (up to 256 nodes) |
| **Signal** | Single-ended | Differential |
| **Noise Immunity** | Poor | Excellent |
| **Use Case** | PC serial ports, short connections | Industrial, long distance |
**Why RS485 for YamBMS?**
- Long-distance BMS connections
- Noisy electrical environment (batteries, inverters)
- Multiple BMS units on one bus (multi-drop)
- Superior reliability
### RS485 Topology
**Linear Bus (Multi-Drop) - CORRECT:**
```
[Master/ESP32]───[BMS 1]───[BMS 2]───[BMS 3]───[BMS 4]
↑ ↑
120Ω term 120Ω term
```
**Important Rules:**
- ✅ **Linear topology** (daisy chain, not star)
- ✅ **Two termination resistors** (120Ω each at both ends)
- ✅ **Short stubs** (branches < 30cm if unavoidable)
- ❌ **NOT star topology** (causes signal reflections)
- ❌ **NOT ring topology** (not supported)
## RS485 Wiring
### Standard 3-Wire Configuration
**MANDATORY wiring for RS485 bus:**
```
RS485 Bus 3-Wire Configuration (REQUIRED!)
===========================================
Device 1 Device 2 Device 3
├─ A (Data+) ────────── A (Data+) ────────── A (Data+)
├─ B (Data-) ────────── B (Data-) ────────── B (Data-)
└─ GND ──────────────── GND ──────────────── GND ← MANDATORY!
```
> [!CRITICAL]
> **The GND connection is MANDATORY for RS485!**
>
> Unlike CAN bus where GND is "strongly recommended," RS485 **REQUIRES** a ground reference wire for reliable operation. This is not optional!
### Pin Identification
**Common RS485 Terminal Labeling:**
Different manufacturers use different naming conventions. Here are the most common:
| Standard | Pin 1 (Data+) | Pin 2 (Data-) | Pin 3 |
|----------|---------------|---------------|-------|
| **Most Common** | **A** | **B** | **GND** |
| Alternative 1 | D+ | D- | GND |
| Alternative 2 | T/R+ | T/R- | GND |
| Alternative 3 | + | - | GND |
| Alternative 4 | H (High) | L (Low) | GND |
**⚠️ WARNING: A/B Confusion!**
Some manufacturers label pins **opposite** to the standard:
- **Standard (Most Common)**: A = Data+, B = Data-
- **Reversed (Some devices)**: A = Data-, B = Data+
**If communication doesn't work, try swapping A and B!**
**Waveshare boards:**
- L pin = A (Data+)
- H pin = B (Data-)
**Always verify with your device documentation!**
### Cable Requirements
**Recommended Cable Specifications:**
- **Type:** Twisted pair cable (A and B wires twisted together)
- **Characteristic Impedance:** 120Ω (matches termination resistors)
- **Gauge:** 24 AWG to 22 AWG for most applications
- **Shielding:** Shielded cable (STP) **highly recommended** for noisy environments
- **Quality:** Industrial-grade RS485 cable recommended
**Acceptable Alternative (short distances only):**
- CAT5/CAT6 ethernet cable (use one twisted pair for A/B, another for GND)
- **Only for distances < 100 meters and low noise environments!**
### Ground Connection - ABSOLUTELY CRITICAL
> [!CRITICAL]
> **MUST YOU connect the GND wire on RS485 bus?**
**Answer: YES - ABSOLUTELY MANDATORY!**
This is **NOT optional**. RS485 **REQUIRES** a ground reference wire between all devices. Let me explain why this is even more critical than for CAN bus.
#### Why Ground Connection is MANDATORY for RS485
**1. Common Mode Voltage Range (Stricter than CAN)**
- RS485 transceivers tolerate **-7V to +12V** common mode voltage (similar to CAN)
- **BUT:** RS485 is significantly **more sensitive** to ground potential differences than CAN
- Without GND: communication **WILL FAIL** or be extremely unreliable
**2. Long Distance Communications**
- RS485 is designed for distances up to **1200 meters**
- Over these distances, ground potential differences of **several volts** are guaranteed
- Without GND connection: **catastrophic communication failure** or **transceiver damage**
**3. Official RS485/TIA-485 Standard**
- The standard **explicitly requires** a signal ground reference
- Industry best practices **always include ground wire**
**Quote from industrial RS485 documentation:**
> *"While a differential signal does not require a signal ground to communicate, the ground wire serves an important purpose. Over a distance of hundreds or thousands of feet there can be very significant differences in the voltage level of 'ground.' RS-485 networks can typically maintain correct data with a difference of -7 to +12 Volts. If the grounds differ more than that amount, **data will be lost and often the port itself will be damaged**."*
**4. Multiple Power Supplies**
- ESP32 and BMS units have separate power supplies
- Different power supplies = different ground potentials
- Can easily exceed the ±7V to +12V common mode range
- **Result without GND: Transceiver damage and communication failure**
**5. Protection Against Ground Loops**
- Proper grounding prevents destructive ground loop currents
- In long cable runs, ground potential differences create currents in signal wires
- GND wire carries these currents, protecting signal integrity
#### Consequences of Omitting GND on RS485
**What WILL happen without GND connection:**
```
❌ WITHOUT GND - Guaranteed Problems:
✗ Frequent communication errors
✗ Complete communication failure over distance
✗ Intermittent data corruption
✗ Data packets lost or garbled
✗ BMS readings incorrect or missing
✗ RISK: Transceiver damage (voltage > ±12V)
✗ RISK: Complete port failure requiring replacement
```
**Real-world failure modes observed:**
- BMS readings work for 5 minutes, then fail
- Communication works in the morning, fails in the afternoon (temperature-dependent ground shifts)
- Works on the bench (short cables), fails in installation (long cables)
- Random disconnections during high battery current (ground bounce)
#### When GND Can Be Omitted (EXTREMELY RARE - NOT RECOMMENDED)
**Only in these VERY limited cases (still not recommended):**
- Distance **< 1 meter**
- **Identical power supply** (same PSU, same ground reference)
- Clean bench testing environment only
- **Duration:** Temporary testing only
**Even in these cases, you SHOULD connect GND for these reasons:**
- Establishes good habits
- What works on the bench may fail in installation
- Ground connection costs nothing but saves hours of troubleshooting
#### Isolated RS485 Transceivers
**Question:** If my board has isolated RS485 (e.g., Waveshare, M5Stack RS485-ISO), do I still need to connect GND?
**Answer:** **YES - ABSOLUTELY!**
```
Board with RS485 Isolation
===========================
ESP32 Side Isolation RS485 Bus Side
(non-isolated) ═══════════ (isolated)
├─ A ──→ to BMS
├─ B ──→ to BMS
└─ GND ──→ to BMS (MANDATORY!)
Isolation protects the ESP32 from voltage spikes, but devices
on the isolated side STILL REQUIRE a common ground reference!
```
**Explanation:**
- **Isolation** protects your ESP32 from damage
- Devices on the **isolated side** (BMS units, sensors) **MUST** share a common ground
- Without GND: communication between BMS units will be unreliable despite isolation
- The isolated DC-DC converter provides power isolation, not signal ground
### Wiring Best Practices
**DO:**
- ✅ **ALWAYS connect GND wire between ALL devices** (mandatory!)
- ✅ Use twisted pair cable (A and B twisted together)
- ✅ Use proper RS485 cable (120Ω impedance)
- ✅ Keep cable runs as short as practical
- ✅ Add termination resistors at both ends (120Ω)
- ✅ Use shielded cable in electrically noisy environments
- ✅ Connect shield to earth ground at **one end only** (prevents ground loops)
- ✅ Avoid running RS485 cables parallel to AC power cables
- ✅ Use separate conduits for RS485 and high-voltage power
**DON'T:**
- ❌ **NEVER omit the GND wire** (causes guaranteed problems!)
- ❌ Use random cable (speaker wire, telephone cable, etc.)
- ❌ Create star or ring topologies
- ❌ Exceed maximum cable length for your baud rate
- ❌ Add more than two 120Ω termination resistors
- ❌ Connect shield to ground at both ends (causes ground loops)
- ❌ Swap A and B randomly (check device documentation first)
## Termination Resistors
### Why Termination is Necessary
**Signal Reflections:**
- When an electrical signal reaches the end of a cable, it reflects back
- These reflections cause signal distortion, ringing, and communication errors
- **Termination resistors** absorb the signal energy, preventing reflections
- Critical for high-speed communication or long cable runs
**The 120Ω Standard:**
- RS485 cable has a characteristic impedance of 120Ω
- Termination resistors match this impedance
- Result: clean signal transmission without reflections
### Proper Termination Configuration
**Correct: Exactly TWO 120Ω resistors at both ends**
```
CORRECT Termination
===================
120Ω 120Ω
║ ║
[ESP32]───[BMS 1]───[BMS 2]───[BMS 3]───[BMS 4]
└─ Start of bus End of bus ─┘
```
**How to verify termination:**
1. **Power off all devices** (important!)
2. **Disconnect** one end of the RS485 bus
3. Measure resistance between A and B with a multimeter
4. **Expected result: ~60Ω** (two 120Ω resistors in parallel = 60Ω)
```
Termination Math:
=================
Two 120Ω resistors in parallel:
R_total = (R1 × R2) / (R1 + R2)
R_total = (120 × 120) / (120 + 120)
R_total = 14400 / 240 = 60Ω
```
### Built-in vs External Termination
**Boards with Built-in Termination:**
Some boards have onboard 120Ω resistors that can be enabled:
- **Waveshare ESP32-S3-RS485-CAN**: Jumper for RS485 termination (120R/NC)
- **M5Stack RS485-ISO Unit (U094)**: Includes separate 120Ω resistor to connect
- Many industrial RS485 devices have switchable termination
**Boards without Built-in Termination:**
Some boards require external termination resistors:
- **LilyGo T-Connect**: No built-in RS485 termination
- External 120Ω resistor must be connected between A and B at bus endpoints
**How to add external termination:**
```
Physical Connection:
====================
120Ω Resistor (1/4W or 1/2W)
┌─────┐
A ───────┤ ├─────── B
└─────┘
(at bus endpoint)
```
**Where to buy termination resistors:**
- 1/4W or 1/2W 120Ω resistors from any electronics supplier
- Pre-made RS485 termination plugs (with screw terminals)
- Modbus/Profibus termination resistors
### Common Termination Mistakes
**❌ WRONG: No termination**
```
[ESP32]───[BMS 1]───[BMS 2]
```
**Result:** Signal reflections, communication errors, unreliable operation
**❌ WRONG: Only one termination resistor**
```
120Ω
║
[ESP32]───[BMS 1]───[BMS 2]
```
**Result:** One end unterminated, partial reflections
**❌ WRONG: Termination in the middle**
```
120Ω
║
[ESP32]───[BMS 1]───[BMS 2]───[BMS 3]
```
**Result:** Both ends unterminated, reflections from both directions
**❌ WRONG: More than two termination resistors**
```
120Ω 120Ω 120Ω
║ ║ ║
[ESP32]───[BMS 1]───[BMS 2]───[BMS 3]
```
**Result:** Total impedance too low (~40Ω), excessive current, signal distortion
### Determining Termination Configuration
**For a typical YamBMS setup (ESP32 ↔ Multiple BMS):**
```
Multi-drop RS485 connection:
============================
120Ω (if available) 120Ω (add if needed)
║ ║
[ESP32]───[BMS 1]───[BMS 2]───[BMS 3]───[BMS 4]
└─ Start End ─┘
```
**Steps:**
1. **Check your ESP32 board:**
- Does it have built-in termination? (check docs/jumpers)
- If yes: enable it (move jumper to 120R position)
- If no: add external 120Ω resistor between A and B
2. **Check the last BMS on the bus:**
- Most BMS units do NOT have built-in termination
- Add external 120Ω resistor between A and B at the last BMS
3. **Verify with multimeter:**
- Power off all devices
- Disconnect one end
- Measure between A and B
- Should read ~60Ω
### When is Termination Optional?
**Short, Low-Speed Connections:**
- Cable length < 10 meters
- Baud rate ≤ 9600 bps
- Few communication errors tolerable (not recommended for YamBMS!)
**However:** For reliability, **always add termination** regardless of distance or speed. It costs almost nothing and prevents hours of troubleshooting!
## Common RS485 Issues & Troubleshooting
### No Communication on RS485
**Symptoms:**
- No data received from BMS
- ESP32 cannot communicate with devices
- RS485 bus appears "dead"
**Troubleshooting Steps:**
1. **Check Wiring (MOST COMMON ISSUE)**
- ✓ A to A, B to B (not swapped)
- ✓ **GND connected between ALL devices** (mandatory!)
- ✓ No loose connections
- ✓ Cable integrity (no breaks)
- ✓ Try swapping A and B if still not working (labeling may be reversed)
2. **Verify Ground Connection**
- **Critical:** Measure continuity between all GND pins
- GND must have low resistance (< 1Ω) between all devices
- Without GND: guaranteed communication failure
3. **Check Termination**
- Power off all devices
- Disconnect one end of bus
- Measure resistance between A and B
- Should be ~60Ω (two 120Ω resistors in parallel)
4. **Verify Baud Rate**
- ESP32 and BMS must use same baud rate
- JK-B BMS (UART): 115200 baud
- JK-PB BMS (RS485): 9600 baud
- Check BMS documentation
5. **Check Power**
- All devices powered on
- Correct voltage levels
- Stable power supplies
6. **Verify Polarity**
- Some devices label A/B opposite to standard
- **Try swapping A and B connections**
- This is a very common issue!
### Intermittent Communication Errors
**Symptoms:**
- Communication works sometimes, fails other times
- Occasional corrupted data
- Random BMS disconnections
- Works for minutes/hours, then fails
**Possible Causes & Solutions:**
1. **Missing or Poor Ground Connection (MOST COMMON)**
- **Solution:** Ensure GND wire is connected between ALL devices
- Check GND continuity with multimeter (should be < 1Ω)
- Verify no high resistance in GND path
- **This is the #1 cause of intermittent RS485 problems!**
2. **Ground Potential Differences**
- Without GND: different ground potentials cause voltage shifts
- Exceeds common mode range (-7V to +12V)
- **Solution:** Connect GND wire securely
3. **Poor Termination**
- Measure resistance: should be exactly ~60Ω
- Check termination resistors securely connected
- Verify only two 120Ω resistors present
4. **Electrical Noise Interference**
- Use shielded cable (STP)
- Route RS485 cable away from AC power cables
- Connect shield to earth ground at one end only
- Check for nearby sources of EMI (motors, switching PSUs, inverters)
5. **Cable Quality Issues**
- Replace with proper RS485 cable (120Ω impedance)
- Avoid using random cables (cat5 for long distances, speaker wire, etc.)
- Check for damaged or kinked cables
6. **Temperature-Related Issues**
- Ground potential differences change with temperature
- Connections expand/contract
- **Solution:** Ensure solid, reliable connections with GND wire
### Very Slow or Corrupted Data
**Symptoms:**
- Data arrives but is very slow
- Frequent CRC errors
- Garbled messages
**Possible Causes:**
1. **Incorrect Baud Rate**
- ESP32 and BMS must match exactly
- Common rates: 9600, 19200, 38400, 115200
- Even small mismatches cause problems
2. **Cable Too Long for Baud Rate**
- 115200 baud: max ~500 meters
- 9600 baud: max ~1200 meters
- Higher speeds require shorter cables
3. **Missing Ground Reference**
- Without GND: signal levels shift
- Receiver interprets signals incorrectly
- **Solution:** Connect GND wire!
4. **Over-Termination**
- Too many termination resistors (>2)
- Measure resistance: should be ~60Ω, not ~40Ω
- Remove extra terminators
### RS485 Transceiver Damage
**Symptoms:**
- Complete communication failure
- Hot transceiver chip
- Burnt smell
- No voltage on A or B lines
**Causes:**
- Voltage spike exceeded ±12V common mode range
- Ground potential difference too large without GND connection
- Reverse polarity connection
- Short circuit between A, B, or GND
**Prevention:**
- **Always connect GND wire!**
- Use isolated RS485 transceivers (Waveshare, M5Stack RS485-ISO)
- Check connections before applying power
- Use proper termination
**Solution if damaged:**
- Replace board or transceiver IC
- Investigate root cause before reconnecting
- Consider upgrading to isolated transceiver
### Measuring RS485 with Multimeter
**Idle Bus (Mark State):**
```
With termination (power ON):
A (Data+): ~2.5V to 3.3V
B (Data-): ~1.5V to 2.5V
Differential: A > B (mark state)
```
**Active Bus (Mixed States):**
```
A: Fluctuating between ~1.5V and ~3.5V
B: Fluctuating opposite to A
Differential: Varies with data
```
**If you see:**
- A = 0V or 5V continuously → Problem with transceiver or power
- B = 0V or 5V continuously → Problem with transceiver or power
- A = B (same voltage) → No differential signal, check driver/termination
- No voltage fluctuation → No activity (check if devices are transmitting)
## YamBMS-Specific RS485 Configuration
### JK-PB BMS via RS485 (Recommended Configuration)
**Hardware:**
- ESP32-S3 board with RS485 transceiver (Waveshare ESP32-S3-RS485-CAN, M5Stack AtomS3 + RS485-ISO Unit)
- Multiple JK-PB BMS units (inverter BMS)
- Twisted pair RS485 cable (120Ω impedance)
- Two 120Ω termination resistors
**Communication Parameters:**
- **Protocol:** RS485 (Modbus RTU)
- **Baud Rate:** 9600 bps (typical for JK-PB)
- **Data Bits:** 8
- **Parity:** None (N)
- **Stop Bits:** 1
- **Format:** 8N1
**Wiring Example:**
```
YamBMS ESP32-S3 JK-PB BMS (Multiple Units)
(with RS485)
┌──────────────┐ ┌───────┐ ┌───────┐ ┌───────┐
│ A ──────────┼──────────────┤ A ├──┤ A ├──┤ A │
│ B ──────────┼──────────────┤ B ├──┤ B ├──┤ B │
│ GND ─────────┼──────────────┤ GND ├──┤ GND ├──┤ GND │
└──────────────┘ └───────┘ └───────┘ └───────┘
120Ω ↑ BMS 1 BMS 2 BMS 3
(if at endpoint) ↑ 120Ω (add)
```
**Important Notes:**
- Each JK-PB BMS must have a **unique address** (ID 1, 2, 3, etc.)
- ESP32 polls each BMS sequentially by address
- All BMS units share the same RS485 bus (multi-drop)
- **GND must be connected between all devices!**
### JK-B BMS via UART (Direct Serial Connection)
**Hardware:**
- ESP32 board with UART pins
- JK-B BMS with UART interface (not RS485)
- 3-wire connection (TX, RX, GND)
**Communication Parameters:**
- **Protocol:** UART (Serial)
- **Baud Rate:** 115200 bps
- **Data Bits:** 8
- **Parity:** None (N)
- **Stop Bits:** 1
- **Format:** 8N1
**Wiring (Point-to-Point):**
```
ESP32 UART JK-B BMS UART
┌──────────┐ ┌──────────┐
│ TX ──────┼───────────┤ RX │
│ RX ──────┼───────────┤ TX │
│ GND ─────┼───────────┤ GND │
└──────────┘ └──────────┘
```
**Notes:**
- This is **NOT RS485** - it's direct UART/serial
- No RS485 transceiver needed
- No termination resistors needed
- Limited to short distances (~2 meters recommended)
- Only one BMS per UART (point-to-point)
- **For multiple JK-B BMS, use multiple UART ports or switch to JK-PB via RS485!**
### Comparison: JK-B (UART) vs JK-PB (RS485)
| Feature | JK-B (UART) | JK-PB (RS485) |
|---------|-------------|---------------|
| **Interface** | Direct UART | RS485 differential |
| **Distance** | < 5 meters | Up to 1200 meters |
| **Multiple BMS** | Need multiple UARTs | Single RS485 bus (multi-drop) |
| **Transceiver** | None (direct) | RS485 transceiver required |
| **Baud Rate** | 115200 bps | 9600 bps (typical) |
| **Termination** | Not needed | 120Ω at both ends |
| **Noise Immunity** | Poor | Excellent |
| **Recommended For** | 1-2 BMS, short distance | Multiple BMS, long distance |
**YamBMS Recommendation:**
- **JK-PB BMS + RS485** is the better choice for installations with multiple BMS units or longer distances.
## Advanced Topics
### RS485 Isolation
**What is RS485 Isolation?**
- Galvanic isolation between the ESP32 and the RS485 bus
- Protects the ESP32 from voltage spikes, ground loops, and electrical noise
- Uses opto-isolators and isolated DC-DC converters
**Benefits:**
- Protects expensive ESP32 boards from damage
- Allows operation with large ground potential differences
- Prevents ground loops
- Improves noise immunity in harsh electrical environments
**Boards with Isolated RS485:**
- ✅ Waveshare ESP32-S3-RS485-CAN (isolated, CA-IS3082W chip)
- ✅ M5Stack RS485-ISO Unit (U094) (isolated, CA-IS3082W chip, 1000V isolation)
- ❌ Some cheaper RS485 modules (not isolated)
**Isolation Voltage Ratings:**
- Waveshare: Isolated DC-DC + optocoupler isolation
- M5Stack RS485-ISO Unit: **1000V RMS isolation**
**Recommendation:** Always prefer isolated RS485 transceivers for battery/BMS applications!
### Fail-Safe Protection
**What is Fail-Safe?**
- Feature of some RS485 transceivers
- If A and B inputs are open or shorted, receiver outputs a known state (high)
- Prevents random data output when bus is disconnected
**Boards with Fail-Safe:**
- M5Stack RS485-ISO Unit (CA-IS3082W has fail-safe)
**Benefit for YamBMS:**
- If a BMS is disconnected or cable breaks, ESP32 detects clean "no data" state
- Prevents false readings from floating inputs
### Half-Duplex vs Full-Duplex
**Half-Duplex (Most Common for RS485):**
- Uses 2 wires (A and B) plus GND
- Communication in one direction at a time
- Transmitter enable (DE/RE) control required
- **This is what JK-PB BMS uses**
**Full-Duplex:**
- Uses 4 wires (TX+, TX-, RX+, RX-) plus GND
- Simultaneous bidirectional communication
- More expensive and complex
- Rarely needed for BMS applications
**YamBMS:** Typically uses half-duplex RS485.
### RS485 Repeaters
**What is an RS485 Repeater?**
- Device that extends the RS485 bus beyond normal distance/node limits
- Regenerates the signal for another 1200 meters
- Isolates one segment from another
**When to Use:**
- Very long distances (> 1200 meters)
- Very high number of nodes (> 32 without repeater)
- Need to isolate bus segments
**YamBMS:** Rarely needed for typical installations.
### Modbus Protocol
**What is Modbus?**
- Application layer protocol that runs over RS485 (physical layer)
- Standard for industrial device communication
- Two variants: Modbus RTU (binary) and Modbus ASCII
**JK-PB BMS:**
- Uses Modbus RTU protocol over RS485
- Standard function codes for reading registers
- CRC error checking
**YamBMS Implementation:**
- ESPHome Modbus component
- Configured for Modbus RTU at 9600 baud
- Reads voltage, current, SOC, temperature, etc.
## Safety & Best Practices
### Electrical Safety
⚠️ **WARNING:**
- RS485 in battery systems operates near **high-voltage DC batteries**
- Always disconnect battery before working on RS485 wiring
- Use properly insulated tools and materials
- Verify no voltage on RS485 bus before connecting/disconnecting
- **Never work on live circuits!**
### Installation Best Practices
**DO:**
- ✅ **ALWAYS connect GND wire between ALL devices** (mandatory!)
- ✅ Plan your wiring layout before installation
- ✅ Use proper crimping tools for terminal connections
- ✅ Label wires clearly (A, B, GND)
- ✅ Secure cables with cable ties to prevent movement
- ✅ Protect cables from sharp edges, abrasion, and UV exposure
- ✅ Use cable glands for outdoor installations
- ✅ Document your wiring configuration (take photos!)
- ✅ Test with multimeter before powering on
**DON'T:**
- ❌ **NEVER omit the GND wire** (guaranteed problems!)
- ❌ Work on live circuits
- ❌ Use damaged or frayed cables
- ❌ Mix RS485 cables with high-voltage AC power cables in same conduit
- ❌ Exceed voltage/current ratings of components
- ❌ Modify BMS wiring without consulting manual
- ❌ Use star or ring topology (linear bus only!)
### Preventive Maintenance
**Regular Checks:**
- Inspect cable condition (wear, damage, UV degradation)
- Verify termination resistors still in place
- Check GND continuity between all devices
- Tighten terminal block screws (can loosen over time)
- Monitor communication error rates in YamBMS logs
**Annual Maintenance:**
- Replace cables showing signs of UV damage (outdoor)
- Clean terminal blocks (dust, corrosion)
- Verify GND resistance still low (< 1Ω between all devices)
## Sources
- [TIA/EIA-485 Standard (RS485 Specification)](https://en.wikipedia.org/wiki/RS-485)
- [Modbus Protocol Specification](https://modbus.org/docs/Modbus_Application_Protocol_V1_1b3.pdf)
- [Schneider Electric RS485 Wiring Guide](https://www.se.com/ca/en/faqs/FA221785/)
- [Analog Devices RS485 Design Guide](https://www.analog.com/en/technical-articles/rs485-design-guide.html)
---
**License:** This documentation is part of the YamBMS project and follows the same GPLv3 license.
**Disclaimer:** Always consult your device manuals and follow electrical safety procedures. This guide is for educational purposes. Work with high-voltage batteries requires proper training and certification.
@@ -0,0 +1,241 @@
# Summary — Analysis and Modeling of Calendar Aging of a Commercial LiFePO4/Graphite Cell
> **Full reference:** Maik Naumann, Michael Schimpe, Peter Keil, Holger C. Hesse, Andreas Jossen (2018).
> *Analysis and modeling of calendar aging of a commercial LiFePO4/graphite cell.*
> Journal of Energy Storage, **17**, 153–169.
> DOI: [10.1016/j.est.2018.01.019](https://doi.org/10.1016/j.est.2018.01.019)
>
> Institute for Electrical Energy Storage Technology (EES), Technical University of Munich (TUM)
---
## 1. Context and Motivation
In stationary battery energy storage systems (BESS), **calendar aging is the dominant lifetime-limiting factor**, not cycle aging. As the authors note:
> *"As current mass-produced LiFePO4/graphite battery cells show cycle stability up to 10,000 full equivalent cycles (FECs) [...] the cycle lifetime is commonly not a limiting factor in stationary applications."* (§1.1)
Within 20 years of home energy storage operation, only ~6,000 FECs are expected. Therefore, the **calendar lifetime becomes the decisive parameter** for economic assessment of stationary BESS. (§1.1)
This study is described as the **first comprehensive calendar aging study** for the widely deployed Sony/Murata US26650FTC1 LFP/graphite cell — a 3 Ah 26650 format cell used commercially under the brand name *fortelion* in many home storage systems, as well as in a 192 kWh containerized BESS (the *Energy Neighbor* project). (§1.1, §2.1)
---
## 2. Investigated Cell — Sony US26650FTC1
Key datasheet parameters (Table 2 of the paper):
| Parameter | Value |
|---|---|
| Nominal capacity | 3.0 Ah (measured mean over 1,100 cells) |
| Nominal voltage | 3.2 V |
| Max. charge voltage | 3.6 V (applied in study) |
| Min. discharge voltage | 2.0 V |
| Max. continuous charge current | 3.0 A (1C) |
| Max. continuous discharge current | 20 A |
| Charge temperature range | 0 °C to 45 °C |
| Discharge temperature range | −20 °C to 60 °C |
| Mass | 84.5 g |
Prior to the aging study, all 1,100 cells were characterized by Rumpf et al., showing a mean discharge capacity of **3.019 Ah** and a very low cell-to-cell variation (σ = 0.007 Ah). (§2.1, §2.7)
---
## 3. Experimental Protocol
### 3.1 Static Aging Study (primary dataset)
- **17 test points (TPs)**, each with **3 cells** stored at constant temperature and SOC
- Duration: **885 days of storage** (970 days total including check-ups)
- **35 periodic check-up (CU) measurements** performed throughout
- Test matrix covers temperatures: **0, 10, 25, 40, 60 °C** and SOC: **0% to 100%** (Table 4)
- Reference condition: 25 °C, SOC = 50% (expected average in BESS operation)
- Accelerated aging at 60 °C (maximum datasheet temperature) to project long-term behavior via Arrhenius extrapolation (§2.5)
### 3.2 Dynamic Aging Study (model validation)
- **15 test points**, 1 cell each, with **alternating temperature and/or SOC conditions** every ~4 weeks
- Duration: ~**270 days** (9 months)
- Designed to validate path-independence of storage conditions and model accuracy under realistic variable conditions (§2.6, Table 5)
### 3.3 Check-Up Measurement Procedure
Each check-up includes (§2.3):
1. Two consecutive full charge/discharge cycles at 1C (CC+CV) to determine discharge capacity *C*disch
2. Pulse resistance test at 1/3C, 2/3C and 1C to determine *R*DC,10s
3. Electrochemical Impedance Spectroscopy (EIS) at SOC = 50%, 25 °C
4. Extended check-ups (×4 over the study): additional 0.02C slow charge/discharge for Differential Voltage Analysis (DVA)
---
## 4. Aging Mechanisms
### 4.1 Dominant mechanism: SEI growth → Loss of Lithium Inventory (LLI)
> *"The SEI growth leads to an irreversible loss of lithium inventory (LLI) [...] and is accelerated with increased temperatures and higher SOCs."* (§1.2, citing Barré et al. [11])
The DVA analysis (§3.1.2, Fig. 3 & 4) confirms that capacity fade is predominantly driven by the **shift of the LiC₁₂ graphite peak** (Q2 parameter), consistent with LLI from SEI growth. At 25 °C, Q1 (anode capacity) is virtually unchanged, confirming **no Loss of Active Material (LAM)** at moderate temperatures.
### 4.2 Secondary mechanism: LAM at high temperatures
At 60 °C, a **slight decrease of Q1** is observed in the DVA, indicating some LAM of the negative electrode — attributed to iron dissolution from the LFP cathode depositing on the graphite surface. However:
> *"LLI remains the dominating factor for capacity fade."* (§3.1.2)
### 4.3 Anode overhang effect
The investigated cell has an anode overhang area of **6.2% of total coated anode area** (Table 3). This can produce a reversible capacity shift of up to ~2.2% depending on storage SOC, but this effect is considered secondary and is not integrated into the aging model. (§2.1, §3.2.1)
---
## 5. Aging Results
### 5.1 Capacity loss (Q_loss)
- Capacity decreases for **all temperatures over time**, with the **rate slowing down** — consistent with a **square root (√t) time dependence** (Fig. 2a, 2c)
- Higher storage SOC → stronger capacity fade, but **between SOC = 37.5% and 62.5%, the difference is minimal** (§3.1.1)
- Higher temperature → strongly accelerated capacity fade
> *"With higher storage SOCs the rates of Q_loss are increasing, but in the middle SOC-range, the rate stays almost constant."* (§4 — Conclusions)
### 5.2 Resistance increase (R_inc)
- Resistance increases **linearly over time** (not √t) for most test points (Fig. 2b, 2d)
- A slight transient **resistance decrease** is observed at the very beginning of storage for most TPs — possibly linked to anode overhang redistribution or measurement uncertainty (§3.1.1)
- Most notable finding: **highest resistance increase occurs in the middle SOC range (~50%)**, not at high SOC — a behavior the authors consider specific to this cell chemistry (§3.1.1, §3.1.3)
> *"The resistance increase shows a non-monotonic dependance over the storage SOC with the highest increase in the middle SOC-range."* (§3.1.1)
---
## 6. Semi-Empirical Aging Model
### 6.1 Model equations
The model expresses capacity loss and resistance increase as a **product of three independent factors** (Eqs. 3 & 4):
**Capacity loss:**
Q_loss(T, SOC, t) [%] = k_temp,Q(T) * k_SOC,Q(SOC) * sqrt(t)
**Resistance increase:**
R_inc(T, SOC, t) [%] = k_temp,R(T) * k_SOC,R(SOC) * t
### 6.2 Temperature factor — Arrhenius law (Eq. 5)
k_temp(T) = k_ref * exp( Ea/R * (1/T_ref - 1/T) )
With reference conditions: *T*ref = 25 °C = 298.15 K, SOCref = 100%.
### 6.3 SOC factor
- **Q_loss**: modeled with a **cubic function** of (SOC − 0.5) → captures the step-like increase above ~75% SOC (Eq. 12)
- **R_inc**: modeled with a **quadratic function** of (SOC − 0.5) → captures the peak at ~50% SOC (Eq. 14)
Parameters fitted on 40 °C test points with 9 SOC values (0% to 100%).
### 6.4 Model parameters (Table 7)
| Parameter | Q_loss | R_inc |
|---|---|---|
| *k*ref | 0.001257 % s⁻⁰·⁵ | 3.419 × 10⁻⁸ % s⁻¹ |
| *E*a | **17.126 kJ mol⁻¹** | **71.827 kJ mol⁻¹** |
| *c* | 2.8575 | 3.3903 |
| *d* | 0.60225 | 1.5604 |
| *T*ref | 298.15 K | 298.15 K |
| SOCref | 100% | 100% |
### 6.5 Dynamic application — virtual time t*
When storage conditions change over time, the model is applied in **differential form** (Eqs. 15 & 16). A **virtual time t*** is introduced to correctly account for the SEI growth history when transitioning between conditions:
t*_cal(T, SOC, Q_loss) = ( Q_loss / (k_temp,Q(T) * k_SOC,Q(SOC)) )^2
This ensures the model correctly represents the **path-independence of storage conditions** confirmed experimentally. (§3.3)
### 6.6 Validation accuracy (Table 8)
| Parameter | Maximum absolute model error |
|---|---|
| Q_loss | **< 2.2%** across all 15 dynamic TPs |
| R_inc | **< 6.9%** across all 15 dynamic TPs |
---
## 7. Long-Term Lifetime Projection
From the Arrhenius extrapolation (§4 — Conclusions):
> Storage at **25 °C / SOC = 50%** yields a projected calendar lifetime of **more than 22 years** before reaching EOL (Q_loss = 20%).
For a standard 20-year BESS operation at 25 °C / 50% SOC:
- Capacity loss from calendar aging alone: **~19.0%**
- Resistance increase from calendar aging alone: **~33.7%**
When combined with cycle aging (covered in the companion paper by Naumann, Spingler & Jossen, 2020), the EOL criterion of Q_loss = 20% would typically be reached **before 20 years** under realistic operating conditions.
---
## 8. Best Practices for Maximizing LFP Cell Lifetime
The following recommendations are directly derived from the experimental results and conclusions of this study.
### 🌡️ 1 — Control storage temperature
Keep cells between **15 °C and 25 °C** whenever possible. The Arrhenius law governs temperature sensitivity: the **activation energy for capacity loss is E_a = 17.126 kJ mol⁻¹**, implying that each ~8–10 °C rise in temperature roughly doubles the aging rate. Storage above 40 °C is significantly detrimental; at 60 °C, the cell approaches EOL conditions within months. (§3.2.4, Table 7)
> In outdoor or non-climate-controlled BESS installations, **summer thermal management is the single most impactful lever** for extending lifetime.
### ⚡ 2 — Avoid prolonged storage at high SOC
The cubic SOC factor (Eq. 12) shows that capacity fade accelerates substantially above **~75–80% SOC**. The optimal long-term storage range is **SOC = 30–60%**, where Q_loss is near its minimum and nearly independent of SOC. (§3.1.1, §3.2.5, Fig. 2c & Fig. 7a)
### 📉 3 — Reduce maximum charge setpoint
Lowering the charge ceiling from 100% to 80–85% SOC significantly reduces calendar aging at the cost of a small reduction in usable capacity. In a BMS-controlled system with accurate Coulomb counting, transitioning to float mode at a defined SOC target is a direct implementation of this recommendation. (§3.2.5)
### 🔁 4 — Prefer regular cycling over prolonged static storage at high SOC
Short idle periods at high SOC (a few hours daily, as in a typical solar self-consumption cycle) are far less damaging than multi-day storage at 100% SOC. The key cumulative variable is **time spent at high SOC × high temperature**. (§1.1, §3.1.1)
### 🔬 5 — Note on resistance: the 50% SOC anomaly
Unlike capacity loss, **internal resistance increases fastest at mid-SOC (~50%)**, not at high SOC. This counter-intuitive behavior appears to be specific to this cell type and may be related to homogeneous vs. inhomogeneous SEI growth patterns across the anode. This does not change the SOC recommendation for capacity preservation, but is relevant for power performance monitoring over time. (§3.1.1, §3.1.3, Table 6)
### 🔋 6 — Initial cell storage matters
Cells were delivered and stored at **50% SOC at ~8 °C** to minimize pre-study aging — a direct confirmation that low temperature + mid-SOC is the optimal long-term storage condition even before commissioning. (§2.4)
---
## 9. Applicability to BMS-Controlled Systems
This model is designed for integration into BESS lifetime simulations with **dynamic SOC and temperature profiles**. The differential form of the model (Eqs. 15–17) allows real-time or periodic aging estimation based on continuously logged temperature and SOC data.
A BMS that can:
1. Track SOC accurately via Coulomb counting (shunt-based)
2. Communicate charge voltage setpoints dynamically to the MPPT charge controller
3. Log cell temperature continuously
...has all the inputs needed to implement an **active aging minimization strategy** grounded directly in this model. The virtual time *t** mechanism (Eq. 17) even allows implementing a running Q_loss estimate that correctly accounts for past operating history.
---
## 10. Selected References from the Paper
| # | Authors | Title | Journal | Year |
|---|---|---|---|---|
| [1] | Naumann et al. | LFP battery cost analysis in PV-household applications | Energy Procedia | 2015 |
| [6] | Schmalstieg et al. | Holistic aging model for NMC 18650 cells | J. Power Sources | 2014 |
| [11] | Barré et al. | Review of Li-ion aging mechanisms for automotive applications | J. Power Sources | 2013 |
| [12] | Li et al. | Degradation mechanisms of graphite electrode in C6/LFP | J. Electrochem. Soc. | 2016 |
| [13] | Li et al. | Calendar aging degradation mechanisms of C6/LFP | Electrochim. Acta | 2016 |
| [14] | Keil et al. | Calendar aging of lithium-ion batteries | J. Electrochem. Soc. | 2016 |
| [25] | Sarasketa-Zabala et al. | Calendar aging of LFP with dynamic model validation | J. Power Sources | 2014 |
| [45] | Rumpf et al. | Cell-to-cell variation study on 1,100 commercial Li-ion cells | J. Energy Storage | 2017 |
---
*This summary was prepared from the full text of: Naumann et al. (2018), Journal of Energy Storage, Vol. 17, pp. 153–169.
All section (§), equation, figure and table references correspond directly to the original publication.*
@@ -1,15 +0,0 @@
# YamBMS - Schematic and setup instructions
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
## Contents
1) [Galvanic isolation](Galvanic_isolation.md)
2) [JK-B BMS](BMS_JK-B.md)
3) [JK-PB BMS](BMS_JK-PB.md)
4) [JK RS485 DISPLAY](BMS_JK_RS485_DISPLAY.md)
5) [Victron SmartShunt](Shunt_Victron_SmartShunt.md)
+59 -60
View File
@@ -8,10 +8,13 @@
## Supported BMS
* All `JK-B` BMS models with software version `>=6.0`, see [esphome-jk-bms](https://github.com/syssi/esphome-jk-bms)
* `JK-PB` BMS, see [esphome-jk-bms](https://github.com/txubelaxu/esphome-jk-bms/)
* `JBD` BMS, see [esphome-jbd-bms](https://github.com/syssi/esphome-jbd-bms)
* `Seplos V1 V2` BMS, see [esphome-seplos-bms](https://github.com/syssi/esphome-seplos-bms)
* `JK` BMS (BLE / UART / RS485)
* `JBD` BMS (BLE / UART)
* `Seplos V1 V2 V3` BMS (RS485)
* `PACE` BMS (RS485)
* `BASEN` BMS (RS485)
* `DEYE` BMS (CAN)
* `Ecoworthy` BMS (RS485)
**Note: other BMS brands already integrated with ESPhome can be added easily.**
@@ -19,33 +22,40 @@
* `Victron Smartshunt` (UART)
* `Victron Smartshunt` (BLE)
* `Junctek KH-F` (UART/RS485)
* `Junctek KH-F` (UART / RS485)
**Note: other Shunt brands already integrated with ESPhome can be added easily.**
## Supported ESP32
## Supported balancers
**Recommended: AtomS3 or ESP32-S3**
* `GW-24S4EB: NEEY/Heltec 4A Smart Active Balancer)` (BLE)
* `GW-24S4EB: NEEY 4A Smart Active Balancer 4th generation)` (BLE)
* `EK-24S15EB: (NEEY 15A Smart Active Balancer)` (BLE)
* `EK-24S10EB: (NEEY 10A Smart Active Balancer)` (BLE)
* [M5Stack AtomS3 dedicated documentation](Supported_devices_M5Stack_AtomS3.md)
* [PVbrain2 with ESP32-S3](https://github.com/SeByDocKy/pvbrain2) (up to 11 BMS monitored with `UART`)
* [Build your own PCB with ESP32 or ESP32-S3](Supported_devices_Build_your_own_PCB.md)
**Note: other Balancer brands already integrated with ESPhome can be added easily.**
| [AtomS3 Lite](https://docs.m5stack.com/en/core/AtomS3%20Lite) | [AtomS3](https://docs.m5stack.com/en/core/AtomS3) | [AtomS3R (8MB PSRAM)](https://docs.m5stack.com/en/core/AtomS3R) |
## Supported MCU
This project works with various `ESP32` variants and also with the `Raspberry Pi Pico (RP2040)`.
Note that merging data from multiple BMS, balancers and shunts is resource-intensive, so I highly recommend a board based on the `ESP32-S3` with `PSRAM`.
| [AtomS3 Lite](Board_M5Stack_AtomS3.md) | [AtomS3](Board_M5Stack_AtomS3.md) | [AtomS3R (8MB PSRAM)](Board_M5Stack_AtomS3.md) |
| --- | --- | --- |
| <img src="../../images/MCU_AtomS3_Lite.png" width="300"> | <img src="../../images/MCU_AtomS3.png" width="300"> | <img src="../../images/MCU_AtomS3R.png" width="300"> |
| [ESP32 DevKit-V1](https://a.aliexpress.com/_EG12CJ2) | [ESP32-S3 DevKitC-1](https://a.aliexpress.com/_EzFdrw3) | [ESP32-C3 ETH01-EVO](https://a.aliexpress.com/_Ey29fog) |
| [LilyGo T-CAN485 (ESP32)](https://github.com/Xinyuan-LilyGO/T-CAN485) | [LilyGo T-Connect (ESP32-S3)](Board_LilyGo_T-Connect.md) | [Waveshare ESP32-S3-RS485-CAN](Board_Waveshare_ESP32-S3-RS485-CAN.md) |
| --- | --- | --- |
| <img src="../../images/MCU_ESP32_LilyGo-T-CAN485.jpg" width="300"> | <img src="../../images/MCU_ESP32-S3_LilyGo-T-Connect_1.jpg" width="300"> | <img src="../../images/MCU_ESP32-S3_WS-RS485-CAN_1.png" width="300"> |
| [ESP32 DevKit-V1](Board_Build_your_own_PCB.md) | [ESP32-S3 DevKitC-1](Board_Build_your_own_PCB.md) | [ESP32-C3 ETH01-EVO](https://a.aliexpress.com/_Ey29fog) |
| --- | --- | --- |
| <img src="../../images/MCU_ESP32-DevKit-V1.jpg" width="300"> | <img src="../../images/MCU_ESP32-S3-DevKitC-1.png" width="300"> | <img src="../../images/MCU_ESP32-C3_ETH01-EVO.png" width="300"> |
| [espBerry + Waveshare 2-CH CAN HAT](https://copperhilltech.com/esp32-development-board-with-dual-isolated-can-bus-hat/) | [LilyGo T-CAN485 (ESP32)](https://github.com/Xinyuan-LilyGO/T-CAN485) | [LilyGo T-Connect (ESP32-S3)](https://github.com/Xinyuan-LilyGO/T-Connect) |
| --- | --- | --- |
| <img src="../../images/MCU_ESP32-DevKitC_espBerry_2-CH-CAN.png" width="300"> | <img src="../../images/MCU_ESP32_LilyGo-T-CAN485.jpg" width="300"> | <img src="../../images/MCU_ESP32-S3_LilyGo-T-Connect.jpg" width="300"> |
| [Olimex ESP32-EVB](https://github.com/OLIMEX/ESP32-EVB) | [espBerry + Waveshare 2-CH CAN HAT](https://copperhilltech.com/esp32-development-board-with-dual-isolated-can-bus-hat/) |
| --- | --- |
| <img src="../../images/MCU_ESP32-EVB.jpg" width="300">| <img src="../../images/MCU_ESP32-DevKitC_espBerry_2-CH-CAN.png" width="300"> |
| [Olimex ESP32-EVB](https://github.com/OLIMEX/ESP32-EVB) |
| --- |
| <img src="../../images/MCU_ESP32-EVB.jpg" width="300">|
## Supported CAN bus transceiver
**Note: some inverters only accept a CAN bus at 3.3V in this case please choose the SN65HVD230 chip.**
@@ -65,50 +75,39 @@
| <img src="../../images/RS485_Transceiver_M5stack_SKU-U094_RS485_Isolated_Unit.png" width="300"> | <img src="../../images/RS485_Transceiver_isolated_high_speed_dual_board.png" width="300"> | <img src="../../images/RS485_Transceiver_Two-way_Converter.jpg" width="300"> |
## Supported inverter
## Supported inverters
Inverters supporting CAN PYLON/Goodwe/SMA/Victron Low Voltage protocol should work, check your inverter manual to confirm.
The following are confirmed and known to work:
| Brand | Model | Satus | Reported by | Inverter bat. mode | BMS | BMS protocol | ESP32 board | CAN name | CAN protocol | CAN transceiver | RS485 board | Multi-BMS | Remarks |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Deye | SUN-3.6K-SG03LP1-EU | Working | [@Der_Hannes](https://diysolarforum.com/members/der_hannes.16949/) | Lithium 00 | JK-B | UART | ESP32 DevKit V1 | PYLON | PYLON 1.2 | SN65HVD230 **3.3V** | --- | no | --- |
| Deye | SUN-5K-SG03LP1-EU | Working | [@vdiex](https://github.com/vdiex) | Lithium 00 | JK-B | UART | ESP32 DevKit V1 | PYLON | PYLON 1.2 | --- | no | --- |
| Deye | SUN-5K-SG03LP1-EU | Working | [@arzaman](https://github.com/arzaman) | Lithium 00 | JK-B | BLE | Atom S3 | PYLON | PYLON 1.2 | [Atomic CAN base (SKU:A103)](https://docs.m5stack.com/en/atom/Atomic%20CAN%20Base) | --- | no | --- |
| Deye | SUN-5K-SG03LP1-EU (3) | Working | [@widget4145](https://diysolarforum.com/members/widget4145.110784/) | Lithium 00 | JK-PB (7) | RS485 | Atom S3 Lite | PYLON | PYLON 1.2 | [Atomic CAN base (SKU:A103)](https://docs.m5stack.com/en/atom/Atomic%20CAN%20Base) | RS485 (talk pin) | yes | --- |
| Deye | SUN-6K-SG03LP1-EU | Working | [@Sleeper85](https://github.com/Sleeper85) | Lithium 00 | JK-B | UART | ESP32 DevKit V1 | PYLON | PYLON 1.2 | TJA1051T | --- | no | --- |
| Deye | SUN-6K-SG03LP1-EU | Working | [@Imanol82](https://diysolarforum.com/members/imanol82.122457/) | Lithium 00 | JK-PB (2) | RS485 | ETH01-EVO POE | PYLON | PYLON 1.2 | SN65HVD230 | [Isolated RS485 (high speed dual)](https://a.aliexpress.com/_EueIZT5) | yes | ESP32 wired without WiFi, all ok. |
| Deye | SUN-12K-SG04LP3-EU | Working | [@lucize](https://github.com/lucize) | Lithium 00 | JK-B | UART | ESP32 DevKit V1 | PYLON | PYLON 1.2 | --- | --- | no | --- |
| Deye | SUN-12K-SG04LP3-EU | Working | [@luckylinux](https://github.com/luckylinux) | Lithium 00 | JK-B | BLE | Atom S3 Lite | PYLON | PYLON 1.2 | [CANBus Unit (CA-IS3050G)](https://docs.m5stack.com/en/unit/can) | --- | no | --- |
| Deye | SUN-12K-SG04LP3-EU | Working | [@virus100b](https://github.com/virus100b) | Lithium 00 | JK-PB (2) | RS485 | ESP32 DevKit V1 | PYLON | PYLON 1.2 | TJA1050 | --- | yes | --- |
| Deye | SUN-12K-SG04LP3-EU | Working | [@b1ggi](https://diysolarforum.com/members/b1ggi.120910/) | Lithium 00 | JK-PB (2) | BLE | Atom S3 Lite | PYLON | PYLON 1.2 | [Atomic CAN base (SKU:A103)](https://docs.m5stack.com/en/atom/Atomic%20CAN%20Base) | --- | yes | Used for Inverter Offset Setting 0.5v because of Deye bug |
| Goodwe | 3648-ES (GW5048-ES) | Working | [@jirdol](https://github.com/jirdol) | --- | JK-B | UART | ESP32 DevKit V1 | GOODWE | PYLON + | --- | --- | no | --- |
| Goodwe | GW5000S-BP | Working | [@Uksa007](https://github.com/Uksa007) | Goodwe LX U5.4-L | JK-B | UART | ESP32 DevKit V1 | GOODWE | PYLON + | --- | --- | no | --- |
| Goodwe | GW5000S-BP & GW3600S-BP | Working | [@OselDusan7](https://github.com/OselDusan7) | --- | JK-B | UART | ESP32 DevKit V1 | GOODWE | PYLON + | --- | --- | no | --- |
| Sofar | ME 3000-SP | Working | [@starman](https://diysolarforum.com/members/starman.65151/) | --- | JK-B | UART | ESP32 DevKit V1 | --- | --- | --- | --- | no | --- |
| Sofar | HYD 5000-ES | Working | [@Paulfrench35](https://diysolarforum.com/members/paulfrench35.78523/) | --- | JK-B | UART | ESP32 DevKit V1 | --- | --- | --- | --- | no | --- |
| Sofar | HYD 5000-EP | Working | [@tonystrullu](https://diysolarforum.com/members/tonystrullu.91283/) | --- | JK-B | UART | ESP32 DevKit V1 | --- | --- | --- | --- | no | --- |
| Sofar | HYD 3600-ES | Working | [@chaosnature](https://diysolarforum.com/members/chaosnature.64395/) | Automatic | JK-PB (2) | BLE | Atom S3 (display) | PYLON | PYLON 1.2 | [Atomic CAN base (SKU:A103)](https://docs.m5stack.com/en/atom/Atomic%20CAN%20Base) | --- | yes | DIY Li-ion Growatt GBLI5001 converted. A 120 Ohm resistor had to be added on the Sofar side. Prefared over original BMS Manufacture's Management System. |
| Growatt | SPF 5000ES | Working | [@Paulfrench35](https://diysolarforum.com/members/paulfrench35.78523/) | CAN L52 | JK-B | UART | ESP32 DevKit V1 | PYLON | PYLON 1.2 | --- | --- | no | --- |
| Growatt | SPF 5000ES | Working | [@cjdell](https://github.com/cjdell) | CAN L52 | JK-B | UART | ESP32 DevKit V1 | PYLON | PYLON 1.2 | --- | no | --- |
| Growatt | SPF 5000ES | Working | [@cinusik](https://diysolarforum.com/members/cinusik.109738/) | CAN L52 | JK-PB (2) | BLE | Atom S3 (display) | PYLON | PYLON 1.2 | [Isolated CAN Unit (SKU:U085)](https://docs.m5stack.com/en/unit/can) | [Atomic RS485 Base (SKU:A131)](https://docs.m5stack.com/en/atom/Atomic%20RS485%20Base) | yes | Best solution for the incomplete/wrong protocols implementation on JK Inverter BMSes and some inverters. |
| Solis | RHI-3.6K-48ES-5G | Working | [@cjdell](https://github.com/cjdell) | Pylon LV | JK-B | UART | ESP32 DevKit V1 | PYLON | PYLON + | SN65HVD230 **3.3V** | --- | no | --- |
| Solis | S5-EH1P4.6K-L | Working | [@Baker0052](https://github.com/Baker0052) | Pylon LV | JK-B | UART | ESP32 DevKit V1 | PYLON | PYLON + | SN65HVD230 **3.3V** | --- | no | --- |
| Solis | S5-EH1P6K-L | Working | [@MrPabloUK](https://github.com/MrPabloUK) | AoBo | JK-B | UART | ESP32 DevKit V1 | SMA | SMA | [Adafruit CAN Pal](https://learn.adafruit.com/adafruit-can-pal/overview) | --- | no | --- |
| Solis | RHI-3.6K-48ES-5G | Working | [@MrPabloUK](https://github.com/MrPabloUK) | AoBo | JK-B | UART | ESP32 DevKit V1 | SMA | SMA | [Adafruit CAN Pal](https://learn.adafruit.com/adafruit-can-pal/overview) | --- | no | --- |
| Solis | RHI-3K-48ES | Working | [@chaosnature](https://diysolarforum.com/members/chaosnature.64395/) | AoBo | JK-B (2) | BLE | Atom S3 Lite | SMA | SMA | [Atomic CAN base (SKU:A103)](https://docs.m5stack.com/en/atom/Atomic%20CAN%20Base) | --- | yes | DIY Li-ion Growatt GBLI5001 converted. |
| LuxPower | LXP SNA 5K | Working | [@shvmm](https://github.com/shvmm) | Lithium 6 | JK-B | UART | ESP32 DevKit V1 | Automatic | LuxPower| SN65HVD230 / TJA1050 | --- | no | --- |
| LuxPower | LXP SNA 5K | Working | [@yur43](https://diysolarforum.com/members/yur43.121157/) | Lithium 6 | JK-PB (1) | RS485 | ESP32 DevKit V1 | Automatic | LuxPower | SN65HVD230 | [Isolated RS485 (high speed dual)](https://a.aliexpress.com/_EueIZT5) | no | --- |
| LuxPower | LXP-LB-US 10K | Working | [@Henny101](https://diysolarforum.com/members/henny101.67026/) | Lithium 6 | JK-PB (2) | RS485 | ESP32-S3 DevKitC-1 | Automatic | LuxPower | SN65HVD230 | [Isolated RS485 (high speed dual)](https://a.aliexpress.com/_EueIZT5) | yes | --- |
| EG4 | 6000XP | Working | [@ChrisG](https://diysolarforum.com/members/chrisg.483/) | Lithium 2 | JK-B (2) | BLE | ESP32 DevKit V1 / ESP32-S3 DevKitC-1 | PYLON | PYLON 1.2 | MCP2515 | --- | yes | --- |
| EG4 | 6000XP (2) | Working | [@SGB](https://diysolarforum.com/members/scrotpusgobblebottom.100804/) | Lithium 6 | JK-B (1) JK-PB (1) | BLE | Atom S3 (display) | Automatic | LuxPower | [Atomic CAN base (SKU:A103)](https://docs.m5stack.com/en/atom/Atomic%20CAN%20Base) | --- | yes | --- |
| EG4 | 12000XP | Working | [@andrewfraley](https://github.com/andrewfraley) | Lithium 6 | JBD | RS485 | LilyGo T-CAN485 | Automatic | LuxPower | T-CAN485 (SN65HVD231DR) | T-CAN485 (MAX13487E) | no | set UART baud to 9600 |
| EG4 | 18kPV | Working | [@Maintman](https://diysolarforum.com/members/maintman.19007/) | Lithium 6 | JK-B | BLE | ESP32 DevKit V1 | Automatic | LuxPower | MCP2515 | --- | yes | Connected via Bluetooth to Victron SmartShunt. |
| Victron | MultiPlus-II 48/10000/140 | Working | [@cali-clim](https://diysolarforum.com/members/cali-clim.54284/) | CAN-bus BMS LV (500 kbit/s) | JK-PB (2) | RS485 | Atom S3 (display) | Automatic | Victron | [Atomic CAN base (SKU:A103)](https://docs.m5stack.com/en/atom/Atomic%20CAN%20Base) | [Isolated RS485 Unit (SKU:U094)](https://docs.m5stack.com/en/unit/iso485) | yes | --- |
| Victron | MultiPlus-II 48/10000/140 | Working | [@20after4](https://github.com/20after4) | CAN-bus BMS LV (500 kbit/s) | JBD-BMS (2) | BLE | Olimex ESP32-EVB | Automatic | Victron | SIT1050T (Integrated) | --- | yes | Works well with the integrated Ethernet and CANBus hardware |
| Victron | Multiplus 24/1200/25-16 | Working | [@dmsims](https://diysolarforum.com/members/dmsims.23417/) | CAN-bus BMS LV (500 kbit/s) | JK-B (1) | BLE | Atom S3 Lite | Automatic | Victron | [Atomic CAN base (SKU:A103)](https://docs.m5stack.com/en/atom/Atomic%20CAN%20Base) | --- | no | Plugged into Cerbo Can port (must use supplied Victron terminator in the other port) |
| MidNite Solar | MN15-12KW-AIO | Working | [@goldserve](https://diysolarforum.com/members/goldserve.52541/) | PYLON | JK-B | BLE | ESP32-S3 | Automatic | PYLON 1.2 | MCP2515 | --- | no | Stable with Victron Smartshunt, MQTT, BLE, Neopixel LED, Display also working. |
| MidNite Solar | MN15-12KW-AIO | Working | [@jahyde](https://diysolarforum.com/members/jahyde.7475/) | PYLON | JK-PB | BLE | ESP32-S3 | Automatic | PYLON 1.2 | MCP2515 | --- | yes | --- |
| SMA | Sunny Island | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| SRNE | HESP48120U200-H | Working | [@ogremustcrush](https://diysolarforum.com/members/ogremustcrush.116979/) | UZE | JK-PB | RS485 | Atom S3 Lite | Automtic | PYLON V2 | [Atomic CAN Base (SKU:A103)](https://docs.m5stack.com/en/atom/Atomic%20CAN%20Base) | [Isolated RS485 Unit (SKU:U094)](https://docs.m5stack.com/en/unit/iso485) | Yes | Most of the YamBMS PYLON based protocols show same results on inverter. Inverter itself does not work when it is set to PYLON protocol, but UZE works. Incorrect temp reported on inverter |
| Brand | Model | Inverter bat. mode | CAN/RS485 protocol | Remarks | Reported by |
| --- | --- | --- | --- | --- | --- |
| Deye | SUN-3.6K-SG03LP1-EU | Lithium 00 | CAN : PYLON 1.2 | --- | [@Der_Hannes](https://diysolarforum.com/members/der_hannes.16949/) |
| Deye | SUN-5K-SG03LP1-EU | Lithium 00 | CAN : PYLON 1.2 | --- | [@vdiex](https://github.com/vdiex), [@arzaman](https://github.com/arzaman), [@widget4145](https://diysolarforum.com/members/widget4145.110784/) |
| Deye | SUN-6K-SG03LP1-EU | Lithium 00 | CAN : PYLON 1.2 | --- | [@Sleeper85](https://github.com/Sleeper85), [@Imanol82](https://diysolarforum.com/members/imanol82.122457/) |
| Deye | SUN-12K-SG04LP3-EU | Lithium 00 | CAN : PYLON 1.2 | --- | [@lucize](https://github.com/lucize), [@luckylinux](https://github.com/luckylinux), [@virus100b](https://github.com/virus100b), [@b1ggi](https://diysolarforum.com/members/b1ggi.120910/) |
| Goodwe | GW5048-ES | --- | CAN : PYLON V2 | --- | [@jirdol](https://github.com/jirdol) |
| Goodwe | GW5000S-BP | Goodwe LX U5.4-L | CAN : PYLON V2 | --- | [@Uksa007](https://github.com/Uksa007), [@OselDusan7](https://github.com/OselDusan7) |
| Goodwe | GW3600S-BP | --- | CAN : PYLON V2 | --- | [@OselDusan7](https://github.com/OselDusan7) |
| Sofar | ME 3000-SP | --- | --- | --- | [@starman](https://diysolarforum.com/members/starman.65151/) |
| Sofar | HYD 3600-ES | Automatic | CAN : PYLON 1.2 | A 120 Ohm resistor had to be added on the Sofar side. | [@chaosnature](https://diysolarforum.com/members/chaosnature.64395/) |
| Sofar | HYD 5000-ES | --- | --- | --- | [@Paulfrench35](https://diysolarforum.com/members/paulfrench35.78523/) |
| Sofar | HYD 5000-EP | --- | --- | --- | [@tonystrullu](https://diysolarforum.com/members/tonystrullu.91283/) |
| Growatt | SPF 5000ES | CAN L52 | CAN : PYLON 1.2 | --- | [@Paulfrench35](https://diysolarforum.com/members/paulfrench35.78523/), [@cjdell](https://github.com/cjdell), [@cinusik](https://diysolarforum.com/members/cinusik.109738/) |
| Solis | RHI-3.6K-48ES-5G | Pylon LV / AoBo | CAN : PYLON V2 / SMA | CAN transceiver 3V3 required (SN65HVD230) for Pylon LV mode. | [@cjdell](https://github.com/cjdell), [@MrPabloUK](https://github.com/MrPabloUK) |
| Solis | S5-EH1P4.6K-L | Pylon LV | CAN : PYLON V2 | CAN transceiver 3V3 required (SN65HVD230). | [@Baker0052](https://github.com/Baker0052) |
| Solis | S5-EH1P6K-L | AoBo | CAN : SMA | --- | [@MrPabloUK](https://github.com/MrPabloUK) |
| Solis | RHI-3K-48ES | AoBo | CAN : SMA | --- | [@chaosnature](https://diysolarforum.com/members/chaosnature.64395/) |
| LuxPower | LXP SNA 5K | Lithium 6 | CAN : LuxPower | --- | [@shvmm](https://github.com/shvmm), [@yur43](https://diysolarforum.com/members/yur43.121157/) |
| LuxPower | LXP-LB-US 10K | Lithium 6 | CAN : LuxPower | --- | [@Henny101](https://diysolarforum.com/members/henny101.67026/) |
| EG4 | 6000XP | Lithium 2 / Lithium 6 | CAN : PYLON 1.2 / LuxPower | --- | [@ChrisG](https://diysolarforum.com/members/chrisg.483/), [@SGB](https://diysolarforum.com/members/scrotpusgobblebottom.100804/) |
| EG4 | 12000XP | Lithium 6 | CAN : LuxPower | --- | [@andrewfraley](https://github.com/andrewfraley) |
| EG4 | 18kPV | Lithium 6 | CAN : LuxPower | --- | [@Maintman](https://diysolarforum.com/members/maintman.19007/) |
| Victron | Multiplus 24/1200/25-16 | CAN-bus BMS LV (500 kbit/s) | CAN : Victron | Plugged into Cerbo CAN port (must use supplied Victron terminator in the other port). | [@dmsims](https://diysolarforum.com/members/dmsims.23417/) |
| Victron | MultiPlus-II 48/10000/140 | CAN-bus BMS LV (500 kbit/s) | CAN : Victron | --- | [@cali-clim](https://diysolarforum.com/members/cali-clim.54284/), [@20after4](https://github.com/20after4) |
| MidNite Solar | MN15-12KW-AIO | PYLON | CAN : PYLON 1.2 | --- | [@goldserve](https://diysolarforum.com/members/goldserve.52541/), [@jahyde](https://diysolarforum.com/members/jahyde.7475/) |
| SRNE | HESP48120U200-H | UZE | CAN : PYLON V2 | Most PYLON-based protocols show same results. Inverter does not work in PYLON mode, UZE works. Incorrect temp reported. | [@ogremustcrush](https://diysolarforum.com/members/ogremustcrush.116979/) |
| Studer | XTM-4000 | Pylontech | CAN : PYLON V2 | DIP Switch in Xcom-CAN: 11000110 (1 to 8, ON==1). | [@kolins-cz](https://github.com/kolins-cz) |
| Schneider | XW Pro 6848 NA | Voltage Control Li-Ion | CAN : PYLON V2 | Requires enabling the CAN bus option `canbus_extended_ack:` to `true`. | [@AGDorsum](https://diysolarforum.com/members/agdorsum.29403/), [@ngustas](https://diysolarforum.com/members/ngustas.126045/) |
| SMA | Sunny Island | --- | --- | --- | --- |
@@ -1,56 +0,0 @@
# YamBMS - M5Stack AtomS3, the Plug & Play solution (no welding)
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
> [!IMPORTANT]
> AtomS3 provides very few GPIOs.
> This solution is not the best for supervising a large number of `JK-B BMS` via `UART` but it works very well for supervising a large number of `JK-PB BMS` via `RS485`.
> [!TIP]
> If you have `JK-PB BMS` (inverter BMS) and want to monitor them via `RS485`, please read the [BMS JK-PB RS485](BMS_JK-PB_RS485_solution.md) dedicated topic.
## Number of BMS supported
* 3x BMS with `Bluetooth` (BLE stack consumes significant amount of RAM on device and can cause crash and reboot)
* 2x `JK-B` BMS with `UART/RS485` (the second UART must be soldered on the Atomic CAN base on GPIOs G7 and G8)
* several `JK-PB` BMS with `RS485` (already tested with 7 BMS)
Note: these are theoretical limits, not all combinations have been tested.
## List of M5Stack components that can be used depending on needs
> [!TIP]
> Choose an `AtomS3` to clip onto the `Atomic CAN Base`.
> Feel free to ask your question on the [DIY solar forum](https://diysolarforum.com/threads/yambms-jk-bms-can-with-new-cut-off-charging-logic-open-source.79325/) if you don't know what to choose.
- [AtomS3 Lite - SKU:C124](https://docs.m5stack.com/en/core/AtomS3%20Lite)
- [AtomS3 - SKU:C123](https://docs.m5stack.com/en/core/AtomS3)
- [AtomS3R - SKU:C126 (8MB PSRAM)](https://docs.m5stack.com/en/core/AtomS3R)
- [Atomic CAN Base - SKU:A103 (recommended)](https://docs.m5stack.com/en/atom/Atomic%20CAN%20Base)
- [CAN Unit - SKU:U085](https://docs.m5stack.com/en/unit/can)
- [RS485 Unit - SKU:U094](https://docs.m5stack.com/en/unit/iso485)
| [AtomS3 Lite](https://docs.m5stack.com/en/core/AtomS3%20Lite) | [AtomS3](https://docs.m5stack.com/en/core/AtomS3) | [AtomS3R (8MB PSRAM)](https://docs.m5stack.com/en/core/AtomS3R) |
| --- | --- | --- |
| <img src="../../images/MCU_AtomS3_Lite.png" width="300"> | <img src="../../images/MCU_AtomS3.png" width="300"> | <img src="../../images/MCU_AtomS3R.png" width="300"> |
| [Atomic CAN Base (isolated)](https://docs.m5stack.com/en/atom/Atomic%20CAN%20Base) | [CAN Unit (isolated)](https://docs.m5stack.com/en/unit/can) | [RS485 Unit (isolated)](https://docs.m5stack.com/en/unit/iso485) |
| --- | --- | --- |
| <img src="../../images/CAN_Transceiver_M5Stack_Atomic_CAN_Base.png" width="300"> | <img src="../../images/CAN_Transceiver_M5Stack_CAN_Unit.png" width="300"> | <img src="../../images/RS485_Transceiver_M5stack_SKU-U094_RS485_Isolated_Unit.png" width="300"> |
## Note regarding the sensors managing the display backlight (ili9xxx platform)
* **Backlight control** : manual brightness control
* **Backlight max level** : limit the max brightness in general
* **Backlight Autodim level** : the desired brightness when dimmed down (set to 0 to switch off screen completely instead of dimming down)
* **Backlight Autodim time in min** : time in minutes, after the screen will dim down (set to 0 to disable Auto dimming)
Device will restore last screen brightness after boot, but the timer script does not get start automatically.
The auto dim timer gets initially started by pressing the screen button (which bumps up the brightness to 100% until the timer dims down then).
That seems to be the easiest and lightweight solution.
But i guess some user could be confused and expect from the device to react immediately after changing some parameters.
+8
View File
@@ -43,3 +43,11 @@ By default an ESP32 has `3 UARTs`, one of which is used for the logger output. T
logger:
baud_rate: 0
```
### Logs commands examples
```
esphome logs YamBMS.yaml --device /dev/ttyUSB0 | grep -E 'yambms_debug:|Restarting device'
esphome logs YamBMS.yaml --device /dev/ttyUSB0 | grep '0x351 hex:'
esphome logs YamBMS.yaml --device /dev/ttyUSB0 | grep -E '0x351 hex:|0x356 hex:'
```
@@ -1,4 +1,4 @@
# YamBMS - How to create your YamBMS YAML (Local Packages examples)
# YamBMS - How to create your YamBMS Local Packages YAML
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
@@ -7,9 +7,11 @@
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
> [!TIP]
> Not sure which YAML to choose ? ... `YamBMS_Remote_Packages_example.yaml` is a good basis for creating your custom YAML.
> Examples of BMS imports can be found in the [configuration_examples](configuration_examples/) folder.
> You can mix different BMS models, the only condition is that they are numbered in order starting from `1`.
> Not sure which YAML to choose ? ... [YamBMS_Remote_Packages_example.yaml](../../YamBMS_Remote_Packages_example.yaml)
> is a good basis for creating your custom YAML.
> Examples of `BMS` and `Shunt` packages can be found in the [examples](../../examples/single-node/) folder.
> You don't have to import a shunt but you must import at least `one BMS`.
> You can mix different `BMS` models, the only condition is that the `bms_id` are numbered in order starting from `1` !
> [!IMPORTANT]
> BMS monitoring with `Bluetooth` as well as the `Web server` are RAM-intensive components.
@@ -72,7 +74,7 @@ If you don't use `Home Assistant`, you can activate the `Web Server` and have ac
[ESPHome Web Server Component](https://esphome.io/components/web_server.html)
## Importing YamBMS packages
## Importing YamBMS Local Packages
Package imports are done below this line:
@@ -103,7 +105,13 @@ So just one of the packages below :
### ESP32-S3 DevKitC-1
```YAML
device_board: !include packages/board/board_ESP32-S3_DevKitC-1.yaml
# RGB LED to GPIO 38
device_board: !include packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml
```
```YAML
# RGB LED to GPIO 48
device_board: !include packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml
```
### Atom S3 Lite
@@ -149,12 +157,24 @@ This board has an `Ethernet` port and can be powered from `POE` (optional).
```YAML
device_board: !include packages/board/board_ESP32_LilyGo-T-CAN485.yaml
```
> [!NOTE]
> The device has an integrated 120 Ohm termination resistor. If used as a node in the middle, this resistor must be removed. ![Image](../../images/MCU_ESP32_LilyGo-T-CAN485_resistors.jpg)
### ESP32-S3 LilyGo T-Connect
```YAML
device_board: !include packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml
```
> [!NOTE]
> The device has an integrated 120 Ohm termination resistor. If used as a node in the middle, this resistor must be removed.
### ESP32-S3 LilyGo T-Connect Pro
```YAML
device_board: !include packages/board/board_ESP32-S3_LilyGo-T-Connect-Pro.yaml
```
> [!NOTE]
> The device has an integrated 120 Ohm termination resistor. If used as a node in the middle, this resistor must be removed.
## YamBMS single-node example
@@ -182,6 +202,13 @@ This board has an `Ethernet` port and can be powered from `POE` (optional).
bms_name: 'BMS 2'
# other settings
# ...
balancer1: !include
file: packages/balancer/balancer_sensors_JK_NEEY_BLE.yaml
vars:
bms_id: '1' # must match the BMS ID
balancer_name: 'Balancer 1'
balancer_ble_mac_address: 11:22:33:44:55:66
```
## YamBMS multi-node RS485 modbus example
@@ -247,6 +274,13 @@ This board has an `Ethernet` port and can be powered from `POE` (optional).
bms_name: 'BMS 1'
# other settings
# ...
balancer1: !include
file: packages/balancer/balancer_sensors_JK_NEEY_BLE.yaml
vars:
bms_id: '1' # must match the BMS ID
balancer_name: 'Balancer 1'
balancer_ble_mac_address: 11:22:33:44:55:66
```
### ESP32 modbus server `node3`
@@ -289,219 +323,7 @@ There are other `bms.yaml` not mentioned here, see in the [bms](../../packages/b
The `full` / `standard` versions contain all available sensors while the `minimal` version contains the basic sensors without the voltages of each cell and other superfluous sensors.
### [JK-BMS (BLE)](https://github.com/syssi/esphome-jk-bms)
> [!IMPORTANT]
> The BLE software stack on the ESP32 consumes a significant amount of RAM on the device.
> Crashes are likely to occur if you include too many additional components in your device’s configuration.
> I recommend using `UART` or `RS485` if possible.
```YAML
bms1: !include
file: packages/bms/bms_combine_JK_BLE_standard.yaml # bms_modbus_JK_BLE_standard.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_ble_protocol_version: 'JK02_32S' # JK02_24S < hardware version 11.0 >= JK02_32S
bms_ble_mac_address: 'C8:47:8C:10:7E:AA' # Your MAC address
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
```
### [JK-BMS (UART 4G-GPS)](https://github.com/syssi/esphome-jk-bms)
[How to make the UART connection with the ESP32.](BMS_JK-B_UART_solution.md)
```YAML
bms1: !include
file: packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml # bms_modbus_JK_UART_4G-GPS_full.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_uart_id: 'uart_esp_1'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
```
### [JK-BMS (RS485 DISPLAY)](https://github.com/syssi/esphome-jk-bms)
> [!CAUTION]
> The `jk_bms_display` component does not provide all the information needed for an optimal operation of `YamBMS`.
> The missing information has been added in the code by fixed values.
> e.g. it's not possible to know if the BMS is `online` or if the BMS is `equalizing` the cells.
[How to make the RS485 connection with the ESP32.](BMS_JK-B_RS485_DISPLAY_solution.md)
```YAML
bms1: !include
file: packages/bms/bms_combine_JK_RS485_DISPLAY_full.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_uart_id: 'uart_esp_1'
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
# LFP values example
bms_battery_capacity: '280' # Ah
bms_max_charge_current: '100' # A. Used to calculate maximum charge current
bms_max_discharge_current: '100' # A. Used to calculate maximum discharge current
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
```
### [JK-BMS (RS485 Modbus)](https://github.com/txubelaxu/esphome-jk-bms/)
> [!TIP]
> Compatible with JK-PB, JK-B HW. >= 11A
A single `RS485 bus` allows you to monitor up to `16` BMS.
[How to make the RS485 connection with the ESP32.](BMS_JK-PB_RS485_solution.md)
#### JK sniffer
> [!IMPORTANT]
> You need to import only one `sniffer` package of your choice.
> Depending on which `RS485` board you have, you should use the version of the `sniffer` with or without `talk_pin`.
The sniffer represents the ESP node connected to the JK-PB RS485 bus
If address `0x00` is not detected on the RS485 bus, the sniffer will act directly as a master BMS (mode 2, max 15 BMS).
Sniffer without `talk_pin` :
```YAML
sniffer1: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_sniffer.yaml
vars:
sniffer_id: 'sniffer1'
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_1'
```
If your `RS485` board requires a `talk_pin` you must specify which `GPIO` will be used :
```YAML
sniffer1: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_sniffer_talk_pin.yaml
vars:
sniffer_id: 'sniffer1'
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_1'
sniffer_talk_pin: 8 # ESP32: 4, ESP32-S3: 8, ESP32-C3: 10
```
#### JK-BMS (JK-PB, JK-B HW. >= 11A)
```YAML
# Mode2 : configure the DIP switches of your BMS from 0x01 to 0x0F (don't use the 0x00 address, maximum 15 BMS)
bms1: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_full.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_address: '0x01' # BMS 1 DIP switch
```
### [JBD (UART)](https://github.com/syssi/esphome-jbd-bms)
```YAML
bms1: !include
file: packages/bms/bms_combine_JBD_UART_full.yaml # bms_modbus_JBD_UART_full.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_uart_id: 'uart_esp_1'
bms_rx_timeout: '150ms'
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
# LFP values example
bms_max_charge_current: '100' # A. Used to calculate maximum charge current
bms_max_discharge_current: '100' # A. Used to calculate maximum discharge current
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
```
### [JBD (BLE)](https://github.com/syssi/esphome-jbd-bms)
```YAML
bms1: !include
file: packages/bms/bms_combine_JBD_BLE_full.yaml # bms_modbus_JBD_UART_full.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_ble_mac_address: 'C8:47:8C:10:7E:AA' # Your MAC address
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
# LFP values example
bms_max_charge_current: '100' # A. Used to calculate maximum charge current
bms_max_discharge_current: '100' # A. Used to calculate maximum discharge current
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
```
### [Seplos V1/V2 (RS485)](https://github.com/syssi/esphome-seplos-bms)
A single `RS485 bus` allows you to monitor up to `16` BMS.
> [!CAUTION]
> The `seplos_bms` component does not provide all the information needed for an optimal operation of `YamBMS`.
> The missing information has been added in the code by fixed values.
> e.g. it's not possible to know if the BMS **blocks** the `charge` or the `discharge` or if the BMS is `equalizing` the cells.
> The `online` status has not been tested.
> [!IMPORTANT]
> You need to import only one `seplos_modbus`.
#### Seplos modbus
```YAML
seplos_modbus1: !include
file: packages/bms/bms_combine_SEPLOS_V1_V2_RS485_modbus.yaml
vars:
seplos_modbus_id: 'seplos_modbus1'
seplos_modbus_uart_id: 'uart_esp_1'
seplos_modbus_baud_rate: '9600' # 9600 / 19200 ; please set the baudrate of your Seplos BMS model here
seplos_modbus_rx_timeout: '150ms'
```
#### Seplos V1/V2 BMS
```YAML
bms1: !include
file: packages/bms/bms_combine_SEPLOS_V1_V2_RS485_bms_full.yaml
vars:
# Seplos modbus ID
seplos_modbus_id: 'seplos_modbus1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_address: '0x01' # BMS 1 DIP switch
bms_protocol_version: '0x20' # Known protocol versions: 0x20 (Seplos), 0x26 (Boqiang)
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
# LFP values example
bms_max_charge_current: '100' # A. Used to calculate maximum charge current
bms_max_discharge_current: '100' # A. Used to calculate maximum discharge current
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
```
You can find `BMS` import `LP` examples in the [examples/single-node](../../examples/single-node/) folder.
## Shunt
@@ -513,49 +335,14 @@ A single `RS485 bus` allows you to monitor up to `16` BMS.
As soon as you import a `Shunt` and it can be combined ([see condition](YamBMS_behavior.md#shunt)) the values ​​`Voltage`, `Current`, `Power` and `SoC` of the shunt(s) will take precedence over the BMS values.
You can find `Shunt` import `LP` examples in the [examples/single-node](../../examples/single-node/) folder.
### [Victron Smartshunt (UART)](https://github.com/KinDR007/VictronMPPT-ESPHOME)
[How to make the UART connection with the ESP32.](Shunt_Victron_SmartShunt_HowTo.md)
```YAML
shunt1: !include
file: packages/shunt/shunt_combine_Victron_SmartShunt_UART.yaml # shunt_modbus_Victron_SmartShunt_UART.yaml
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_uart_id: 'uart_esp_1'
```
### [Victron Smartshunt (BLE)](https://github.com/Fabian-Schmidt/esphome-victron_ble)
## Balancer
> [!IMPORTANT]
> The BLE software stack on the ESP32 consumes a significant amount of RAM on the device.
> Crashes are likely to occur if you include too many additional components in your device’s configuration.
> I recommend using `UART` or `RS485` if possible.
> You must number your `Balancer` with the same number as the `BMS` it is connected to.
[How to make the BLE connection with the ESP32.](Shunt_Victron_SmartShunt_HowTo.md)
```YAML
shunt1: !include
file: packages/shunt/shunt_combine_Victron_SmartShunt_BLE.yaml # shunt_modbus_Victron_SmartShunt_BLE.yaml
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_mac_address: '60:A4:23:91:8F:55' # Your MAC address
shunt_encryption_key: '0df4d0395b7d1a876c0c33ecb9e70dcd' # Your encryption key
```
### [Junctek KH-F (UART/RS485)](https://github.com/Sleeper85/esphome-junctek_khf)
```YAML
shunt1: !include
file: packages/shunt/shunt_combine_Junctek_KHF_UART.yaml # shunt_modbus_Junctek_KHF_UART.yaml
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_uart_id: 'uart_esp_1'
```
As soon as the balancer is available/online the values ​​`equalizing` and `balance trigger voltage` of the balancers(s) will take precedence over the BMS values.
## YamBMS
@@ -572,6 +359,8 @@ Take the time to configure `YamBMS` correctly according to your battery chemistr
file: packages/yambms/yambms.yaml
vars:
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: 'yambms1'
yambms_name: 'YamBMS 1'
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
@@ -593,15 +382,21 @@ Take the time to configure `YamBMS` correctly according to your battery chemistr
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_discharge_current: '300' # in Ampere
```
## CAN bus
## CAN bus to Inverter
> [!TIP]
> This package is only used with the `YamBMS` main node.
> It's possible to use this package multiple times in order to send information on two different CAN bus.
> It's possible to use this package multiple times in order to send information on two different `CAN` bus.
The CAN bus connected to your inverter via the CAN transceiver `canbus_node1`.
You can keep the default configuration and adapt the `canbus` node on which the component must connect.
You can keep the default configuration.
@@ -619,25 +414,35 @@ You can keep the default configuration.
canbus_link_timer: '5s'
```
# RS485 bus to Inverter
> [!TIP]
> This package is only used with the `YamBMS` main node.
> It's possible to use this package multiple times in order to send information on two different `RS485` bus.
The RS485 bus connected to your inverter via the RS485 transceiver `uart_esp_3`.
You can keep the default configuration and adapt the `uart` port on which the component must connect.
```YAML
rs485_pylon: !include
file: packages/yambms/yambms_rs485_pylon.yaml
vars:
rs485_id: 'rs485_1'
rs485_name: 'RS485 1'
rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
rs485_uart_baud_rate: '9600'
rs485_update_timeout: '5s'
```
## Debug
The `debug` package will add useful information to refer to if problems occur.
### ESP32 and AtomS3
```YAML
device_debug: !include
file: packages/base/device_debug_ESP32.yaml
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
```
### ESP32 with PSRAM memory like ESP32-S3 / AtomS3R
```YAML
device_debug: !include
file: packages/base/device_debug_ESP32-S3.yaml
# file: packages/base/device_debug_ESP32_PSRAM.yaml # for ESP32 with PSRAM
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
+472
View File
@@ -0,0 +1,472 @@
# YamBMS - How to create your YamBMS Remote Packages YAML
[![Badge License: GPLv3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Badge Version](https://img.shields.io/github/v/release/Sleeper85/esphome-yambms?include_prereleases&color=yellow&logo=DocuSign&logoColor=white)](https://github.com/Sleeper85/esphome-yambms/releases/latest)
![GitHub stars](https://img.shields.io/github/stars/Sleeper85/esphome-yambms)
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
> [!TIP]
> Not sure which YAML to choose ? ... [YamBMS_Remote_Packages_example.yaml](../../YamBMS_Remote_Packages_example.yaml)
> is a good basis for creating your custom YAML.
> Examples of `BMS` and `Shunt` packages can be found in the [examples](../../examples/single-node/) folder.
> You don't have to import a shunt but you must import at least `one BMS`.
> You can mix different `BMS` models, the only condition is that the `bms_id` are numbered in order starting from `1` !
> [!IMPORTANT]
> BMS monitoring with `Bluetooth` as well as the `Web server` are RAM-intensive components.
> Please note that enabling these components will take up a lot of memory and may decrease the stability of your ESP32.
## WiFi & Ethernet
> [!IMPORTANT]
> By default, if the ESP32 is disconnected from the WiFi network it will reboot `every 15 minutes` to try to resolve the problem.
> The `wifi` or `ethernet` components are found in the [YAML corresponding to the board](../../packages/board/).
Configuring a fixed IP address can be done in the main YAML like this:
### WiFi
> [!IMPORTANT]
> Don't forget to configure your WiFi credentials in the `secrets.yaml` file.
```YAML
wifi:
manual_ip:
static_ip: 192.168.0.85
gateway: 192.168.0.1
subnet: 255.255.255.0
dns1: 8.8.8.8
dns2: 8.8.4.4
```
### Ethernet
```YAML
ethernet:
manual_ip:
static_ip: 192.168.0.85
gateway: 192.168.0.1
subnet: 255.255.255.0
dns1: 8.8.8.8
dns2: 8.8.4.4
```
## Home Assistant API
> [!IMPORTANT]
> If your ESP32 is not connected with Home Assistant it will reboot every 15 minutes.
> This is the normal behavior of ESPHome, this is not a bug to be resolved but a mechanism put in place by the ESPHome team to correct a possible problem with the API connection.
The **"api:"** section is therefore configured by default not to reboot every 15 minutes if `Home Assistant` is not connected.
```YAML
api:
reboot_timeout: 0s
```
## Web Server
> [!IMPORTANT]
> Please note that enabling this component will take up a lot of memory and may decrease stability and be the cause of reboot depending on the capabilities of the board used.
If you don't use `Home Assistant`, you can activate the `Web Server` and have access to YamBMS information and also interact with the application.
[ESPHome Web Server Component](https://esphome.io/components/web_server.html)
## Importing YamBMS Remote Packages
Package imports are done below this line:
```YAML
packages:
```
Each remote package starts with the 5 first lines below.
These lines will not be shown in the examples.
You can import multiple remote packages (3 in this example) without having to repeat the first 5 lines.
```YAML
remote_packages:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: 'your_remote_packages_1.yaml'
- path: 'your_remote_packages_2.yaml'
- path: 'your_remote_packages_3.yaml'
```
## Board
First you need to import the package that corresponds to the `board` you are going to use.
There are other `board.yaml` not mentioned here, see in the [board](../../packages/board/) folder.
So just one of the packages below :
### ESP32 Generic
```YAML
- path: 'packages/board/board_ESP32_Generic.yaml'
```
### ESP32 DevKit-V1
```YAML
- path: 'packages/board/board_ESP32_DevKit-V1.yaml'
```
### ESP32-S3 DevKitC-1
```YAML
# RGB LED to GPIO 38
- path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-38.yaml'
```
```YAML
# RGB LED to GPIO 48
- path: 'packages/board/board_ESP32-S3_DevKitC-1_LED-48.yaml'
```
### Atom S3 Lite
```YAML
- path: 'packages/board/board_ESP32-S3_AtomS3-Lite.yaml'
```
### Atom S3 / S3R (display)
In this case you need to specify the `yambms` and `canbus` IDs to display the information on the screen.
```YAML
- path: 'packages/board/board_ESP32-S3_AtomS3.yaml'
vars:
display_auto_next_page_interval: '5s'
display_rotation: '0' # 0/90/180/270 rotation angle in degrees
```
```YAML
- path: 'packages/board/board_ESP32-S3_AtomS3R.yaml'
vars:
display_auto_next_page_interval: '5s'
display_rotation: '0' # 0/90/180/270 rotation angle in degrees
```
### ESP32-C3 DevKitM-1
```YAML
- path: 'packages/board_ESP32-C3_DevKitM-1.yaml'
```
### ESP32-C3 ETH01-EVO
This board has an `Ethernet` port and can be powered from `POE` (optional).
```YAML
- path: 'packages/board/board_ESP32-C3_ETH01-EVO.yaml'
```
### ESP32 LilyGo T-CAN485
```YAML
- path: 'packages/board/board_ESP32_LilyGo-T-CAN485.yaml'
```
> [!NOTE]
> The device has an integrated 120 Ohm termination resistor. If used as a node in the middle, this resistor must be removed. ![Image](../../images/MCU_ESP32_LilyGo-T-CAN485_resistors.jpg)
### ESP32-S3 LilyGo T-Connect
```YAML
- path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect.yaml'
```
> [!NOTE]
> The device has an integrated 120 Ohm termination resistor. If used as a node in the middle, this resistor must be removed.
### ESP32-S3 LilyGo T-Connect Pro
```YAML
- path: 'packages/board/board_ESP32-S3_LilyGo-T-Connect-Pro.yaml'
```
> [!NOTE]
> The device has an integrated 120 Ohm termination resistor. If used as a node in the middle, this resistor must be removed.
## YamBMS [single-node](../../examples/single-node/) example
```YAML
# Shunt 1
- path: 'packages/shunt/shunt_combine_Victron_SmartShunt_UART.yaml'
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_uart_id: 'uart_esp_1'
# BMS 1
- path: 'packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'BMS 1'
- # other settings
# ...
# BMS 2
- path: 'packages/bms/bms_combine_JBD_BLE_full.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'BMS 2'
# other settings
# ...
# Balancer 1
- path: 'packages/balancer/balancer_sensors_JK_NEEY_BLE.yaml'
vars:
bms_id: '1' # must match the BMS ID
balancer_name: 'Balancer 1'
balancer_ble_mac_address: 11:22:33:44:55:66
```
## YamBMS [multi-node](../../examples/multi-node/) RS485 modbus example
> [!IMPORTANT]
> The BMS/Shunt IDs of the `modbus client` must match exactly with the BMS/Shunt IDs of the `modbus server` as in the example below.
### YamBMS modbus client `node1`
```YAML
# Modbus client
- path: 'packages/base/device_modbus.yaml'
vars:
modbus_role: 'client' # client / server
modbus_uart_id: 'uart_esp_1' # RS485 board
# Shunt 1
- path: 'packages/shunt/shunt_combine_modbus_client.yaml'
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
# BMS 1
- path: 'packages/bms/bms_combine_modbus_client.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'BMS 1'
# BMS 2
- path: 'packages/bms/bms_combine_modbus_client.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'BMS 2'
# BMS 3
- path: 'packages/bms/bms_combine_modbus_client.yaml'
vars:
bms_id: '3' # must be a number
bms_name: 'BMS 3'
```
### ESP32 modbus server `node2`
```YAML
# Modbus server
- path: 'packages/base/device_modbus.yaml'
vars:
modbus_role: 'server' # client / server
modbus_uart_id: 'uart_esp_1' # RS485 board
# Shunt 1
- path: 'packages/shunt/shunt_modbus_Victron_SmartShunt_UART.yaml'
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
# other settings
# ..
# BMS 1
- path: 'packages/bms/bms_modbus_JK_UART_4G-GPS_full.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
# other settings
# ..
# Balancer 1
- path: 'packages/balancer/balancer_sensors_JK_NEEY_BLE.yaml'
vars:
bms_id: '1' # must match the BMS ID
balancer_name: 'Balancer 1'
balancer_ble_mac_address: 11:22:33:44:55:66
```
### ESP32 modbus server `node3`
```YAML
# Modbus server
- path: 'packages/base/device_modbus.yaml'
vars:
modbus_role: 'server' # client / server
modbus_uart_id: 'uart_esp_1' # RS485 board
# BMS 2
- path: 'packages/bms/bms_modbus_JK_BLE_standard.yaml'
vars:
bms_id: '2' # must be a number, also represents the modbus server number !
bms_name: 'JK-BMS 2'
# other settings
# ..
# BMS 3
- path: 'packages/bms/bms_modbus_JK_BLE_standard.yaml'
vars:
bms_id: '3' # must be a number, also represents the modbus server number !
bms_name: 'JK-BMS 3'
# other settings
# ..
```
## BMS
> [!IMPORTANT]
> You must number your `BMS` in order starting with the number `1`.
> [!TIP]
> YAML files whose name starts with `bms_combine` are to be used on the main `YamBMS` node connected to your inverter, those whose name starts with `bms_modbus` are to be used on the other nodes connected to the `RS485` bus.
The example YAMLs are just examples, you can mix different BMS models without problems.
There are other `bms.yaml` not mentioned here, see in the [bms](../../packages/bms/) folder.
The `full` / `standard` versions contain all available sensors while the `minimal` version contains the basic sensors without the voltages of each cell and other superfluous sensors.
You can find `BMS` import `RP` examples in the [examples/single-node](../../examples/single-node/) folder.
## Shunt
> [!IMPORTANT]
> You must number your `Shunt` in order starting with the number `1`.
> [!TIP]
> YAML files whose name starts with `shunt_combine` are to be used on the main `YamBMS` node connected to your inverter, those whose name starts with `shunt_modbus` are to be used on the other nodes connected to the `RS485` bus.
As soon as you import a `Shunt` and it can be combined ([see condition](YamBMS_behavior.md#shunt)) the values ​​`Voltage`, `Current`, `Power` and `SoC` of the shunt(s) will take precedence over the BMS values.
You can find `Shunt` import `RP` examples in the [examples/single-node](../../examples/single-node/) folder.
## Balancer
> [!IMPORTANT]
> You must number your `Balancer` with the same number as the `BMS` it is connected to.
As soon as the balancer is available/online the values ​​`equalizing` and `balance trigger voltage` of the balancers(s) will take precedence over the BMS values.
## YamBMS
> [!TIP]
> This package is only used with the `YamBMS` main node.
> [!CAUTION]
> By default, `YamBMS` is configured with the values ​​for a 16S LFP battery !
Take the time to configure `YamBMS` correctly according to your battery chemistry type `LFP/Li-ion/LTO` and `cell count`. Charging voltages can be changed in the app.
```YAML
yambms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: 'packages/yambms/yambms.yaml'
vars:
# Please read the cut-off charging logic README to understand how the YamBMS works
yambms_id: 'yambms1'
yambms_name: 'YamBMS 1'
yambms_update_interval: '1s'
# Input numbers can be displayed as a slider or an input box, options are 'slider' or 'box'.
yambms_input_number_mode: 'slider'
# Please check and fill in the options below correctly according to your battery chemistry and number of cells in series.
# These parameters are important and used for charging logic.
# Battery Chemistry
yambms_battery_chemistry: '1' # 1-LFP | 2-Li-ion | 3-LTO
# Number of cells in series
yambms_cell_count: '16'
# Bulk / Absorption Voltage : corresponds to the Bulk voltage that will be used to charge the battery. (LFP : 55.2V = 3.45V/Cell for 16S battery)
yambms_bulk_v: '55.2'
# Float Voltage : corresponds to the voltage at which the battery would be maintained at the end of charge. (LFP : 53.6V = 3.35V/Cell for 16S battery)
yambms_float_v: '53.6'
# Rebulk voltage, voltage from which a new Bulk charge can start. (LFP : 52.8V = 3.3V/Cell for 16S battery)
yambms_rebulk_v: '52.8'
# Maximum time in minutes that the cut-off step can last before charging is complete
# If your cells are properly balanced this step ends at the fastest after the `cut-off timer`
# This timer can be deactivated with a switch
yambms_eoc_timer: '30'
# Time in seconds during which the end of charge conditions must be respected (cut-off + cells not equalizing)
yambms_cutoff_timer: '60'
# Max. charge current : corresponds to the maximum charge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_charge_current: '300' # in Ampere
# Max. discharge current : corresponds to the maximum discharge current which may be requested by YamBMS.
# The current requested will be proportional to the BMS count without ever exceeding this value.
yambms_max_requested_discharge_current: '300' # in Ampere
```
## CAN bus to Inverter
> [!TIP]
> This package is only used with the `YamBMS` main node.
> It's possible to use this package multiple times in order to send information on two different `CAN` bus.
The CAN bus connected to your inverter via the CAN transceiver `canbus_inverter_1`.
You can keep the default configuration and adapt the `canbus` node on which the component must connect.
```YAML
canbus:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: 'packages/yambms/yambms_canbus.yaml'
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (0x305 frame) for 5s
# The Deye inverter sends the ACK 0x305 only when it receives the 0x356 frame.
canbus_link_timer: '5s'
```
# RS485 bus to Inverter
> [!TIP]
> This package is only used with the `YamBMS` main node.
> It's possible to use this package multiple times in order to send information on two different `RS485` bus.
The RS485 bus connected to your inverter via the RS485 transceiver `uart_esp_3`.
You can keep the default configuration and adapt the `uart` port on which the component must connect.
```YAML
rs485_pylon:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: 'packages/yambms/yambms_rs485_pylon.yaml'
vars:
rs485_id: 'rs485_1'
rs485_name: 'RS485 1'
rs485_uart_id: 'uart_esp_3' # UART interface to which your inverter is connected
rs485_uart_baud_rate: '9600'
rs485_update_timeout: '5s'
```
## Debug
The `debug` package will add useful information to refer to if problems occur.
```YAML
debug:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
- path: packages/base/device_debug_ESP32.yaml
# - path: packages/base/device_debug_ESP32_PSRAM.yaml # for ESP32 with PSRAM
vars:
debug_name: 'Debug'
debug_update_interval: '5s'
# Size of your PSRAM in bits
# 8Mb='8388608' | 6Mb='6291456' | 4Mb='4194304' | 2Mb='2097152' | NoPSRAM='0'
debug_psram_size: '8388608'
```
+156 -40
View File
@@ -6,18 +6,13 @@
![GitHub forks](https://img.shields.io/github/forks/Sleeper85/esphome-yambms)
![GitHub watchers](https://img.shields.io/github/watchers/Sleeper85/esphome-yambms)
## Shunt and BMS combination
![Image](../../images/YamBMS_Combine_switch.png "YamBMS_Combine_switch")
The various counters above allow you to see what state your system is in.
### Shunt/BMS combine status
![Image](../../images/YamBMS_Combine_Status.png "YamBMS_Combine_Status")
* **Combine Availability** : This status indicates whether the `BMS` or `Shunt` meets the conditions to be combined.
* **Can be combined** : This status indicates whether the `BMS` or `Shunt` is currently combined.
**Combined / Can be combined** : This status indicates whether the `BMS` or `Shunt` is currently combined.
In this example there are **3x BMS** and **1x BMS** is not combined (it is offline or is not sending correct data).
### Shunt
@@ -35,6 +30,15 @@ As soon as you import a `Shunt` and it can be combined (see condition) the value
> [!NOTE]
> If all BMS are `uncombined` the shunt data will no longer be published.
If one shunt is used for multiple batteries, it is possible to provide the BMS IDs the shunt code with the variable `bms_ids`, example: `bms_ids: '{1, 2, 3}'`.
When the BMS IDs are provided to the shunt and one or more of the BMS are offline, the shunt `Combine` switch will be turned `OFF`.
This is helpful when one BMS/battery shuts down for a longer time. The `SoC` of the shunt will then not be correct anymore and this avoids that the batteries are
discharged further then wanted.
> [!NOTE]
> You need to manually enable the `Combine` switch again if it was disabled automatically.
> If you do not want that behaviour, do not provide `bms_ids` to the shunt.
### BMS
Combine condition :
@@ -52,12 +56,21 @@ The `binary_sensor` does not only represent the state of the `charge/discharge`
The `errors_bitmask` should not be a condition to combine a BMS anymore, let the BMS decide if the `charge/discharge` is allowed (its alarm system takes care of that).
The `errors_bitmask` continues to be analyzed to send `warnings/alarms` on the CAN bus.
The `errors_bitmask` continues to be analyzed to send `warnings/alarms` to the inverter.
The behavior of the `Charging Instruction` and `Discharging Instruction` sensors responsible for the instructions sent to the inverter will also be adapted. Alarm analysis will no longer be checked. If at least one BMS allows charging, charging can continue, if at least one BMS allows discharging, discharging can continue. This will also be based on the `binary_sensor` related to the state of `switchs/alarms` of the BMS.
If a BMS blocks charging or discharging, the permitted current is automatically reduced.
## External balancer
If an external balancer is used instead of the BMS internal one, it can be combined with the BMS.
Behaviour for `equalizing` and `balance trigger voltage`:
1) When no external balancer is present for a BMS or it is offline, the BMS values are used for `equalizing` and `balance trigger voltage`.
2) When an external balancer is present for a BMS and it is online, the BMS sensor data for `equalizing` and `balance trigger voltage` is overwritten by the external balancer sensor data.
## State of Charge
The `SoC` is slightly manipulated before reaching `0%` or `100%`.
@@ -68,53 +81,156 @@ SoC behavior:
2) Else if `the battery is fully charged` real SoC is sent
3) Else SoC `98%` is sent
## RGB LED status
This only applies to boards with an `RGB LED`.
## LED Status & Diagnostic Codes
| Color | Status |
| --- | --- |
| $${\color{red}Red}$$ | HA or MQTT KO + CANBUS KO |
| $${\color{green}Green}$$ | HA or MQTT OK + CANBUS KO |
| $${\color{blue}Flashing-Blue}$$ | HA or MQTT KO + CANBUS OK |
| $${\color{cyan}Flashing-Cyan}$$ | HA or MQTT OK + CANBUS OK |
The system uses Synchronized Diagnostic Blink Codes.
This allows the device to communicate specific fault categories visually without requiring a network connection.
### 1. System Healthy
If no faults are present, the LED indicates the system is alive.
* **Pattern:** 🟢 Green Pulse (1s) $\rightarrow$ ⚫ OFF (1s).
* **Meaning:** All linked components operational.
* **Cycle Time:** ~2.0 Seconds.
### 2. Component Fault
When a fault occurs, the cycle changes to a strict 3-part message structure.
| Phase | Color | Duration | Description |
| :--- | :--- | :--- | :--- |
| **1. Header** | 🔵 **Blue** | 1.0s | **"Attention."** Marks the start of a error report cycle. |
| **2. Gap** | ⚫ **OFF** | 0.5s | **"Wait."** A short pause to prepare for counting. |
| **3. Code** | 🔴 **Red** | Variable | **"Data."** A set count of short Red blinks. |
#### Reading the Blink Code
The number of Red blinks corresponds to the Fault Category (see table below).
To make counting easier, long codes are broken into groups of 4:
* **5 Pips:** `* * * *` ... `*`
* **9 Pips:** `* * * *` ... `* * * *` ... `*`
#### Category Reference Table
| Blinks | Category | Description |
| :--: | :--- | :--- |
| **1** | **API / MQTT** | API or MQTT communication failure. |
| **2** | **BMS** | Battery Management System communication failure. |
| **3** | **INV CAN** | Inverter CAN bus communication failure. |
| **4** | **INV RS485** | Inverter RS485 bus communication failure. |
| **5** | **SHUNT** | Shunt communication failure. |
| **6** | **BALANCER** | Balancer communication failure. |
| **7** | **NETWORK** | No wifi or ethernet connection. |
| **8-16** | **AUX 1-9** | Reserved for future expansion. |
### Advanced Behaviors
#### Spotlight Mode
When a fault is active anywhere in the system:
1. Fault LEDs: Display the Red error code.
2. Healthy LEDs: Turn OFF during the "Code" phase
This reduces visual noise, highlighting exactly which components requires attention.
#### Multi-Fault Rotation
If a single LED monitors multiple components (e.g., a LED monitoring both the BMS and the Shunt) and both fail simultaneously:
* **Cycle 1:** Displays BMS Code (2 Pips).
* **Cycle 2:** Displays Shunt Code (5 Pips).
* **Repeat:** The LED rotates through active faults one by one.
#### Monochromatic LEDs
For boards without RGB LEDs:
* **Header:** Solid on.
* **Code:** Blinking.
* **Gap/Healthy:** off.
#### Multi-LED Boards
For boards with multiple LEDs, it's possible to assign a specific led to a specific component.
For example, led_1 for BMS 1, led_2 for canbus. See the section below for more details.
### Configuration & LED Assignment
The system links specific hardware LEDs to software components using Substitutions in your YAML package configuration.
Each component package (BMS, canbus, etc.) includes a specific variable to define which LED should report its status.
#### Example Configuration
In your main YAML file, under `packages`, you assign the Light ID to the `*_status_led_id` variable.
In most cases, the default values can be used but some boards such as the [LilyGo T-Connect](Board_LilyGo_T-Connect.md) have multi-LED functionality.
```yaml
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Unique ID for this specific instance
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_address: '0x01' # BMS 1 DIP switch
# LINKING THE LED
# Set this to the ID of the light component defined in your ESPHome config.
# Example: 'esp_light', 'led_1', etc. The board config will show further details
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
```
## CAN bus link
For the CAN bus link to be established with your inverter, the two conditions below must be met:
1) At least one BMS is in service (the number of combined BMS must be `> 0`)
2) Your inverter sends an `ACK 0x305` every `1s` (the link will be faulty if no ACK is received for 5s)
For the CAN bus link to be established with your inverter, the three conditions below must be met:
1) At least `one` BMS is `combined`
2) The YamBMS status must be `initialized`
3) Your inverter sends an `ACK 0x305` every `1s` (the link will be faulty if **no ACK is received for `5s`**)
If these conditions are not met, the application waits `60s` before trying to connect again.
If these conditions are not met, the application waits `30s` before trying to connect again.
### Extra infos
During boot or when switching from `0 to 1` combined BMS, the `CAN bus` starts after `YamBMS initialization`, which can take `30s`...
Sending CAN frames continues without an inverter connected is problematic and will lead to ESP32 crash.
During boot the CAN bus links are activated directly if at least one BMS is combined and the inverter responds to the sending of CAN frames within a `5s` delay.
This `5s` delay represents the time during which the link is valid, this timer is reset each time an `ACK 0x305` is received from the inverter.
This `5s` delay can be modified in the configuration when importing the canbus package.
For this reason, if the inverter does not respond after `5s`, the link is paused for `30s` before attempting to re-establish the communication.
The Deye inverter sends the ACK (can_id `0x305`) only when it receives the can_id `0x356`.
```YAML
canbus1: !include
file: packages/yambms/yambms_canbus.yaml
vars:
canbus_id: 'canbus1'
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_node1'
canbus_light_id: 'esp_light'
# The CANBUS link will be considered down if no response from the inverter (ID 0x305) for 5s
canbus_link_timer: '5s'
- path: 'packages/yambms/yambms_canbus.yaml' # yambms_canbus_web_server.yaml
vars:
canbus_id: '1' # must be a number
canbus_name: 'CANBUS 1'
canbus_node_id: 'canbus_inverter_1' # CAN bus node to which your inverter is connected
canbus_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# The CAN bus link will be paused for `30s` if the inverter does not respond with an ACK (can_id 0x305)
# before the end of the `canbus_link_timer` (5s by default).
canbus_link_timer: '5s'
canbus_extended_ack: 'false' # Set to 'true' for enable extended 29-bit IDs for the ACK can_id 0x305 (required for Schneider XW Pro)
```
If the inverter does not respond with an `ACK 0x305` within this `5s` delay the sending of CAN frames is paused for `60s` this delay cannot be modified when importing the canbus package but you can modify it in the code if you need to.
## Warning & Alarms
## BMS alarms
![Image](../../images/YamBMS_BMS_alarms.png "YamBMS_BMS_alarms")
If all BMS have alarms, the alarms are sent to the **CAN bus** as `Protection Alarms`.
If all BMS have alarms, the alarms are sent to the `CAN bus` as `Protection Alarms`.
If at least one BMS has no alarms, the alarms are sent to the CAN bus as `Warning`.
Both **text_sensor** `Alarm` and `Warning` show the alarms/warnings currently transmitted to the inverter.
![Image](../../images/YamBMS_BMS_alarms.png "YamBMS_BMS_alarms")
Each BMS transmits its alarms using the YamBMS `errors_bitmask` in the format below :
```
# +--------------------------------------+
# | YamBMS Errors Bitmask (16bit) |
# +--------------------------------------+
# Bit 0 General alarm 0000 0000 0000 0001 0x0001
# Bit 1 Battery high voltage alarm 0000 0000 0000 0010 0x0002
# Bit 2 Battery low voltage alarm 0000 0000 0000 0100 0x0004
# Bit 3 Battery high temperature alarm 0000 0000 0000 1000 0x0008
# Bit 4 Battery low temperature alarm 0000 0000 0001 0000 0x0010
# Bit 5 Battery high temperature charge alarm 0000 0000 0010 0000 0x0020
# Bit 6 Battery low temperature charge alarm 0000 0000 0100 0000 0x0040
# Bit 7 Battery high discharge current alarm 0000 0000 1000 0000 0x0080
# Bit 8 Battery high charge current alarm 0000 0001 0000 0000 0x0100
# Bit 9 Contactor alarm 0000 0010 0000 0000 0x0200
# Bit 10 Short circuit alarm 0000 0100 0000 0000 0x0400
# Bit 11 BMS internal alarm 0000 1000 0000 0000 0x0800
# Bit 12 Cell imbalance alarm 0001 0000 0000 0000 0x1000
# Bit 13 Reserved 0010 0000 0000 0000 0x2000
# Bit 14 Reserved 0100 0000 0000 0000 0x4000
# Bit 15 Reserved 1000 0000 0000 0000 0x8000
```
+128 -14
View File
@@ -21,7 +21,7 @@ Other configurations are possible, don't hesitate to communicate what works well
| Inverter | Battery mode | CAN protocol |
| --- | --- | --- |
| Deye | Lithium 00 | PYLON 1.2 |
| GoodWe | LX U5.4-L | PYLON + |
| GoodWe | LX U5.4-L | PYLON V2 |
| Sofar | Automatic | PYLON 1.2 |
| Growatt | CAN L52 | PYLON 1.2 |
| Solis | AoBo | SMA |
@@ -52,17 +52,35 @@ The `Float voltage` slider allows you to set the voltage used after charging is
The `Inverter Offset V.` slider allows you to correct the inverter charge voltage, either because it does not respect the requested value or because your inverter is far from your batteries and there is a voltage drop. This allows you to reach the target `Bulk` or `Float` charge voltage by adding an offset.
### Max current (%)
### Max Requested Current
![Image](../../images/YamBMS_Max_Current_PCT.png "YamBMS_Max_Current_PCT")
![Image](../../images/YamBMS_Max_Requested_Current.png "Max Requested Current")
The allowed charge or discharge current is automatically calculated based on the `OCP` values ​​of your BMS. The `OCP` currents of the combined BMS (not in alarm) are added together and the requested current is a percentage `0~90%` of this value.
The required `charge/discharge current` is calculated as follows :
1. You define a **maximum current** that can never be exceeded
2. YamBMS calculates the **maximum current** accepted by your BMS (total of OCP values ​​* 0.9)
3. The temperature-based current limiting function calculates the **maximum current** `based` on the **temperature**, the **battery capacity** and the **charging_rate_table** / **discharging_rate_table**. For further details see [Auto Temp-Based Current](Auto_temp-based_current.md).
The **current requested** by YamBMS will be **the lowest** of these three values.
## Requested Values
![Image](../../images/YamBMS_Requested_Values.png "YamBMS_Requested_Values")
These 4 sensors allow you to see what is being requested of your inverter.
In the example below, we are in the `Float` phase at a voltage of `53.6V` and an `Inverter Offset V.` of `0.1V`. The `Requested Charge Voltage` is therefore `53.7V`.
The `Requested Discharge Voltage` is the `UVP + 0.2` value of your BMS multiplied by the number of cells, in this example (3V * 16).
### ReBulk
![Image](../../images/YamBMS_ReBulk.png "YamBMS_ReBulk")
There are two parameters to start a new `Bulk` phase. You can set a `Rebulk SoC` or a `Rebulk V.` value, only one of these conditions must be met.
There are three parameters to start a new `Bulk` phase. You can set a `Rebulk SoC`, a `Rebulk V.` value or the `Rebulk Days` (since last full charge), only one of these conditions must be met.
`Rebulk Days` can be disabled by setting them to `0`.
If needed you can also force a `Bulk` charge with the `Force Bulk (top bal)` switch. The switch will automatically deactivate when your cells enter the `Balancing` phase.
@@ -78,14 +96,16 @@ Works only with `PYLON`, `LuxPower` and `Victron` protocols.
## Auto functions
Thanks to [@MrPabloUK](https://github.com/MrPabloUK) for developing these features.
Thanks to [@MrPabloUK](https://github.com/MrPabloUK) for developing `Auto CVL`, `Auto CCL`, `Auto DCL` and `Auto Temp-Based Current` functions.
A [reference spreadsheet](https://docs.google.com/spreadsheets/d/1UwZ94Qca-DBP5gppzKmAjbMJYZGjR4lMwZtwwQR9wWY/edit?usp=sharing) has been created that shows how the `Auto functions` works.
A [reference spreadsheet](https://docs.google.com/spreadsheets/d/1UwZ94Qca-DBP5gppzKmAjbMJYZGjR4lMwZtwwQR9wWY/edit?usp=sharing) has been created that shows how the `Auto CCL & DCL` works.
![Image](../../images/YamBMS_Auto_CVL_CCL_DCL.png "YamBMS_Auto_CVL_CCL_DCL")
Thanks to [@GHswitt](https://github.com/GHswitt) for developing `Auto Float` function.
## Auto CVL
![Image](../../images/YamBMS_Auto_CVL.png "YamBMS Auto CVL")
> [!IMPORTANT]
> The `Auto CVL` function uses the `Balance Trig. Volt.` value of your BMS. `e.g. for LFP` : BTG=0.010V
@@ -100,6 +120,8 @@ You can compare `Auto CVL` to cruise control in a car.
## Auto CCL & DCL
![Image](../../images/YamBMS_Auto_CCL_DCL.png "YamBMS Auto CCL & DCL")
> [!IMPORTANT]
> The `Auto CCL` function uses the `OVP` value of your BMS.
> The `Auto DCL` function uses the `UVP` value of your BMS.
@@ -115,17 +137,109 @@ You can compare `Auto CCL` to a max speed limiter in a car.
Current control should work with any inverter that uses `CAN` control.
## Requested Values
## Auto Float Voltage
![Image](../../images/YamBMS_Requested_Values.png "YamBMS_Requested_Values")
![Image](../../images/YamBMS_Auto_Float.png "YamBMS Auto Float")
These 4 sensors allow you to see what is being requested of your inverter.
When switching from `Bulk` to `Float`, therefore lowering the `Requested Charge Voltage (CVL)`, some inverters (e.g. Deye SUN-12K) will start to discharge the battery (into the grid) with up to max. discharge current until the
`Requested Charge Voltage (CVL)` is reached. The reason behind this is that the inverter sees this as battery overvoltage and wants to counter it.
As workaround, by enabling `Automatic Float Voltage`, it will lower the `Requested Charge Voltage (CVL)` gradually in small steps until the float voltage is reached, allowing the battery more time to settle down.
There are two modes available: `Follow` and `Immediately`.
In the example below, we are in the `Float` phase at a voltage of `53.6V` and an `Inverter Offset V.` of `0.1V`. The `Requested Charge Voltage` is therefore `53.7V`.
- `Follow`: Waits until the battery voltage itself is below the current `Requested Charge Voltage (CVL)` before lowering `Requested Charge Voltage (CVL)` further. It follows the battery voltage until the target float voltage is reached.
- `Immediately`: Immediately start lowering the `Requested Charge Voltage (CVL)`, independent of the current battery voltage. That means it can go below the current battery voltage.
The `Requested Discharge Voltage` is the `UVP + 0.2` value of your BMS multiplied by the number of cells, in this example (3V * 16).
This feature might not work with all inverters as good or is not required if these do not discharge the battery.
The voltage steps can be configured (default `0.1V`) with `Auto Float Voltage Step`. The update interval can be configured (default `3 minutes`) with `Auto Float Update Interval`.
## Auto EOC
![Image](../../images/YamBMS_Auto_EOC.png "YamBMS Auto EOC")
When to use: Your battery would be full early in the day and then be idle for the rest of the day. You want to charge it slowly and have it full at a specified time, for example in the evening.
This function allows to set a target time when `Bulk` charging. It limits the `Requested Charge Current (CCL)` so the battery should reach full charge at the specified time. As the algorithm is quite simple there are some requirements for it to work correctly:
- The time of the ESPHome device must be correct and available.
- The `Battery Capacity` must be correct.
- The charger/inverter can deliver the `Requested Charge Current (CCL)` over the time frame -> the sun must be shining.
There are some configuration options to adjust the behaviour:
- `Automatic EOC Current`: This switch enables or disables the function. When disabled, it will not limit the `Requested Charge Current (CCL)`.
- `Auto EOC Target Hour`: This selects the hour of the desired target time.
- `Auto EOC Target Minute`: This selects the minute of the desired target time.
- `Auto EOC Correction`: This increases or decreases the `Requested Charge Current (CCL)` and allows for correcting charger/inverter differences, for example if the inverter delivers less current than requested.
- `Auto EOC Capacity Modifier`: This allows to lower the target capacity for the calculation. If your battery `Capacity Remaining` does not reach `Battery Capacity` when 100% full, you can adjust the value here.
- `Auto EOC Increase Stop Hours`: When nearing the target time but the charge current can not be reached, the `Requested Charge Current (CCL)` will increase until it reaches the max. charge current. To avoid this, a time frame bevor the target time can be chosen in which the current will not be increased. E.g. if this option is set to 1 hour, the `Requested Charge Current (CCL)` is 40A and the time is between `Target Hour - 1 hour` and `Target Hour`, it will stay at 40A.
- `Auto EOC Increase Stop SoC`: Similar to `Auto EOC Increase Stop Hours`, this stops increasing the `Requested Charge Current (CCL)` when the `SoC` is equal or above the specified `SoC`.
The text sensor `Auto EOC Status` will show the current status of the function:
- `Stop: Disabled`: Function is disabled or capacity not available.
- `Stop: Float`: YamBMS currently in `Float` mode, not `Bulk`.
- `Stop: Time not valid`: The ESPHome device time is not valid.
- `Stop: Target time passed`: The current time is after the selected target time.
- `Stop: Current above limit`: The required charge current is above the current charge limit.
- `Run: Current increase stopped`: Running, but no current increase because of `Auto EOC Increase Stop Hours` or `Auto EOC Increase Stop SoC`.
- `Run`: Working normally.
- `Run: Auto SoC Limit xx%`: Enabled, but reduced the target capacity by the value selected for `Auto SoC Limit`.
The sensor `Auto EOC Current` will show the calculated charging current. Note that it is filtered by an EWMA filter with a default 3 minute delay.
That means that changes to the options or parameters are not immediately visible. This avoids that the `Requested Charge Current (CCL)` will fluctuate too much. It will show 0A when the function is disabled/stopped or there is no solution.
The function used to calculate the required charging current is very basic. The missing battery capacity (difference between `Battery Capacity` and `Capacity Remaining`) divided by the remaining hours. If `Auto SoC Limit` is active,
the configured limit value will be used to calculate the target capacity. It will be updated every minute, but afterwards filtered before it is used for `Requested Charge Current (CCL)`. That means it will adapt, but not take into account any special circumstances. For example if `Auto CCL` is enabled and required, the charge current may further be limited by `Auto CCL`. The target time may then not be reached exactly. To account for this, the parameter `Auto EOC Correction` can be used to increase the overall current a little to compensate for the lower end current.
Here is an example when the target time is set to 18:00. Starting at 00:00, the required current increases as the battery is discharged. When the battery starts charging as the sun is up, the required current stabilizes around 14A.
The current is increased at the end as it does not exactly hit its required charge, but at 17:30, the required current is stable because the parameter `Auto EOC Increase Stop Hours` was set to 0.5 hours, so it will not be increased anymore.
At about 18:08 the battery is 100% after a short balancing period.
![Image](../../images/YamBMS_Auto_EOC_Graph.png "YamBMS Auto EOC Graph")
## Auto SoC Limit
![Image](../../images/YamBMS_Auto_SoC_Limit.png "YamBMS Auto SoC Limit")
When to use: You want to charge your battery up to a specific SoC value.
This function allows to set a target SoC when charging. Upon reaching this limit, it can either switch to `Float`, limit the `Requested Charge Current (CCL)` or both.
There are some configuration options to adjust the behaviour:
- `Automatic SoC Limit`: This switch enables or disables the function.
- `Auto SoC Limit`: The SoC limit value.
- `Auto SoC Limit Mode`: The mode to use when the limit is reached.
- `Auto SoC Hysteresis`: Configurable hysteresis value when to stop limiting `Requested Charge Current (CCL)`.
- `Auto SoC Limit CCL`: The value that will be used for `Requested Charge Current (CCL)` when the limit is reached and `Auto SoC Limit` is set to `CCL` or `Float + CCL`.
The text sensor `Auto SoC Limit Status` will show the current status of the function:
- `Stop: Disabled`: Function is disabled.
- `Stop: Force Bulk active`: The `Force Bulk` switch is enabled, this function will not be enabled
- `Stop: Rebulk Days active`: `Rebulk Days` is `> 0` and last full charge was longer ago than the specified number of days, this function will not be enabled.
- `Stop: Not in Bulk/Float`: Charging status is not `Bulk` or `Float`, this function will not be enabled during `Cut-Off` or `Balancing`.
- `Stop: SoC limit reached`: The configured `SoC` limit was reached.
- `Wait: Reactivating at xx%`: The configured `SoC` limit was reached, now it waits until the SoC goes down to `Auto SoC Limit` - `Auto SoC Hysteresis`.
- `Run`: Function enabled, `SoC` limit not reached.
Modes:
- `Float`: Will set the charging mode from `Bulk` to `Float`. If already at `Float`, nothing will happen.
- `CCL`: Limits the `Requested Charge Current (CCL)` to the value set by `Auto SoC Limit CCL`. The limit will be removed once the `SoC` is below `Auto SoC Limit` - `Auto SoC Hysteresis`.
- `Float + CCL`: Will use both previously described methods. However while the `Requested Charge Current (CCL)` will be removed, the charging mode will not be reset to `Bulk`. For this, `Rebulk SoC` is available.
Note: Some inverters may not like `0A` for `Requested Charge Current (CCL)`. `Auto SoC Limit CCL` allows to set a small value to effectively limit the charging process.
Example:
- `Auto SoC Limit` is set to `80%`
- `Auto SoC Limit Mode` is set to `CCL`
- `Auto SoC Hysteresis` is set to `5%`
The current `SoC` is `70%`. When it reaches `80%` during charging, `Requested Charge Current (CCL)` is set to `Auto SoC Limit CCL`.
Afterwards the battery is then discharged, however `Requested Charge Current (CCL)` will stay at `Auto SoC Limit CCL` until `SoC` reaches
`Auto SoC Limit` - `Auto SoC Hysteresis` = `80%` - `5%` = `75%`. Without this, the `SoC` would oscillate between
`79%` and `80%`, stressing components unnecessary.
The `Requested Charge/Discharge Current` is the `OCP` value of your BMS multiplied by the `Max current` percentage, in this example (150A * 80%).
## Inverter Heartbeat Monitoring
@@ -1,5 +1,5 @@
# Updated : 2025.04.01
# Version : 1.5.5
# Updated : 2026.01.24
# Version : 1.1.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -23,16 +23,10 @@
################################################################################
substitutions:
modbus_update_interval: '5s' # frequency with which BMS/Shunt modbus servers are queried
modbus_baud_rate: '19200' # 9600 / 19200 / 11520
modbus_command_throttle: '0ms' # minimum time in between 2 requests to the device
modbus_send_wait_time: '250ms' # time in milliseconds before the next ModBUS command is sent if an answer from a previous command is pending
packages:
modbus: !include
file: packages/base/device_modbus.yaml
file: packages/board/board_options_itf_modbus.yaml
vars:
modbus_role: 'client' # client / server
modbus_uart_id: 'uart_esp_1' # RS485 board
@@ -42,6 +36,10 @@ packages:
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
# Optional: BMS IDs connected to this shunt
# If provided, the shunt will only be used when all listed BMS are online
# If not provided, the shunt will be used independently of the BMS online status
bms_ids: '{1, 2, 3}'
bms1: !include
file: packages/bms/bms_combine_modbus_client.yaml
@@ -66,7 +64,7 @@ packages:
# vars:
# bms_id: '4' # must be a number
# bms_name: 'BMS 4'
# bms5: !include
# file: packages/bms/bms_combine_modbus_client.yaml
# vars:
@@ -102,3 +100,16 @@ packages:
# vars:
# bms_id: '10' # must be a number
# bms_name: 'BMS 10'
# Balancer
balancer2: !include
file: packages/balancer/balancer_modbus_client.yaml
vars:
bms_id: '2' # must match the BMS ID
balancer_name: 'Balancer 2'
balancer3: !include
file: packages/balancer/balancer_modbus_client.yaml
vars:
bms_id: '3' # must match the BMS ID
balancer_name: 'Balancer 3'
@@ -1,5 +1,5 @@
# Updated : 2025.04.01
# Version : 1.5.5
# Updated : 2026.02.03
# Version : 1.1.3
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -24,15 +24,13 @@
################################################################################
substitutions:
modbus_update_interval: '5s' # frequency with which BMS/Shunt modbus servers are queried
modbus_baud_rate: '19200' # 9600 / 19200 / 11520
modbus_command_throttle: '0ms' # minimum time in between 2 requests to the device
modbus_send_wait_time: '250ms' # time in milliseconds before the next ModBUS command is sent if an answer from a previous command is pending
friendly_name : 'YamBMS Modbus Server 1' # Prefix added in front of the `entity display name`, also used to classify them.
hostname: 'yambms-modbus-server-1' # Name of your ESPHome node registered on the IP network (DNS name, must be unique) and prefix added in front of the `entity id`.
packages:
modbus: !include
file: packages/base/device_modbus.yaml
file: packages/board/board_options_itf_modbus.yaml
vars:
modbus_role: 'server' # client / server
modbus_uart_id: 'uart_esp_1' # RS485 board
@@ -43,6 +41,7 @@ packages:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_uart_id: 'uart_esp_2'
shunt_status_led_id: 'esp_light' # led used to show status. Default = esp_light, comment out to disable
bms1: !include
file: packages/bms/bms_modbus_JK_UART_4G-GPS_full.yaml
@@ -52,4 +51,5 @@ packages:
bms_uart_id: 'uart_esp_3'
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light' # led used to show status. Default = esp_light, comment out to disable
@@ -1,5 +1,5 @@
# Updated : 2025.04.01
# Version : 1.5.5
# Updated : 2026.02.03
# Version : 1.1.3
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -24,15 +24,13 @@
################################################################################
substitutions:
modbus_update_interval: '5s' # frequency with which BMS/Shunt modbus servers are queried
modbus_baud_rate: '19200' # 9600 / 19200 / 11520
modbus_command_throttle: '0ms' # minimum time in between 2 requests to the device
modbus_send_wait_time: '250ms' # time in milliseconds before the next ModBUS command is sent if an answer from a previous command is pending
friendly_name : 'YamBMS Modbus Server 2' # Prefix added in front of the `entity display name`, also used to classify them.
hostname: 'yambms-modbus-server-2' # Name of your ESPHome node registered on the IP network (DNS name, must be unique) and prefix added in front of the `entity id`.
packages:
modbus: !include
file: packages/base/device_modbus.yaml
file: packages/board/board_options_itf_modbus.yaml
vars:
modbus_role: 'server' # client / server
modbus_uart_id: 'uart_esp_1' # RS485 board
@@ -47,6 +45,7 @@ packages:
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light' # led used to show status. Default = esp_light, comment out to disable
bms3: !include
file: packages/bms/bms_modbus_JK_BLE_standard.yaml
@@ -58,3 +57,4 @@ packages:
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light' # led used to show status. Default = esp_light, comment out to disable
@@ -0,0 +1,54 @@
# Updated : 2026.02.03
# Version : 1.1.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
############################ Local Packages Example ############################
# This is not a working YAML but just code ready to copy into your main YAML.
################################################################################
substitutions:
friendly_name : 'YamBMS Modbus Server 3' # Prefix added in front of the `entity display name`, also used to classify them.
hostname: 'yambms-modbus-server-3' # Name of your ESPHome node registered on the IP network (DNS name, must be unique) and prefix added in front of the `entity id`.
packages:
modbus: !include
file: packages/board/board_options_itf_modbus.yaml
vars:
modbus_role: 'server' # client / server
modbus_uart_id: 'uart_esp_1' # RS485 board
# Balancer for BMS 2
balancer2: !include
file: packages/balancer/balancer_modbus_JK_NEEY_BLE.yaml
vars:
bms_id: '2' # must match BMS ID
balancer_name: 'NEEY 1'
balancer_ble_mac_address: 11:22:33:44:55:66
balancer_status_led_id: 'esp_light' # led used to show status. Default = esp_light, comment out to disable
# Balancer for BMS 3
balancer3: !include
file: packages/balancer/balancer_modbus_JK_NEEY_BLE.yaml
vars:
bms_id: '3' # must be a number
balancer_name: 'NEEY 2'
balancer_ble_mac_address: 11:22:33:44:55:67
balancer_status_led_id: 'esp_light' # led used to show status. Default = esp_light, comment out to disable
@@ -1,5 +1,5 @@
# Updated : 2025.04.01
# Version : 1.5.5
# Updated : 2026.01.24
# Version : 1.1.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -23,12 +23,6 @@
################################################################################
substitutions:
modbus_update_interval: '5s' # frequency with which BMS/Shunt modbus servers are queried
modbus_baud_rate: '19200' # 9600 / 19200 / 11520
modbus_command_throttle: '0ms' # minimum time in between 2 requests to the device
modbus_send_wait_time: '250ms' # time in milliseconds before the next ModBUS command is sent if an answer from a previous command is pending
packages:
yambms_modbus_client:
@@ -37,7 +31,7 @@ packages:
refresh: 0s
files:
# Modbus client
- path: 'packages/base/device_modbus.yaml'
- path: 'packages/board/board_options_itf_modbus.yaml'
vars:
modbus_role: 'client' # client / server
modbus_uart_id: 'uart_esp_1' # RS485 board
@@ -46,6 +40,10 @@ packages:
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
# Optional: BMS IDs connected to this shunt
# If provided, the shunt will only be used when all listed BMS are online
# If not provided, the shunt will be used independently of the BMS online status
bms_ids: '{1, 2, 3}'
# BMS 1
- path: 'packages/bms/bms_combine_modbus_client.yaml'
vars:
@@ -96,3 +94,12 @@ packages:
# vars:
# bms_id: '10' # must be a number
# bms_name: 'BMS 10'
# Balancer
- path: 'packages/balancer/balancer_modbus_client.yaml'
vars:
bms_id: '2' # must match the BMS ID
balancer_name: 'Balancer 2'
- path: 'packages/balancer/balancer_modbus_client.yaml'
vars:
bms_id: '3' # must match the BMS ID
balancer_name: 'Balancer 3'
@@ -1,5 +1,5 @@
# Updated : 2025.04.01
# Version : 1.5.5
# Updated : 2026.02.03
# Version : 1.1.3
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -24,10 +24,8 @@
################################################################################
substitutions:
modbus_update_interval: '5s' # frequency with which BMS/Shunt modbus servers are queried
modbus_baud_rate: '19200' # 9600 / 19200 / 11520
modbus_command_throttle: '0ms' # minimum time in between 2 requests to the device
modbus_send_wait_time: '250ms' # time in milliseconds before the next ModBUS command is sent if an answer from a previous command is pending
friendly_name : 'YamBMS Modbus Server 1' # Prefix added in front of the `entity display name`, also used to classify them.
hostname: 'yambms-modbus-server-1' # Name of your ESPHome node registered on the IP network (DNS name, must be unique) and prefix added in front of the `entity id`.
packages:
@@ -37,7 +35,7 @@ packages:
refresh: 0s
files:
# Modbus server
- path: 'packages/base/device_modbus.yaml'
- path: 'packages/board/board_options_itf_modbus.yaml'
vars:
modbus_role: 'server' # client / server
modbus_uart_id: 'uart_esp_1' # RS485 board
@@ -47,6 +45,7 @@ packages:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_uart_id: 'uart_esp_2'
shunt_status_led_id: 'esp_light' # led used to show status. Default = esp_light, comment out to disable
# BMS 1
- path: 'packages/bms/bms_modbus_JK_UART_4G-GPS_full.yaml'
vars:
@@ -56,3 +55,4 @@ packages:
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light' # led used to show status. Default = esp_light, comment out to disable
@@ -1,5 +1,5 @@
# Updated : 2025.04.01
# Version : 1.5.5
# Updated : 2026.02.03
# Version : 1.1.3
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -24,10 +24,8 @@
################################################################################
substitutions:
modbus_update_interval: '5s' # frequency with which BMS/Shunt modbus servers are queried
modbus_baud_rate: '19200' # 9600 / 19200 / 11520
modbus_command_throttle: '0ms' # minimum time in between 2 requests to the device
modbus_send_wait_time: '250ms' # time in milliseconds before the next ModBUS command is sent if an answer from a previous command is pending
friendly_name : 'YamBMS Modbus Server 2' # Prefix added in front of the `entity display name`, also used to classify them.
hostname: 'yambms-modbus-server-2' # Name of your ESPHome node registered on the IP network (DNS name, must be unique) and prefix added in front of the `entity id`.
packages:
@@ -37,7 +35,7 @@ packages:
refresh: 0s
files:
# Modbus server
- path: 'packages/base/device_modbus.yaml'
- path: 'packages/board/board_options_itf_modbus.yaml'
vars:
modbus_role: 'server' # client / server
modbus_uart_id: 'uart_esp_1' # RS485 board
@@ -51,6 +49,7 @@ packages:
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light' # led used to show status. Default = esp_light, comment out to disable
# BMS 3
- path: 'packages/bms/bms_modbus_JK_BLE_standard.yaml'
vars:
@@ -61,3 +60,4 @@ packages:
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light' # led used to show status. Default = esp_light, comment out to disable
@@ -0,0 +1,55 @@
# Updated : 2026.02.03
# Version : 1.1.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
############################ Remote Packages Example ###########################
# This is not a working YAML but just code ready to copy into your main YAML.
################################################################################
substitutions:
friendly_name : 'YamBMS Modbus Server 3' # Prefix added in front of the `entity display name`, also used to classify them.
hostname: 'yambms-modbus-server-3' # Name of your ESPHome node registered on the IP network (DNS name, must be unique) and prefix added in front of the `entity id`.
packages:
yambms_modbus_server:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# Modbus server
- path: 'packages/board/board_options_itf_modbus.yaml'
vars:
modbus_role: 'server' # client / server
modbus_uart_id: 'uart_esp_1' # RS485 board
# Balancer for BMS 2
- path: 'packages/balancer/balancer_modbus_JK_NEEY_BLE.yaml'
vars:
bms_id: '2' # must match BMS ID
balancer_name: 'NEEY 1'
balancer_ble_mac_address: 11:22:33:44:55:66
balancer_status_led_id: 'esp_light' # led used to show status. Default = esp_light, comment out to disable
# Balancer for BMS 3
- path: 'packages/balancer/balancer_modbus_JK_NEEY_BLE.yaml'
vars:
bms_id: '3' # must be a number
balancer_name: 'NEEY 2'
balancer_ble_mac_address: 11:22:33:44:55:67
balancer_status_led_id: 'esp_light' # led used to show status. Default = esp_light, comment out to disable
@@ -0,0 +1,53 @@
# Updated : 2026.02.16
# Version : 1.1.3
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
############################ Local Packages Example ############################
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
################################################################################
packages:
# Basen controller
controller: !include
file: packages/bms/bms_combine_BASEN_RS485_controller.yaml
vars:
basen_uart_id: 'uart_esp_1'
basen_uart_baud_rate: '9600'
basen_controller_id: "basen_controller_1"
# Basen module 1
bms1: !include
file: packages/bms/bms_combine_BASEN_RS485_full.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'BASEN-BMS 1'
bms_address: '0x01'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# Basen module 2
bms2: !include
file: packages/bms/bms_combine_BASEN_RS485_full.yaml
vars:
bms_id: '2' # must be a number
bms_name: 'BASEN-BMS 2'
bms_address: '0x02'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -0,0 +1,105 @@
# Updated : 2026.02.16
# Version : 1.1.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
############################ Local Packages Example ############################
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
################################################################################
packages:
shunt1: !include
file: packages/shunt/shunt_combine_FAKE.yaml
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
# Shunt sensors values
shunt_voltage: '52.81' # V
shunt_current: '17.5' # A
shunt_power: '924' # W
shunt_soc: '50' # %
shunt_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms1: !include
file: packages/bms/bms_combine_DEMO.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'BMS 1'
# BMS sensors values
bms_battery_capacity: '280' # Ah
bms_current: '9.2' # A
bms_soc: '87' # %
bms_soh: '98' # %
bms_min_cell_voltage: '3.339' # V
bms_max_cell_voltage: '3.341' # V
bms_min_temperature: '9.1' # °C
bms_max_temperature: '9.3' # °C
bms_max_charge_current: '100' # A
bms_max_discharge_current: '100' # A
bms_cell_ovp: '3.650' # V Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
bms_charging_cycles: '178' # charging cycles number Used to calculate the SoH
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms2: !include
file: packages/bms/bms_combine_DEMO.yaml
vars:
bms_id: '2' # must be a number
bms_name: 'BMS 2'
# BMS sensors values
bms_battery_capacity: '280' # Ah
bms_current: '11.3' # A
bms_soc: '85' # %
bms_soh: '89' # %
bms_min_cell_voltage: '3.337' # V
bms_max_cell_voltage: '3.339' # V
bms_min_temperature: '15.1' # °C
bms_max_temperature: '15.3' # °C
bms_max_charge_current: '100' # A
bms_max_discharge_current: '100' # A
bms_cell_ovp: '3.650' # V Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
bms_charging_cycles: '226' # charging cycles number Used to calculate the SoH
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms3: !include
file: packages/bms/bms_combine_DEMO.yaml
vars:
bms_id: '3' # must be a number
bms_name: 'BMS 3'
# BMS sensors values
bms_battery_capacity: '280' # Ah
bms_current: '15.7' # A
bms_soc: '83' # %
bms_soh: '79' # %
bms_min_cell_voltage: '3.334' # V
bms_max_cell_voltage: '3.336' # V
bms_min_temperature: '20.1' # °C
bms_max_temperature: '20.3' # °C
bms_max_charge_current: '100' # A
bms_max_discharge_current: '100' # A
bms_cell_ovp: '3.650' # V Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
bms_charging_cycles: '194' # charging cycles number Used to calculate the SoH
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -0,0 +1,62 @@
# Updated : 2026.02.16
# Version : 1.1.3
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
############################ Local Packages Example ############################
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
################################################################################
packages:
# Deye BMS top unit (required)
bms_top: !include
file: packages/bms/bms_sensors_DEYE_CAN_top_full.yaml
vars:
# CAN BUS ID
canbus_id: 'canbus_bms_1'
deye_name: 'DEYE-Top 1'
deye_id: '1'
# Deye module 1
bms1: !include
file: packages/bms/bms_combine_DEYE_CAN_module_full.yaml
vars:
# CAN BUS ID
canbus_id: 'canbus_bms_1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'DEYE-BMS 1'
deye_id: '1'
deye_module_id: '0' # Modules are numbered with 0-9
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# Deye module 2
bms2: !include
file: packages/bms/bms_combine_DEYE_CAN_module_full.yaml
vars:
# CAN BUS ID
canbus_id: 'canbus_bms_1'
# BMS vars
deye_id: '1'
bms_id: '2' # must be a number
bms_name: 'DEYE-BMS 2'
deye_module_id: '1' # Modules are numbered with 0-9
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -0,0 +1,58 @@
# Updated : 2026.02.16
# Version : 1.1.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
############################ Local Packages Example ############################
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
################################################################################
packages:
eg4_modbus: !include
file: packages/bms/bms_combine_EG4_RS485_modbus.yaml
vars:
eg4_modbus_uart_id: 'uart_esp_1'
eg4_modbus_baud_rate: '9600'
bms1: !include
file: packages/bms/bms_combine_EG4_LLV2_RS485_bms_full.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'EG4-BMS 1'
## BMS address must start at 2 with EG4 LLV2, ID 1 is a special case and has different output.
bms_address: 2 # BMS 1 modbus address
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms2: !include
file: packages/bms/bms_combine_EG4_LLV2_RS485_bms_full.yaml
vars:
bms_id: '2' # must be a number
bms_name: 'EG4-BMS 2'
bms_address: 3 # BMS 2 modbus address
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms3: !include
file: packages/bms/bms_combine_EG4_LLV2_RS485_bms_full.yaml
vars:
bms_id: '3' # must be a number
bms_name: 'EG4-BMS 3'
bms_address: 4 # BMS 3 modbus address
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -0,0 +1,114 @@
# Updated : 2026.02.16
# Version : 1.1.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
############################ Local Packages Example ############################
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
################################################################################
# Example A : Primary + secondary batteries (one BMS polls multiple batteries)
#
# The primary BMS component reads data for all batteries on the RS485 bus.
# Secondary batteries are exposed as separate YamBMS BMS entries using
# bms_combine_Ecoworthy_RS485_secondary.yaml.
#
# Set bms_battery_count on the primary to the total number of batteries.
################################################################################
packages:
# Ecoworthy Modbus - Include this ONCE per RS485 bus
ecoworthy_modbus: !include
file: packages/bms/bms_combine_Ecoworthy_RS485_modbus.yaml
vars:
ecoworthy_modbus_uart_id: 'uart_esp_1'
ecoworthy_modbus_baud_rate: '9600'
# Primary battery (BMS 1) - polls all batteries on the RS485 bus
bms1: !include
file: packages/bms/bms_combine_Ecoworthy_RS485.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'Ecoworthy-BMS 1'
bms_address: '0x01' # BMS 1 modbus address (usually 0x01 for primary)
bms_battery_count: '3' # total batteries polled (1=primary only, 2+=primary+secondaries)
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# Secondary battery 2 (BMS 2) - data polled by primary
bms2: !include
file: packages/bms/bms_combine_Ecoworthy_RS485_secondary.yaml
vars:
bms_id: '2' # must be a number
bms_name: 'Ecoworthy-BMS 2'
parent_ecoworthy_bms_id: 'ecoworthy_bms1' # references the primary component
secondary_battery_number: '2'
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light'
# Secondary battery 3 (BMS 3) - data polled by primary
bms3: !include
file: packages/bms/bms_combine_Ecoworthy_RS485_secondary.yaml
vars:
bms_id: '3' # must be a number
bms_name: 'Ecoworthy-BMS 3'
parent_ecoworthy_bms_id: 'ecoworthy_bms1' # references the primary component
secondary_battery_number: '3'
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light'
################################################################################
# Example B : Multiple independent primaries (each BMS has its own address)
#
# Use this when each Ecoworthy BMS is independently addressed on the bus
# and you don't need the primary/secondary polling pattern.
# Protection thresholds (cell OVP/UVP) are read from BMS config registers.
################################################################################
# # Ecoworthy Modbus - Include this ONCE per RS485 bus
# ecoworthy_modbus: !include
# file: packages/bms/bms_combine_Ecoworthy_RS485_modbus.yaml
# vars:
# ecoworthy_modbus_uart_id: 'uart_esp_1'
# ecoworthy_modbus_baud_rate: '9600'
#
# # Ecoworthy BMS 1
# bms1: !include
# file: packages/bms/bms_combine_Ecoworthy_RS485.yaml
# vars:
# bms_id: '1' # must be a number
# bms_name: 'Ecoworthy-BMS 1'
# bms_address: '0x01' # BMS 1 modbus address (usually 0x01 for primary)
# bms_cell_max_cycles: '6000.0'
# bms_status_led_id: 'esp_light'
#
# # Ecoworthy BMS 2
# bms2: !include
# file: packages/bms/bms_combine_Ecoworthy_RS485.yaml
# vars:
# bms_id: '2' # must be a number
# bms_name: 'Ecoworthy-BMS 2'
# bms_address: '0x02' # BMS 2 modbus address
# bms_cell_max_cycles: '6000.0'
# bms_status_led_id: 'esp_light'
@@ -1,5 +1,5 @@
# Updated : 2025.04.01
# Version : 1.5.5
# Updated : 2026.02.16
# Version : 1.1.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -19,7 +19,8 @@
############################ Local Packages Example ############################
# This is not a working YAML but just code ready to copy into your main YAML.
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
################################################################################
@@ -29,7 +30,7 @@ packages:
file: packages/bms/bms_combine_JBD_UART_full.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_name: 'JBD-BMS 1'
bms_uart_id: 'uart_esp_1'
bms_rx_timeout: '150ms'
# Required settings cannot be retrieved from BMS
@@ -43,12 +44,13 @@ packages:
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms2: !include
file: packages/bms/bms_combine_JBD_BLE_full.yaml
vars:
bms_id: '2' # must be a number
bms_name: 'BMS 2'
bms_name: 'JBD-BMS 2'
bms_ble_mac_address: 'C8:47:8C:10:7E:AA' # Your MAC address
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
@@ -61,3 +63,4 @@ packages:
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -0,0 +1,109 @@
# Updated : 2026.02.16
# Version : 1.1.5
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
############################ Local Packages Example ############################
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
################################################################################
packages:
# The sniffer represents the ESP node connected to the JK-BMS PB RS485 bus
# If address 0x00 is not detected on the RS485 bus, the sniffer will act directly as a master BMS (mode 2, max 15 BMS)
# RS485 Sniffer with talk_pin (WS-RS485-CAN and other RS485 boards with a flow_control_pin)
# sniffer1: !include
# file: packages/bms/bms_combine_JK_RS485_Modbus_sniffer_talk_pin.yaml
# vars:
# sniffer_protocol: 'JK02_32S'
# sniffer_uart_id: 'uart_esp_1'
# sniffer_talk_pin: ${talk_pin} # can be replaced by the GPIO number
sniffer1: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_sniffer.yaml
vars:
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_1'
# Mode2 : configure the DIP switches of your BMS from 0x01 to 0x0F (don't use the 0x00 address, maximum 15 BMS)
bms1: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_address: '0x01' # BMS 1 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms2: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml
vars:
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_address: '0x02' # BMS 2 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms3: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml
vars:
bms_id: '3' # must be a number
bms_name: 'JK-BMS 3'
bms_address: '0x03' # BMS 3 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms4: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml
vars:
bms_id: '4' # must be a number
bms_name: 'JK-BMS 4'
bms_address: '0x04' # BMS 4 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms5: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml
vars:
bms_id: '5' # must be a number
bms_name: 'JK-BMS 5'
bms_address: '0x05' # BMS 5 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms6: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml
vars:
bms_id: '6' # must be a number
bms_name: 'JK-BMS 6'
bms_address: '0x06' # BMS 6 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms7: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml
vars:
bms_id: '7' # must be a number
bms_name: 'JK-BMS 7'
bms_address: '0x07' # BMS 7 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms8: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml
vars:
bms_id: '8' # must be a number
bms_name: 'JK-BMS 8'
bms_address: '0x08' # BMS 8 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -0,0 +1,101 @@
# Updated : 2026.02.16
# Version : 1.1.5
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
############################ Local Packages Example ############################
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
################################################################################
packages:
# The sniffer represents the ESP node connected to the JK-BMS PB RS485 bus
# If address 0x00 is not detected on the RS485 bus, the sniffer will act directly as a master BMS (mode 1, max 16 BMS)
# RS485 Sniffer with talk_pin (WS-RS485-CAN and other RS485 boards with a flow_control_pin)
# sniffer1: !include
# file: packages/bms/bms_combine_JK_RS485_Modbus_sniffer_talk_pin.yaml
# vars:
# sniffer_protocol: 'JK02_32S'
# sniffer_uart_id: 'uart_esp_1'
# sniffer_talk_pin: ${talk_pin} # can be replaced by the GPIO number
sniffer1: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_sniffer.yaml
vars:
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_1'
# Mode1 : configure the DIP switches of your BMS from 0x00 to 0x0F (max 16 BMS)
bms1: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_full.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_address: '0x00' # BMS 1 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms2: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_full.yaml
vars:
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_address: '0x01' # BMS 2 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms3: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_full.yaml
vars:
bms_id: '3' # must be a number
bms_name: 'JK-BMS 3'
bms_address: '0x02' # BMS 3 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms4: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_full.yaml
vars:
bms_id: '4' # must be a number
bms_name: 'JK-BMS 4'
bms_address: '0x03' # BMS 4 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms5: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_full.yaml
vars:
bms_id: '5' # must be a number
bms_name: 'JK-BMS 5'
bms_address: '0x04' # BMS 5 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms6: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_full.yaml
vars:
bms_id: '6' # must be a number
bms_name: 'JK-BMS 6'
bms_address: '0x05' # BMS 6 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms7: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_full.yaml
vars:
bms_id: '7' # must be a number
bms_name: 'JK-BMS 7'
bms_address: '0x06' # BMS 7 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -1,5 +1,5 @@
# Updated : 2025.04.01
# Version : 1.5.5
# Updated : 2026.02.16
# Version : 1.1.5
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -19,7 +19,8 @@
############################ Local Packages Example ############################
# This is not a working YAML but just code ready to copy into your main YAML.
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
################################################################################
@@ -28,18 +29,17 @@ packages:
# The sniffer represents the ESP node connected to the JK-BMS PB RS485 bus
# If address 0x00 is not detected on the RS485 bus, the sniffer will act directly as a master BMS (mode 2, max 15 BMS)
# RS485 Sniffer with talk_pin (WS-RS485-CAN and other RS485 boards with a flow_control_pin)
# sniffer1: !include
# file: packages/bms/bms_combine_JK_RS485_Modbus_sniffer_talk_pin.yaml
# vars:
# sniffer_id: 'sniffer1'
# sniffer_protocol: 'JK02_32S'
# sniffer_uart_id: 'uart_esp_1'
# sniffer_talk_pin: 8 # ESP32: 4, ESP32-S3: 8, ESP32-C3: 10
# sniffer_talk_pin: ${talk_pin} # can be replaced by the GPIO number
sniffer1: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_sniffer.yaml
vars:
sniffer_id: 'sniffer1'
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_1'
@@ -47,79 +47,63 @@ packages:
bms1: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_address: '0x01' # BMS 1 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms2: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_address: '0x02' # BMS 2 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms3: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '3' # must be a number
bms_name: 'JK-BMS 3'
bms_address: '0x03' # BMS 3 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms4: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '4' # must be a number
bms_name: 'JK-BMS 4'
bms_address: '0x04' # BMS 4 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms5: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '5' # must be a number
bms_name: 'JK-BMS 5'
bms_address: '0x05' # BMS 5 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms6: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '6' # must be a number
bms_name: 'JK-BMS 6'
bms_address: '0x06' # BMS 6 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms7: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '7' # must be a number
bms_name: 'JK-BMS 7'
bms_address: '0x07' # BMS 7 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms8: !include
file: packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '8' # must be a number
bms_name: 'JK-BMS 8'
bms_address: '0x08' # BMS 8 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -1,5 +1,5 @@
# Updated : 2025.04.01
# Version : 1.5.5
# Updated : 2026.02.16
# Version : 1.1.3
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -19,7 +19,8 @@
############################ Local Packages Example ############################
# This is not a working YAML but just code ready to copy into your main YAML.
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
################################################################################
@@ -35,6 +36,7 @@ packages:
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms2: !include
file: packages/bms/bms_combine_JK_BLE_standard.yaml
@@ -46,3 +48,4 @@ packages:
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -1,5 +1,5 @@
# Updated : 2025.04.01
# Version : 1.5.5
# Updated : 2026.02.16
# Version : 1.1.3
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -19,7 +19,8 @@
############################ Local Packages Example ############################
# This is not a working YAML but just code ready to copy into your main YAML.
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
################################################################################
@@ -34,6 +35,7 @@ packages:
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms2: !include
file: packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml
@@ -44,3 +46,4 @@ packages:
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -0,0 +1,54 @@
# Updated : 2026.02.16
# Version : 1.1.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
############################ Local Packages Example ############################
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
################################################################################
packages:
pace_modbus: !include
file: packages/bms/bms_combine_PACE_RS485_modbus.yaml
vars:
pace_modbus_uart_id: 'uart_esp_1'
pace_modbus_baud_rate: '9600' # 9600 / 19200 ; please set the baudrate of your Pace BMS model here
bms1: !include
file: packages/bms/bms_combine_PACE_RS485_bms_full.yaml
vars:
bms_id: '1' # BMS id and modbus address
bms_name: 'PACE-BMS 1'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms2: !include
file: packages/bms/bms_combine_PACE_RS485_bms_full.yaml
vars:
bms_id: '2' # BMS id and modbus address
bms_name: 'PACE-BMS 2'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms3: !include
file: packages/bms/bms_combine_PACE_RS485_bms_full.yaml
vars:
bms_id: '3' # BMS id and modbus address
bms_name: 'PACE-BMS 3'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -1,5 +1,5 @@
# Updated : 2025.04.01
# Version : 1.5.5
# Updated : 2026.02.16
# Version : 1.1.5
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -19,28 +19,24 @@
############################ Local Packages Example ############################
# This is not a working YAML but just code ready to copy into your main YAML.
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
################################################################################
packages:
seplos_modbus1: !include
seplos_modbus: !include
file: packages/bms/bms_combine_SEPLOS_V1_V2_RS485_modbus.yaml
vars:
seplos_modbus_id: 'seplos_modbus1'
seplos_modbus_uart_id: 'uart_esp_1'
seplos_modbus_baud_rate: '9600' # 9600 / 19200 ; please set the baudrate of your Seplos BMS model here
seplos_modbus_rx_timeout: '150ms'
bms1: !include
file: packages/bms/bms_combine_SEPLOS_V1_V2_RS485_bms_full.yaml
vars:
# Seplos modbus ID
seplos_modbus_id: 'seplos_modbus1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_name: 'SEPLOS-BMS 1'
bms_address: '0x01' # BMS 1 DIP switch
bms_protocol_version: '0x20' # Known protocol versions: 0x20 (Seplos), 0x26 (Boqiang)
# Required settings cannot be retrieved from BMS
@@ -51,18 +47,15 @@ packages:
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms2: !include
file: packages/bms/bms_combine_SEPLOS_V1_V2_RS485_bms_full.yaml
vars:
# Seplos modbus ID
seplos_modbus_id: 'seplos_modbus1'
# BMS vars
bms_id: '2' # must be a number
bms_name: 'BMS 2'
bms_name: 'SEPLOS-BMS 2'
bms_address: '0x02' # BMS 2 DIP switch
bms_protocol_version: '0x20' # Known protocol versions: 0x20 (Seplos), 0x26 (Boqiang)
bms_uart_id: uart_esp_2
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
# LFP values example
@@ -71,3 +64,21 @@ packages:
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms3: !include
file: packages/bms/bms_combine_SEPLOS_V1_V2_RS485_bms_full.yaml
vars:
bms_id: '3' # must be a number
bms_name: 'SEPLOS-BMS 3'
bms_address: '0x03' # BMS 2 DIP switch
bms_protocol_version: '0x20' # Known protocol versions: 0x20 (Seplos), 0x26 (Boqiang)
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
# LFP values example
bms_max_charge_current: '100' # A. Used to calculate maximum charge current
bms_max_discharge_current: '100' # A. Used to calculate maximum discharge current
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -0,0 +1,83 @@
# Updated : 2026.02.16
# Version : 1.1.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
############################ Local Packages Example ############################
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
################################################################################
packages:
seplos_parser: !include
file: packages/bms/bms_combine_SEPLOS_V3_RS485_modbus_sniffer.yaml
vars:
seplos_uart_id: 'uart_esp_1'
seplos_baud_rate: '19200' # 9600 / 19200 ; please set the baudrate of your Seplos BMS model here
seplos_bms_count: '3' # Seplos V3 BMS count
seplos_update_interval: '3' # # Time in seconds, update interval for all data points
bms1: !include
file: packages/bms/bms_combine_SEPLOS_V3_RS485_bms_full.yaml
vars:
bms_id: '1'
bms_prefix: 'bms0' # DON'T CHANGE THIS NAME !
bms_name: 'SEPLOS-BMS 1'
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
bms_max_charge_current: '100' # A. The maximum current your BMS can handle
bms_max_discharge_current: '100' # A. The maximum current your BMS can handle
# LFP values example
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms2: !include
file: packages/bms/bms_combine_SEPLOS_V3_RS485_bms_full.yaml
vars:
bms_id: '2'
bms_prefix: 'bms1' # DON'T CHANGE THIS NAME !
bms_name: 'SEPLOS-BMS 2'
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
bms_max_charge_current: '100' # A. The maximum current your BMS can handle
bms_max_discharge_current: '100' # A. The maximum current your BMS can handle
# LFP values example
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
bms3: !include
file: packages/bms/bms_combine_SEPLOS_V3_RS485_bms_full.yaml
vars:
bms_id: '3'
bms_prefix: 'bms2' # DON'T CHANGE THIS NAME !
bms_name: 'SEPLOS-BMS 3'
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
bms_max_charge_current: '100' # A. The maximum current your BMS can handle
bms_max_discharge_current: '100' # A. The maximum current your BMS can handle
# LFP values example
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -0,0 +1,71 @@
# Updated : 2026.02.16
# Version : 1.1.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
############################ Local Packages Example ############################
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
################################################################################
packages:
# Basen controller
controller: !include
file: packages/bms/bms_combine_BASEN_RS485_controller.yaml
vars:
basen_uart_id: 'uart_esp_1'
basen_uart_baud_rate: '9600'
basen_controller_id: "basen_controller_1"
# Basen module 1
bms1: !include
file: packages/bms/bms_combine_BASEN_RS485_full.yaml
vars:
bms_id: '1' # must be a number
bms_name: 'BASEN-BMS 1'
bms_address: '0x01'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# Basen module 2
bms2: !include
file: packages/bms/bms_combine_BASEN_RS485_full.yaml
vars:
bms_id: '2' # must be a number
bms_name: 'BASEN-BMS 2'
bms_address: '0x02'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# Balancer 1 linked to BMS 1
balancer1: !include
file: packages/balancer/balancer_sensors_JK_NEEY_BLE.yaml
vars:
bms_id: '1' # must match the BMS ID
balancer_name: 'Balancer 1'
balancer_ble_mac_address: 11:22:33:44:55:66
balancer_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# Balancer 2 linked to BMS 2
balancer2: !include
file: packages/balancer/balancer_sensors_JK_NEEY_BLE.yaml
vars:
bms_id: '2' # must match the BMS ID
balancer_name: 'Balancer 2'
balancer_ble_mac_address: 11:22:33:44:55:67
balancer_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -0,0 +1,64 @@
# Updated : 2026.02.16
# Version : 1.1.5
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
############################ Local Packages Example ############################
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
################################################################################
packages:
shunt1: !include
file: packages/shunt/shunt_combine_Junctek_KHF_UART.yaml
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_uart_id: 'uart_esp_1'
shunt_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# Optional: BMS IDs connected to this shunt
# If provided, the shunt will only be used when all listed BMS are online
# If not provided, the shunt will be used independently of the BMS online status
bms_ids: '{1, 2}'
shunt1: !include
file: packages/shunt/shunt_combine_Victron_SmartShunt_UART.yaml
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_uart_id: 'uart_esp_1'
shunt_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# Optional: BMS IDs connected to this shunt
# If provided, the shunt will only be used when all listed BMS are online
# If not provided, the shunt will be used independently of the BMS online status
bms_ids: '{1, 2}'
shunt1: !include
file: packages/shunt/shunt_combine_Victron_SmartShunt_BLE.yaml
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_mac_address: '60:A4:23:91:8F:55' # Your MAC address
shunt_encryption_key: '0df4d0395b7d1a876c0c33ecb9e70dcd' # Your encryption key
shunt_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# Optional: BMS IDs connected to this shunt
# If provided, the shunt will only be used when all listed BMS are online
# If not provided, the shunt will be used independently of the BMS online status
bms_ids: '{1, 2}'
@@ -0,0 +1,53 @@
# Updated : 2026.02.16
# Version : 1.1.3
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
############################ Remote Packages Example ###########################
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
# packages:
# remote_packages:
# url: https://github.com/Sleeper85/esphome-yambms
# ref: main
# refresh: 60s
# files:
################################################################################
# Basen controller
- path: 'packages/bms/bms_combine_BASEN_RS485_controller.yaml'
vars:
basen_uart_id: 'uart_esp_1'
basen_uart_baud_rate: '9600'
basen_controller_id: "basen_controller_1"
# Basen module 1
- path: 'packages/bms/bms_combine_BASEN_RS485_full.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'BASEN-BMS 1'
bms_address: '0x01'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# Basen module 2
- path: 'packages/bms/bms_combine_BASEN_RS485_full.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'BASEN-BMS 2'
bms_address: '0x02'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -0,0 +1,47 @@
# Updated : 2026.02.15
# Version : 1.1.2
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
############################ Remote Packages Example ###########################
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
# packages:
# remote_packages:
# url: https://github.com/Sleeper85/esphome-yambms
# ref: main
# refresh: 60s
# files:
################################################################################
# This is additional charging logic executed at the BMS level.
# This logic turns the BMS's charge switch OFF when the battery is fully charged.
# This prevents the battery from being overcharged while the other batteries continue to charge.
# This logic acts directly on the charging MOSFETs; please use it only if necessary and at your own risk.
# The BMS charge switch will be turned ON again during ReBulk.
# BMS 1
- path: 'packages/bms/bms_options_charging_logic.yaml'
vars:
bms_id: '1' # must be a number
# BMS 2
- path: 'packages/bms/bms_options_charging_logic.yaml'
vars:
bms_id: '2' # must be a number
@@ -0,0 +1,109 @@
# Updated : 2026.02.16
# Version : 1.1.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
############################ Remote Packages Example ###########################
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
# packages:
# remote_packages:
# url: https://github.com/Sleeper85/esphome-yambms
# ref: main
# refresh: 60s
# files:
################################################################################
# Shunt 1
- path: 'packages/shunt/shunt_combine_FAKE.yaml'
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
# Shunt sensors values
shunt_voltage: '52.81' # V
shunt_current: '17.5' # A
shunt_power: '924' # W
shunt_soc: '50' # %
# BMS 1
- path: 'packages/bms/bms_combine_DEMO.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'BMS 1'
# BMS sensors values
bms_battery_capacity: '280' # Ah
bms_current: '9.2' # A
bms_soc: '87' # %
bms_soh: '98' # %
bms_min_cell_voltage: '3.339' # V
bms_max_cell_voltage: '3.341' # V
bms_min_temperature: '9.1' # °C
bms_max_temperature: '9.3' # °C
bms_max_charge_current: '100' # A
bms_max_discharge_current: '100' # A
bms_cell_ovp: '3.650' # V Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
bms_charging_cycles: '178' # charging cycles number Used to calculate the SoH
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_DEMO.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'BMS 2'
# BMS sensors values
bms_battery_capacity: '280' # Ah
bms_current: '11.3' # A
bms_soc: '85' # %
bms_soh: '89' # %
bms_min_cell_voltage: '3.337' # V
bms_max_cell_voltage: '3.339' # V
bms_min_temperature: '15.1' # °C
bms_max_temperature: '15.3' # °C
bms_max_charge_current: '100' # A
bms_max_discharge_current: '100' # A
bms_cell_ovp: '3.650' # V Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
bms_charging_cycles: '226' # charging cycles number Used to calculate the SoH
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 3
- path: 'packages/bms/bms_combine_DEMO.yaml'
vars:
bms_id: '3' # must be a number
bms_name: 'BMS 3'
# BMS sensors values
bms_battery_capacity: '280' # Ah
bms_current: '15.7' # A
bms_soc: '83' # %
bms_soh: '79' # %
bms_min_cell_voltage: '3.334' # V
bms_max_cell_voltage: '3.336' # V
bms_min_temperature: '20.1' # °C
bms_max_temperature: '20.3' # °C
bms_max_charge_current: '100' # A
bms_max_discharge_current: '100' # A
bms_cell_ovp: '3.650' # V Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V Used by 'Auto CVL' functions
bms_charging_cycles: '194' # charging cycles number Used to calculate the SoH
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -0,0 +1,62 @@
# Updated : 2026.02.16
# Version : 1.1.3
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
############################ Remote Packages Example ###########################
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
# packages:
# remote_packages:
# url: https://github.com/Sleeper85/esphome-yambms
# ref: main
# refresh: 60s
# files:
################################################################################
# Deye BMS top unit (required)
- path: 'packages/bms/bms_sensors_DEYE_CAN_top_full.yaml'
vars:
# CAN BUS ID
canbus_id: 'canbus_bms_1'
deye_name: 'DEYE-Top 1'
deye_id: '1'
# Deye module 1
- path: 'packages/bms/bms_combine_DEYE_CAN_module_full.yaml'
vars:
# CAN BUS ID
canbus_id: 'canbus_bms_1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'DEYE-BMS 1'
deye_id: '1'
deye_module_id: '0' # Modules are numbered with 0-9
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# Deye module 2
- path: 'packages/bms/bms_combine_DEYE_CAN_module_full.yaml'
vars:
# CAN BUS ID
canbus_id: 'canbus_bms_1'
# BMS vars
deye_id: '1'
bms_id: '2' # must be a number
bms_name: 'DEYE-BMS 2'
deye_module_id: '1' # Modules are numbered with 0-9
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -0,0 +1,60 @@
# Updated : 2026.02.16
# Version : 1.1.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
############################ Remote Packages Example ###########################
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
# packages:
# remote_packages:
# url: https://github.com/Sleeper85/esphome-yambms
# ref: main
# refresh: 60s
# files:
################################################################################
# EG4 Modbus
- path: 'packages/bms/bms_combine_EG4_RS485_modbus.yaml'
vars:
eg4_modbus_uart_id: 'uart_esp_1'
eg4_modbus_baud_rate: '9600'
# BMS 1
- path: 'packages/bms/bms_combine_EG4_LLV2_RS485_bms_full.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'EG4-BMS 1'
## BMS address must start at 2 with EG4 LLV2, ID 1 is a special case and has different output.
bms_address: 2 # BMS 1 modbus address
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_EG4_LLV2_RS485_bms_full.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'EG4-BMS 2'
bms_address: 3 # BMS 2 modbus address
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 3
- path: 'packages/bms/bms_combine_EG4_LLV2_RS485_bms_full.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'EG4-BMS 3'
bms_address: 4 # BMS 3 modbus address
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -0,0 +1,107 @@
# Updated : 2026.02.16
# Version : 1.1.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
############################ Remote Packages Example ###########################
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
# packages:
# remote_packages:
# url: https://github.com/Sleeper85/esphome-yambms
# ref: main
# refresh: 60s
# files:
################################################################################
# Example A : Primary + secondary batteries (one BMS polls multiple batteries)
#
# The primary BMS component reads data for all batteries on the RS485 bus.
# Secondary batteries are exposed as separate YamBMS BMS entries using
# bms_combine_Ecoworthy_RS485_secondary.yaml.
#
# Set bms_battery_count on the primary to the total number of batteries.
################################################################################
# Ecoworthy Modbus - Include this ONCE per RS485 bus
- path: 'packages/bms/bms_combine_Ecoworthy_RS485_modbus.yaml'
vars:
ecoworthy_modbus_uart_id: 'uart_esp_1'
ecoworthy_modbus_baud_rate: '9600'
# Primary battery (BMS 1) - polls all batteries on the RS485 bus
- path: 'packages/bms/bms_combine_Ecoworthy_RS485.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'Ecoworthy-BMS 1'
bms_address: '0x01' # BMS 1 modbus address (usually 0x01 for primary)
bms_battery_count: '3' # total batteries polled (1=primary only, 2+=primary+secondaries)
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# Secondary battery 2 (BMS 2) - data polled by primary
- path: 'packages/bms/bms_combine_Ecoworthy_RS485_secondary.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'Ecoworthy-BMS 2'
parent_ecoworthy_bms_id: 'ecoworthy_bms1' # references the primary component
secondary_battery_number: '2'
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light'
# Secondary battery 3 (BMS 3) - data polled by primary
- path: 'packages/bms/bms_combine_Ecoworthy_RS485_secondary.yaml'
vars:
bms_id: '3' # must be a number
bms_name: 'Ecoworthy-BMS 3'
parent_ecoworthy_bms_id: 'ecoworthy_bms1' # references the primary component
secondary_battery_number: '3'
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light'
################################################################################
# Example B : Multiple independent primaries (each BMS has its own address)
#
# Use this when each Ecoworthy BMS is independently addressed on the bus
# and you don't need the primary/secondary polling pattern.
# Protection thresholds (cell OVP/UVP) are read from BMS config registers.
################################################################################
# # Ecoworthy Modbus - Include this ONCE per RS485 bus
# - path: 'packages/bms/bms_combine_Ecoworthy_RS485_modbus.yaml'
# vars:
# ecoworthy_modbus_uart_id: 'uart_esp_1'
# ecoworthy_modbus_baud_rate: '9600'
# # Ecoworthy BMS 1
# - path: 'packages/bms/bms_combine_Ecoworthy_RS485.yaml'
# vars:
# bms_id: '1' # must be a number
# bms_name: 'Ecoworthy-BMS 1'
# bms_address: '0x01' # BMS 1 modbus address (usually 0x01 for primary)
# bms_cell_max_cycles: '6000.0'
# bms_status_led_id: 'esp_light'
# # Ecoworthy BMS 2
# - path: 'packages/bms/bms_combine_Ecoworthy_RS485.yaml'
# vars:
# bms_id: '2' # must be a number
# bms_name: 'Ecoworthy-BMS 2'
# bms_address: '0x02' # BMS 2 modbus address
# bms_cell_max_cycles: '6000.0'
# bms_status_led_id: 'esp_light'
@@ -1,5 +1,5 @@
# Updated : 2025.04.01
# Version : 1.5.5
# Updated : 2026.02.16
# Version : 1.1.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -19,22 +19,23 @@
############################ Remote Packages Example ###########################
# This is not a working YAML but just code ready to copy into your main YAML.
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
# packages:
# remote_packages:
# url: https://github.com/Sleeper85/esphome-yambms
# ref: main
# refresh: 60s
# files:
################################################################################
packages:
bms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# BMS 1
- path: 'packages/bms/bms_combine_JBD_UART_full.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_name: 'JBD-BMS 1'
bms_uart_id: 'uart_esp_1'
bms_rx_timeout: '150ms'
# Required settings cannot be retrieved from BMS
@@ -48,11 +49,12 @@ packages:
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_JBD_BLE_full.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'BMS 2'
bms_name: 'JBD-BMS 2'
bms_ble_mac_address: 'C8:47:8C:10:7E:AA' # Your MAC address
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
@@ -65,3 +67,4 @@ packages:
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -0,0 +1,100 @@
# Updated : 2026.02.16
# Version : 1.1.5
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
############################ Remote Packages Example ###########################
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
# packages:
# remote_packages:
# url: https://github.com/Sleeper85/esphome-yambms
# ref: main
# refresh: 60s
# files:
################################################################################
# RS485 Sniffer with talk_pin (WS-RS485-CAN and other RS485 boards with a flow_control_pin)
# - path: 'packages/bms/bms_combine_JK_RS485_Modbus_sniffer_talk_pin.yaml'
# vars:
# sniffer_protocol: 'JK02_32S'
# sniffer_uart_id: 'uart_esp_1'
# sniffer_talk_pin: ${talk_pin} # can be replaced by the GPIO number
# RS485 Sniffer
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_sniffer.yaml'
vars:
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_1'
# BMS 1
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_address: '0x01' # BMS 1 ( JK app `Device Addr.` setting )
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_address: '0x02' # BMS 2 ( JK app `Device Addr.` setting )
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 3
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
bms_id: '3' # must be a number
bms_name: 'JK-BMS 3'
bms_address: '0x03' # BMS 3 ( JK app `Device Addr.` setting )
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 4
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
bms_id: '4' # must be a number
bms_name: 'JK-BMS 4'
bms_address: '0x04' # BMS 4 ( JK app `Device Addr.` setting )
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 5
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
bms_id: '5' # must be a number
bms_name: 'JK-BMS 5'
bms_address: '0x05' # BMS 5 ( JK app `Device Addr.` setting )
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 6
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
bms_id: '6' # must be a number
bms_name: 'JK-BMS 6'
bms_address: '0x06' # BMS 6 ( JK app `Device Addr.` setting )
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 7
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
bms_id: '7' # must be a number
bms_name: 'JK-BMS 7'
bms_address: '0x07' # BMS 7 ( JK app `Device Addr.` setting )
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 8
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_JK-B_standard.yaml'
vars:
bms_id: '8' # must be a number
bms_name: 'JK-BMS 8'
bms_address: '0x08' # BMS 8 ( JK app `Device Addr.` setting )
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -1,5 +1,5 @@
# Updated : 2025.04.01
# Version : 1.5.5
# Updated : 2026.02.16
# Version : 1.1.5
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -19,95 +19,82 @@
############################ Remote Packages Example ###########################
# This is not a working YAML but just code ready to copy into your main YAML.
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
# packages:
# remote_packages:
# url: https://github.com/Sleeper85/esphome-yambms
# ref: main
# refresh: 60s
# files:
################################################################################
packages:
# The sniffer represents the ESP node connected to the JK-BMS PB RS485 bus
# If address 0x00 is not detected on the RS485 bus, the sniffer will act directly as a master BMS (mode 2, max 15 BMS)
bms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# RS485 Sniffer with talk_pin (WS-RS485-CAN and other RS485 boards with a flow_control_pin)
# - path: 'packages/bms/bms_combine_JK_RS485_Modbus_sniffer_talk_pin.yaml'
# vars:
# sniffer_protocol: 'JK02_32S'
# sniffer_uart_id: 'uart_esp_1'
# sniffer_talk_pin: ${talk_pin} # can be replaced by the GPIO number
# RS485 Sniffer
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_sniffer.yaml'
vars:
sniffer_id: 'sniffer1'
sniffer_protocol: 'JK02_32S'
sniffer_uart_id: 'uart_esp_1'
# BMS 1
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'JK-BMS 1'
bms_address: '0x01' # BMS 1 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '2' # must be a number
bms_name: 'JK-BMS 2'
bms_address: '0x02' # BMS 2 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 3
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '3' # must be a number
bms_name: 'JK-BMS 3'
bms_address: '0x03' # BMS 3 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 4
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '4' # must be a number
bms_name: 'JK-BMS 4'
bms_address: '0x04' # BMS 4 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 5
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '5' # must be a number
bms_name: 'JK-BMS 5'
bms_address: '0x05' # BMS 5 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 6
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '6' # must be a number
bms_name: 'JK-BMS 6'
bms_address: '0x06' # BMS 6 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 7
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '7' # must be a number
bms_name: 'JK-BMS 7'
bms_address: '0x07' # BMS 7 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 8
- path: 'packages/bms/bms_combine_JK_RS485_Modbus_bms_standard.yaml'
vars:
# Sniffer ID
sniffer_id: 'sniffer1'
# BMS vars
bms_id: '8' # must be a number
bms_name: 'JK-BMS 8'
bms_address: '0x08' # BMS 8 DIP switch
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -1,5 +1,5 @@
# Updated : 2025.04.01
# Version : 1.5.5
# Updated : 2026.02.16
# Version : 1.1.3
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -19,17 +19,18 @@
############################ Remote Packages Example ###########################
# This is not a working YAML but just code ready to copy into your main YAML.
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
# packages:
# remote_packages:
# url: https://github.com/Sleeper85/esphome-yambms
# ref: main
# refresh: 60s
# files:
################################################################################
packages:
bms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# BMS 1
- path: 'packages/bms/bms_combine_JK_BLE_standard.yaml'
vars:
@@ -40,6 +41,7 @@ packages:
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_JK_BLE_standard.yaml'
vars:
@@ -50,3 +52,4 @@ packages:
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -1,5 +1,5 @@
# Updated : 2025.04.01
# Version : 1.5.5
# Updated : 2026.02.16
# Version : 1.1.3
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -19,17 +19,18 @@
############################ Remote Packages Example ###########################
# This is not a working YAML but just code ready to copy into your main YAML.
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
# packages:
# remote_packages:
# url: https://github.com/Sleeper85/esphome-yambms
# ref: main
# refresh: 60s
# files:
################################################################################
packages:
bms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# BMS 1
- path: 'packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml'
vars:
@@ -39,6 +40,7 @@ packages:
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_JK_UART_4G-GPS_full.yaml'
vars:
@@ -48,3 +50,4 @@ packages:
# Maximum cell charging cycles is used to calculate the battey SoH.
# MB31=8000.0, LF280K v3=8000.0, LF280K v2=6000.0, LF280=3000.0 (decimal is required)
bms_cell_max_cycles: '6000.0'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -0,0 +1,56 @@
# Updated : 2026.02.16
# Version : 1.1.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
############################ Remote Packages Example ###########################
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
# packages:
# remote_packages:
# url: https://github.com/Sleeper85/esphome-yambms
# ref: main
# refresh: 60s
# files:
################################################################################
# Pace Modbus
- path: 'packages/bms/bms_combine_PACE_RS485_modbus.yaml'
vars:
pace_modbus_uart_id: 'uart_esp_1'
pace_modbus_baud_rate: '9600' # 9600 / 19200 ; please set the baudrate of your Pace BMS model here
# BMS 1
- path: 'packages/bms/bms_combine_PACE_RS485_bms_full.yaml'
vars:
bms_id: '1' # BMS id and modbus address
bms_name: 'PACE-BMS 1'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_PACE_RS485_bms_full.yaml'
vars:
bms_id: '2' # BMS id and modbus address
bms_name: 'PACE-BMS 2'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 3
- path: 'packages/bms/bms_combine_PACE_RS485_bms_full.yaml'
vars:
bms_id: '3' # BMS id and modbus address
bms_name: 'PACE-BMS 3'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -1,5 +1,5 @@
# Updated : 2025.04.01
# Version : 1.5.5
# Updated : 2026.02.16
# Version : 1.1.5
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
@@ -19,32 +19,28 @@
############################ Remote Packages Example ###########################
# This is not a working YAML but just code ready to copy into your main YAML.
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
# packages:
# remote_packages:
# url: https://github.com/Sleeper85/esphome-yambms
# ref: main
# refresh: 60s
# files:
################################################################################
packages:
bms:
url: https://github.com/Sleeper85/esphome-yambms
ref: main
refresh: 0s
files:
# Seplos Modbus 1
# Seplos Modbus
- path: 'packages/bms/bms_combine_SEPLOS_V1_V2_RS485_modbus.yaml'
vars:
seplos_modbus_id: 'seplos_modbus1'
seplos_modbus_uart_id: 'uart_esp_1'
seplos_modbus_baud_rate: '9600' # 9600 / 19200 ; please set the baudrate of your Seplos BMS model here
seplos_modbus_rx_timeout: '150ms'
# BMS 1
- path: 'packages/bms/bms_combine_SEPLOS_V1_V2_RS485_bms_full.yaml'
vars:
# Seplos modbus ID
seplos_modbus_id: 'seplos_modbus1'
# BMS vars
bms_id: '1' # must be a number
bms_name: 'BMS 1'
bms_name: 'SEPLOS-BMS 1'
bms_address: '0x01' # BMS 1 DIP switch
bms_protocol_version: '0x20' # Known protocol versions: 0x20 (Seplos), 0x26 (Boqiang)
# Required settings cannot be retrieved from BMS
@@ -55,17 +51,14 @@ packages:
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_SEPLOS_V1_V2_RS485_bms_full.yaml'
vars:
# Seplos modbus ID
seplos_modbus_id: 'seplos_modbus1'
# BMS vars
bms_id: '2' # must be a number
bms_name: 'BMS 2'
bms_name: 'SEPLOS-BMS 2'
bms_address: '0x02' # BMS 2 DIP switch
bms_protocol_version: '0x20' # Known protocol versions: 0x20 (Seplos), 0x26 (Boqiang)
bms_uart_id: uart_esp_2
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
# LFP values example
@@ -74,3 +67,20 @@ packages:
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 3
- path: 'packages/bms/bms_combine_SEPLOS_V1_V2_RS485_bms_full.yaml'
vars:
bms_id: '3' # must be a number
bms_name: 'SEPLOS-BMS 3'
bms_address: '0x03' # BMS 2 DIP switch
bms_protocol_version: '0x20' # Known protocol versions: 0x20 (Seplos), 0x26 (Boqiang)
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
# LFP values example
bms_max_charge_current: '100' # A. Used to calculate maximum charge current
bms_max_discharge_current: '100' # A. Used to calculate maximum discharge current
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -0,0 +1,85 @@
# Updated : 2026.02.16
# Version : 1.1.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
############################ Remote Packages Example ###########################
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
# packages:
# remote_packages:
# url: https://github.com/Sleeper85/esphome-yambms
# ref: main
# refresh: 60s
# files:
################################################################################
# Seplos Parser
- path: 'packages/bms/bms_combine_SEPLOS_V3_RS485_modbus_sniffer.yaml'
vars:
seplos_uart_id: 'uart_esp_1'
seplos_baud_rate: '19200' # 9600 / 19200 ; please set the baudrate of your Seplos BMS model here
seplos_bms_count: '3' # Seplos V3 BMS count
seplos_update_interval: '3' # # Time in seconds, update interval for all data points
# BMS 1
- path: 'packages/bms/bms_combine_SEPLOS_V3_RS485_bms_full.yaml'
vars:
bms_id: '1'
bms_prefix: 'bms0' # DON'T CHANGE THIS NAME !
bms_name: 'SEPLOS-BMS 1'
# Required settings cannot be retrieved from BMS
# These values ​​must match your BMS settings
bms_max_charge_current: '100' # A. The maximum current your BMS can handle
bms_max_discharge_current: '100' # A. The maximum current your BMS can handle
# LFP values example
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 2
- path: 'packages/bms/bms_combine_SEPLOS_V3_RS485_bms_full.yaml'
vars:
bms_id: '2'
bms_prefix: 'bms1' # DON'T CHANGE THIS NAME !
bms_name: 'SEPLOS-BMS 2'
# Required settings cannot be retrieved from BMS
bms_max_charge_current: '100' # A. The maximum current your BMS can handle
bms_max_discharge_current: '100' # A. The maximum current your BMS can handle
# These values ​​must match your BMS settings
# LFP values example
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# BMS 3
- path: 'packages/bms/bms_combine_SEPLOS_V3_RS485_bms_full.yaml'
vars:
bms_id: '3'
bms_prefix: 'bms2' # DON'T CHANGE THIS NAME !
bms_name: 'SEPLOS-BMS 3'
# Required settings cannot be retrieved from BMS
bms_max_charge_current: '100' # A. The maximum current your BMS can handle
bms_max_discharge_current: '100' # A. The maximum current your BMS can handle
# These values ​​must match your BMS settings
# LFP values example
bms_cell_ovp: '3.650' # V. Used by 'Auto CCL' functions
bms_cell_uvp: '2.800' # V. Used by 'Auto DCL' functions and to calculate maximum discharge voltage
bms_balance_trigger_voltage: '0.010' # V. Used by 'Auto CVL' functions
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
@@ -0,0 +1,68 @@
# Updated : 2026.02.16
# Version : 1.1.1
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
############################ Remote Packages Example ###########################
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
# packages:
# remote_packages:
# url: https://github.com/Sleeper85/esphome-yambms
# ref: main
# refresh: 60s
# files:
################################################################################
# Basen controller
- path: 'packages/bms/bms_combine_BASEN_RS485_controller.yaml'
vars:
basen_uart_id: 'uart_esp_1'
basen_uart_baud_rate: '9600'
basen_controller_id: "basen_controller_1"
# Basen module 1
- path: 'packages/bms/bms_combine_BASEN_RS485_full.yaml'
vars:
bms_id: '1' # must be a number
bms_name: 'BASEN-BMS 1'
bms_address: '0x01'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# Basen module 2
- path: 'packages/bms/bms_combine_BASEN_RS485_full.yaml'
vars:
bms_id: '2' # must be a number
bms_name: 'BASEN-BMS 2'
bms_address: '0x02'
bms_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# Balancer 1 linked to BMS 1
- path: 'packages/balancer/balancer_sensors_JK_NEEY_BLE.yaml'
vars:
bms_id: '1' # must match the BMS ID
balancer_name: 'Balancer 1'
balancer_ble_mac_address: 11:22:33:44:55:66
balancer_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# Balancer 2 linked to BMS 2
- path: 'packages/balancer/balancer_sensors_JK_NEEY_BLE.yaml'
vars:
bms_id: '2' # must match the BMS ID
balancer_name: 'Balancer 2'
balancer_ble_mac_address: 11:22:33:44:55:67
balancer_status_led_id: 'esp_light' # led used to show status. Default = esp_light, comment out or set to 'nullptr' to disable
@@ -0,0 +1,72 @@
# Updated : 2026.02.16
# Version : 1.1.4
# GitHub : https://github.com/Sleeper85/esphome-yambms
# YamBMS ( Yet another multi-BMS Merging Solution )
# This YAML is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/gpl.html>.
############################ Remote Packages Example ###########################
# This is not a working YAML but just code ready to copy into
# your main YAML below the `packages:` section.
# packages:
# remote_packages:
# url: https://github.com/Sleeper85/esphome-yambms
# ref: main
# refresh: 60s
# files:
################################################################################
# Junctek KHF UART
# Shunt 1
- path: 'packages/shunt/shunt_combine_Junctek_KHF_UART.yaml'
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_uart_id: 'uart_esp_1'
shunt_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# Optional: BMS IDs connected to this shunt
# If provided, the shunt will only be used when all listed BMS are online
# If not provided, the shunt will be used independently of the BMS online status
bms_ids: '{1, 2}'
# Victron SmartShunt UART
# Shunt 1
- path: 'packages/shunt/shunt_combine_Victron_SmartShunt_UART.yaml'
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_uart_id: 'uart_esp_1'
shunt_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# Optional: BMS IDs connected to this shunt
# If provided, the shunt will only be used when all listed BMS are online
# If not provided, the shunt will be used independently of the BMS online status
bms_ids: '{1, 2}'
# Victron SmartShunt BLE
# Shunt 1
- path: 'packages/shunt/shunt_combine_Victron_SmartShunt_BLE.yaml'
vars:
shunt_id: '1' # must be a number
shunt_name: 'Shunt 1'
shunt_mac_address: '60:A4:23:91:8F:55' # Your MAC address
shunt_encryption_key: '0df4d0395b7d1a876c0c33ecb9e70dcd' # Your encryption key
shunt_status_led_id: 'esp_light' # LED used to show status; default = esp_light, comment out to disable
# Optional: BMS IDs connected to this shunt
# If provided, the shunt will only be used when all listed BMS are online
# If not provided, the shunt will be used independently of the BMS online status
bms_ids: '{1, 2}'
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 KiB

Loaded 100 of 372 files, more files were not shown because too many files have changed in this diff. Show more