An add-on device configured to be releasably attached to a drug delivery device comprising a housing with a reference marker and a scale drum with a zero identifier and an initial marker. The add-on device comprises a memory and a camera adapted to capture an image of the housing reference marker and the initial marker when the scale drum is in a (near) initial position. The add-on device is adapted to perform a reference offset value determination, comprising: capture an image, perform an image analysis to determine if the captured image comprises the zero identifier, if so, determine a reference offset value based on the distance between the housing reference marker and the initial marker, the reference off-set value representing the initial rotational position, and if no reference offset value is stored in the memory or if the determined reference offset value corresponds to a smaller set dose amount than a currently stored value, store in the memory the determined reference offset value.La présente invention concerne un dispositif additionnel conçu pour être fixé de manière amovible à un dispositif dadministration de médicament comprenant un logement présentant un marqueur de référence et un tambour gradué présentant un identificateur zéro et un marqueur initial. Le dispositif additionnel comprend une mémoire et un appareil photographique adapté à la capture dune image du marqueur de référence de boîtier et du marqueur initial lorsque le tambour gradué se trouve sur une position (quasi) initiale. Le dispositif additionnel est adapté à lexécution dune détermination de valeur de décalage de référence, comprenant : la capture dune image, lexécution dune analyse dimage en vue de déterminer si limage capturée comprend lidentificateur zéro, si tel est le cas, déterminer une valeur de décalage de référence sur la base de la distance entre le marqueur de référence de boîtier et le marqueur initial, la valeur de décalage de référence représentant la position de rotation