This article can be more of a guide on how to construct an heartbeat sensor utilizing an Arduino. Although a complicated one, this project comes as an interesting one to many electronics hobbyists.
If you love tinkering, ESPHome is a fantastic way to build custom smart home devices. This open-source firmware framework gives you local control over smart home devices that support open standards.