I was just thinking about how to keep the 'snapshot' of the device(s) last list.
Device and CARD ID were the BIG issue.
If it is missing the ID, why not
ask for user help in (re-)establishing the ID?
BTW I uniquely name the 'Volumes' for both my device and SDCARD (removable cards can move around

and should not be locked into a single device if found in a multi-device library)

Identity by
1) calibre ID
2) device ID (eg ser#)
3) volume ID
4) book list match (possible ID)