MQTT Doorbell

Okay guys I wanted to have my own smart doorbell to add to my home automation setup. I lke the idea that was shared by armand janssen. I orderd all the items and they are send so I hope to receive them soon.

Anyways currently my setup is like this:

So based on the wiring image shared by armand i was just drawing my idea into a wiring image:

But as you can see I dont believe this will work or maybe even kill my esp and relais setup.

anyone who can help me out :smiley:

For me i used a cheap 433MHz wireless doorbell which is also read by the equally cheap sonof rf bridge, which then relays an mqtt to HA.

Ok I made some better diagrams. Still not able to get it to work.
hereby my current situation:

!

So I tried to insert my wemos d1 + relay in between. but no effect.

If I press the button I dont hear the bell

Shoul I connect the power from the fuse box to the COM or NO port?

I have update my last input somebody who can help me? It is wired as shown but no sound currently. :frowning:

Your schema looks ok. I donā€™t understand your doorbell in the drawing, but looks good.

Do you hear the physical click from the relay?
Did you configure the correct port?

I dont hear anything as far as I have tested.
I have connected the doorbell wire to D2 and the other one to GND.

As mentioned in the code.

this a photo of my doorbell gong and the wiring.

Did you put the relay correctly on the wemos ? Soldered it?

Try with a simple buzzer or led instead of your doorbell.

This to test the relay. It should give a click sound like in https://youtu.be/zup17vYASlU

This is great and I feel like if I was smarter I wouldnā€™t need a follow up question butā€¦

on my ubuntu pc thats running Hass.io in docker I have setup moquitto. Basic install expect a different port.
Its running lights and my doorbell. The lights are fine but for the doorbell automation I use a MQTT trigger.
That one has the same issue has christian.ek mentioned.
When I try to run the moquitto_pub command I get an error " Error: Connection refused"
Its definately user error but is there anyway you can help clarify running the _pub command? I tried stopping the MQTT service and running _pub -t HA -r -n but got the same error.

I think hassio sets up a required username and password for mosquitto, so you nee

mosquitto_pub -t your_topic -r -n -u username -P password

I think the password parameter is a capital p, but I donā€™t use them myself so I may be remembering incorrectly.

So I bought the DB Modernizr from @ErikNL in the interest of just getting it hooked up and done with. Unfortunately I am getting constant triggers.

I have a 24v transformer wired to a LaView PDB1520F1 video doorbell, which is then wired to my chime. I have not traced all the wires as they all change colors a gauge, but I am getting a constant 2.2v at the chime terminals. Erikā€™s DB Modernizr is wired in parallel at the chime. I created pigtails from the chime terminals and wired in the leads from the doorbell and pigtails from the DB modernizr. Is the constant 2.2v what is causing the constant triggers? I do not know yet what the change in voltage is when the door bell is pressed as my assistant (my better half) is out of town at the moment. Do I have to add resistors in series with the leads to the DB Modernizr?

Since the4 Modernizr works roughly the same as my bell, I would expect 0 voltage when nog pressed and 5v when pressed (when connected to ground and a pin on the Arduino). So the pin goes from ā€œdownā€ to ā€œupā€.

try 1001 :stuck_out_tongue:

i have found a wiring diagram.

Its a two chime doorbell. Have an ESP wemo D1 mini and relay.
I have tested the relay and it works. (seperate code) the main issue is the wiring with the ESP in between.

If this does not work I will consider taking away the bell and just have some sound send to my bluetooth speaker instead of. But the is a worst case scenario.

THANKS

Please I need to make this work :stuck_out_tongue:

Can Wemos D1 operate without separate supply as a circuit diagram?

I have the same issue.
before with my stupid doorbell everything worked fine.
Now with my smart doorbell itā€™s giving continous triggers.

Did you fix it?

Hi fietspomp yes fixed it.
I found another guy who did this and I managed to make it work. Did not believe it but it does work.

I will share the link tomorrow
For now. Google activate sleep mode

If you need some assistance just send me a pm

1 Like

Ok, so I investigated and I have the version 1.2 of the Doorbell Modernizer.
There is a resistance of 10Kohm soldered in between the 3.3V and the input pin.
I replaced this 10Kohm with a 3K3 ohm and now it works! No more false triggers!

Ok small update: After a while I had a few false triggers!
I was also struggling with Arduino so I decided to go ESPhome.
This works perfect and also, without delay, no more false triggers!
If anyone is interested, I can paste the code here.

Would love to see what you did to make it work (hardware and code). What voltages were you getting at standby and on doorbell press?

I gave up on it for awhile and was going to go with a reed sensor next to the solenoid but that wasnā€™t working for me either (worked fine on the bench, probably due to cable length). Iā€™ve shelved this project again as a result :frowning:

I already replaced the DBModernizr along with my SmartThings sensor for the front door sensor with a regular Wemos flashed with ESPHome, a reed switch for the door and DHT11 for temperature/humidity. Basically I have again the same functionality as I did with the SmartThings sensor except no battery.

I didnā€™t check the voltages to be honest.

Hardware wise, I have version 1.2, so itā€™s working via GPIO16 which doesnā€™t support internal pullup.
In this case, on the bottom of the board, thereā€™s a 10KOhm resistor soldered between input and 3.3V.
This 10KOhm I replaced with 3K3Ohm. But to be honest Iā€™m not sure if this was even necessary.
The newer version uses the internal pullup of GPIO 14, so I donā€™t know if that one works better/worse.
After this I only got a few false triggers. Which still bothered me.
The Arduino code was also bothering me, I like ESPHome much better.
Figured it wouldnā€™t be so hard to make it work. Hereā€™s the code:

esphome:
  name: doorbell
  platform: ESP8266
  board: esp12e

wifi:
  ssid: "xxxxxx"
  password: "xxxxxxxxx"
  manual_ip:
    static_ip: xxx.xxx.xxx.xxx
    subnet: 255.255.255.0
    gateway: xxx.xxx.xxx.xxx
   
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Doorbell Fallback Hotspot"
    password: "xxxxxxxxx"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:

web_server:
  port: 80

binary_sensor:
  - platform: gpio
    device_class: sound
    pin: GPIO16
    name: Deurbel
    filters:
      - invert:
      - delayed_off: 5000ms
      
switch:
  - platform: gpio
    pin: GPIO12
    internal: true
    name: Reset
    on_turn_on: 
      then: 
        - switch.turn_on: switch_12
  - platform: restart
    id: switch_12
    name: "Restart"   

As you can see, easy.
The 5 second delay is so that when the button is pressed, it doesnā€™t immediately send other notification when itā€™s pressed again quickly (Like the mailman does).
GPIO 12 is the reset button.
GPIO 16 is the input for the octocoupler. Of you have a newer version (1.2a or 2.0), use GPIO 14.

Good luck!

Impressive work, guys!
Iā€™ve been struggling with false alarms myself on a similarly setup doorbell (ESP-01S+ Relay) and Iā€™m considering switching to a D1 mini.
Question: apart from false alarms have you seen an alarm/ring every time the D1 mini starts?
Sometime we have power outages during the night and when power comes back on my doorbell ringsā€¦ waking up the house :frowning:

So I bought the Doorbell Modernizr as well, but after succesfully connecting it to Hassio, I constanly get the following errors (whenever I press the ringer):

*** PAYLOAD IS NOT VALID JSON DATA *** 

Unexpected character ('o' (code 111)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
 at [Source: java.io.StringReader@3e996f15; line: 1, column: 2]

Anybody knows what could be causing this issue?