Hardware ID - Variant detection with 1 Digital MCU pin
Dallas 1wire memory or
Very small microcontroller or
RC circuit. Measure charge/discharge time. Set pin low for X time to discharge. Set pin hi for Y time. Make pin input - test state. Rinse and repeat until high. Then do the same in reverse - charge hi, then discharge whilst testing the pin. Based on the time for charge/discharge gives you a value.