• 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

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.
It's all a balancing act. I have a VPN for remote access, and prefer to avoid cloud services where possible both for security and reliability. With the dongle you give up some of that for convienence.

Does the 6000XP let you split out CAN and RS485 at the battery port on the inverter?
 
It's all a balancing act. I have a VPN for remote access, and prefer to avoid cloud services where possible both for security and reliability. With the dongle you give up some of that for convienence.
Honestly same here, I've been burned before by IoT devices getting dropped once the profit was gone. Not saying I get that impression from EG4/Signature Solar, but its a matter of principle for me.

Does the 6000XP let you split out CAN and RS485 at the battery port on the inverter?
Ya know, I have yet to try this, I have been on the v1 LP4 batteries up until recently, so I never had the option of batteries over CAN and the Inverter over RS485, definitely something I will have to mess with...
 
Ya know, I have yet to try this, I have been on the v1 LP4 batteries up until recently, so I never had the option of batteries over CAN and the Inverter over RS485, definitely something I will have to mess with...
Checked the manual; pin 1 and 2 are RS485 and pin 5 and 6 are CAN.
 
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....
@adamksmith1234 This connector on the 6000xp I circle in red?

1729538508953.png
 
I'm doing something very similar to the original post with data logging on my EG4 6000XP, so I thought I'd share.
  • picked up a JST-XA-SMT connector and unplugged the wifi from the board
  • mapped pins to an RS485 USB dongle
  • I loaded up the latest raspberry pi lite OS (old raspberry pi laying around)
  • Installed https://github.com/HotNoob/PythonProtocolGateway
  • Pointed the output to my MQTT node and data immediately started flowing to Home Assistant
I might move to an ESP32 down the road, but this was a good fit for what I had (I did purchase the dongle and connector), but now I don't have to worry about the wifi issues (I always prefer hard wiring data loggers when reasonable). I used an RJ45 jack to stay inside the inverter as I didn't have a permeant placement for my pi and thought it was a bit cleaner having the jack inside. I haven't worked on any two-way communications as I haven't had the need. I'm operating in a completely off-grid configuration.

This is my second system as I've been running a larger Victron / Electrodacus / Home Assistant configuration for years in my house (we are off grid), but I wanted to try out EG4 for my second building.
 

Attachments

  • PXL_20241024_200141279.MP.jpg
    PXL_20241024_200141279.MP.jpg
    87.9 KB · Views: 22
  • PXL_20241024_200122729.MP.jpg
    PXL_20241024_200122729.MP.jpg
    131.8 KB · Views: 23
@adamksmith1234 This is great. I've wanted a direct ESP to Home Assistant connection for the 6000xp since I got it.

You said you're using the MAX485 for this. How exactly does that work with the ESPHome UART/Modbus components? Doesn't the MAX485 require a direction control GPIO pin? I don't see that setup in your YAML.
 
@adamksmith1234 This is great. I've wanted a direct ESP to Home Assistant connection for the 6000xp since I got it.

You said you're using the MAX485 for this. How exactly does that work with the ESPHome UART/Modbus components? Doesn't the MAX485 require a direction control GPIO pin? I don't see that setup in your YAML.

I just setup a ESP32-Poe with this and yes you are right. For the MAX485 you need a flow control bit. I added this under the modbus item:

modbus:
- uart_id: uart_modbus_inverter_1
id: modbus_inverter_1
flow_control_pin: GPIO033
 
Hey all, it was a fat minute cause of life stuff. I see there are some more questions that might have been answered... but I'll add my own answer in as well....
@adamksmith1234 This connector on the 6000xp I circle in red?

View attachment 251315
Yes that is the connector I'm Using, I just unplugged the HDMI connector daughter board thing... put my stuff on that, it makes it easier for me to float between the EG4 dongle and mine for firmware updates.
I just setup a ESP32-Poe with this and yes you are right. For the MAX485 you need a flow control bit. I added this under the modbus item:

modbus:
- uart_id: uart_modbus_inverter_1
id: modbus_inverter_1
flow_control_pin: GPIO033
I am not using flow control on my implementation, cause the boards I'm using don't expose it to the ESP, in hindsight I should have found a board that exposed the flow control pin cause I created some fun bugs to chase down on my inverters.

That bug was mostly caused from the time keeping stuff I had implemented on the ESP, it was basically DoS-ing the controller and causing the inverter to fault out... I will post the updated code to the git repo, but needless to say after I got past that point, I had to shelve some of the other stuff I was working on due to Holiday stuffs.

I am hoping to get battery status at some point working so I can keep tabs on the batteries in my bank and see how they are holding up. I would also at some point like to take another stab at messing with the chargeverter stuff I have on my system so I can also control that rather than having to use relays on the power in side of the charger.

I'm doing something very similar to the original post with data logging on my EG4 6000XP, so I thought I'd share.
  • picked up a JST-XA-SMT connector and unplugged the wifi from the board
  • mapped pins to an RS485 USB dongle
  • I loaded up the latest raspberry pi lite OS (old raspberry pi laying around)
  • Installed https://github.com/HotNoob/PythonProtocolGateway
  • Pointed the output to my MQTT node and data immediately started flowing to Home Assistant
I might move to an ESP32 down the road, but this was a good fit for what I had (I did purchase the dongle and connector), but now I don't have to worry about the wifi issues (I always prefer hard wiring data loggers when reasonable). I used an RJ45 jack to stay inside the inverter as I didn't have a permeant placement for my pi and thought it was a bit cleaner having the jack inside. I haven't worked on any two-way communications as I haven't had the need. I'm operating in a completely off-grid configuration.

This is my second system as I've been running a larger Victron / Electrodacus / Home Assistant configuration for years in my house (we are off grid), but I wanted to try out EG4 for my second building.
I did try this at one point in time, but I wanted something that I could mount to the side of the inverter and just drop an ethernet cable to each inverter, rather than dealing with a Pi. I did end up caving and Using a Pi for my Tigo stuff, but the inverters are fortunately all ESP based.
 
I took your code and made it work with the Lilygo T-CAN485 and added a few features that you didnt have:

I also ran into the issue where the 6000xp crashes when overloading the RS485 bus. The latest code in the github seems pretty stable but I did remove lots of variables I dont care for. Currently I am polling every 10 seconds. The fix for me was when reading the registers, too make sure that ESPHome reads as much as possible in 1 go (using register_count: 4 - for example).
 
I took your code and made it work with the Lilygo T-CAN485 and added a few features that you didnt have:

I also ran into the issue where the 6000xp crashes when overloading the RS485 bus. The latest code in the github seems pretty stable but I did remove lots of variables I dont care for. Currently I am polling every 10 seconds. The fix for me was when reading the registers, too make sure that ESPHome reads as much as possible in 1 go (using register_count: 4 - for example).
Looks great dude! I’m scrolling through this and I’m probably gonna steal some stuff from your build. Appreciate that you commented out the unused variables rather than deleting them entirely. I’m also going to steal the Neo-pixel stuff for mine so I can get more status indication over just RJ-45 lights on the Wireless-Tag ESP I’m using.
 

diy solar

diy solar
Back
Top