• Have you tried out dark mode?! Scroll to the bottom of any page to find a sun or moon icon to turn dark mode on or off!

diy solar

diy solar

EG4 6000XP - ESPHome

adamksmith1234

New Member
Joined
Sep 20, 2024
Messages
16
Location
Colorado, United States
Hey all,

I have noticed its been a reoccurring theme for the data loggers to some up for the 6000XP. I got tired of the loggers being rate limited, and was just not happy with the Solar Assistant Integration and the frustrating process of adjusting parameters on the inverter with it. I recently got a second inverter and was unable to get SA to talk to both inverters at the same time.

I decided to roll my own solution for the data logger... Its based on an ESP-32 with physical RJ-45 and I'm using an RS-485 adapter to connect to what the data logger originally used.

Here are some photos of the finished product for my use case... I will try and get some internal photos of the assembled modules later, but here is how they sit now:
1727562866395.png

And here is the dashboard I'm pumping data to in Home Assistant:

Screenshot 2024-09-28 at 4.35.27 PM.png

And here is the Github Repo that contains my YAML I'm using to talk to the inverter: https://github.com/adamksmith/ESPHome-Projects/blob/main/EG4-6000-XP/Parent-Inverter.yaml

A couple fun callouts to note when I was getting everything working for the inverter, they swap the order the registers are in. So when I write time to the inverter, rather than being in HHMM its in MMHH. Another fun gotcha I ran into is the clocks on these inverters drift... a lot... so I had to put functionality in to bump the time on the inverter every 15min.

I am working on getting support included for AC Couple stuff that was released with the recent firmware update to the inverters. If anyone has any pointers on that, that would be greatly appreciated. Any feedback you have is also appreciated, but bear in mind I rolled this for my particular setup, and as such did some things to meet my specific needs.
 
Oh this is cool… i wil give it a try, I been connecting mine thought SA … but was wishing this was available, apparently I did not look hard enough ..
 
Taking a look at the code, does it matter if the 6000xp is connect via wired or wireless? It would appear it is using the esp32 to connect to the 6000xp through the network device on the esp32 .. and that it would not matter that the 6000xp was on wireless . ..
 
Taking a look at the code, does it matter if the 6000xp is connect via wired or wireless? It would appear it is using the esp32 to connect to the 6000xp through the network device on the esp32 .. and that it would not matter that the 6000xp was on wireless . ..
This is an entire replacement for the dongle itself, I removed the HDMI interface board and hooked the ESP up to the inverter with the 4pin connector that connected to that interface card. On that connector is the Modbus pins as well as 5V that I'm using to power the ESP. Ultimately I didn't want to use wifi to get this data off my inverters, and Ethernet was my preferred method.

When I'm out there tomorrow I'll see if I can pull pictures of how I have everything hooked up....
 
Excuse my ignorance, but HDMI? Is that for the touchscreen? Or is that just the plug type being misused by the dongle?

This looks like a great solution for my needs.
 
Excuse my ignorance, but HDMI? Is that for the touchscreen?

This looks like a great solution for my needs.
Nah, they repurposed the HDMI Connector as a means to connect the data logger dongle to the inverter, its not actually doing anything with displays... I will admit its a rather odd choice, but I guess they are cheap to get in bulk for LuxPower
 
Nah, they repurposed the HDMI Connector as a means to connect the data logger dongle to the inverter, its not actually doing anything with displays... I will admit its a rather odd choice, but I guess they are cheap to get in bulk for LuxPower

Great to know. I wish manufacturers were better at having a serial communications port easily accessible with a documented protocol.
 
This is an entire replacement for the dongle itself, I removed the HDMI interface board and hooked the ESP up to the inverter with the 4pin connector that connected to that interface card. On that connector is the Modbus pins as well as 5V that I'm using to power the ESP. Ultimately I didn't want to use wifi to get this data off my inverters, and Ethernet was my preferred method.

When I'm out there tomorrow I'll see if I can pull pictures of how I have everything hooked up....
Oh that’s the other option… so esp32 take and sends direct to HA… but you loose wireless and port for wired ….
 
Oh that’s the other option… so esp32 take and sends direct to HA… but you loose wireless and port for wired ….
Yeah, I have the dongle and breakout board sitting in a bag in the wiring compartment. My entire goal of this was to be able to either reverse it if needed, or plug the old data logger in if I need to do firmware updates for some new feature I want. Ex: AC Coupled Solar stuff
 
