My interpretation is...
The excess power is being thrown away ( I prefer 'not used'). I think the OP has realised that storing power when on-grid is often not worthwhile, hence the ask. He says he's fed up with battery cost. I assume the batteries will now sit there as a backup only, no longer cycling. i.e. the batteries are being substituted overnight by the dc adapter.
If so, I think my relay design is what's required, but it really could do with an op amp as comparator with feedback resistor to give known hysteresis to give clean switch over
Or...
**broken link removed**