Yeah… 2$ If you have everythingv else on hand and specific circumstances…
Yeah, and they’re assuming you’re going to power it off of a 5v line. In most instances you’d want to power it off the existing doorbell transformer, so you have to step down the voltage and convert it to DC somehow. That’s $5-10 right off the bat.
Additionally, you’d want to have the esp chip and relay at the doorbell transformer, not at the actual doorbell. You’d need to have a second relay or power transformer for this, but that’s not a huge deal.
The project would likely be around $10-20, assuming you’re not going to 3D print an enclosure. Plus, if you already have a front door camera, chances are you’d already have a doorbell camera that can already do this.
Source: building custom smart devices is my hobby.