Thermodynamics of transition metal-hydrogen solid solutions