npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

node-red-contrib-byd-lvs-monitor

v1.1.1

Published

Node-RED nodes for monitoring BYD Battery-Box LVS cell-level data via Modbus

Downloads

33

Readme

node-red-contrib-byd-lvs-monitor

Node-RED nodes for monitoring BYD Battery-Box LVS Premium cell-level data via BMU Ethernet port.

Reads per-module cell voltages, temperatures, SOC/SOH, balancing status, energy counters, errors and warnings directly from the BYD BMU (Battery Management Unit).

Features

  • Cell-level monitoring for all LVS modules (up to 256)
  • Auto-detection of module count, towers must be specified manually for correct splitting
  • 16 cell voltages and up to 8 temperature sensors per module
  • Balancing status per cell
  • Lifetime charge/discharge energy counters
  • InfluxDB formatter for v2 (batch) and v3 (line protocol)
  • MQTT formatter with Generic and Home Assistant output modes
  • Battery notifier with SOC warranty timer and cell drift alerts
  • Dashboard widget with live data, 24-hour history charts, and cell drift analysis

Installation

Install via the Node-RED Palette Manager: search for node-red-contrib-byd-lvs-monitor.

Or install manually:

cd ~/.node-red
npm install node-red-contrib-byd-lvs-monitor

Nodes

BYD LVS config

Shared configuration node for BMU connection settings.

| Property | Default | Description | |----------|---------|-------------| | Host | 192.168.16.254 | BMU IP address if there is no DHCP server in your local net| | Port | 8080 | BMU TCP port | | Modules | 0 (auto-detect) | Number of BMS modules, 0 = auto-detect from registers | | Towers | 1 | Number of battery towers (for multi-tower setups) | | Convert mV to V | off | Output cell voltages in V instead of mV |

BYD LVS read

Reads all BMS modules and outputs complete battery data as JSON.

Input: Any message triggers a read cycle. Connect to an Inject node set to repeat.

Output (msg.payload):

{
  "timestamp": "2026-02-19T14:30:05.123Z",
  "host": "192.168.1.155",
  "summary": {
    "soc": 62, "soh": 98, "pack_voltage": 54.0, "pack_voltage_2": 54.1,
    "current": -25.3,
    "max_cell_v": 3.64, "min_cell_v": 3.42,
    "max_temp": 27, "min_temp": 22,
    "towers": 2, "bmu_serial": "P050A...",
    "sys_charge_energy_kwh": 9876.543, "sys_discharge_energy_kwh": 9654.321,
    "sys_estimated_cycles": 142.3, "sys_efficiency": 97.8, "sys_warranty_used_pct": 5.2
  },
  "modules": {
    "BMS1": {
      "bms_id": 1, "serial": "E050A...",
      "soc": 93.2, "soh": 98,
      "bat_voltage": 53.7, "output_voltage": 53.8,
      "current": -6.3, "power": -338.9,
      "max_cell_v": 3382, "min_cell_v": 3370,
      "max_temp": 26, "min_temp": 23,
      "cell_voltages": [3382, 3380, ...],
      "cell_temps": [25, 26, 24, 25, 23, 24, 26, 25],
      "balancing": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
      "balancing_active": 0,
      "errors": 0, "warnings1": 0, "warnings2": 0,
      "charge_energy_kwh": 1234.567, "discharge_energy_kwh": 1198.432,
      "estimated_cycles": 332.9, "round_trip_efficiency": 97.1,
      "warranty_used_pct": 10.1, "warranty_remaining_pct": 89.9
    }
  }
}

Status indicators:

  • Grey ring — Idle
  • Blue dot — Reading in progress (shows current BMS module)
  • Green dot — Last read successful (SOC% and time)
  • Yellow ring — Skipped (previous read still in progress)
  • Red dot — Error

Inject interval: Must be longer than the scan duration. Each module takes approximately 2–3 seconds. For 8 modules use 30s interval, for 32 modules use 120s.

BYD LVS influxdb

Formats battery data for InfluxDB storage. Supports both InfluxDB v2 and v3.

| Property | Default | Description | |----------|---------|-------------| | InfluxDB version | v2 | v2 = batch array for node-red-contrib-influxdb, v3 = line protocol for node-red-contrib-influxdb3 | | Measurement prefix | byd | Prefix for measurement names |

Measurements:

| Measurement | Points per scan | Tags | Fields | |-------------|----------------|------|--------| | {prefix}_summary | 1 | host | soc, soh, pack_voltage, current, max_cell_v, min_cell_v, max_temp, min_temp, towers, pack_voltage_2, sys_charge_energy_kwh, sys_discharge_energy_kwh, sys_estimated_cycles, sys_efficiency, sys_warranty_used_pct | | {prefix}_module | 1 per module | host, module | soc, soh, voltage, output_voltage, current, power, min_temp, max_temp, errors, warnings1, warnings2, balancing_active, charge_energy_kwh, discharge_energy_kwh, estimated_cycles, round_trip_efficiency, warranty_used_pct | | {prefix}_cell | 16 per module | host, module, cell | voltage, balancing | | {prefix}_temp | up to 8 per module | host, module, sensor | temperature |

BYD LVS mqtt

Formats battery data for MQTT publishing. Connect output to a standard MQTT out node.

| Property | Default | Description | |----------|---------|-------------| | Output mode | Generic | Generic (per-cell JSON objects) or Home Assistant (individual scalar topics) | | Parent topic | byd | Root topic prefix for all messages |

Generic mode — multiple messages per scan with JSON objects:

byd/summary            → {"soc":99, "soh":98, "pack_voltage":56.7, "current":-25.3, ...}
byd/module/BMS1        → {"soc":93.2, "soh":98, "voltage":53.7, "current":-6.3, "power":-338.9,
                           "min_temp":23, "max_temp":26, "errors":0, "warnings1":0, "warnings2":0,
                           "balancing_active":0, "charge_energy_kwh":1234.567, ...}
byd/module/BMS1/cell/1 → {"voltage":3567, "balancing":0, "temperature":31}
byd/module/BMS1/cell/9 → {"voltage":3571, "balancing":0}

Cells 1–8 include temperature (matching BYD BE Connect layout). Cells 9–16 have only voltage and balancing.

Home Assistant mode — individual scalar topics for easy HA sensor creation:

byd/summary/soc                        → 99
byd/summary/soh                        → 98
byd/summary/pack_voltage               → 56.7
byd/summary/current                    → -25.3
byd/summary/max_cell_v                 → 3.64
byd/summary/min_cell_v                 → 3.42
byd/summary/max_temp                   → 27
byd/summary/min_temp                   → 22
byd/summary/towers                     → 2
byd/summary/sys_charge_energy_kwh      → 9876.543
byd/summary/sys_discharge_energy_kwh   → 9654.321
byd/summary/sys_estimated_cycles       → 142.3
byd/summary/sys_efficiency             → 97.8
byd/summary/sys_warranty_used_pct      → 5.2
byd/module/BMS1/soc                    → 93.2
byd/module/BMS1/soh                    → 98
byd/module/BMS1/voltage                → 53.7
byd/module/BMS1/current                → -6.3
byd/module/BMS1/power                  → -338.9
byd/module/BMS1/min_temp               → 23
byd/module/BMS1/max_temp               → 26
byd/module/BMS1/errors                 → 0
byd/module/BMS1/charge_energy_kwh      → 1234.567
byd/module/BMS1/discharge_energy_kwh   → 1198.432
byd/module/BMS1/estimated_cycles       → 332.9
byd/module/BMS1/round_trip_efficiency  → 97.1
byd/module/BMS1/warranty_used_pct      → 10.1
byd/module/BMS1/cell/1                 → {"voltage":3567, "balancing":0, "temperature":31}
byd/module/BMS1/cell/9                 → {"voltage":3571, "balancing":0}

BYD LVS notifier

Monitors battery SOC and cell voltage drift, sends notifications when configurable thresholds are exceeded.

| Property | Default | Description | |----------|---------|-------------| | SOC % | 10 | SOC percentage at or below which the timer starts counting | | Days | 14 | Consecutive days below SOC threshold before notification is sent | | Drift mV | 100 | Cell voltage deviation from module median that triggers a warning (checked at SOC < 50%) |

Input: Single input with content-based detection. Messages with summary and modules properties (from BYD LVS read) update internal state. Any other message acts as a trigger and runs SOC/drift checks.

Output:

| Field | Description | |-------|-------------| | msg.payload | Human-readable notification text | | msg.type | "info" for SOC timer, "warning" for cell drift | | msg.title | "BYD LVS Battery" |

Wire both the BYD LVS read node (continuous data) and an inject node (e.g. daily trigger) to the single input. Connect the output to a notification node (e.g. Victron notify on Cerbo GX) or a debug node.

[byd-lvs-read] ──┬── [byd-lvs-notifier] ─── [notification]
[inject 1x/day] ─┘

Usage Variants

Choose the setup that fits your needs. All example flows are importable directly in Node-RED: Menu → Import → Examples.

| Setup | Description | Additional packages | |-------|-------------|---------------------| | InfluxDB + Grafana | Read node → InfluxDB formatter. Use Grafana for visualization | node-red-contrib-influxdb + external InfluxDB | | MQTT | Read node → MQTT formatter. Generic or Home Assistant mode | External MQTT broker | | Dashboard | Read → Dashboard. Live data + 24h in-memory history charts | node-red-dashboard-2-byd-lvs-monitor | | Notifier | Read + daily trigger → Notifier. SOC warranty timer and cell drift alerts | — |

Dashboard installation

Search for node-red-dashboard-2-byd-lvs-monitor in the Palette Manager, or install manually:

cd ~/.node-red
npm install node-red-dashboard-2-byd-lvs-monitor

Connection

The BYD BMU uses Modbus RTU framing over TCP (not standard Modbus TCP). Default connection is port 8080. Only one client can be connected at a time — the node disconnects after each read cycle.

Make sure no other application (e.g. BYD BE Connect) is connected to the BMU while this node is active.

Compatibility

  • BYD Battery-Box LVS (Premium)
  • Node-RED >= 2.0.0
  • Node.js >= 14.0.0

Disclaimer

This software is NOT an official BYD diagnostic tool. It is provided "AS IS" without warranty of any kind.

The Ethernet port and its Modbus protocol on the BYD BMU are not documented in the product manual for diagnostic use by end-users or installers. Their availability and open accessibility are purely coincidental and may change with firmware updates without notice. The consequences of frequent or continuous Modbus polling on the BMU are unknown.

By using this software, you acknowledge and agree that:

  • The author assumes NO liability for any damages, loss of warranty, or other consequences whatsoever
  • You waive all claims for compensation arising from its use
  • You accept full responsibility for any decisions made based on information provided by this software
  • Incorrect readings may occur due to register misinterpretation, communication errors, or firmware differences

Data interpretation by this tool (including but not limited to warranty estimates, cycle counts, efficiency calculations, and cell drift analysis) reflects the author's understanding and may not be accurate. Always consult official BYD documentation or an authorized service partner for definitive assessments.

By your first use of this software, you irrevocably accept all of the above terms.

BYD and Battery-Box are registered trademarks of BYD Company Limited.

License

MIT