Remote Programming & Monitoring

Communication interfaces, protocols, and software integration paths for programmatic control of the off-grid system

Communication Interfaces

Interface availability by device. Each row shows the protocols available for programmatic access.
DeviceRS-485 / ModbusCAN BusWi-FiBluetoothUSB / RS-232
EG4 6000XPModbus RTUBattery CANDongle (TCP:8000)Via dongle onlyN/A
ECO-WORTHY Cubix 100Pylontech / RS-485Pylontech CANPro model onlyClassic BT (JBD)RS-232
QCells Q.TRON 430WN/AN/AN/AN/AN/A
The QCells Q.TRON BLK M-G2+ panels are standard DC modules with no built-in communication. Panel-level monitoring requires adding third-party DC optimizers (e.g., SolarEdge, Tigo) or using the inverter's string-level MPPT data. The Q.TRON AC variant (different SKU) has an integrated Enphase IQ8 microinverter with module-level monitoring, but that is not applicable here.

EG4 6000XP Deep Dive

The EG4 6000XP is a rebranded LuxPower SNA 6000. Protocol documentation, register maps, and community tooling often reference "LuxPower" interchangeably.

RS-485 / Modbus RTU

The primary programmatic interface. The inverter exposes an INV485 RJ-45 port on the front panel, shared with the Wi-Fi dongle connector. If the Wi-Fi dongle is not installed, this port is available for direct RS-485 communication.

Physical Connection

ParameterValue
ConnectorRJ-45 (INV485 / CT1 port)
RS-485 A+ pinPin 8 (brown wire in T-568B)
RS-485 B- pinPin 7 (brown/white stripe in T-568B)
Baud rate19200
Data format8N1 (8 data bits, no parity, 1 stop bit)
Default slave address1
Function codes0x03 (Read Holding Registers), 0x04 (Read Input Registers), 0x06 / 0x10 (Write)

Key Modbus Registers (Input Registers, FC 0x04)

The EG4 6000XP Modbus protocol document (request from EG4 support or distributor) contains the full register map. Below are commonly referenced registers confirmed by community implementations. Register values are 16-bit unsigned unless noted.
RegisterDescriptionUnit / Scale
0x0004Battery voltage0.1 V (divide by 10)
0x0005Battery SOC / SOH% (dual-purpose register)
0x0000Inverter status / stateEnum
variesPV power inputW
variesLoad power outputW
variesBattery charge / discharge powerW
variesInternal temperature0.1 C
variesDaily / monthly / lifetime energykWh
The full register map with 100+ data points is available through the eg4_web_monitor and EG4-Inverter-Modbus Home Assistant integrations. These contain the definitive community-mapped register addresses in their source code. You can also request the official EG4-6000XP-MODBUS-Communication-Protocol PDF from EG4 support or your distributor.

Writable Holding Registers (FC 0x06 / 0x10)

The following parameters can be configured remotely via Modbus write operations (confirmed by the eg4_web_monitor integration):
Battery charge SOC limit (%)AC / PV charge power (0.1 kW steps)Battery charge / discharge currentQuick charge toggleBattery backup (EPS) modeAC charge modeForced charge / dischargeGrid peak shavingOperating mode (Normal / Standby)

Wi-Fi Dongle — Modbus TCP

The EG4 Wi-Fi dongle plugs into the INV485 RJ-45 port and bridges Modbus RTU to TCP. It operates in two network modes simultaneously:
ModeDetails
Client modeConnects to your home Wi-Fi. Sends data to monitor.eg4electronics.com (cloud). The dongle gets an IP on your LAN; port 8000 accepts Modbus TCP queries.
Access Point modeBroadcasts its own SSID (serial number of dongle). Connect directly to it and access 10.10.10.1:8000. Your device gets IP 10.10.10.2. Used by the EG4 Monitor mobile app's "Local Connect" feature.
Polling on port 8000 does not interrupt cloud reporting. However, avoid aggressive poll intervals (faster than ~5 seconds) as this can overwhelm the dongle and cause it to stop responding. Polling the dongle causes it to report the same data upstream to EG4 servers.

