The series of events involved in the perception of pain in which a temperature stimulus is received and converted into a molecular signal.
sensory perception of pain, sensory detection of thermal stimulus