Security features for an electronic metered-dose smart inhaler, mobile app, and cloud-based software system for use with medical prescriptions and clinical trial regimens. The smart inhaler requires several types of user validation and feedback, and enters a locked-out state when required user feedback is not received or when received user feedback raises a suspicion of fraudulent or improper use. While the smart inhaler system is well suited for aerosol medical marijuana products, it may be used to deliver and conduct clinical trials on any type of product suitable for aerosol administration including other types of medication and non-medical products, such as nicotine, herbal products, pain killers, sleep aids, dietary stimulants, dietary suppressants, etc. The security features are not limited to aerosol inhalers, and may be applied more widely to other types of in-home, patient-administered products.