Cade Cunningham scored 21 points and made two free throws with 5.5 seconds left to help the Detroit Pistons hold on to beat the Houston Rockets 115-111.