MQTT Doorbell

Looking at your layout I was wondering where the wemos D1 gets the power from? In the picture the wemos D1 is only connected by the reed switch. Is that correct?

Edit: I got it all working by powering the Wemos D1 via usb and play sound with Chromecast Audio when doorbell rings. Sweet! However I want the Chromecast to pause when doorbell rings and continue to play after that. Any tips how to automate this?

Sorry, indeed I missed where the wemos gets itā€™s power from. It is powered by USB.

I donā€™t have any ideas how to resume. But if you figure that out I would very much appreciate it when you could share that solution :grin:

I run mine off of an AC/DC adjustable buck controller. Voltage from the doorbell transformer(18VAC) goes into it and 5VDC comes out

@quadmasta what would you have used if you would have to step down from 230v to 3.3v?

To which pins did you connect, simple 5v and gnd??

This is what I used. It can adjust 2.7-27V AC or DC to 1.5-7VDC. Iā€™d be really shocked if your doorbell ran on mains power and didnā€™t have a transformer.
https://www.amazon.com/dp/B00SO4T7IU

yes valid remark, but I was asking it for another project :slight_smile: Which could run on 230 instead of usb.

I am new to this whole ESP8266 thing and I am curious as I am looking into a similar solution for our doorbell.

Hi Eric. I gave up the doorbell and stole adwolfers idea (magnet sensor). The signal was triggered by a surge in the power supply. This could be the relay or something else. I even tried octocoupler relay with seperate supply and some capacitors, but nothing helpedā€¦ But that beeing said. I started my experience with Arduino/ESP8266 using this code. So when I needed to make a magnet sensor code I easly put together a new code. Now I have a doorbell which alerts my and starts some automations, but I can not silence the bell. I am happy with my system and hope you find a solution too!

Cheers

Hereā€™s my doorbell project:
http://www.cribbstechnologies.com/index.php/home-automation/mqtt-integrated-doorbell/doorbell-hardware/

Iā€™m working on the updates to the project pages as I switched to WeMos stuff.

Hey, finished building this last night. Working well but I think there may have been a couple of false triggers.

Could be interference as mentioned below? Iā€™ll have another look tonight but I have some spare reed switches so tempted to try the @adwolters solution.

Thanks again :slight_smile:

I have also experienced some false triggers. Not sure how to fix it. Is it enough to use a shielded cable?

I implemented the design here: http://www.redgrendel.com/the-doorbell/
It is basically using a sonoff on the high voltage side to control the door bell.
It works well and I have HA sending me push notifications when the bell is rung with access to my camera to view who is at the door.
Only thing is I do get some false triggers which can be annoying.
Still trying to figure out what can be done about that.

1 Like

Do your false triggers actually ring the bell? Or just false notifications? Iā€™ve had two false triggers of the relay today which has rang the door bell. Confused everyone at home today haha

Triggers. It happens sometimes when i turn the lighting on in the bathroom. haha :see_no_evil:

I can see that the Wemos board send a MQTT message when this happens so i guess i should try using a shielded cable instead and see if this helps with anything.

Haha! I had to disconnect mine last night.

It triggered 5 times yesterday on itā€™s own.

Going to look at the magnet/reed solution next.

@christian.ek
Do you mind sharing your sonos_doorbell script?

Iā€™m trying to do the same as you with a different approach but getting errors with the scrip Iā€™m using.

Do you mean the automation? Here it is:

#################################################################
## Doorbell automation
#################################################################

- id: doorbell_ringing_daytime
  alias: Doorbell ringing daytime
  trigger:
    platform: mqtt
    topic: home/outdoors/doorbell
    payload: 'on'
  condition:
    condition: time
    after: '07:00:00'
    before: '19:00:00'
  action:
    - service: shell_command.sonos_play_doorbell
    - service: shell_command.doorbell_notification
    - service: notify.iOS
      data:
        message: "Dƶrrklockan ringer!"
        data:
          push:
            category: camera
          entity_id: camera.huvudentren

- id: doorbell_ringing_nighttime
  alias: Doorbell ringing nighttime
  trigger:
    platform: mqtt
    topic: home/outdoors/doorbell
    payload: 'on'
  condition:
    condition: time
    after: '19:00:00'
    before: '07:00:00'
  action:
    - service: shell_command.sonos_play_doorbell_night
    - service: shell_command.doorbell_notification
    - service: notify.iOS
      data:
        message: "Dƶrrklockan ringer!"
        data:
          push:
            category: camera
          entity_id: camera.huvudentren
2 Likes

Good to see that so many people want to automate their doorbell. I wanted to do the same but without interfering with the existing system.

In the first version I measured the voltage on the A0 pin of a Wemos but after reading an article in the German cā€™t magazine I created a version 2 with an optocoupler. Now itā€™s just a digital input on the Wemos board and the two circuits are nicely separated.

On the Wemos I used Homie software to connect to the MQTT and from there on itā€™s handled by Home Assistant. For now just a message to a slack bot but once you capture the signal in HA itā€™s up to you.

A detailed description of the setup is on my Github page.

5 Likes

How do you got telegram working. Mine failed

Did you ever work out the 8v problem?
My doorbell is 8v 0.6A too and would like to achieve the same.