Make a dumb doorbell smart with Shelly 1

check out Make a dumb doorbell smart with Shelly 1 - #125 by capsel22

Thanks for sharing! I was able to do identical setup with my Shelly 1 and my Honeywell/Friedmann dumb doorbell unit.

Everything else was smooth during the installation exept the MQTT input status of the Shelly 1, which stayed in value “1” after doorbell button was pressed. Then, reading this post, I realized that I had a bulb on the doorbell button which was causing the issue. After removing the bulb, input value goes back to “0” after the button is pressed.

If you prefer not to install a separate AC/DC adapter, the Sonoff Mini is the superior option for transforming your traditional doorbell into a smart one. It can be powered directly using the existing 230V AC, without high voltage on the button wires. This makes installation easier and ensures a safer usage experience.

For additional information on this setup and a custom firmware that simplifies Home Assistant integration, please visit: Smart Doorbell

I used a Shelly 1 Plus to make my dumb doorbell smart:

I enabled the binary input sensor:

Shelly1Plus_binary_input_sensor

Test results for now look good. The input sensor switches as soon as I press the button and it also reacts quickly enough when I press it really short. Maybe the Shelly 1 Plus is quicker in that sense than the previous generation.

I really wanted to leverage the platform switch mentioned in the opening post here to be able to put the doorbell in “detached” mode. Unfortunately the code is rather different for the gen 2 Shelly’s.
But with help from the community here I was able to get it working.

Enabling/Disabling a Shelly Plus 2PM relay schedule from HA using a REST switch [Solution]

My working code:

switch:
  - platform: rest
    name: "Shelly1Plus.Doorbell.Buzzer"
    resource: http://192.168.48.55/rpc
    method: post
    headers:
      Content-Type: application/json
    body_on: '{"id":1,"method":"Switch.SetConfig","params":{"id":0,"config":{"in_mode":"follow""initial_state":"match_input"}}}'
    body_off: '{"id":1,"method":"Switch.SetConfig","params":{"id":0,"config":{"in_mode":"detached","initial_state":"off"}}}'
    state_resource: http://192.168.48.55/rpc/Switch.GetConfig?id=0
    is_on_template: "{{ value_json['in_mode'] == 'follow' }}"

Shelly1Plus_Doorbell_Buzzer_Switch

Thought I share it here as this thread has been a big source of information for this project. :slight_smile:

2 Likes

I have the same solution, with the previous generation Sonoff mini (s1, s2 teminals are black on mine).

Unfortunately, a delivery guy told me he had received a shock while pushing the doorbell. I turns out that, even though there’s only 3.3v between s1 and s2, they’re not safe because they’re not (fully) isolated from mains, as I confirmed with a multimeter.

Maybe on the Sonoff mini R2, s1 and s2 are fully isolated from mains?

Hey Job, great to have you on the HA forum! It’s absolutely impossible to get a shock from 3.3v. If that occurred, there’s likely a wiring error or your Sonoff could be faulty. To put it in perspective, 3.3v is akin to the power of two AA batteries in series. If your delivery guy felt anything, he must be incredibly sensitive! :slight_smile:

So, Job, if you have confirmed (via multimeter) that 230V (?) is leaking to the button, because the 3.3V circuit is not fully isolated…
I suppose we need to be careful for those sonoff mini…

What do you plan to replace it with? What are the options you have?

I don’t perceive the Sonoff mini as a hazardous device. I’ve never faced any problems with them, even when using multiple units to power devices that would immediately explode if subjected to a 230V current through the isolated s1/s2 ports. While there are alternatives like the Shelly, they come with their drawbacks. For a detailed comparison, you can refer to the “Sonoff Mini vs. Shelly 1” section here: Smart Doorbell

I measured 230V between earth and s1. Thinking it might be that while s1 is totally isolated from earth this reading could be anything, I put a 10K resistor between earth and s1. The resistor started smoking. Maybe my unit is faulty.

I chose the sonoff mini specifically because I thought the setup to be safe. The button is metallic, a plastic button would probably be totally ok.

What I’m planning to do now is get an esp8266, a small 230v to 3.3v power block. Hook up live and neutral to the power block, earth to the esp8266 ground. Wire the button to ground and a gpio pin, ground, vin and a second gpio pin to a relay. The relay blocks/allows power to the dong.

Basically a DIY replacement of the sonoff mini where I connect ground to earth and trust that the power block has input and output properly separated.

I’m seeing 120V AC between s1 and earth, about half the mains voltage.

What happens if you flip the AC power plug?

The way the plug was in: L-N 226V, L-E 226V, N-E <1V, s1-E 121V, s2-E 120V.
Plug reversed: L-N 226V, L-E <1V, N-E 226V, s1-E 121V, s2-E 120V.
Al these voltages are ±1V, they’re fluctuating a bit.

I’m guessing this behaviour might be different between mini versions. If yours (mini R2) has proper isolation between s1/s2 and earth/mains, then maybe buying a mini R2 would be the simplest solution for me. I read the mini R4 has S1 and Lin internally connected, so that’s definitely not what I’d need.

Or, replace my metallic doorbell-button with a plastic one.

Found this: https://www.diynot.com/diy/threads/sonoff-mini-s1-s2.611039/

“Control lines S1 (and S2) are at significant voltage referenced to ground, even though the potential between them is at a logic level (3.3v). This is very common with modern mass-produced electronics.”

I would opt for the plastic doorbell.

Common or not, whatever devices with high potential to something that human hand would touch is not a good fit. I think this rules out sonoff mini, or at least some version of the sonoff mini.
So the key takeaway is to always check with your multimeter, and double check, regardless what the manufacturer would say.

You would. I would definitely not. Electrical shock is no joke. This is not something someone would want to take any risk.

The 230V-3.3V block I mentioned above also seems to have its output at significant voltage referenced to earth, so just connecting its output ground to earth is not going to be safe either.

Plastic fantasic :confused: is the solution. Thanks for your feedback.

As you said before, it’s not a hazardous device, we just need to be aware that the s1-s2 is 3.3v, so safe to connect to … things. But not to humans who’re standing outside in the rain.

1 Like

I think a plastic doorbell insulates the human hand from the wires.

What is a safe way to get earthed 3.3v from 230v to the doorbell? If I have that, I could use an optocoupler to trigger the sonoff mini.

Yes… this.

The project you’ve created looks fantastic to me.
Can you explain to me how to install the doorbell.ino?