A system, a method, a device and a computer program are provided for detecting and monitoring medium flow. The device comprises a flow sensor (350) that includes a thermopile (352), wherein the thermopile (352) may include a first thermocouple and a second thermocouple. The device can further comprise a microcontroller (340) that can be configured to generate a reference baseline and can further be configured to compare an output of the mass airflow sensor to the reference baseline (503). The heater element may comprise a heater resistor.