Honestly? It's simply not worth the effort. Yes, we can put a grey water reservoir who receive water from washing machines, dishwasher, showers, sinks and so on, with a simple three way thermostatic valve who divert just hot water to the reservoir and than a heat pump suck heat for it to push in a room, but the quantity of heat we can recover is simply too little except maybe for some industrial activity that produce hot water as a result of some process (like an industrial laundry).
It's simply too costly creating such system than the energy we can recover.
It's simply too costly creating such system than the energy we can recover.