CAN Bus — Battery Communication

The BAT COMM RJ-45 port connects to battery CAN bus for BMS communication. This port uses the Pylontech or LuxPower CAN protocol to read battery parameters (SOC, voltage, current, temperature, cell data) and manage charge / discharge limits. It is primarily intended for the inverter-to-battery link, not for user-facing data collection.For programmatic access, read battery data through the inverter's Modbus registers (which aggregate BMS data) or connect directly to the battery's own interfaces.

EG4 Cloud Monitoring Platform

The EG4 monitoring platform at monitor.eg4electronics.com provides a web dashboard and mobile apps (iOS/Android) for viewing real-time and historical inverter data. Data is pushed by the Wi-Fi dongle. EG4 has an API documentation page, though the cloud API endpoint is the primary data sink, and the dongle does not expose local HTTP REST endpoints.For a fully local, cloud-free setup, bypass the dongle entirely: connect a USB-to-RS485 adapter directly to the INV485 port and use Modbus RTU with tools like Solar Assistant, ESPHome, or pymodbus.

Battery BMS Integration

The ECO-WORTHY Cubix 100 uses a JBD (Jiabaida / Xiaoxiang) BMS — the most widely reverse-engineered BMS in the DIY solar community.

Bluetooth — JBD Protocol

The Cubix 100 BMS advertises over Classic Bluetooth (not BLE) with a device name pattern like ECOxxxx. It uses the JBD serial protocol over Bluetooth SPP (Serial Port Profile).

JBD Protocol Frame Format

ByteFieldValue
0Header0xDD
1Command (read 0xA5 / write 0x5A)0xA5 or 0x5A
2Register address0x03, 0x04, etc.
3Data lengthN bytes
4..N+3Data payload(varies)
N+4, N+5Checksum (16-bit)Sum of bytes, inverted + 1
N+6Tail0x77

Key Commands

RegisterCommandResponse Data
0x03Read pack infoTotal voltage (0.01V), current (0.01A), remaining capacity (0.01Ah), nominal capacity, cycle count, SOC %, protection status, FET status, temperatures
0x04Read cell voltagesIndividual cell voltages in mV (up to 24+ cells)
0x05Read hardware infoModel string, manufacturing date, software version
0xAARead error countersShort circuit, overcurrent, overvoltage, undervoltage, over/undertemp counts
0x10-0xA2EEPROM registersProtection thresholds, cell balance settings, configuration (requires EEPROM mode entry via writing 0x5678 to register 0x00)
Example read request for pack info: DD A5 03 00 FF FD 77. Example read request for cell voltages: DD A5 04 00 FF FC 77.

UART / RS-485 / RS-232

The JBD BMS has a UART-TTL interface (3.3V logic, 4-pin JST PA 2.0mm connector) that uses the same protocol as Bluetooth at 9600 baud, 8N1. This is the most reliable connection method for continuous monitoring.The Cubix 100 also exposes RS-485 and RS-232 ports on the battery face panel. These typically speak the Pylontech protocol (default) but can be switched to Voltronic or other protocols via the BMS configuration tool. The Pylontech protocol over RS-485 is what the inverter uses for battery communication.

CAN Bus — Pylontech Protocol

The Cubix 100's CAN port speaks the Pylontech CAN protocol by default, which is compatible with the EG4 6000XP's BAT COMM port. This is the primary battery-to-inverter communication channel, carrying SOC, voltage, current limits, temperature, and alarm data.The CAN protocol selection (Pylontech vs. Voltronic) is configurable via DIP switches on the battery or through the JBD BMS PC software tool.

Compatible Monitoring Apps

ECO-WORTHY App (iOS / Android)Xiaoxiang BMS App (JBD official)Overkill Solar BMS AppJBDTool (Windows PC)
All of these apps use the JBD protocol over Bluetooth SPP. The JBDTool Windows software provides full EEPROM read/write access for configuring protection thresholds, cell balance parameters, and protocol selection.

