Development of a Cyber Physical System for Fire Safety