Wi-Fi connected devices based presence detector

Would it be possible to implement Wi-Fi connected devices based presence detector? For example, you can get the list MAC addresses of devices connected to wlan0 with:
/sbin/iw dev wlan0 station dump | grep Station | cut -f 2 -s -d" "
I like this approach, because ping often fails with sleeping devices. Also it doesn’t require for battery powered station devices to send any ping replies. AP already knows the connected devices. This approach has a drawback that if station leaves the network without disconnecting, there is a timeout before AP knows that the station has left, but this is ok for me.

Is this something like what you want?

Something simpler. I have an AP (access point) and I need device tracker that shows what stations are connected to it based on response from the command above.