[Integration] EG4/Luxpower Web Monitor Home Assistant Integration

[Integration] EG4/Luxpower Web Monitor — Local Modbus, Cloud & Hybrid Monitoring + Control for EG4 Solar Systems

EG4 Web Monitor is a comprehensive Home Assistant custom integration for EG4 and Luxpower-compatible solar equipment — inverters, GridBOSS microgrid devices, and batteries. It has grown far beyond its cloud-monitoring roots: today it offers fully local Modbus polling (5-second updates, no internet required), cloud API access, or a hybrid of both, plus a deep control surface for automations.

The integration meets the Home Assistant Platinum quality tier (the highest level: fully async, strict typing, websession injection) and is translated into 12 languages.

:electric_plug: Connection Options

Connection type How Update speed Internet required
Cloud API Your existing monitor.eg4electronics.com account 30 s Yes
Local Modbus TCP RS485-to-Ethernet adapter (e.g. Waveshare) 5 s No
WiFi dongle Direct connection to the inverter’s stock WiFi dongle 5 s No
Serial (USB/RS485) USB-to-RS485 adapter on your HA host 5 s No
Hybrid Local polling + cloud for cloud-only features and write fallback 5 s Cloud features only

The mode is derived automatically from what you configure — cloud credentials only → Cloud, local devices only → Local, both → Hybrid. Hybrid gives you the best of both: fast local polling, with the cloud filling in cloud-only data (DST auto-sync, portal event log, AC Couple parameters) and acting as a fallback path for control writes if the local link drops.

:battery: Supported Equipment

  • Inverters: FlexBOSS21, FlexBOSS18, 18kPV, 12kPV, XP series (6000XP/12000XP), LXP-EU (three-phase), LXP-LB-BR (Brazil 10 kW)
  • GridBOSS: microgrid interconnection device with smart port monitoring and configuration
  • Batteries: all EG4-compatible modules with BMS integration and individual cell monitoring — including banks with more than 4 batteries (round-robin battery tracking)
  • Multi-station: monitor multiple installations from one account, multiple inverters in parallel groups, full Station → Parallel Group → Inverter → Battery device hierarchy

:bar_chart: Monitoring

Inverters (~50+ sensors each): AC/DC power, PV generation per string, battery charge/discharge, voltages, currents, frequency, split-phase per-leg detail, daily/lifetime energy, temperatures, firmware version, plus a friendly Operating State sensor and Off-Grid binary sensor decoded from the status code.

Individual batteries (~15 sensors each, one HA device per battery): voltage, current, SoC, SoH, cycle count, capacities, max/min cell voltages and temperatures, and a calculated Cell Voltage Delta sensor — great for spotting cell imbalance.

Battery bank aggregates: bank-level voltage, current, SoC, cell extremes, and charge/discharge current limits straight from the BMS — no CAN bus needed.

GridBOSS (~80+ sensors): grid interconnection L1/L2 phases, UPS and backup load management, 4 smart load ports (Unused / Smart Load / AC Couple), AC coupling energy, generator monitoring.

Portal event log (Cloud/Hybrid): a Last Event diagnostic sensor per inverter and GridBOSS surfaces faults/warnings that only exist in EG4’s cloud event log (transients that fall between register polls), with event code, type, timestamps, and status as attributes.

Data integrity: WiFi dongle cross-request validation, canary checks against corrupt Modbus reads, and energy monotonicity guards — bad readings get rejected instead of polluting your energy dashboard.

:control_knobs: Control Entities

This is where the integration really goes beyond monitoring:

  • Switches: Quick Charge (with local Modbus start on supported models — per-inverter, unlike the portal’s group-wide start), Battery Backup (EPS), AC Charge, Forced Charge/Discharge, Grid Sell Back, Fast Zero Export, Share Battery, AC Couple, DST, and more
  • Numbers: SOC limits (on-grid/off-grid cutoffs, system charge limit — including 101% for LiFePO4 top-balancing), charge/discharge current and power limits, AC/PV charge power, grid peak shaving power, voltage limits (charge, cut-off, AC charge start/end, stop discharge), start charge/discharge power thresholds, AC Couple Start/End SOC window, Quick Charge duration
  • Selects: operating mode, GridBOSS smart port modes, and battery control mode — regulate by SOC (default) or Voltage, with the full EG4-portal label cross-reference documented
  • Time entities: schedule windows for seven schedule families — AC Charge, Forced Charge, Forced Discharge, AC First, Peak Shaving, Generator, and Off-Grid (3 windows each where supported)
  • Update entities: firmware updates from within Home Assistant, including multi-step/multi-component update chains with progress reporting
  • Button: force an immediate data refresh

Controls are capability-aware: entities that don’t apply to your model or grid configuration (grid-tied vs. off-grid families) are gated automatically, and unsupported writes surface proper HA errors instead of failing silently.

:hammer_and_wrench: Service Actions

Service What it does
eg4_web_monitor.import_historical_data Backfill years of daily energy history from the EG4 cloud into HA long-term statistics (PV yield, consumption, grid import/export, battery charge/discharge) — selectable in the Energy dashboard, idempotent, with a dry-run preview
eg4_web_monitor.reconcile_history Fill gaps in your energy-sensor history from the cloud (e.g. after HA downtime)
eg4_web_monitor.fetch_events Pull the recent portal event log on demand as response data
eg4_web_monitor.refresh_data Force an immediate refresh of all device data

The historical import is a favorite for new installs: your Energy dashboard doesn’t have to start from zero — pull in your system’s full history back to commissioning day.

:robot: Automation Examples

The docs ship worked examples, including:

  • Off-peak charging: turn Quick Charge on/off on a schedule
  • Battery cell balancing: watch the Cell Voltage Delta sensors, bump the SOC limit to 101% for a top-balance when imbalance persists, then return to normal automatically
  • Grid outage detection: a debounced template binary sensor built from grid voltage + frequency (the reliable signal on off-grid-configured systems), with outage/recovery notifications
  • Smart port transfer: script the AC Couple switch to safely de-energize a smart-port source on demand
# Taste of it — charge during off-peak:
automation:
  - alias: "Charge Batteries During Off-Peak"
    trigger:
      - platform: time
        at: "23:00:00"
    action:
      - service: switch.turn_on
        target:
          entity_id: switch.18kpv_1234567890_quick_charge

See the README for the full versions.

:wrench: Installation

HACS (recommended):

  1. Add custom repository: https://github.com/joyfulhouse/eg4_web_monitor
  2. Install EG4 Web Monitor, restart Home Assistant
  3. Settings → Devices & Services → Add Integration → “EG4 Web Monitor”
  4. Pick Cloud (enter credentials, select station) or Local Device (Modbus TCP / WiFi dongle / Serial — model and serial auto-detected). Add both for Hybrid.

Requires Home Assistant 2026.1.0 or newer.

:chart_increasing: Production Quality

  • :white_check_mark: Home Assistant Platinum quality tier — fully async, strict mypy typing, websession injection
  • :white_check_mark: 2,000+ automated tests across the integration and the underlying pylxpweb library
  • :white_check_mark: Register-level documentation — every register→sensor and API→sensor mapping is documented in the repo (docs/DATA_MAPPING.md), plus a full OpenAPI spec of the EG4 cloud API
  • :white_check_mark: UI reconfiguration & reauthentication — change credentials, stations, or local devices without losing entities
  • :white_check_mark: 12 languages: Chinese (Simplified & Traditional), Dutch, French, German, Italian, Japanese, Korean, Polish, Portuguese, Russian, Spanish

:books: Documentation & Support

:folded_hands: Credits

Built on the pylxpweb library. This integration was inspired by and built upon the pioneering work of @twistedroutes and the eg4_inverter_ha project.

:warning: Disclaimer

This is an unofficial integration, not affiliated with EG4 Electronics. Control entities write settings to your inverter — use at your own risk and verify compatibility with your equipment. MIT licensed.


