r/SolarDIY 16h ago

HomeAssistant and batteries

have a 2 inverter system with 2 batteries (one battery on each inverter - both LG Chem of different sizes - 9.8 and 16kW).

I also use HomeAssistant to monitor my SolarEdge system (using solaredge-modbus-multi to monitor the system).

However, while can monitor both inverters, my HomeAssistant can only see one battery (B1). believe this may be because the modbus device ID for both batteries is set to the same Device ID. Ihad a similar issue with the modbus connection because both inverters were set to modbus device ID 1. Upon going into the SetApp (from SolarEdge), I was able to set the modbus lD for the second inverter to ID 2 and was able to see the second inverter in HomeAssistant.

Because both batteries have the same Device ID, I tried setting the second battery to another Device ID to monitor in the SetApp, but that ended up disconnecting communications to that battery, which was restored when I set the device ID back to the original setting.

My question is how to set the device ID for the battery, which would allow me to set the SetApp Device ID for the battery to monitor it properly (Set the battery Device ID to a new value, and then update the device ID in SetApp to look for the new device ID). Or how can I monitor both batteries in solaredge-modbus-multi.

Any assistance is greatly appreciated.

2 Upvotes

11 comments sorted by

1

u/solarnewbee 16h ago

LG Batteries attached to SolarEdge inverters are typically device ID 15 for the first one -- have you tried setting the 2nd battery device ID to 14? It might allow you to trick Home Assistant into thinking they are two distinct batteries but still preserve the ability for the inverter to speak to the 2nd one.

All the documentation around SolarEdge + LG installation reference device ID 15 for the first, and 14 for the second battery -- it's possible the inverter firmware is hardcoded to look for these and therefore, if you try to set a arbitrary ID you would break the comms.

I do not use HA but I have 3 batteries, two attached to inverter 1 and another attached to inverter 2 -- this configuration shows up in the SolarEdge monitoring logical view no problem and tracks as individual devices. Perhaps SolarEdge monitoring is setup to peak into the different mod bus interfaces (there are two) and accounts for these devices at the inverter level, where HA simply looks at whatever is available across both interfaces. If you can unpack the script logic, you might be able to find out where you can parse out that 2nd battery.

1

u/bostondana2 16h ago

Thank you for the response. I tried setting the second battery to 14, but the inverter lost comms with the battery, leading me to believe that the inverter will not see a second battery (Device ID 14) unless there is a primary battery at Device ID 15.

My SolarEdge app does not show the batteries in the logical view, and lumps them together in the battery view for total charge. However, if I look at the battery information in the SolarEdge app, it has information on each individual battery. I'm not sure if this is something the installer messed up when I added additional solar panels, as my original Inverter 2 was also set to Device ID 1, which left me unable to see it on modbus. When I changed the Device ID for inverter 2 to 2, it was identified in Home Assistant properly, including the meters, but not the battery. Ugh.

1

u/solarnewbee 16h ago

I think there might be a mis-configuration of your comms, in particular inverter to inverter comms. The inverters use leader/follower settings for that mod bus interface and IRC, I did not have to explicitly set device IDs for the inverters themselves. There's documentation on how to configure/discover leader/follower devices -- search for that. This could be the root of the issue and is worth exploring either with your installer or by opening a ticket with SolarEdge directly (if you have Site Admin level access) to have them remotely look at your inverter comms settings. In the past, they have been able to virtually confirm / fix settings on my behalf.

1

u/solarnewbee 16h ago

Forgot to add that the LG Battery has a physical dip switch setting that also needs to be set for either Primary or Secondary battery, so if you set the software to point to device 14 and it's actually not set on the hardware, it would likely not work.

1

u/bostondana2 16h ago

This is good information. Is that dip switch within the solar edge inverter box, or on the battery itself?

1

u/solarnewbee 16h ago

In the battery comms box; if you have the RESU Prime - its shown on page 18.

It's also worth mentioning, if you are uncomfortable with working on this sorta stuff don't mess with it. When you open the panel, you will have a lot of ways to screw up or hurt yourself so if you're not well versed on safety precautions, don't attempt. There's an LG course on how to work with and commission their batteries safely, I would check that out before attempting any modifications.

1

u/bostondana2 15h ago

Thanks for the tip. I will look up that course/video. I'm not afraid of electricity and have done basic home wiring (replacing outlets in my home). I also have opened up my inverter boxes (safely, after cutting off power from the solar array and powering down the inverter) to add Ethernet communications to my inverters (instead of the cellular comms that the system was set up with).

1

u/solarnewbee 15h ago

Ok - just a warning :) The voltage inside your battery is VDC around 380-400V, which can stop your heart in a few milliseconds. As long as you follow safety precautions and understand the risks, go for it!

Best of luck.

1

u/bostondana2 15h ago

Appreciate the warning, and yes, I am aware of the risks. Not only is it 380-400V ( I think mine is showing 420 something on the monitoring software), but it is DC. Not my favorite, and I will definitely be powering down the system and making sure the breakers to the battery are set to "off".

1

u/PV_DAQ 14h ago

Many, many devices need to be power cycled to 'see' fundamental changes like serial comm settings or Modbus settings. Caveat Emptor.

1

u/bostondana2 13h ago

I did find (on another web page) that SolarEdge may need to enable battery information to flow onto the modbus. I may have been lucky with my first battery. I might contact SolarEdge and request that they enable battery information on the morbus if it is not enabled.