Does this kind of relay exist?

I currently have an “old fashioned” doorbell that I want to automate. It’s mains connected and the chimes run on 8V in parallel via a transformer (I will post this in my next post).

My goal is to create a doorbell that triggers an event when pressed, and then selectively (again, programmatically) chimes when I want it to. Perhaps something like this:

Where the smart bell is a Hikvision DB-120A-IW, although I’m not sure that matters at this point. I’m also thinking that if I upgrade my chimes to 24V then I can get rid of the second transformer.

The magic component here is the “USB smart relay”. I want it to do two things:

  1. Programmatically disable the relay so that even if the circuit is completed by the Hikvision, the bells won’t chime. This should fail to enable (ie if the USB control goes away, the bells should work!), and of course the operation of the Hikvision should be unaffected.

  2. Raise a programmatic event via the USB connection when the Hikvision is pressed (regardless of 1, above).

If such a relay doesn’t exist, how can I achieve my goal? I have seen USB relays that can turn a circuit on and off, which I guess I can use to control the chime circuit, but that still leaves the signalling part.

Help!

And this is my current bell:

I found this request really interesting. It’s early and I’m trying to wrap my head around your design requirements. Do I understand this correctly?

Can this be broken down to 3 components, which you ideally want in 1 component?

  1. 24V relay - actuated by smart doorbell
  2. Connected switch enabling #1, the 24V relay.
  3. USB Out when Relay activated

Hi Jumblies,

Yes, that’s it.

If 1, 2 and 3 can be found in a single device (I dunno, like a smart relay that has both I and O) then that would be pretty neat and tidy.

But if not… I figure that 1 (the relay) exists already, and I think I’ve seen USB activated relays that can be used for 2 (by connecting in series with the chimes) for relatively cheap.

3 is the bugger though. I can’t even find a USB device that detects when an arbitrary circuit is closed - and I would have thought such devices exist, we have mouse buttons after all ;).

Does it have to be USB? There are plenty of TCP/IP relays. From cheap eBay modules (that HA can control with shell or restful commands) to more expensive but reliable and HA integrated Global Cache units.

The Global Cache Flex is cheaper than the gc100 and uses the same protocol so should work.

https://www.globalcache.com/products/flex/

I use the GC Flex infra-red bridge and it works perfectly even though the component was written for the GC100.

Or if you are using a Raspi the GPIO component can be used to switch a standard relay (you’ll need a transistor or optocoupler to get the current required by the relay, the port probably wont be powerful enough on its own.

It can absolutely be tcpip. For some reason I assumed usb would be more available. I’ll have a dig around.

Edit: I had a quick look and the situation seems as it does for usb - I can see relays controllable by tcpip but not one that can sense when the relay has been activated. Any tips?

The Global Cache FLEX units have relay outputs and sense inputs.

https://www.globalcache.com/products/flex/flc-rsspec/

Edit: Also you will know the state of the relay because you will be turning it on or off using HA.

That deals with the toggable chimes, but not with knowing when the bell button circuit has been completed. Thats the “sensing” part I need.

Generally then: how would one usually wire a “dumb” circuit completing pushbutton/event to HA? Like a pressure sensor or the like?

Two options:

A FLEX unit with 4x relay and 4x sense:

  1. One Relay to disable chimes - use FLEX relay, HA knows if active
  2. One Sense line to detect button press - use FLEX contact or voltage sensor.

Raspi GPIO

  1. GPIO switch component to control relay via transistor
  2. GPIO binary sensor to sense button press via optocoupler.

I can draw the circuit later today if you tell me if your existing 8V door chime supply voltage is AC or DC and if you are running HA on a Raspi.

Actually the AC/DC does not matter. The FLEX unit supports AC detection. So configuration 1:


The problem with this circuit is you will not be able to sense the doorbell button if the chimes are disabled with the relay. Also the sense logic is inverted (0v = button press). So you could do this:


In this case you would have to automate the chime relay on detection of a button press. To disable the chimes just disable the automation. You can still detect button presses and use them elsewhere (notification automations for example).

Additionally if you get the PoE (power over Ethernet) version of the GC FLEX and your switch/router supports PoE you won’t need an additional power supply (5vDC) for the GC Flex.

Note: there is a much cheaper way to do this if you are using a raspi to host your HA server.

The problem with this circuit is that the raspi can have trouble detecting button presses shorter than 2 seconds. See here: Pi GPIO Binary Sesnsor

One way around this is to use a 555 timer IC configured in monostable mode with a period of 2 seconds connected to the doorbell button. This circuit is beyond my paint skills to draw, so have a read of this: http://www.circuitbasics.com/555-timer-basics-monostable-mode/

The main advantage of this circuit is that it will cost you dollars as opposed to hundreds of dollars with the Global Cache units. The disadvantage is that it requires a little electronics knowledge to build.

This is great and it looks like I have my homework to do. In the meantime I figured out what I needed to search for - “usb relay gpio” gave me a few options… But it seems that the pi route would be easier, more maintainable/extensible and cheaper.

Thanks for the tips!

EDIT 1: it just occurred to me that you used my original bell diagram as a base. It looks like your solution can still apply to the diagram in my OP - that should also sort the issues with disabling the chimes not disabling the button presses.

Also since the smart bell will draw 24v all the time, I’m guessing I need another relay to actuate the gpio instead of hitting it directly?

EDIT 2: For completion (in case anyone else had the use), here are the components I found in searching:

http://www.audon.co.uk/usb_digital/udin44.html

For the record I’m going to try the rasbpi solution below. At the very least it seems more fun!

This would work.

The 0.1uF capacitor (any type) is used to cover the gap in voltage as the AC waveform crosses zero.

Depending on the smart doorbell output, you may not need the 555 circuit to stretch the pulse to 2 seconds.

The doorbell detect logic is inverted (0v = switch closed, 3.3v = switch open). HA has an option for this in the GPIO binary sensor component.

EDIT: also there is a mistake in the diagram. The chime disable relay at the bottom should use the Common and Normally Closed contacts. You turn the relay on to disable the chimes and if the relay circuit fails the chimes will still work as the contacts will close without power to the coil.

I got bored. Here’s how to construct the circuit on a bit of Veroboard:

1 Like

Again, amazing post Tom. I’m going to try to understand the circuit before building it, but will probably go the Rasbpi route (and now I’m thinking about alarm integration and other things down the rabbit hole!)

Hi Tom,
Could you share what software you used to create this diagram - sorry for going off topic

It’s freeware called DIY Layout Creator: http://diy-fever.com/software/diylc/

Very handy for simple circuits when KiCad is not justified.

1 Like

There’s another big error I’ve just noticed in the Veroboard layout. IC1 is not oriented correctly. Pin 1 and 2 should go to the relay not the GPIO and GND. Correct orientation:

Wow…nice info! Definitely want to look into a little simpler design as I don’t need to toggle it, just detect the button pushes on a standard front and back doorbell with the AC transformer. I was probably going to do it with a pair of properly placed (lots of trial and error) reed switches but man what a pain it is to position those when I have two terminals right there I could tag on to. I wasn’t sure how to do it though since I believe the bell wire just shorts out? I need to do some more digging along with your info.

Thanks again for all the help! The situation has changed since I posted though: the smart doorbell isn’t an option anymore and also I’ve fallen into the maker rabbithole while looking for components.

If anyone was interested I’ve adapted the requirements and circuit and created a new thread here.

@digiblur, I found this while browsing these forums:

It might be what you need? Original thread here.