Giter Club home page Giter Club logo

esphome-doorbell's Introduction

ESPHome based DoorBell

IMG_1103 IMG_1107 IMG_1104 IMG_1105

The doorbell

The doorbell is a modified relay hat for a Wemos. It's adjusted so that the Wemos get the power from the doorbell powersupply. No extra powersupply needed to power the Wemos :)

The code (for main bell)

I've created 2 versions of ESPHome yaml code for my ESPHome based DoorBell:

  • Normal/ring code (relay on when doorbell pressed, and off when released)
  • DingDong code (1 push on doorbell will make my dingdong go 3 times)

The code for a secondary bell

When I'm working in my office (attic), I sometimes won't hear the bell on the main floor. I have therefore a second bell on the attic. To trigger the 2nd bell via an automation, I'm using an API service and a script to tidy it up

api:
  services:
    - service: dingdong
      then:
        - script.execute: dingdong_script

script:
  id: dingdong_script
  then:
    if:
      condition:
        - switch.is_on: chime_active
      then:
        - switch.turn_on: relay
        - delay: 200ms
        - switch.turn_off: relay
        - delay: 600ms
        - switch.turn_on: relay
        - delay: 200ms
        - switch.turn_off: relay
        - delay: 600ms
        - switch.turn_on: relay
        - delay: 200ms
        - switch.turn_off: relay

That together with te rest of the esphome yaml code is the dingdong.yaml file

Automation

I'm using 3 services in my automation: App notification, Light notification and 2nd doorbell notification. These happens when somebody is pushing the doorbell, no matter if it is mute. Both main and secondary bell have each their own mute switch (.chime_active)

  - id: '<random generated id>'
  alias: Notify Doorbell
  description: ''
  trigger:
  - platform: state
    entity_id: binary_sensor.doorbell
    from: 'off'
    to: 'on'
  condition: []
  action:
  - service: notify.mobile_app_iphone
    data:
      title: Deurbel gaat
      message: Er belt iemand aan
  - service: light.turn_on
    data:
      flash: short
    target:
      entity_id: light.notify
  - service: esphome.dingdong_dingdong

esphome-doorbell's People

Contributors

zuidwijk avatar

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.