Alerting about sensors readings

I am working on a project that, among other things, will read measurements from an analog fire and carbon monoxide sensor. I have established a connection to the arduino, it reads the measurements, however, I wanted to notify the user when fire and gas are detected.

I tried to do this with the taifun extension, but with each alert, the app would shut down on its own. My method presented here is hopeless because:

  1. the user sees the information only if the application is running
  2. the alert is sent as often as the timer receives it, i.e. once per second, 60 s of sensor operation = 60 x the user will have to click OK on the alert.
  3. no sound at all

Is there a way to realize all these points?

That is, the app detects that the sensor has detected a fire, notifies the user audibly and off the app screen, and sends a notification once every 10 s max, or until the user approves that he sees the message? Ideally, the audible alert should run until confirmation.

I don't know if this is hard to implement or not, thanks for any hints. :slight_smile: