A supplementary device configured to be attached to a drug delivery device, the supplementary device comprising an optical decoding system comprising: a first optical sensor (212) configured to be directed at a first rotatable component of the drug delivery device; a second optical sensor (214) configured to be directed at a second rotatable component of the drug delivery device; and a processor configured to: receive signals from the first optical sensor, wherein the signals from the first optical sensor represent encoded dosage values present on the first rotatable component and whether the first rotatable component is rotating or not; receive signals from the second optical sensor, wherein the signals from the second optical sensor represent whether the second rotatable component is rotating or not, and to determine: i) that the drug delivery device is in a drug dose dialing mode when the signals received from the first optical sensor indicate that the first rotatable component is rotating and the signals received from the second optical sensor indicate that the second rotatable component is rotating, and ii) that the device is in a drug dose delivery mode when the signals received from the first sensor indicate that the first rotatable component is rotating and the signals received from the second sensor indicate that the second rotatable component is not rotating.