Doorbell + Alexa + Sonoff

Hi all, i’m posting my config as i always wanted to implement smart doorbell, but i knew that would be expensive and i would may face difficulties due my home main gate being about 30m (100ft) from my house.
For whom may interest and face similar situation i’ve made as follows:

1 - sonoff mini: as sonoff mini has S1 and S2 terminals i knew i could use them to trigger as someone pressed my doorbell, that way performing any automation.

2 - 110v NC relay: this was my solution for the distance problem. sonoff mini S1 and S2 has 3v between contacts, and due the distance, there is huge voltage drop, i couldn’t trigger the sonoff from distance, this way i needed to use the 110v relay to close contact next to the sonoff. so i did this way.
why doing this way? as i said the main factor was distance, i could install the sonoff or esp8266 at the doorbell switch, but the distance would impact on wifi signal badly, so i decided going this way, and i would have to install another wire to the switch, i decided that was not an option.

for the automation i firstly created a routine on Alexa that increases my echo volume, rings the bell from Amazon sound effects database (ding dong style), saying that someone rang the doorbell then lowers the volume.
now i can access that routine from HA.

Home Assistant:
Created an automation on HA, and my trigger was the sonoff (pulse mode) to do the following.
1 - call the Alexa routine created
2 - opening security camera live feed on my TV for 20s and stopping the feed
3 - saving a snapshot from security camera
4 - send this snapshot to HA app on both, my wife and my phone.

Automation Code:

- id: '1604945323753'
  alias: Doorbell
  description: ''
  - platform: state
    entity_id: switch.sonoff_1000e5705c
    from: 'off'
    to: 'on'
  condition: []
  - data:
      entity_id: media_player.echo_de_henry
      media_content_id: Doorbell
      media_content_type: routine
    entity_id: media_player.echo_de_henry
    service: media_player.play_media
  - service: camera.snapshot
      entity_id: camera.main_gate
      filename: /config/www/images/main_gate.jpg
    entity_id: camera.main_gate
  - delay: 00:00:05
  - service: notify.mobile_app_sm_a530f
      title: Ding Dong!
      message: '{{now().strftime("%H:%M:%S")}} Someone is at the door !

        image: /local/images/main_gate.jpg
  - service: notify.mobile_app_sm_a515f
      title: Ding Dong!
      message: '{{now().strftime("%H:%M:%S")}} Someone is at the door !

        image: /local/images/main_gate.jpg
  - service: media_player.play_media
      media_content_id: http://192.168.x.x:xxxx
      media_content_type: image/jpeg
  - delay: 00:00:20
  - service: media_player.turn_off
    data: {}
  mode: single

This way i could perform what i wanted. There are other ways doing this, i know, but i preferred the way i could spend less time doing (like soldering hardware or programming esp’s would be very time consuming for me) and not spending lots of money on other solutions.
If you think you could help someone that may reach out this topic with a better solution feel free and post it.
I found many solutions for my automations on this forum, so i thought i could help a little bit, even being a beginner. So, thanks a LOT.


How much delay you get when notifying HA’s mobile app?
Mine are inconsistent. Sometimes I get the notification on the phone (Android) 15 minutes later… useless…

Wow that’s a huge delay. Mine pops out in a couple of seconds so far.

I have sonoff mini too, i want to do it with your way
I have a little confused.
Can you share the diagram or picture, how you connect your hardware with doorbell and which terminal?.

1 Like

That´s what i´ve done. this way my doorbell feeds 110v to the relay then closing contact to sonoff s1/s2.