{"id":15642501,"url":"https://github.com/syssi/esphome-seplos-bms","last_synced_at":"2025-04-06T14:10:49.955Z","repository":{"id":36955200,"uuid":"480507144","full_name":"syssi/esphome-seplos-bms","owner":"syssi","description":"ESPHome component to monitor a Seplos Battery Management System (Seplos-BMS) via UART or RS485","archived":false,"fork":false,"pushed_at":"2025-03-03T10:05:00.000Z","size":9531,"stargazers_count":83,"open_issues_count":27,"forks_count":36,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-30T13:07:58.408Z","etag":null,"topics":["esphome","esphome-component","hacktoberfest","modbus","seplos-bms","uart"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/syssi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"buy_me_a_coffee":"syssi"}},"created_at":"2022-04-11T18:40:10.000Z","updated_at":"2025-03-16T14:08:39.000Z","dependencies_parsed_at":"2023-02-13T18:48:13.589Z","dependency_job_id":"d2defbb3-45bb-49e6-8db7-7ce03b32a48a","html_url":"https://github.com/syssi/esphome-seplos-bms","commit_stats":{"total_commits":73,"total_committers":2,"mean_commits":36.5,"dds":0.1917808219178082,"last_synced_commit":"fc5ef38a8ca6d6ed245c376e6c1a1befe0d68814"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syssi%2Fesphome-seplos-bms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syssi%2Fesphome-seplos-bms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syssi%2Fesphome-seplos-bms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syssi%2Fesphome-seplos-bms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syssi","download_url":"https://codeload.github.com/syssi/esphome-seplos-bms/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247492513,"owners_count":20947544,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["esphome","esphome-component","hacktoberfest","modbus","seplos-bms","uart"],"created_at":"2024-10-03T11:56:28.365Z","updated_at":"2025-04-06T14:10:49.938Z","avatar_url":"https://github.com/syssi.png","language":"C++","funding_links":["https://buymeacoffee.com/syssi"],"categories":[],"sub_categories":[],"readme":"# esphome-seplos-bms\n\nESPHome component to monitor Seplos BMS via UART or RS485\n\n## Supported devices\n\n* 1101-SP05 (reported by [@JacquesdeBruyn](https://github.com/syssi/esphome-seplos-bms/issues/37))\n* 1101-SP15 (reported by [@NosIreland](https://github.com/syssi/esphome-seplos-bms/issues/1))\n* 1101-SP16 (reported by [@atze09](https://github.com/syssi/esphome-seplos-bms/issues/28))\n* 1101-ZH26 (reported by [@faizan-elite](https://github.com/syssi/esphome-seplos-bms/issues/2))\n* 1101-MZ02 (reported by [@fajera81](https://github.com/syssi/esphome-seplos-bms/discussions/33))\n* 1101-SP76 (reported by [@bagges](https://github.com/syssi/esphome-seplos-bms/issues/46))\n* 1101-SP101, PUSUNG-135 (reported by [@manznOnly](https://github.com/syssi/esphome-seplos-bms/discussions/50#discussioncomment-5630209))\n* 1101-10E-SP76-16S (reported by [@tobox](https://github.com/syssi/esphome-seplos-bms/discussions/42))\n* 1101-10E-JK06-16S (Apex 48200, Apex BMS 48V200A, reported by [@Pho3niX90](https://github.com/syssi/esphome-seplos-bms/issues/74))\n* Boqiang BMS007-LD43-16S-HW (reported by [@xdilian](https://github.com/syssi/esphome-seplos-bms/discussions/43)) requires custom settings\n  ```\n  protocol_version: 0x26\n  override_pack: 1\n  ```\n* Boqiang BMS001-HS01-15S (reported by [@xdilian](https://github.com/syssi/esphome-seplos-bms/discussions/43)) requires custom settings\n  ```\n  protocol_version: 0x26\n  override_pack: 1\n  override_cell_count: 10\n  ```\n* Seplos BMS V3.0 Type C, B-48200-C (BMS16S200A-SP05B, FW 1.3, [@Goaheadz](https://github.com/syssi/esphome-seplos-bms/discussions/98)) using [esp8266-seplos-v3-example.yaml](esp32-seplos-v3-example.yaml)\n\n## Untested devices\n\n* EMU10xx\n* 11XX Series\n\n## Schematics\n\n```\n                  RS485                      UART\n┌────────────┐              ┌──────────┐                ┌─────────┐\n│            │              │          │\u003c----- RX -----\u003e│         │\n│   Seplos   │\u003c-----B- ----\u003e│  RS485   │\u003c----- TX -----\u003e│ ESP32/  │\n│    BMS     │\u003c---- A+ ----\u003e│  to TTL  │\u003c----- GND ----\u003e│ ESP8266 │\n│            │\u003c--- GND ----\u003e│  module  │\u003c----- 3.3V ---\u003e│         │\u003c-- VCC\n│            │              │          │                │         │\u003c-- GND\n└────────────┘              └──────────┘                └─────────┘\n\n```\n\nPlease make sure to power the RS485 module with 3.3V because it affects the TTL (transistor-transistor logic) voltage between RS485 module and ESP.\n\n### RJ45 jack\n\n|  Pin  | Purpose | RS485-to-TTL pin | Color T-568B |\n|:-----:|:--------|:-----------------|--------------|\n| **1** | **B-**  | **B-**           | Orange-White |\n| **2** | **A+**  | **A+**           | Orange       |\n| **3** | **GND** | **GND**          | Green-White  |\n|   4   | NC      |                  |              |\n|   5   | NC      |                  |              |\n|   6   | GND     |                  |              |\n|   7   | A+      |                  |              |\n|   8   | B-      |                  |              |\n\nPlease be aware of the different RJ45 pinout colors ([T-568A vs. T-568B](images/rj45-colors-t568a-vs-t568.png)).\n\n## Requirements\n\n* [ESPHome 2024.6.0 or higher](https://github.com/esphome/esphome/releases).\n* Generic ESP32 or ESP8266 board\n\n## Installation\n\nYou can install this component with [ESPHome external components feature](https://esphome.io/components/external_components.html) like this:\n```yaml\nexternal_components:\n  - source: github://syssi/esphome-seplos-bms@main\n```\n\nor just use the `esp32-example.yaml` as proof of concept:\n\n```bash\n# Install esphome\npip3 install esphome\n\n# Clone this external component\ngit clone https://github.com/syssi/esphome-seplos-bms.git\ncd esphome-seplos-bms\n\n# Create a secrets.yaml containing some setup specific secrets\ncat \u003e secrets.yaml \u003c\u003cEOF\nwifi_ssid: MY_WIFI_SSID\nwifi_password: MY_WIFI_PASSWORD\n\nmqtt_host: MY_MQTT_HOST\nmqtt_username: MY_MQTT_USERNAME\nmqtt_password: MY_MQTT_PASSWORD\nEOF\n\n# Validate the configuration, create a binary, upload it, and start logs\n# If you use a esp8266 run the esp8266-examle.yaml\nesphome run esp32-example.yaml\n```\n\n![Screen recording](install.gif)\n\n## Example response all sensors enabled\n\n```\n[I][seplos_bms:031]: Telemetry frame received\n[D][sensor:124]: 'seplos-bms cell voltage 1': Sending state 3.28800 V with 3 decimals of accuracy\n[D][sensor:124]: 'seplos-bms cell voltage 2': Sending state 3.30400 V with 3 decimals of accuracy\n[D][sensor:124]: 'seplos-bms cell voltage 3': Sending state 3.31600 V with 3 decimals of accuracy\n[D][sensor:124]: 'seplos-bms cell voltage 4': Sending state 3.28700 V with 3 decimals of accuracy\n[D][sensor:124]: 'seplos-bms cell voltage 5': Sending state 3.31000 V with 3 decimals of accuracy\n[D][sensor:124]: 'seplos-bms cell voltage 6': Sending state 3.30100 V with 3 decimals of accuracy\n[D][sensor:124]: 'seplos-bms cell voltage 7': Sending state 3.29700 V with 3 decimals of accuracy\n[D][sensor:124]: 'seplos-bms cell voltage 8': Sending state 3.29300 V with 3 decimals of accuracy\n[D][sensor:124]: 'seplos-bms cell voltage 9': Sending state 3.30500 V with 3 decimals of accuracy\n[D][sensor:124]: 'seplos-bms cell voltage 10': Sending state 3.31200 V with 3 decimals of accuracy\n[D][sensor:124]: 'seplos-bms cell voltage 11': Sending state 3.30400 V with 3 decimals of accuracy\n[D][sensor:124]: 'seplos-bms cell voltage 12': Sending state 3.31100 V with 3 decimals of accuracy\n[D][sensor:124]: 'seplos-bms cell voltage 13': Sending state 3.30700 V with 3 decimals of accuracy\n[D][sensor:124]: 'seplos-bms cell voltage 14': Sending state 3.29000 V with 3 decimals of accuracy\n[D][sensor:124]: 'seplos-bms cell voltage 15': Sending state 3.29400 V with 3 decimals of accuracy\n[D][sensor:124]: 'seplos-bms cell voltage 16': Sending state 3.28900 V with 3 decimals of accuracy\n[D][sensor:124]: 'seplos-bms min cell voltage': Sending state 3.28700 V with 3 decimals of accuracy\n[D][sensor:124]: 'seplos-bms max cell voltage': Sending state 3.31600 V with 3 decimals of accuracy\n[D][sensor:124]: 'seplos-bms max voltage cell': Sending state 3.00000  with 0 decimals of accuracy\n[D][sensor:124]: 'seplos-bms min voltage cell': Sending state 4.00000  with 0 decimals of accuracy\n[D][sensor:124]: 'seplos-bms delta cell voltage': Sending state 0.02900 V with 3 decimals of accuracy\n[D][sensor:124]: 'seplos-bms average cell voltage': Sending state 3.30050 V with 3 decimals of accuracy\n[D][sensor:124]: 'seplos-bms temperature 1': Sending state 29.82000 °C with 0 decimals of accuracy\n[D][sensor:124]: 'seplos-bms temperature 2': Sending state 29.76000 °C with 0 decimals of accuracy\n[D][sensor:124]: 'seplos-bms temperature 3': Sending state 29.67000 °C with 0 decimals of accuracy\n[D][sensor:124]: 'seplos-bms temperature 4': Sending state 29.82000 °C with 0 decimals of accuracy\n[D][sensor:124]: 'seplos-bms environment temperature': Sending state 29.81000 °C with 0 decimals of accuracy\n[D][sensor:124]: 'seplos-bms mosfet temperature': Sending state 29.78000 °C with 0 decimals of accuracy\n[D][sensor:124]: 'seplos-bms current': Sending state -6.54000 A with 2 decimals of accuracy\n[D][sensor:124]: 'seplos-bms total voltage': Sending state 52.80000 V with 2 decimals of accuracy\n[D][sensor:124]: 'seplos-bms power': Sending state -345.31198 W with 2 decimals of accuracy\n[D][sensor:124]: 'seplos-bms charging power': Sending state 0.00000 W with 2 decimals of accuracy\n[D][sensor:124]: 'seplos-bms discharging power': Sending state 345.31198 W with 2 decimals of accuracy\n[D][sensor:124]: 'seplos-bms residual capacity': Sending state 133.86000 Ah with 2 decimals of accuracy\n[D][sensor:124]: 'seplos-bms battery capacity': Sending state 170.00000 Ah with 2 decimals of accuracy\n[D][sensor:124]: 'seplos-bms state of charge': Sending state 78.70000 % with 1 decimals of accuracy\n[D][sensor:124]: 'seplos-bms rated capacity': Sending state 180.00000 Ah with 2 decimals of accuracy\n[D][sensor:124]: 'seplos-bms charging cycles': Sending state 70.00000  with 0 decimals of accuracy\n[D][sensor:124]: 'seplos-bms state of health': Sending state 100.00000 % with 1 decimals of accuracy\n[D][sensor:124]: 'seplos-bms port voltage': Sending state 52.79000 V with 2 decimals of accuracy\n```\n\n## Known issues and limitations\n\nNone.\n\n## Protocol\n\nSee [SEPLOS BMS Communication Protocol_V2.0.pdf](docs/SEPLOS%20BMS%20Communication%20Protocol_V2.0.pdf) and [Seplos 48v 100A BMS RS485 Protocol.pdf](docs/Seplos%2048v%20100A%20BMS%20RS485%20Protocol.pdf).\n\n```\n$ echo -ne \"~20004642E00200FD37\\r\" | hexdump -ve '1/1 \"%.2X.\"'\n      7E.32.30.30.30.34.36.34.32.45.30.30.32.30.30.46.44.33.37.0D.\n\n# Get pack #0 telemetry data (CID2 `0x42`)\nTX -\u003e \"~20004642E00200FD37\\r\"\nRX \u003c- \"~2000460010960001100CD70CE90CF40CD60CEF0CE50CE10CDC0CE90CF00CE80CEF0CEA0CDA0CDE0CD8060BA60BA00B970BA60BA50BA2FD5C14A0344E0A426803134650004603E8149F0000000000000000DC6C\\r\"\n\n# Get system parameters (CID2 `0x47`)\nTX -\u003e \"~200046470000FDA9\\r\"\nRX \u003c- ?\n\n# Get protocol version (CID2 `0x4F`)\nTX -\u003e \"~2000464F0000FD9A\\r\"\nRX \u003c- ?\n\n# Get manufacturer info (CID2 `0x51`)\nTX -\u003e \"~200046510000FDAE\\r\"\nRX \u003c- \"~20004600C040313130312D5350313520020743414E50726F746F636F6C3A536F666172202020F046\\r\"\n\n# Get management info (pylontech only?)\nTX -\u003e \"~200046920000FDA9\\r\"\nRX \u003c- ?\n\n# Get module serial number (pylontech only?)\nTX -\u003e \"~200046930000FDA8\\r\"\nRX \u003c- ?\n```\n\n## Debugging\n\nIf this component doesn't work out of the box for your device please update your configuration to enable the debug output of the UART component and increase the log level to the see outgoing and incoming serial traffic:\n\n```\nlogger:\n  level: DEBUG\n\nuart:\n  id: uart_0\n  baud_rate: 9600\n  tx_pin: ${tx_pin}\n  rx_pin: ${rx_pin}\n  rx_buffer_size: 384\n  debug:\n    dummy_receiver: false\n    direction: BOTH\n    after:\n      delimiter: \"\\r\"\n    sequence:\n      - lambda: UARTDebug::log_string(direction, bytes);\n```\n\n## References\n\n* https://github.com/Frankkkkk/python-pylontech/blob/master/pylontech/pylontech.py\n* https://diysolarforum.com/threads/simple-seplos-bms-protocol-decode-bash-script.34993/\n* https://github.com/celsworth/lxp-pylon-utils/tree/master/lib/pylon/packet\n* https://github.com/meteosat007/solar-pylontech\n* https://github.com/BrucePerens/seplos_c\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyssi%2Fesphome-seplos-bms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyssi%2Fesphome-seplos-bms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyssi%2Fesphome-seplos-bms/lists"}