Skip to content

grericht/dyness-bms-esphome-canbus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Dyness BMS CAN Bus → ESPHome

ESPHome configuration for reading Dyness battery CAN bus data using an ESP32 and MCP2515 CAN controller.

The configuration decodes Dyness battery CAN frames and exposes battery information locally to Home Assistant using the ESPHome API — no cloud services required.


Tested Hardware

Tested with:

  • Dyness Junior Box
  • ESP32-C3 (ESP32-C3-DevKitM-1)
  • MCP2515 CAN module (8 MHz)

CAN configuration:

500 kbps
Extended CAN frames

Other Dyness battery systems may also work but have not yet been tested.


Features

  • Dyness CAN bus decoding
  • Pylontech compatibility frame decoding
  • automatic CAN ID sniffer for discovering unknown frames
  • native ESPHome integration with Home Assistant
  • local operation without any cloud services
  • battery voltage / current / power
  • SOC / SOH
  • cell voltages
  • temperature sensors
  • protection and alarm flags

Home Assistant Integration

The ESPHome node connects directly to Home Assistant using the native ESPHome API.

All sensors automatically appear in Home Assistant, including:

  • battery voltage
  • battery current
  • battery power
  • SOC
  • SOH
  • cell voltages
  • temperature sensors
  • alarm and protection flags

This allows local battery monitoring without any cloud dependency.


CAN Frames

Dyness batteries transmit two groups of CAN messages:

Dyness native frames

18AAxxxx
18BBxxxx

Pylontech compatibility frames

00000351
00000355
00000356
00000359
0000035C
0000035E
0000035F

These frames are used by many inverters to communicate with the battery.


CAN Sniffer

The configuration includes a built-in CAN sniffer.

Unknown CAN IDs are automatically detected and reported, which helps with reverse engineering additional Dyness protocol frames.


Repository Structure

esphome/
  dyness_can.yaml

docs/
  pinout.md
  can_frames.md

Documentation

Connector pinouts and CAN frame documentation can be found in:

docs/

Contributions

Contributions, frame decoding improvements, and additional hardware tests are welcome.


License

MIT License

About

Dyness BMS CAN bus decoding with ESPHome (ESP32 + MCP2515). Exposes battery data to Home Assistant locally without cloud.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages