An inhaler device (100, 300, 500, 600, 702) for dispensing medication, the inhaler device comprising: a structural body that includes a recess for holding a container of medication to be inhaled by a subject; a primary flow channel through which the medication travels when air is drawn through the flow channel by the subject; a secondary flow channel through which only air travels when air is expelled out during an exhalation by the subject; a thermistor affixed within the secondary flow channel; an electrical circuit comprising: an operational amplifier that passes a fixed current through the thermistor; a voltage monitoring circuit configured to: monitor an output voltage of the operational amplifier, identify a variation in the output voltage exceeding a certain threshold, wherein the variation is caused by the operational amplifier attempting to maintain the fixed current, and estimate an airflow property based on the variation; a locking mechanism configured to prevent a delivery mechanism from causing the medication to be dispensed from the container; a mouthpiece that includes an electrode for detecting a presence of the subject's lips on the mouthpiece; and a controller configured to: receive a signal from the electrode indicative of a contact event between the electrode and an upper lip, a bottom lip, or an oral commissure, generate an activation signal that causes the locking mechanism to be displaced, thereby permitting the subject to administer the medication by interacting with the delivery mechanism. a structural body that includes a recess for holding a container of medication to be inhaled by a subject; a primary flow channel through which the medication travels when air is drawn through the flow channel by the subject; a secondary flow channel through which only air travels when air is expelled out during an exhalation by the subject; a thermistor affixed within the secondary flow channel; an electrical circuit comprising: an operational amplifier that passes a fixed current through the thermistor; a voltage monitoring circuit configured to: monitor an output voltage of the operational amplifier, identify a variation in the output voltage exceeding a certain threshold, wherein the variation is caused by the operational amplifier attempting to maintain the fixed current, and estimate an airflow property based on the variation; monitor an output voltage of the operational amplifier, identify a variation in the output voltage exceeding a certain threshold, wherein the variation is caused by the operational amplifier attempting to maintain the fixed current, and estimate an airflow property based on the variation; a locking mechanism configured to prevent a delivery mechanism from causing the medication to be dispensed from the container; a mouthpiece that includes an electrode for detecting a presence of the subject's lips on the mouthpiece; and a controller configured to: receive a signal from the electrode indicative of a contact event between the electrode and an upper lip, a bottom lip, or an oral commissure, generate an activation signal that causes the locking mechanism to be displaced, thereby permitting the subject to administer the medication by interacting with the delivery mechanism. receive a signal from the electrode indicative of a contact event between the electrode and an upper lip, a bottom lip, or an oral commissure, generate an activation signal that causes the locking mechanism to be displaced, thereby permitting the subject to administer the medication by interacting with the delivery mechanism.