Luxpower Inverter Integration

Hello everyone,

I’d like to share a new custom integration I’ve been working on for LuxPower inverters. Like many of you, I wanted a reliable, cloud-free, and local way to integrate my inverter with Home Assistant, so I decided to build one.

I’ve been using it myself for the past few weeks, and it’s been running just perfect!

Please don’t judge too hard, as this is my first real Python project. My background is mostly in C#, so I’m still learning the ropes in the Home Assistant world, and I’m very open to feedback.

What it does:
The integration connects directly to your inverter’s WiFi dongle over your local network and creates a rich set of entities, including:

Real-time Sensors: PV Power, Grid Import/Export, Battery SOC/SOH, Load Consumption, Voltages, Temperatures, etc.

Controls: Number entities to set Charge/Discharge currents and other operational settings.

Switches: Toggles for features like AC Charging and Grid Feed-in.

User-Friendly State: A text sensor that tells you exactly what the inverter is doing in plain English.

Installation & Configuration
This integration can be installed via HACS by adding it as a custom repository.

For detailed, step-by-step instructions on how to install and configure the integration, please see the README.md file on the GitHub repository.

Feedback & Support
As I mentioned, I would like to hear all your feedback or about any issues you’ve faced with. Your input is incredibly valuable. Please feel free to open an issue on GitHub for any bugs or feature requests, or just reply to this thread with your thoughts!

You can find the project and all documentation on GitHub here:
https://github.com/ant0nkr/luxpower-modbus-hacs

Thanks for checking it out!

4 Likes

Hi,

I just had a sales guy around trying to sell one of these, so I am interested in your integration.

I need to run a few things 24/7 (Home Assistant, IoT etc.) off the batteries when there is a grid failure. I have been told in need an EPS? I have not looked into this yet but it seems the only way they have of creating battery backup.

However, the way they have describe the EPS installation is that I need to select circuits to power or install new sockets to power in the event of a grid failure.

I do not want the hassle of these extra sockets or circuits to do this.

I want to power the whole installation from the batteries in the event of a grid failure and then use Home assistant to switch off items I do not want to power. I have been told I cannot do this as the grid failure cannot be detected by the Lux system.

Do you know if this is true? Can HA detect the grid failure and then automate the switch off of some items?

Thanks

Steve

Hi. This Integration does require Inverter LuxPower. It can be any, since they all using same Modbus Communcation. Just with WiFi Dongle, not ethernet, I don’t have ethernet dongle, so can’t test how it works.

And yes, you need EPS in any case to backup your power and convert 48V to 220V or whatever battery you have.

Thank you.

Hi,

I am not sure if this was a reply to me?

I have looked at EPS in the meantime and it appears to be a part of the inverter. The sales guy suggested it was a separate box! However it looks like its limited to 13 Amps which may be a new issue for me as I will not know the instantaneous load when the grid fails.

Do you know if HA can detect the grid failure to the inverter?

Thanks

Steve

Hi. No, HA by itself can’t detect Grid failure. It has to be something in the EPS to notify about Grid Failure or it can be ESP32, that will be connected to the grid and if it has no power, it means grid is off. Something like this.

Hi yeah that’s what I thought. I use the ESP32s all over the place so no issue there. I didn’t know if your integration could pick up the failure and report it.
Thanks

I can, but it is designed to work with Luxpower Inverters. If you have one with WiFI dongle installed, then yes. You can check for power outages.

Hello,
I’m using the DGxxx dongle. Currently, it can read some configuration parameters, such as the discharge limit (Ample), but the sensors are not working.
Is there any solution for this?
Please help me. Thank you!

Hello,
It’s hard to tell what the issue is, Luxpower Modbus protocol is specific one and doesn’t always works as standard Modbus.
However, from what I know DG is a sim-card dongle, instead of BA which is WiFi.
If you tell me how you’re trying to connect to it, I mean, is there an IP or how you’re connecting to it. I can add this logic into my custom integration and you can try to use it.

Thank you!

Wow, just my luck! I got HA setup yesterday and you just created this! I have an EG4 branded LuxPower inverter and would like to give this a shot.

I’m not much use on the coding front but happy to be an early user. How does the integration interface locally with the dongle? I thought the factory dongle is just setup to phone home to the company’s cloud.

Thanks for the work on this!

Hi. It works with WiFi dongle. There is an upcoming release with some improvements for DG/DJ dongles. it works just perfect with BA dongles.

Thank you.

Hello,
Thanks for the project.
Does it read the datas from the Ac Coupling?

Thanks

Hello,

It shoud read. Check it out :slight_smile:

You mention BA/DG/DJ Dongles. Are these the first 2 letters of the serial number of the dongle?

I ask because mine start BH.

[The next bit is sort of muddled]
There seem to be 2 wifi dongles. Starting with BA and starting with BH, I have two starting with BH - which are apparently a new more secure dongle than the ones starting with BA - allegedly. Certainly - once setup I seem unable to do anything with them.

I initially had 2 older dongles started with BA - but they broke / I broke them by playing with them and ending up with 2 BH dongles that work - but seem unable to respond to anything on the network. Note that I don’t actually know what their IP addresses are and I haven’t been able to work out what they are yet. It may have told me when I set them up - but I forget now

Hi. BH dongles should work as well with the latest version. But, you need to know it’s IP address, since this integration connects locally.

If BH dongle doesn’t work. Please, create an issue on GIT and put there debug logs, it will help me to debutg and find out what needs to be changed in order to make BH dongles work as well.

Thank you.

Thank you.

I don’t see anything here, but wondering if this could activate a quick charge on the inverter (EG4 6000xp)? I’m trying to work with TimeOfDay billing from Portland General but am limited in setting start/end battery levels to just one set for the three charging times. I’d like to kick-off a charge if my batteries get too low even during peak hours.

Update: Saw your stuff on github about changing the charge settings. I was warned against doing that. See this post starting at response #3.

Hi, is there a way of telling the inverter to grid charge on/off on demand? (not a preset time duration) Example: Octopus start to charge my car randomly outside of the cheap rate hours, obviously if this happens then it will start to discharge my house batteries into my Ohme charger so the ideal scenario would be to tell the inverter to start charging when this even occurs which would start the grid charge thereby topping up my house batteries (at cheap rate) which would also stop the batteries discharging to the car.charger. When the Octopus/Ohme charge session is complete it would then put the inverter back in to normal discharge mode. I hope this makes sense and thank you for all the hard work you have put in to develop this addon, im sure everyone using it appreciates it also.

Hi. Yes, this project has a script to allow quick charge.

About this reply:
Careful. The memory in the 6000xp is not infinite. It will stop working after some number of writes.

Not sure why it’s like this. Howerver, based on my research Luxpower does exactly as a script. So…not sure.

Hi.
I think, the best way would be to use automations and switch between Battery and Grid.

I’m running open-loop communications with my batteries (long story). Do you have a script based on battery voltage rather than SOC? The SOC readings on my batteries tend to drift from reality and voltage is a better indication of status.