RAE integrates digital detection of high-risk stress and craving periods by utilizing a mobile phone application and integrated wearable sensor. These detections are paired with interventions (mindfulness based de-escalation tools), support, and monitoring (to identify trends and plan for future). The present study will deploy the technology in a multi-site randomized controlled trial to test the efficacy of the RAE system in on clinical and psychosocial outcomes. Subjects will be randomized to use the RAE system (mobile app and wearable sensor) plus usual care vs usual care plus a fitness tracker only to measure differences retention in treatment, return to substance use, and overall psychosocial functioning. The ultimate goal is to develop a cost-effective, paradigm changing recovery tool that will improve substance use disorder treatment, and prevent related complications and deaths.