The invention refers to a device for attachment to a portable liquid injection device, wherein said device is designed to enclose the drug reservoir of the injection device completely. Further, said device has at least one wave guide enabling an electromagnetic wave to be applied along the drug reservoir of the injection device.In particular, the portable liquid injection device is a so-called insulin pen, i.e. a portable liquid injection device which is used to inject insulin for the treatment of diabetes.The inventive device preferably is in the form of a cap, in particular in the form of a cap of an insulin pen.