Running EG4 gear? Try it out and let me know how it works for your setup — questions, issues, and success stories welcome below! :battery::high_voltage::house:

3 Likes

:rocket: EG4 Web Monitor v1.3.0: Quick Charge Control Implementation

Hey everyone! Excited to share a major update to the EG4 Web Monitor integration with v1.3.0 - introducing comprehensive Quick Charge Control functionality! :high_voltage::battery:

:high_voltage: What’s New: Quick Charge Control

The most requested feature is finally here! You can now start and stop quick charging directly from Home Assistant with real-time status monitoring.

:radio_button: Switch Entity Implementation

  • Direct Battery Control: Toggle quick charging on/off from your dashboard

  • Real-time Status: Live monitoring using the hasUnclosedQuickChargeTask API field

  • Optimistic Updates: Immediate UI feedback - no waiting for API responses!

  • Smart Error Handling: Graceful state reversion if API calls fail

  • Task Tracking: Detailed attributes showing task ID and current status

:bullseye: Device Compatibility

The Quick Charge switches are automatically created for compatible devices:

  • :white_check_mark: FlexBOSS Series: FlexBOSS21, FlexBOSS18

  • :white_check_mark: KPV Series: 18KPV, 12KPV

  • :white_check_mark: XP Series: All XP models

  • :white_check_mark: Auto-Discovery: No manual configuration needed!

:mobile_phone: Entity Examples


# Quick Charge switches automatically appear:

switch.flexboss21_1234567890_quick_charge

switch.18kpv_1234567890_quick_charge

# With attributes for monitoring:

task_id: 279672

task_status: "WAIT_CHARGE"

optimistic_state: false # Shows when using optimistic updates

:wrench: Technical Implementation

Enhanced API Integration

  • New Endpoints: start_quick_charge(), stop_quick_charge(), get_quick_charge_status()

  • Proper Session Management: Works with existing 2-hour authentication flow

  • Status Parsing: Real-time parsing of quick charge task status from EG4 API

Code Quality Maintained

  • Perfect Pylint Score: Still maintaining 10.00/10 code quality! :bar_chart:

  • Home Assistant Best Practices: Proper entity management and device hierarchy

  • Comprehensive Error Handling: Detailed logging and graceful fallbacks

:video_game: User Experience

Immediate Control

The switch provides instant feedback - when you toggle it, the UI updates immediately while the API call happens in the background. If there’s an error, it automatically reverts back with a notification.

Visual Indicators

  • Icon: Battery charging icon (mdi:battery-charging) for clear identification

  • Naming: Clean format like “FlexBOSS21 44300E0585 Quick Charge”

  • Status: Real-time on/off state based on actual charging status

:clipboard: How to Get It

HACS Users (Recommended)

  1. Go to HACS → Integrations

  2. Find “EG4 Web Monitor”

  3. Click “Update” to get v1.3.0

  4. Restart Home Assistant

  5. Quick Charge switches will automatically appear for compatible devices!

Manual Installation


cd /config/custom_components/eg4_web_monitor

git pull origin main

# Restart Home Assistant

:magnifying_glass_tilted_left: What to Expect

After updating, you’ll see new switch entities appear automatically for each compatible inverter. The switches will show the current quick charge status and allow you to start/stop charging with a simple toggle.

Entity ID Format: switch.{model}_{serial}_quick_charge

:bug: Troubleshooting

Switch Not Appearing?

  • Check that your device model is supported (FlexBOSS, 18KPV, 12KPV, XP series)

  • Verify the device type is “inverter” (not GridBOSS)

  • Check debug logs for device compatibility messages

Switch Shows Wrong State?

  • The integration uses the official EG4 API hasUnclosedQuickChargeTask field

  • Status updates every 30 seconds with your regular data refresh

  • Optimistic updates provide immediate feedback during toggle operations

:folded_hands: Community Feedback

This implementation was built based on community requests and testing. The Quick Charge functionality integrates seamlessly with the existing 50+ sensors per inverter while maintaining the high code quality standards (10.00/10 Pylint score).

