I used AsusWRT directly flipping virtual presence sensors on ST - search for "Asus presence" on the community site. It's quite a simple script and easily adapted to other routers, it just uses a mechanism to scan for devices, match them to a list and send web requests if anything has changed. Since then I picked up a Deco mesh network which does the same via IFTTT and webhooks (I use the same virtual sensors on ST to make it easy). Beware though, some IFTTT compatible routers only notify on connection, not disconnection. Deco does both.