The smart smoke detector