Longtime Hopkinton Fire Chief Richard Schaefer died suddenly of a heart attack Sunday night while on duty.