House battery charging is via the 120v that powers your inverter/charger, so it works the same whether from generator or shore power. If you get charging on shore power but not generator, you must not be receiving 120v power on one of the two hot "legs" of you 50A power system. That suggest either a faulty Auto Transfer Switch that is not connecting both legs to the generator, or the generator isn't producing power on both of its legs, perhaps due to a tripped circuit breaker on the generator.
If the house batteries don't charge on either shore or generator power, then the number of possible problems are increased and could be the inverter/charger, batteries, battery control center & relay, disconnect switch, or battery wiring.