MQTT Doorbell

Hi Christian, could you please share the script you run for day and night doorbell?
did you solved the false triggering? nice project.

/Martin

Yes, the false triggers was solved by using a resistor between the switch and the wemos
I use two automations, one for daytime and one for nighttime.

- 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: notify.iOS
      data:
        message: "Dörrklockan ringer!"
        data:
          attachment:
            content-type: jpeg
            hide-thumbnail: false
          push:
            category: camera
          entity_id: camera.huvudentren

- 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: notify.iOS
      data:
        message: "Dörrklockan ringer!"
        data:
          attachment:
            content-type: jpeg
            hide-thumbnail: false
          push:
            category: camera
          entity_id: camera.huvudentren
2 Likes

thx Christian, but the shell_command.sonos_play_doorbell_night where does it point at? sorry for been a bit n00b here :frowning:

i found you github, and can see you are having the files intern :wink: it make sense now

Sonos API addon is a great thing :slight_smile:

I am using your pcb for a while now. Works pretty good, however I am experiencing false triggers.
When the light switch in our bathroom toggles from ‘off’ to ‘on’, I (sometimes) also get a doorbell trigger.

Any idea how that could happen and how to fix it?

Hi lxz,

That sounds like a annoying problem :thinking:
Maybe you can fix it with software, currently the arduino code I use sends a mqttt message as soon as the octocoupler receives a signal:

if ( doorbellState == LOW ) {
client.publish(doorbell_topic, “on” , true);
Serial.println(“Doorbell is pressed!”);

//wait 5 seconds, then publish the off message
delay( 5000 );
client.publish(doorbell_topic, "off" , true);

}

If the switching of the lights just triggers a very short spike, you might be able to get around it by checking if the doorbell is still pressed a few mns later:

if ( doorbellState == LOW ) {
wait 100ms, then check again
delay(100)
if ( doorbellState == LOW ) {
client.publish(doorbell_topic, “on” , true);
Serial.println(“Doorbell is pressed!”);

//wait 5 seconds, then publish the off message
delay( 5000 );
client.publish(doorbell_topic, "off" , true);

}
}

1 Like

I’ve by the way been tinkering with 3d printing a housing for the board:

If you’re interested, you can grab the files here wich can be used to 3D print it: https://github.com/eriknl1982/mqtt_doorbell/tree/master/3d%20print%20housing%20files/for%20v1.1

1 Like

Wish I had seen this post earlier, the look super kool. I would have thrown you a few extra Euro’s to stick one in with the doorbell. I might be in Holland next month anyway for work, so might save on postage, although if I remember correctly, the postage isn’t the cheapest there anyway.

What you could do, is go to https://www.3dhubs.com and see if there’s someone nearby that can print the files on my github repository for you. I don’t actually have a 3d printer myself, but was able to get things printed by someone in my village for a reasonable price.

1 Like

Thank you very much Erik, I have always been interested in a 3D printer, but that does seem like a cheaper way to do it, as I would only ever need it for the odd part here and there :slight_smile:

Hey Erik! Will you get more fully assembled kits in stock soon? Would like to purchase one!:smiley:

Need to say a massive thank you to @ErikNL for his assembled kit. I like to think I could have made it myself, I ordered all the parts, I think, but then stumbled across Erik’s pre-made option, and it was definitely the way to go for me. I have an intercom style doorbell, so it doesn’t have a pulse to it, but managed to hook it into the driver for the LCD screen, and works perfectly for me. Now have TTS speech through the house when it rings, and also triggers my Xaiomi hub too down in the garage, so shouldn’t have an excuse not to hear it now, if answer it, that’s another matter :wink:

I’m currently out of boards and optocouplers, but I should get some in stock any day now.

Regards,

Erik

Just a note that I have some new boards in stock now, I’ve also renamed it into "“Doorbell modernizr” :slight_smile:

Because soldering was taking a bit too much of my time and was too error prone, I now got some professionally assembled. This doesn’t however make it cheaper unfortunately (you would need to go to pretty high batch sizes for that).

All code and designs are still open source:

The device now also works with Domoticz and OpenHAB out of the box by the way :wink:

Just to echo my post above, a big :+1: to @ErikNL Have had one of his doorbells for the last 4 months, and it’s perfect. Integrated straight in HA, super easy to setup. If you are looking to make your dumb doorbell smart, this is definitely the way to go.

1 Like

HI, i am also verry interested in this doorbell, at the moment i have this system in house
https://entrya.eu/wp-content/uploads/2017/10/Facila-DP132C-NL.pdf

if i buy that system from ericnl do i just need to attach the wire like in the picture below? doest it mather where i put the + and - ?
also, the outpost has a camera, is it possible to capture the camera stream somehow of those 2 wires?

thnx in advance

This project looks great! I’ve been looking to add something to the hardwired doorbell and keep it simple. The only thing I can suggest is maybe using the AC transformer to power the unit instead of another wall wart.
The transformers are always in a hidden spot under a floor joist, in a crawl space under stairs or some weird spot. Usually a receptacle is not near and just having a 7-24VAC converter along with the 5v plug would make it universal and easy to use.

Agreed. If it used AC power from the doorbell transformer, that would make this perfect.

My two cents on powering a sensor for a traditional doorbell:

If neither the doorbell transformer nor any other wired power source is easily accessible I would recommend to use @tlsGoud 's solution but with a battery-powered wemos d1 mini and the following modifications (to make the batteries last for at least some months):

  1. connect the wire to the RST pin of the wemos d1 mini instead of the D3 pin
  2. change the code to send the mqtt message when the wemos is started and go to deepsleep then (should look like this)

For the people who wonder whether the ESP node could be powered with the doorbell AC transformer current of a button press because the transformer itself is not accessible: With a supercap it could work but probably not reliably.
Reddit’s markus_b did some math here: https://www.reddit.com/r/esp8266/comments/4slt3a/sanity_check_for_doorbell_project/d5b69uh/

An alternative for this would be to add a 433mhz transmitter to your traditional doorbell as it needs a lot less power than a wifi module and thus could be powered with capacitors. Here is a project where someone built that and documented it quite well: http://www.maltepoeggel.de/?site=klingelerweiterung
Of course you’d also need a 433mhz receiver for HA then if you haven’t already.