Abstract: The disclosure proposes a cable for connecting to an electronic device. The cable comprising an electrical cord, a connector, a sensor device and an alarm unit. The connector is connected to one end of the electrical cord, and adapted to connect the cable to the electronic device. The sensor device is arranged at the connector and is adapted for collecting sensor data from the electronic device when the connector is connected to the electronic device. The alarm unit is connected to the sensor device and arranged to initiate an alarm based on output data from the sensor device.