Code Monkey home page Code Monkey logo

esphome-doorbell-with-mute's Introduction

ESPHome-based doorbell with mute option in Home Assistant

The code is in deurbel.yaml, the only thing you need to change is your own wifi settings and, if desired, change some names.

The code is based on some personal preferences:

  • Bell should not ring longer than 1 second (delay: 1000ms)
  • Once presssed, you have to wait 5 seconds (delayed_off) AFTER releasing the button, before the bell will ring again. Pressing the button within 5 seconds will only reset the timer without ringing the bell.

In Home Assistant you'll need to create a boolean, which in my code is named "input_boolean.mute_doorbell". This piece of code is shown in home-assistant_input_boolean

The hardware

The hardware is quite easy. It's based on a Wemos D1 mini. That's powered on the 5V pin. The doorbell is connected between the 3.3V and the D2 connector. There is a resistor between ground and D2 (this can be anything between 1K and 100K, I've used a 1K here) for a pull-down to ground. So D2 is always low (via the resistor), until the doorbell is presssed, than it's high (3.3V).

The D1 is directly connected to the Wemos Relay shield (bought mine via Aliexpress, If you've got another one which requires another connector, change the code for that).

Automation

I've used the following automation code (automation.yaml):

  • If mute is enabled than don't ring the bell, notify via light flashes (I got Hue lights placed in a group)
  • If not mute, the bell will ring and there'll be no need for light flashes
  • Always send a notification when the doorbell is pushed
  • In the future I'll let my camera send a photo or even a short movie clip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.