Safety in smart buildings