@tgauchat gave an excellent overview of the issues. This is typically called “micro location” and many people are working on it, with no clear winner yet. Eventually, there will be home automation that can count heartbeats, but we’re not there yet.
Meanwhile, for how this plays out within a SmartThings-compatible installation, start with the following project thread. (This is a clickable link.) It discusses most of the current options.