During this COVID-19 pandemic, I’ve been working at home for 85% of the time. I redecorated my 3rd floor to be my home office, bought some extra furniture and new monitors to be able to work comfortably. Yet every time someone (mostly the mailman) rang my doorbell, I didn’t hear it. Obviously I get a notification on my watch, but I wanted to change that…
Because I’v got plenty of my ESPHome based doorbells, I figured out it could be used for so many more! So I sacrificed my test setup to be my permanent office doorbell.
Now I ain’t going add a second pushbutton at the door, I just wanted to trigger a second bell when I’m in my office. Unfortunately it’s not possible to trigger a gpio remotely. Therefor I needed another way to trigger the dingdong sequence. Those loud “ring-ing” doorbells are way to loud and unfriendly.
How to trigger the doorbell remote
As I can’t trigger the GPIO remotely, I had to figure out another way. Luckily an ESPHome dev-er Guillermo pointed me to use an API service. The service can be triggered within Home Assistant, and runs a script:
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
The script uses the condition “switch.is_on” for chime_active. Therefor it’s easy to mute the doorbell, if needed (like in a video conference).
I already had an automation to trigger the lights to flash and send a notification to my phone. Just add another service “service: esphome.dingdong_dingdong”:
- 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
Home Assistant Lovelace
Within my Home Assistant dashboard, I’ve added both doorbells to one panel, including some other handy toggle’s:
All used code I have placed on my GitHub: https://github.com/zuidwijk/esphome-doorbell
(I’m not that familiar with GitHub, yet … that will come)