Make classic door bell smart?

Hi Wolfgang,

I saw the project you referred to before and it seemed very interesting. However I was unsure whether it is ok to have an esp-01 constantly drawing power from my 8v transformator. I‘m not very knowledgeable when it comes to electronics and thus didn’t feel like simply trying this without really understanding the implications would be a good idea. Can you maybe explain me if this could/should be done?

I realised my ‚smart’ doorbell with a battery which should last a long time by using deep sleep. However the reaction time is quite slow since it takes the esp-01 a bit more then 2 seconds to wake up, connect to wifi and send a message. It takes another second or so for the notification to reach my phone (through the myopenhab cloud). So I’m still thinking about using a different setup in the future.

Best regards,
Thomas

Hello,

there is another very simple solution. If there is some sort of Button which lights up when someones ringing the bell, you can use a photoresistor on an esp to catch that information and sending that information (for example) via mqtt to openhab.

Regards

If you want to go the ESP route, have a look into ESPNow, it should reduce start up time and also uses way less battery. Drawback though ja you need a 2nd coordinator ESP.
I use this concept in my water flow (shower) sensor.

Since I use the deep sleep until I register a button press my batteries should last for years so I‘m not really concerned regarding battery life (it’s rechargeable anyway).

I’m more interested in speeding up the message transmission from the esp to my mobile. How would ESPNow reduce the startup time and what is the coordinator used for? Thanks for your suggestions!

ESPNow does not require WiFi connection on your sensor and the ESPNow connection is hence faster.
The coordinator then acts as WiFi and, if needed, MQTT gateway and is connected the whole time.

In case you want to use only one chip with WiFi make sure you declare all WiFi variables (IP, DNS etc.) and hardcore them in the WiFi connect line, this also reduces connection time slightly.

Edit: from my experience, my ESPNow connection lasted not even a second when I tested it with one payload only and timed it. This includes starting up after deepsleep etc.

1 Like

Thank you for your explanations, I was already thinking about something non-wifi, I didn’t know that this can be done with espnow. I will look into that, thank you!

1 Like

Have A look at:

The installation of nodejs is a bit olddated but for the rest it is stil working fine in my house

your information is very interesting and good question but i am not idea.

Hi,

I have the same config and bought a Shelly Uni.
But I die Not find the time to install it though the Specs Look like it can be solved with it

Consider not extending but replacing your door bell with … a sensor (any of your tech choice).
Then choose from all of OH’s capabilities to notify residents.
I for instance simply attached a loud speaker to my OH server and play a sound there.
For conservatives, you can record your old door bell sound. For all others, take your pick what to play. I have a collection of bell related samples like the intro from AC/DC ‘Hells Bells’ that I keep cycling through.

Bonus of this approach: you can silence your doorbell via OH when you have a need to (do not disturb mode at night or when you turn your home cinema on).

The esp draw on your doorbell transformer is very negligible.
I use Tasmota for all my esp chips and have very fast response times. Flipping a phisical relay switch on the sonoff r2 mini is instant.
I do find it a bit laughable when they say “a $2 project”… The relay, eps, wires and box will cost you $30. Ftdi board would be another extra cost. May need some capacitors to smooth out your power.
But it would be tones of fun.

I was overly fixated on Getting a doorbell button working, when I installed a video doorbell camera I found less then 30% of visitors actually push the button. I don’t know if it is a covid 19 thing but most couriers and postman will not push the button. A PIR sensor that is ZigBee is very small and cheap and will catch the people that don’t push a button.

What do they do? Just scream at the door?!

Good old Fashioned knock on the door or the house. Interested to hear if it is just my house or if others find the same. So consider using a sensor that does not need a person to push the button as not everyone will.

I had a Xiaomi MCCGQ11LM contact sensor that my cat had played with and broken the glass tube. So it was pretty useless for its main function, so I used it as a door bell sensor. Connected it in parallel to the wires powerig the bell, when the voltage is applied, the bell would ring and the contact sensor would generate lots of state switches in a short period of time. What i noticed is that the state changes would appear sometime on its own, not sure why, but generally a rather low number, while the real bell ring would generate something like 10-12 every time. So in order to avoid false positives, the number of states switches that are required in a 5s interval I set to 8, then the event registers as a door bell activation, captures a picture from the entrance camera and sends it to my phone, turns on external light if it is night etc.

Here are the items

String          sens_contact16_status                   "DoorBell [MAP(sens_contact.map):%s]"                   <soundvolume>           (gPers_Change_Day)              {channel="mqtt:topic:mymosquitto:sens_contact16:status"}        //excluded from gZB_contact
Number          sens_contact16_batt                     "DoorBell Battery [%.1f %%]"                            <battery>               (gPers_Change_Day, gZB_bat)     {channel="mqtt:topic:mymosquitto:sens_contact16:batt"}
Number          sens_contact16_volt                     "DoorBell Volt [%d mV]"                                 <energy>                (gPers_Change_Day)              {channel="mqtt:topic:mymosquitto:sens_contact16:volt"}
Number          sens_contact16_link                     "DoorBell Link: [%s]"                                   <qualityofservice>      (gPers_Change_Day)              {channel="mqtt:topic:mymosquitto:sens_contact16:link"}
Number          sens_contact16_lastseen_epoch           "DoorBell [%s]"                                                                 (gZB_lastseen)                  {channel="mqtt:topic:mymosquitto:sens_contact16:lastseen_epoch"}
DateTime        sens_contact16_lastseen_datetime        "Last Seen: [%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS]"
Switch          sens_contact16_doorbell                 "DoorBell"                                                                      (gPers_Change_Day)
Number          sens_contact16_counts                   "Counts"                                                <switch>
Switch          sens_contact16_timer                                                                            <switch>                                                {expire="5s, command=OFF"} // Timer set not to accept more then 1 press per 5 sec
Switch          sens_contact16_timer_ring                                                                       <switch>                                                {expire="5s, command=OFF"} // Timer to indicate that the doorbell was actually activated.

