Background. Most patients have moderate or severe pain after surgery. Opioids are the cornerstone of treating severe pain after surgery but cause problems when continued long after discharge. We investigated the efficacy of multifunction pain management software (MServ) in improving postoperative pain control and reducing opioid prescription at discharge. Methods. We recruited 234 patients to a prospective cohort study into sequential groups in a nonrandomised manner, one day after major thoracic or urological surgery. Group 1 received standard care (SC, n = 102), group 2 were given a multifunctional device that fed back to the nursing staff alone (DN, n = 66), and group 3 were given the same device that fed back to both the nursing staff and the acute pain team (DNPT, n = 66). Patient-reported pain scores at 24 and 48 hours and patient-reported time in severe pain, medications, and satisfaction were recorded on trial discharge. Findings. Odds of having poor pain control (>1 on 0–4 pain scale) were calculated between standard care (SC) and device groups (DN and DNPT). Patients with a device were significantly less likely to have poor pain control at 24 hours (OR 0.45, 95% CI 0.25, 0.81) and to report time in severe pain at 48 hours (OR 0.62, 95% CI 0.47–0.80). Patients with a device were three times less likely to be prescribed strong opioids on discharge (OR 0.35, 95% CI 0.13 to 0.95). Interpretation. Using an mHealth device designed for pain management, rather than standard care, reduced the incidence of poor pain control in the postoperative period and reduced opioid prescription on discharge from hospital.