Performance Impact: Minimal - Quick Charge status is fetched alongside existing data with the same 30-second refresh interval using parallel API calls.


:books: Full Changelog & Documentation


Happy charging, everyone! :high_voltage::house::sun:

Let me know how the Quick Charge functionality works for you - always looking for feedback to make this integration even better!

P.S. - Still maintaining that 10.00/10 Pylint score because clean code matters! :blush:

2 Likes

I just set this up, and it is very impressive. It gives so much more control of my 18kpv than I had before.

The first post references an included automation, but I don’t see it anywhere. Does that show up in the GUI? I love the concept, but want to use my own automation with the AC charge setting to force a top-balance if it’s after 6pm and still has too large of a delta.

Thank you!!!

Glad you’re finidng the integration useful! I use this to quick charge if battery level is too low:

alias: "Battery: Quick Charge"
description: ""
triggers:
  - trigger: time
    at: "15:00:00"
conditions:
  - condition: numeric_state
    entity_id: sensor.18kpv_1234567890_state_of_charge
    below: 80
actions:
  - action: switch.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: switch.18kpv_1234567890_quick_charge
mode: single

There’s also a sample automation in the github repo that top balances when the delta between cell voltages exceeds a certain threshold for too long.

I added the integration but have a noob question: How do I install the dashboard?

I copied the dashboard yaml into my configuration file, but my dashboard is just a bunch a tables, not nice looking graphs and charts. What do I need to do so that my dashboard looks like the sample dashboard from Git Hub?


Is it possible to expose for both set and get:

Stop AC Charge SOC(%)
On-Grid Cut-Off SOC(%)

I would like to add automation in HA to control those depending on solar forecast for the next day

You’ll need to create your own dashboard. There’s an example in the github repository.

@afilenkov - Implemented in v1.5.1! :tada:

New Controls

Three new number entities in the Controls section:

  1. AC Charge SOC Limit (HOLD_AC_CHARGE_SOC_LIMIT) - 0-100%
  2. On-Grid SOC Cut-Off (HOLD_DISCHG_CUT_OFF_SOC_EOD) - 0-100%
  3. Off-Grid SOC Cut-Off (HOLD_SOC_LOW_LIMIT_EPS_DISCHG) - 0-100%

All support read/write and enable solar forecasting automations as requested.

Release: v1.5.1

1 Like

EG4 Web Monitor v3.0.0 Beta - Architecture Update & Call for Device Data

Hey everyone!

Big update for v3.0.0 - we’ve extracted the API client into a standalone library called pylxpweb to support more inverters and monitoring platforms.

What’s New

  • pylxpweb library - Reusable Python client with proper device object models

  • Multi-platform support planned - EG4, LuxPower US (us.luxpowertek.com), LuxPower EU (eu.luxpowertek.com)

  • New controls - Working Mode switches, Battery Charge/Discharge Current, decimal AC Charge Power

  • Code quality - Base classes & mixins, strict typing, 127 automated tests, Platinum tier certified

:warning: Breaking Changes

  • Entity IDs may change - Some sensors have been renamed for consistency. You may need to update automations and dashboards.

  • Removed deprecated sensors - Sensors that were previously deprecated have been removed.

  • Minimum HA version - Requires Home Assistant 2024.1 or newer.

Help Us Support More Inverters!

We need device data to properly support all EG4/LuxPower models. If you have a FlexBOSS, 12KPV, XP series, LuxPower inverter, or GridBOSS, please help!

Collect your data (auto-sanitizes serial numbers):


pip install pylxpweb

pylxpweb-collect -u YOUR_EMAIL -p YOUR_PASSWORD --sanitize

Then create an issue at pylxpweb/issues titled “Device Data: [Your Model]” and attach the generated zip.

Full instructions: COLLECT_DEVICE_DATA.md

