Skip to content

Adding Bexie BE - #1080

Open
netmindz wants to merge 7 commits into
davidrapan:mainfrom
netmindz:bexie_be
Open

Adding Bexie BE#1080
netmindz wants to merge 7 commits into
davidrapan:mainfrom
netmindz:bexie_be

Conversation

@netmindz

@netmindz netmindz commented Jun 1, 2026

Copy link
Copy Markdown

ModBus over TCP - directly to the inverter

https://bexieenergy.com/product/be3-6-6kw-1ph/

CHINT CPS-SCETL vs Bexie Hybrid differences:

  1. Phase count: CHINT is three-phase; Bexie is single-phase
    • CHINT has output L1/L2/L3 voltage/current/power, grid L1/L2/L3 voltage/current, load L1/L2/L3 power/voltage/current, Internal CT1/CT2/CT3 power, EPS L1/L2/L3 power
    • Bexie only has single Grid Voltage, single Grid Power, and single Load Power
  2. MPPT count: CHINT supports up to 9 MPPTs while Bexie has just 2
  3. Battery Temperature register: CHINT reads from 0x2001 as a signed 16-bit value, but Bexie uses 0x201B as unsigned 16-bit — and 0x2001 returns 0 on Bexie
  4. Battery Power: The two systems use different register rules and addresses for this metric — CHINT uses a 32-bit unsigned value across two registers, while Bexie uses a single 16-bit signed register with a different rule
  5. Device info block: CHINT has a complete device info group spanning 0x1A00–0x1A78, but Bexie doesn't have this
  6. EPS group: CHINT includes a full Emergency Power Supply group that Bexie lacks
  7. Fault registers: CHINT tracks Battery Fault and Inverter Fault states, but Bexie doesn't expose these
  8. Control registers: Bexie has Work Mode, Grid Charge, and Grid Charge End SOC controls that CHINT doesn't support
  9. update_interval: CHINT defaults to 60 seconds while Bexie defaults to 30 seconds
  10. Grid Power: Both use the same registers but CHINT labels it "Internal CT1 Power" while Bexie calls it "Grid Power"
  11. Load Power: CHINT hides this metric while Bexie exposes it, though they're at the same register addresses
  12. PV items: The PV group structure differs — CHINT lists PV1-PV9 Power separately, while Bexie includes Voltage and Current directly in the PV group with only 2 MPPTs
  13. DC Temperature: CHINT marks this as hidden and calls it "DC Temperature"; Bexie shows it as "Inverter Temperature"
  14. Inverter Mode: Bexie includes this field but CHINT's profile doesn't
  15. Today Production validation: CHINT has validation rules set; Bexie doesn't include this
  16. Total Load Consumption scale: CHINT applies a 0.01 scale factor
    , and Bexie uses the same
  17. Battery Current rule: Both use rule 4 for signed 32-bit values

@netmindz
netmindz force-pushed the bexie_be branch 2 times, most recently from 45ac472 to aab0c31 Compare June 6, 2026 20:44
@netmindz
netmindz marked this pull request as ready for review June 6, 2026 20:49
@netmindz

netmindz commented Aug 4, 2026

Copy link
Copy Markdown
Author

Anything blocking this PR being accepted?

netmindz and others added 2 commits August 4, 2026 08:23
Serial number, firmware versions/build dates, and rated specs verified
live against hardware at the same register offsets CHINT CPS-SCETL
uses. EMS firmware fields renamed to CSB per the Bexie app's own
naming; Device Protocol Version omitted as it decodes to garbage on
this device.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Lets a profile identify itself during "Auto" selection by declaring an
autodetection block (probe registers + expected ASCII value), so adding
autodetection support for a new manufacturer is a YAML-only change.
Checked before the existing Deye numeric-code probe, since an explicit
confirmed string match is higher confidence than inferring a profile
from a register-0 code.

Adds an autodetection block to bexie_hybrid.yaml, matching on the SKU
string confirmed via tools/probe_registers.py against real hardware.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BwWZzRmQBk9aSJhoGkGWAK
@netmindz

netmindz commented Aug 8, 2026

Copy link
Copy Markdown
Author

Added YAML-declared autodetection support (06ba20f) so "Auto" profile selection can identify this device without relying on Deye's register-0 numeric code, which doesn't apply here.

A profile can now declare an autodetection block:

autodetection:
  code: 0x03
  start: 0x1A00
  end: 0x1A0F
  equals: "BE6KW-1PH"

lookup_profile() probes that register range, decodes it as ASCII, strips anything outside printable ASCII (padding byte is device-specific — nulls/spaces/0xFF all handled), and compares against equals (a single string or a list, for profiles covering multiple model numbers on the same register layout). This runs before the existing Deye probe, since an explicit confirmed string match is higher confidence than inferring a profile from a numeric code. Adding autodetection support for a future profile is a YAML-only change — no code changes needed.

bexie_hybrid.yaml's equals: "BE6KW-1PH" was confirmed against real hardware via tools/probe_registers.py (added in this branch), which reads the same block and prints a MATCH/NO MATCH check using the identical decode logic, so there's no drift between the verification tool and the actual integration code.

Known limitation: CHINT CPS-SCETL shares the same 0x1A00 register block but its exact identity string hasn't been confirmed, so it doesn't have an autodetection entry yet — only exact-string matches are used, deliberately, to avoid misidentifying one for the other.

netmindz and others added 3 commits August 27, 2026 19:32
… (Bexie)

Battery Power was read as a single signed 16-bit register (0x200A),
capping at ±3276.7W. Under Feed-in Priority, battery discharge can
exceed that, wrapping the raw value into the negative range and
misreporting heavy discharge as charging. Read the full signed 32-bit
pair [0x200A, 0x2009] instead, matching the Battery Current pattern.

Not yet confirmed against a real charging sample — flagged in the
profile comments for follow-up verification.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Reproduced the reported bug directly against the device (mass:1502)
via tools/probe_registers.py: while discharging 5397W under Feed-in
Priority, the old single-register (0x200A, rule 2) definition read
-1156.6W, matching the "shows as charging" symptom. 0x2009 read
0x0000, the expected high word for a value fitting in the low 16
bits, supporting the 32-bit pair read from the prior commit.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…dance

Host/port had drifted from the documented 192.168.178.134:502 to
mass:1502. Also point future sessions at tools/probe_registers.py
directly so testing against real hardware doesn't require re-asking
how to connect.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@netmindz

Copy link
Copy Markdown
Author

@davidrapan - anything blocking this PR being approved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant