A device for detecting the state of a vehicle's engine using vehicle on-board diagnostics data, the device comprising: a connector for connecting the device to a vehicle OBD port to receive OBD data and power; and a processor arranged to determine a vehicle engine state by monitoring a voltage at the connector, the processor being arranged to: (i) detect an engine 'on' state; and (ii) detect an engine 'off' state, wherein the processor is arranged to detect a transition from the engine 'off' state to the engine 'on' state when: (i) the monitored voltage is not less than a threshold; or (ii) a temporary voltage drop of at least a predetermined magnitude is detected; and wherein the processor is arranged to detect the engine 'off' state using a two-stage detection process in which a pending engine 'off' state is detected before the engine 'off' state is detected, characterised in that the processor is arranged to: detect the pending engine 'off' state when the monitored voltage is less than the threshold for a third predetermined time period; transition from the pending engine 'off' state to the engine 'on' state when the monitored voltage is no longer less than the threshold; and transition from the pending engine 'off' state to the engine 'off' state when, while the monitored voltage remains less than the threshold, the OBD data indicates vehicle speed and/or engine revolutions are constant for a first predetermined time period and then a second predetermined period of time elapses. a connector for connecting the device to a vehicle OBD port to receive OBD data and power; and a processor arranged to determine a vehicle engine state by monitoring a voltage at the connector, the processor being arranged to: (i) detect an engine 'on' state; and (ii) detect an engine 'off' state, wherein the processor is arranged to detect a transition from the engine 'off' state to the engine 'on' state when: (i) the monitored voltage is not less than a threshold; or (ii) a temporary voltage drop of at least a predetermined magnitude is detected; and wherein the processor is arranged to detect the engine 'off' state using a two-stage detection process in which a pending engine 'off' state is detected before the engine 'off' state is detected, characterised in that the processor is arranged to: detect the pending engine 'off' state when the monitored voltage is less than the threshold for a third predetermined time period; transition from the pending engine 'off' state to the engine 'on' state when the monitored voltage is no longer less than the threshold; and transition from the pending engine 'off' state to the engine 'off' state when, while the monitored voltage remains less than the threshold, the OBD data indicates vehicle speed and/or engine revolutions are constant for a first predetermined time period and then a second predetermined period of time elapses. detect the pending engine 'off' state when the monitored voltage is less than the threshold for a third predetermined time period; transition from the pending engine 'off' state to the engine 'on' state when the monitored voltage is no longer less than the threshold; and transition from the pending engine 'off' state to the engine 'off' state when, while the monitored voltage remains less than the threshold, the OBD data indicates vehicle speed and/or engine revolutions are constant for a first predetermined time period and then a second predetermined period of time elapses.