Installing the Beta via HACS

  1. Go to HACS → Integrations → EG4 Web Monitor

  2. Click the three dots menu (⋮) → Redownload

  3. Enable “Show beta versions” checkbox

  4. Select v3.0.0-beta.7 from the dropdown

  5. Click Download and restart Home Assistant

Links

Thanks for all the feedback - it directly shapes this integration!

I have a FlexBOSS18 and a GridBOSS. I’m not a programmer though. Please let me know if I can help in any way with your project.

1 Like

If you have a github account, you can run the extraction script, but it’s not too big a deal though. I have a GridBOSS and a FlexBoss21 that I need to have re-installed – I would imagine they have similar parameters. More curious if anyone has the offline inverters so I can have the integration properly handle their entity creation since they lack the functions a hybrid inverter has.

If anyone would like to help test before I release v3.0.0 for wider distribution, please follow the steps below. Also note that there are breaking changes with the way the battery entities are created. I tried to keep it as compatible w/ v2 as much as possible, but some modifications to automations may be needed.

Go to the EG4 Web Monitor integration in HACS.
Click on Redownload:

Select Need a different version?

Select v3.0.0-rc.4

Please report any issues in github! Thanks!

1 Like

I am just getting my Gridboss/flexboss systems setup now. One of the gridboss smart loads will be attached to my shop furnace. I would like to provide more control of how my furnace behaves on battery power.

For example, if the grid is down, I would like to disable this furnace unless the shop temperature is below say 45 degrees in which case I need the furnace to keep the shop above freezing.

Does this integration allow me to do this?

Thanks!

Swapping from MQTT from Solar Assistant to this.
I think in some ways it will be better, but others I am still trying to figure out.

Like I can’t find a simple sensor to show the current power (watts) for my Solar PV for Flexboss 21 + Gridboss

I would really appreciate a 1:1 mapping from the native sensors added from this intergration to the common sense Energy dashboard entries for Grid consumption, return to grid, grid power, solar production, battery storage, etc.

I went with
Parallel Group A Grid Import - Grid consumption
Parallel Group A Grid Export - Return to grid
Grid Boxx Grid Power - Grid Power
Flexboss Solar Yield - Solar production (only KwH sensor no Watt sensor)
Parallel Group A Discharging/Charging - Battery systems

Did I make any errors here?

I did not add consumption under individual devices from the EG4 intergration, I use a per breaker CT monitoring system to track that, but wonder if I might find a way to use this sensor as well to increase accuracy or as a double check without scewing the energy dashboard.

hi there, just trying to get this integration running and I get a an error “Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble” during the “add integration” step.
any ideas?

The RS485 version is great. It’s working with my 2 - EGA 18kpvs and 4 wall mount batteries.

Hi All

Really excited about this integration and i feel like i am close, but cannot seem to connect.
I have an EG4 12000 xp, firmware ceaa-0507 and want to connect via a Waveshare Modbus to TCP.
I have an ethernet cable with pin 1 and 2 connected to A and B
I do get a solid blue light on the converter
I have it plugged into the port shown in image.

Are these settings for the Modbus to TCP device correct?
I am not sure if Device Port AND Destination Port get set to 502??
The instructions say baud 19200, but i think the 12000xp is 9600?? I have tried both…

When i try to connect it seems to just spin and then error.
If i try to auto scan the network, it does find the modbus to tcp device, but then i hit submit and it just spins and errors…

Any Help Appreciated!!



You need to set multihost settings to Modbus to RTU on your waveshare configuration

Thanks, I did try that with both 9600 and 19200 baud. but no dice…
Also to add more info. I tried this all with and without the wifi dongle plugged into the unit.
I have an ethernet cord about 15 foot long…
At first i didn’t have Ground hooked to the P/E terminal.
I just repeated all the tests with the green ground terminal on the EG4 12000 XP connected to the P/E terminal on the adapter… No dice…
Also tried connecting PE Terminal on the EG4 to the adapter PE terminal…

Also FYI, My home assistant is running on a Virtual Server on a NAS… Wouldn’t think that would matter.

Only thing i haven’t tried is channel 2 on the adapter…