Post

Integrating a Lux Power Inverter with Home Assistant

1691492751
1692009273
6

After having solar installed I wanted to get it integrated into home assistant to enable historical monitoring and also automation around my home.

At this time I haven’t implemented any automation, that will come in the future but for now I will show you how I integrated it with Home Assistant and implemented a nice card to display usage

Lux Inverter Setup

By default, the datalogger plugged into the Lux sends statistics about your inverter to LuxPower in China. This is how their web portal and phone app knows all about you.

We need to configure it to open another port that we can talk to. Open a web browser to your datalogger IP (might have to check your DHCP server to find it) and login with username/password admin/admin. Click English in the top right

Lux OS Index

click Network Setting in the menu. You should see the network settings, the top one is populated with LuxPower’s server IP Address, the second one we can use.

Configure it to look like the below and save:

Lux Network Settings

After the datalogger reboots, port 8000 on your inverter IP is accessible.

You should be sure that this port is only accessible via your LAN, and not exposed to the Internet, or anyone can control your inverter.

Home Assistant Integration

For this I use LuxPython to get access fill out this form

Install LuxPython

Download the repository and copy the folder custom_components/luxpower to home assistant /config folder.

Once copied REBOOT HA this step is required otherwise it wont work.

Setup the integration

Open up Settings > Devices and Services > Add Integration and search for LuxPower Inverter

If it doesn’t show up, clear your browser cache as it’s very likely your browser is the issue!

Fill in your IP, Port (8000), dongle serial and inverter serial

This can be found on the Lux website at server.luxpowertek.com

Once you have added this into HA, you should see some sensors in HA:

Use Developer Tools to view sensor.luxpower. Initially, the state will be Waiting but after a few minutes when the inverter pushes an update the state will change to ONLINE and data will be populated in the attributes.

Manual Refresh

To manually refresh data, add the following button to the dashboard:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
show_name: true
show_icon: true
type: button
tap_action:
  action: call-service
  service: luxpower.luxpower_refresh_registers
  service_data:
    dongle: BA********
  target: {}
entity: ''
icon_height: 50px
icon: mdi:cloud-refresh
name: Refresh LUX Data
show_state: false

replace BA******** with your dongle serial

Inverter disconnects often

The inverter dongle often disconnects, to solve the issue of data not flowing please import the reconnection blueprint.

It will allow you to reconnect if the inverter doesn’t report for X minutes (I would set it to 20 minutes but absolutely no lower than 10)

Conclusion

If you have followed all of this, you should now have your Lux inverter linked to home assistant and have your usage visible on the dashboard card.

If you have any problems let me know in the comments section or discord and I will assist where possible.

This post is licensed under CC BY 4.0 by the author.