A sensor device, monitoring device, and method for automatically matching the sensor device attached to an animal with an ID tag attached to the animal, wherein the monitoring device receives information related to the ID tag from an ID reader device and receives sensor device information from the sensor device, where the sensor device information includes a sensor device identity information and an indication that transmission of the sensor device information from the sensor device was triggered by an ID reader device, the ID tag and the sensor device being determined to be attached to the same animal based on time information associated with the information related to the ID tag and the sensor device information.