What do you think you are losing on the network connectivity?
The daily logging will be cut in two pieces making it less useful is my thought. I have logged into eg4 mon/ solar assistant for almost a year. I would be unable to easly compare data.

Need both :)
 
The daily logging will be cut in two pieces making it less useful is my thought. I have logged into eg4 mon/ solar assistant for almost a year. I would be unable to easly compare data.

Need both :)
See the issue I had was I couldn't get SA to acknowledge the other inverter, so it was already an incomplete picture. I also wanted to work on some automations to rip off what the Ecoflow's do with "Storm Mode" and the like, cause I have absolutely awful power where I'm at.

Different goals for different folks I guess, I was not pleased with the reliability of changing settings on the inverters when I was using SA, and I didn't really like running a whole separate Pi when I had a rack of servers sitting next to the inverter lol.

I do in the future want to play with both the EG4 logger and my logger running in tandem with each other. I did some sniffing of what the Inverter and EG4 dongle were sending back and forth with each other, and the dongle appears to not use Modbus on the RS485 connection, so there might be a possibility the two can co-exist... more to try on my end I guess....
 
It would be awesome if they can coexist, but if not a couple of low power DPDT relays could switch the data and power connections between the two devices. Then you'd have a simple way to switch between them, which potentially could be controlled remotely as well.
 
It would be awesome if they can coexist, but if not a couple of low power DPDT relays could switch the data and power connections between the two devices. Then you'd have a simple way to switch between them, which potentially could be controlled remotely as well.
Oh that's smart, I never considered that. I might keep that in mind for a Rev. 2...

In the process of setting this up, I can neither confirm nor deny that I made the inverter really really drunk poking at registers, and that would have saved me so much time going between the house and the building that has the inverters lol.
 
I couldn't get SA to acknowledge the other inverter
Im running 2 to solar assistant and outputting mqqt and then that goes via wifi to my home assistant sever for my automatons.

You should really try to figure that out. They must be on the same network. They must be on 2.4ghz wifi.

Assuming you know that, I would double check ID , serial and ip address.
 
I am doing something similar but using an RS485 to usb that I got with my Lifepower4 Batteries connected to the 4 pin connector on the inverter. That is connected to my PI running home assistant. I run a modified version of this code https://github.com/HotNoob/PythonProtocolGateway/tree/main in AppDaemon in HA that reads the modbus and sends it to MQTT for HA dashboards and an app on my phone.

I have it reading every couple seconds and even have it updating the EOD SOC morning and night so I don't use battery when my electric is cheap at night (I hate the AC first mode on the 6000xp). Opens the door for a lot of other automations also.

If I need to do a firmware update I just plug back in the dongle board and update.
 
The daily logging will be cut in two pieces making it less useful is my thought. I have logged into eg4 mon/ solar assistant for almost a year. I would be unable to easly compare data.

Need both :)
Shame you can't really export data from SolarAssistant's database.

Honestly though... that would be my big reason to make the switch to an open solution. I can pull data into InfluxDB from multiple sources and merge it (with some data loss and loss of data quality of course), but it can be very helpful.
 
Shame you can't really export data from SolarAssistant's database.

Honestly though... that would be my big reason to make the switch to an open solution. I can pull data into InfluxDB from multiple sources and merge it (with some data loss and loss of data quality of course), but it can be very helpful.

I feel like if you go poking around enough inside the SD card of the Pi running solar assistant you could prolly find the database its using. From what I gathered its really a bunch of off the shelf software bolted together to make a decent UI.

I personally am pumping data into Prometheus as well as Home Assistant. I didn't include this in the repo I posted, but I have a prometheus scrape endpoint on each of the ESPs for my Prometheus stack to scrape.
 
What do you think you are losing on the network connectivity?
The ability going down the road on in gas station to connect directly to the ip on my eg4 and make sure everything is … unless you catch all the data, archive it and all exporting, there is going to be a need for something that is not currently configured … also upgrades for the inverter, and support or the ability to have them review what is wrong with my equipment… I’m sure their are a few more …

I assume you can get this data without disconnecting it from the world and making it the only way in/out… otherwise how did SA would not work. So I prefer the find a method that does not disrupt the existing data.
 

diy solar

diy solar
Back
Top