System Integration Architecture

Three practical paths to a unified monitoring and control system, ordered by complexity.

Path 1: Solar Assistant (Turnkey)

Easiest
Solar Assistant is a dedicated monitoring OS for Raspberry Pi that natively supports EG4/LuxPower inverters via RS-485. It reads Modbus registers, stores 10+ years of historical data on a 16GB SD card, and exposes all data via MQTT for downstream consumption.
ComponentDetails
HardwareRaspberry Pi + USB-to-RS485 adapter
ConnectionRS-485 to inverter INV485 port (pins 7/8)
Inverter configSelect "Luxpower" as inverter model in Solar Assistant
Battery monitoringVia inverter Modbus (aggregate) or direct USB to BMS (per-cell detail for JK, Daly, JBD BMS)
Data exportMQTT broker built-in; integrates directly with Home Assistant, Node-RED, Grafana

Path 2: Home Assistant + HACS Integrations

Moderate
Home Assistant provides the most flexible integration platform. Multiple community integrations exist for the EG4 6000XP:
IntegrationMethodNotes
eg4_web_monitorCloud API, Local Modbus TCP, Wi-Fi dongle (port 8000), Serial Modbus, or HybridPlatinum-tier HACS integration. Supports FlexBOSS, 18KPV, 12KPV, XP, GridBOSS. 100+ sensors, writable parameters. 5-second local polling.
EG4-Inverter-ModbusModbus TCP via RS485-to-Ethernet gatewayDirect Modbus approach. Requires a Waveshare or similar RS485-to-Ethernet adapter on your LAN.
BMS_BLE-HABluetooth Low EnergyNative HA integration for JBD BMS over BLE. Auto-detects devices named JBD-*. SOC, voltage, current, power, cell voltages, temperature. Supports ESPHome BT proxy for range extension.
Note: The ECO-WORTHY Cubix 100 uses Classic Bluetooth (SPP), not BLE. The BMS_BLE-HA integration may not detect it. For Classic BT JBD devices, the ESPHome UART approach (wired) or an ESP32 BLE-to-UART bridge is more reliable.

Path 3: Custom Code (Python / Node.js / Rust)

Full Control
For maximum flexibility, connect directly to each device's protocol and build your own data pipeline.

Inverter (Modbus RTU / TCP)

Use pymodbus to poll the inverter directly over RS-485 or TCP (via dongle port 8000):
from pymodbus.client import ModbusTcpClient # Connect via Wi-Fi dongle on LAN client = ModbusTcpClient("192.168.1.x", port=8000) client.connect() # Read input registers (FC 0x04) result = client.read_input_registers(0x0004, count=2, slave=1) battery_voltage = result.registers[0] * 0.1 # decivolts battery_soc = result.registers[1] # percent # Read holding registers (FC 0x03) # result = client.read_holding_registers(addr, count, slave=1) client.close()

Battery BMS (JBD Protocol)

Use a serial connection (USB-to-UART or RS-485 adapter at 9600 baud) to query the BMS directly:
import serial ser = serial.Serial("/dev/ttyUSB0", 9600, timeout=2) # Request pack info (register 0x03) ser.write(bytes.fromhex("DD A5 03 00 FF FD 77")) response = ser.read(64) # Parse: voltage (bytes 4-5), current (6-7), # remaining cap (8-9), nominal cap (10-11), # cycles (12-13), ... if response[0] == 0xDD and response[1] == 0x03: voltage = int.from_bytes(response[4:6], 'big') * 0.01 current = int.from_bytes(response[6:8], 'big', signed=True) * 0.01 soc = response[23] # state of charge % # Request cell voltages (register 0x04) ser.write(bytes.fromhex("DD A5 04 00 FF FC 77")) cell_data = ser.read(64) ser.close()

Data Pipeline