And here is the rule

rule "contact_16_triggered"
  when
    Item sens_contact16_status received update
  then


  var increment = sens_contact16_counts.state as DecimalType + 1
  postUpdate(sens_contact16_counts, increment )
  logInfo("DoorBell",  sens_contact16_counts.name + " is " + sens_contact16_counts.state)
  postUpdate(sens_contact16_timer, ON)

  if ( sens_contact16_counts.state >= 8 && sens_contact16_timer_ring.state != ON ) {
      logInfo("DoorBell: ", "DoorBell activated. " + sens_contact16_counts.state)
      postUpdate(sens_contact16_timer_ring, ON)
      sendPushoverMessage(pushoverBuilder("DoorBell activated at " + now.toString ("yyyy-MM-dd HH:mm:ss")))

      var FrontDoorCam = "FrontDoor" + now.toString ("yyyy-MM-dd_HH-mm-ss") + ".jpg"

      executeCommandLine("curl -q http://192.168.222.31/snap.jpeg -o /var/log/doorbell/" + FrontDoorCam)
      Thread::sleep(1000)
      sendPushoverMessage(pushoverBuilder("DoorBell activated (w.photo) " + now.toString ("yyyy-MM-dd HH:mm:ss")).withAttachment("/var/log/doorbell/" + FrontDoorCam))


      //Turn ON ext.light at night time for 5 mins.
      if (Night_State.state == ON && Shelly1_01_Power.state != ON) {
         sendCommand(Shelly1_01_Power, ON)
         postUpdate(Shelly1_01_Timer, ON)
         logInfo("DoorBell: ", "Turning ext light on")
      }

  }
  //If somebody constantly pushes the Doorbell
  else if ( sens_contact16_counts.state >= 200 && sens_contact16_timer_ring.state != ON ) {
      logInfo("DoorBell: ", "Crazy person at the door. " + sens_contact16_counts.state)
      postUpdate(sens_contact16_timer_ring, ON)
      sendPushoverMessage(pushoverBuilder("DoorBell active. CrazyPerson at the door."))
  }

end


rule "contact_16_timer_off"
  when
    Item sens_contact16_timer received command "OFF"
  then

  logInfo("DoorBell", "Timer: " + sens_contact16_timer.name + " to " + sens_contact16_timer.state)
  postUpdate(sens_contact16_counts, 0)
end


rule "Shelly1_01_Power_Timer to OFF"
  when
    Item Shelly1_01_Timer received command "OFF"
  then

  logInfo("DoorBell", "Automatically turning external lights OFF")
  sendCommand(Shelly1_01_Power, OFF)
end

Hello

I built my doorbells from scratch using gibato universalsensor z wave, I prefer keeping my lan and wifi as decluttered as possible.

I used a nice button free choice and a powersupply, I also spiced it upp with a 12 volt car relay so my lkght in the button is on until yoi push it. Thanks to the relay solution I’m able to have a 12 volt buzzer connected as failover.

Audioplayback is done in two ways speakers connected to rpi running oh 3 and a speakergroup of google nest minis, the respond quite slow so som visitors think we wouldn’t be home but local connected speakers reacts fast. 2 doors and differnet audio on each of them.

I send notification to smartphones and tv set top box. I guess sky is the limit.

For not having door sound pmaying along time if someone rapidly pushes button several times I use a timestamp that needs to bee 30seconds old for audio to start playing.

I have one dnd switch that just send notifications usefull for late moornings.

Her is my take: Interfacing Front-door chime using Fibaro The Button
The relay didn’t last long though with the 8VAC input. This one does the trick:
https://www.elfadistrelec.no/en/contactor-2no-12v-25a-25kva-finder-22-32-012-4340/p/13670323?track=true&no-cache=true&marketingPopup=false

You can use a Shelly relay to register when the doorbell is pressed.

Well thanks again for the ESPNow hint. I just created a small ESPNow to MQTT gateway from an esp32 for my doorbell and made my esp8266 doorbell speak ESPNow. I know that there are projects out there that did pretty much the same but it was a lot more rewarding to do the coding by myself. Since I’m using an Ethernet shield for my gateway it’s not 100% standard anyway :wink:

The results are excellent, I’m receiving the MQTT messages now without noticeable delay and moreover my doorbell will be working when wifi is down as well.

Anyway the hardest part as usual will be to find a proper case for the gateway…

I like this. I might check this out and do something similar :+1: