Skip to content

zuidwijk/esphome-doorbell

Repository files navigation

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

About

ESPHome based DoorBell

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published