Publish readings to MQTT, pipe to InfluxDB + Grafana, or push to your own API. The eg4-bridge project (Rust) provides a production-ready bridge from LuxPower Modbus to MQTT / InfluxDB / PostgreSQL that you can run in Docker.

Tools & Libraries

ToolLanguagePurposeLink
eg4_web_monitorPython (HA)Full EG4 inverter HA integration (local + cloud). 100+ sensors, writable config. Best-in-class for HA.GitHub
EG4-Inverter-ModbusPython (HA)HA integration via Modbus-to-Ethernet gateway. Contains mapped register definitions.GitHub
eg4-bridgeRustBridge from LuxPower/EG4 inverter to MQTT, InfluxDB, Postgres. Docker-ready. Actively maintained fork of lxp-bridge.GitHub
esphome-jbd-bmsC++ (ESPHome)ESPHome component for JBD BMS via UART-TTL or BLE. ESP32 firmware that pipes BMS data into Home Assistant.GitHub
BMS_BLE-HAPython (HA)Native HA integration for BLE battery management systems. Supports JBD, Daly, JK, EG4 LL, and 30+ brands. Zero config auto-discovery.GitHub
Solar AssistantAppliance (RPi)Dedicated monitoring OS for Raspberry Pi. Per-second accuracy, 10+ years storage, built-in MQTT broker, web + mobile apps.Website
pymodbusPythonFull Modbus RTU/TCP/ASCII library. Use for custom scripts that read/write inverter registers directly.Docs
mpp-solarPythonSwiss-army-knife for solar inverter communication. Supports MPP-Solar/Voltronic protocols, JK BMS, Daly BMS. Docker available.GitHub
jbd_ble_esp32C++ (ESP32)ESP32 bridge between JBD BLE BMS and Venus GX serialBattery. Useful for Victron integration or as a protocol reference.GitHub

Recommended Hardware

ItemPurposeNotes
USB-to-RS485 adapter (FTDI/CH340)Direct Modbus RTU to inverter INV485Wire to pins 7 (B-) and 8 (A+) on RJ-45. Use with Solar Assistant or pymodbus.
Waveshare RS485-to-PoE-ETH adapterModbus RTU to Modbus TCP bridgePuts inverter Modbus on your LAN as TCP. Standard Modbus TCP port 502. Works with HA Modbus integration.
ESP32 dev boardESPHome node for BMS UART or inverter ModbusConnect to JBD BMS UART (3.3V, 9600 baud, GPIO4/5). Or connect to inverter RS-485 with MAX485 transceiver.
Raspberry Pi 4/5Solar Assistant OS or Home Assistant OSEither dedicated Solar Assistant or full Home Assistant with HACS integrations above.

Panel-Level Monitoring (QCells Q.TRON BLK M-G2+ 430W)

The Q.TRON BLK M-G2+ is a standard DC module (N-type TOPCon, 22.5% efficiency, Voc 39.32V, Isc 13.74A, Vmpp 32.94V) with no built-in communication or monitoring capabilities. These panels are wired in series/parallel strings directly to the EG4 6000XP's dual MPPT inputs.

Options for Module-Level Monitoring

ApproachApplicabilityNotes
Inverter MPPT dataAvailable nowThe EG4 6000XP reports per-string PV voltage, current, and power via Modbus. Not per-panel, but per-MPPT channel. Free with any Modbus integration above.
Tigo TS4-A-O optimizersAdd-on hardwareRetrofit DC optimizers that attach to each panel. Provides per-panel monitoring + optimization + rapid shutdown compliance. Requires Tigo CCA or TAP gateway.
SolarEdge P-Series optimizersNot compatibleSolarEdge optimizers require a SolarEdge inverter. Not usable with the EG4 6000XP.
Current clamp sensorsDIY optionUse split-core CTs on individual panel leads with an INA226 or ADS1115 ADC on an ESP32 for per-panel current monitoring. Cheap but manual.

Sources