I can think of at least four aspects of battery modeling that can be difficult. First is the issue of the battery's capacity to be charged and discharged. For that you could use something like the kinetic battery model or something even more complicated, but unless you have a good reason to get that deep into it, I suggest you use a simple one-tank model with a fixed capacity and no limit to the charge and discharge rates.
For example, if the battery capacity is 25 kWh and its current state of charge is 80% or 20 kWh, then the maximum amount of charge energy it could accept over one time step would be 5 kWh, and the maximum discharge energy would be 20 kWh. If your time step is 1 hour, that means the maximum charge power is 5 kW and the maximum discharge power is 20 kW.
Something like the kinetic battery model would impose additional restrictions, but the one-tank model is the ideal and the simplest case.
The second potentially difficult aspect of battery modeling is the voltage. HOMER makes the simplest assumption, which is that the voltage is constant and equal to the nominal voltage. You could instead model the battery with an internal resistance that causes the voltage to rise above the nominal voltage during charging, and drop below the nominal voltage during discharging.
The third aspect of battery modeling is the efficiency. HOMER uses the assumption that the battery has a constant round-trip energy efficiency, independent of the rate of charge/discharge and independent of the state of charge. You could instead account for I2R losses in the internal resistance.
The fourth aspect is the battery lifetime. The simplest thing is to assume the batteries will last a certain number of years regardless of how they are used. HOMER uses the next simplest assumption, which is that the battery will accept a certain number of kWh of throughput before dying. The next step is to do what Hybrid2 does, which is to count the number and the depth of the cycles in the state of charge, and refer to the battery discharge curve to determine how long it will last before dying. That's analogous to the modeling of metal fatigue, and it's complicated because of the need to count cycles. I'd suggest you avoid that unless you have a good reason.