Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doorbell #375

Closed
DerKoller-eu opened this issue Jan 1, 2021 · 40 comments · Fixed by #495
Closed

Doorbell #375

DerKoller-eu opened this issue Jan 1, 2021 · 40 comments · Fixed by #495
Labels
enhancement New feature or request new-HAP-type new HomeKit Acessory Protocol type support.

Comments

@DerKoller-eu
Copy link

DerKoller-eu commented Jan 1, 2021

It would be cool to use a Shelly with the HomeKit Firmeware as a Doorbell like this Homebridge Plugin enables a Shelly 1 to do so: Shelly-Doorbell.
I try to avoid using Homebridge so a direct integration would make perfect sense.

@BlancoDeMallloca
Copy link

BlancoDeMallloca commented Jan 1, 2021

This sounds great. Should work like a garage door opener Shelly 1. My doorbell uses a pulse for the ring and the close Sensor should be the ring button. Ring Button is also a pulse comming to SW on Shelly 1

@rojer / @andyblac: I think this could be easy as it should only be a new Mode for Shelly 1. Am I right? By the way: Thanks again for the great work with this firmware!

@DerKoller-eu
Copy link
Author

My doorbell uses a pulse for the ring and the close Sensor should be the ring button. Ring Button is also a pulse comming to SW on Shelly 1

My Doorbell works exactly like that and I can’t hear it when I‘m in my Cellar‘s Office. So having a ring on my HomePod would be great if someone is at the door. I also think it should just be another mode for the Shelly like the Garagedoor.

@Cojaeck
Copy link

Cojaeck commented Jan 8, 2021

I already use this. The input has to be in detached mode. And the HAP type must be set to occupancy. Then it appears in HomeKit as a sensor that can e.g. trigger your iPhone to show a notification. Additionally you can set a routine which activates a light or a bell. I have another Shelly connected to a buzzer which gets activated for two seconds (via auto off function) when the occupancy sensor gets active.
So I think there is no need to do anything. Everything is already there.

@DerKoller-eu
Copy link
Author

The advantage of Doorbell mode is that all homepods in the House ring immediately, no delay and every device in the home also immediately gets a push notification. You only need one Shelly 1 for this and also your old doorbell still rings. You also get two switches in home app to enable or disable the mechanical bell as well as the digital bell. This can be useful to disable the bells based on time, occupancy or routines.

@simonfield76
Copy link

Is it possible to use it on the gate as well?
I've attached a shelly 1 in parallel to the button to use it as gate opener but attaching it to the ring button would be nice!

@Cojaeck
Copy link

Cojaeck commented Jan 8, 2021

The advantage of Doorbell mode is that all homepods in the House ring immediately, no delay and every device in the home also immediately gets a push notification. You only need one Shelly 1 for this and also your old doorbell still rings. You also get two switches in home app to enable or disable the mechanical bell as well as the digital bell. This can be useful to disable the bells based on time, occupancy or routines.

Ok. Interesting. In my environment (no homepods) this wouldn't change anything. And the switching is done via switching routines on/off.

@Cojaeck
Copy link

Cojaeck commented Jan 8, 2021

Is it possible to use it on the gate as well?
I've attached a shelly 1 in parallel to the button to use it as gate opener but attaching it to the ring button would be nice!

When you set the Input to detached you should be able to do this. Then the switch operates separated from the input (as two separate devices). But the input is not isolated (the output of a Shelly 1 is). So the input must receive a signal from the same source as the supply voltage.

@rojer rojer added enhancement New feature or request good first issue labels Jan 8, 2021
@rojer
Copy link
Contributor

rojer commented Jan 8, 2021

doorbell in HAP spec has only one required characteristic - programmable switch event, exactly the same as the stateless switch.
so adding doorbell mode for input would be super easy, just a matter of plumbing.
@zeevox this would be a good first issue to tackle on the firmware side.

@DerKoller-eu
Copy link
Author

So the input must receive a signal from the same source as the supply voltage.

And as remark:
As the standard doorbells often work with 12 Volt AC (in Austria at least) make sure to change that to 12 Volt DC or 24 Volt AC (If using 12 Volt DC don’t forget to set the jumper on the Shelly to the correct setting). Otherwise your Shelly gets toasted.

@theelog
Copy link

theelog commented Jan 23, 2021

I now have a Shelly 1 connected to receive button presses from outside and ring the doorbell. Works like a charm but needs Homebridge and some work.

I’d rather have a simpler approach using on-Shelly firmware.

@andyblac andyblac added new-HAP-type new HomeKit Acessory Protocol type support. webUI labels Jan 25, 2021
@andyblac andyblac assigned andyblac and unassigned andyblac Jan 25, 2021
@BlancoDeMallloca
Copy link

@zeevox: Could you already take a look into this? It would be great to have the doorbell mode. Thanks for your support

@zeevox
Copy link
Contributor

zeevox commented Feb 12, 2021

@BlancoDeMallloca and everyone else

Regarding the support status of doorbells in HomeKit. The service type is still present on Apple's developer docs. However, it is not mentioned even once in the code for the HomeKit ADK. Back in July 2018 Apple removed the entire doorbell category from its accessory list.

I implemented a doorbell for Shelly-HomeKit but it shows up as "not supported" in the HomeKit app:

image

Apparently doorbells no longer function as stand-alone devices, they can be attached to a camera to produce a video doorbell, for reference see this issue comment on another HAP library. Or, as the HAP Specification vaguely puts it:

The Doorbell service describes a doorbell and is the primary service of the Video Doorbell Profile.

For those that have homebridge-shelly-doorbell could you share some insight on how it works with HomeKit? Does it show a blank camera stream?

@theelog
Copy link

theelog commented Feb 12, 2021

I would be fine if it fakes a camera somehow. I just want it for the notifications.

@jsiegenthaler
Copy link
Contributor

jsiegenthaler commented Feb 12, 2021

I use https://github.com/Sunoo/homebridge-camera-ffmpeg for my Video Doorbell with a GIF stored on my raspberry pi for the image and it works well on my iPhone with iOS 14.4 (and prior versions) . It also works with a static image or with no image. You could always add a default image, one of the existing icons and maybe some text, if you can pack that into the tiny memory space.
And my Video Doorbell uses a single Shelly1 to detect the doorbell button push (using a 6VAC relay connected to the doorbell buzzer which switches 220V to the SW input) and also as a door opener (using the Shelly1 relay to activate the apartment intercom Door Opener button)

@BlancoDeMallloca
Copy link

@zeevox and all: Thanks for the time spent on this issue.

For me its also fine to have a predefined image or an icon. As @basroovers already wrote the main feature is the notification.

Trank you very much

@DerKoller-eu
Copy link
Author

For those that have homebridge-shelly-doorbell could you share some insight on how it works with HomeKit? Does it show a blank camera stream?

I attached two screenshots how it looks like in my home app.

i have a Shelly 1 with the stock firmware and Homebridge-Shelly-doorbell plug-in from @Sl1nd installed.

The Bell itself doesn’t show up in HomeKit but the Homepods ring if someone pushes the button. Additionally you get two switches where I can turn the mechanical gong at my door as well as the digital gong for the HomePods on or off. Very useful for my „Good Night“ Automation.
AE914940-DC68-4ED5-A139-9957F86FFC8D
BD63FE2C-1359-436C-ADD4-80F6114534B5

@timoschilling
Copy link
Collaborator

@zeevox The post that are you liked to is outdated or wrong, doorbells are back and they worked, only the Home app tile says unsupported.
Hier is it listeded in Apple Docs https://www.apple.com/ios/home/accessories/#section-bell
Screenshot 2021-02-12 at 21 52 19

The Home app says it's unsupported, but that only means there is no interface in the Home app. If you use Home+ or the Eve app you can attach automatisation for the doorbell.

And if you trigger a doorbell the Home app gives a push notification and all HomePods are plaining a doorbell sound.
image
The push notification cam outside the Home app, too.

@zeevox
Copy link
Contributor

zeevox commented Feb 12, 2021

@timoschilling Yes! Thank you for pointing this out, indeed it says unsupported but pressing it causes a notification.

image

But I guess since there is no UI that means there is no switch for digital and mechanical gong like in the screenshot @DerKoller-eu posted?

@DerKoller-eu
Copy link
Author

But I guess since there is no UI that means there is no switch for digital and mechanical gong like in the screenshot @DerKoller-eu posted?

The switch is created by the Homebridg plug-in. S as this is a nice feature I would love to see this in a Shelly HomeKit Firmware as well..

@rojer
Copy link
Contributor

rojer commented Feb 13, 2021

this can be done in a separate update.

@rojer rojer reopened this Feb 14, 2021
@rojer rojer mentioned this issue Feb 14, 2021
@rojer
Copy link
Contributor

rojer commented Feb 14, 2021

@DerKoller-eu @BlancoDeMallloca i've cut 2.8.0-alpha1, please help test - #498

@rojer rojer closed this as completed Feb 14, 2021
@BlancoDeMallloca
Copy link

@DerKoller-eu @BlancoDeMallloca i've cut 2.8.0-alpha1, please help test - #498

Thank you very much. Need to go to the workshop to get add. installation material. Will test it asap.

@spiegelt
Copy link

I've been using a shelly1 for my bell as a classic switch with an auto-off timer for a long time. After the update I have now set up the shelly as the detached / doorbell / pulse as described. I also get push notifications when the doorbell rings. But how can I make the gong ring?

@SimonWecklein
Copy link

I have the same issue either I get a notofication with detached or the gong rings with momentary. Is it possible to get both?

@timoschilling
Copy link
Collaborator

Wait for a later version or create a automatisation wich turns on the switch if the doorbell triggers

@SimonWecklein
Copy link

Thanks just thought I was missing something out. Meawhile I will try your suggestion 😅👍🏻

@AndrewJLockhart
Copy link

I've been using a shelly1 for my bell as a classic switch with an auto-off timer for a long time. After the update I have now set up the shelly as the detached / doorbell / pulse as described. I also get push notifications when the doorbell rings. But how can I make the gong ring?

Have I missed something obvious in the GUI, I have a Shelly1, but can’t see the doorbell option anywhere.

@jsiegenthaler
Copy link
Contributor

Shelly1 acts as a Relay and a Switch input.
You set it up in HomeKit as a doorbell using whatever method fits your system the best.

I used the https://github.com/Sunoo/homebridge-camera-ffmpeg#readme plugin to make a video doorbell and used the Shelly1 to send a http command from the SW input for the doorbell trigger. Works brilliantly. I use a GIF on my raspberry pi as the video feed.

Here's how it works:
Ringing the Doorbell
Pressing the physical doorbell button buzzes the doorbell buzzer, and activates the relay wired to the buzzer
The relay closes the SW contact on the Shelly1
The Shelly1 calls a URL command to the ffmpeg plugin "Front Door Doorbell Trigger" door bell input (a switch with auto-off)
The ffmpeg plugin sends the "Someone rang the doorbell" notification to HomeKit
The iOS devices show the notification, and it also pops up on Apple TV

Opening the Door
Switching on the "Front Door Opener" in Home app activates the Shelly1 relay
The Shelly1 relay closes and connects the Door opener wires on the physical door opener
The door buzzer sounds and the person outside the door can open the door
The Shelly1 turns off automatically after 4 seconds (the relay goes off, and the door opener buzzer stops)

Automatic Door Opener
When a person in my house comes home, a delay switch "Recent Arrival" is turned on. This turns off after a set time.
When the ffmpeg door bell input is turned on (by the Shelly1), it runs a simple automation: If Recent Arrival is On, then unlock the "Front Door" (lock mechanism), and turn on the "Front Door Opener" (switch).
This allows the person to enter the building

Displaying Door Lock/Unlock Status
When the "Front Door Opener" switch turns on, it triggers an automation: When Front Door Opener Turns On, Unlock Apartment Front Door"
When the "Front Door Opener" switch turns off (auto timeout on the Shelly1), it triggers an automation: When Front Door Opener Turns Off, Lock Apartment Front Door"
The "Front Door" lock mechanism in the room "Apartment" sends notifications when the door is locked or unlocked, and it displays the lock/unlock state.

@AndrewJLockhart
Copy link

AndrewJLockhart commented Jun 27, 2021 via email

@kloibs
Copy link

kloibs commented May 13, 2022

Hi guys, I know this is from a while ago, but I’m looking to implement something along these lines for my apartment in Austria.

If I understand correctly I should be able to wire a Shelly 1 into the bell itself so that when someone rings from downstairs or from my front door, it triggers a standard HomeKit doorbell notification and rings on the HomePods. Note: I don’t have HomeBridge running 😪

Would I be able to turn the physical bell on or off as well? Thanks in advance!

@jsiegenthaler
Copy link
Contributor

Hi @kloibs
Your understanding is correct.
I use a single Shelly 1 in my apartment.

  1. the SW input is triggered by a relay which in turn is triggered by the bell voltage (when the bell is ringing)
  2. the relay output triggers the door opener
    The Shelly 1 one only has a single relay. If you want to trigger the door opener (Türöffner), and also have the ability to turn off the ding-dong bell, then you need 2 x Shelly 1s.

@kloibs
Copy link

kloibs commented May 14, 2022

@jsiegenthaler thanks for the tip! I’ve got a Nuki opener installed already, so just looking for the doorbell connectivity. Should just be able to switch the Shelly‘s switch to 12V and be good to go!

@jsiegenthaler
Copy link
Contributor

@kloibs Excellent! If your apartment intercom has an old fashioned electric buzzer, triggered by an AC voltage, then be careful with what voltage relay you use as the voltage drops under load. I measured 14V AC under no load, so added a 12V AC relay, but it was slow to switch on when the buzzer was going. Turned out the AC voltage sunk to about 8V AC when the buzzer was buzzing. So I swapped the relay to a 6V AC relay and now it is reliable.

@kloibs
Copy link

kloibs commented May 15, 2022

@jsiegenthaler I‘m planning on getting a Shelly 1 tomorrow to implement this, but I don’t have a multimeter unfortunately. My apartment building in Salzburg was built in the 70s, so now I’m nervous about the voltage, even though my landlord said he was rather confident about the voltage being 12v.

Do you recommend proceeding or should I go on the side of caution and try to find a multimeter?

@jsiegenthaler
Copy link
Contributor

@kloibs my apartment in Switzerland is of the same age. It'll be a 12V system likely with the doorbell being 12V AC. But you do need to confirm with a multimeter. You should definitely proceed, and a multimeter will be very useful.

@kloibs
Copy link

kloibs commented May 18, 2022

719AE404-0E65-469C-B0DA-7735A416EC3F
71A25DBE-B350-4B78-AE2A-2E103135C0FD

@kloibs
Copy link

kloibs commented May 18, 2022

Sorry to keep bothering everyone. I was successfully able to get a Shelly Uni connected to power, but unsure as to where to connect either of the inputs. Whenever they’re connected to the lines that go to the bell itself, it triggers a continuous loop of doorbell rings within HomeKit. Any suggestions?

@Tillman-Z
Copy link

Hi!
Was this implemented already?
Currently I only see "Switch", "Outlet", "Lock" and "Valve" as HAP service types (running in mode "switch").
Or am I missing something? :)

@timoschilling
Copy link
Collaborator

Change the input type to detached, then you get a separate config section for the input where you can set the type to doorbell.

@pingcheater
Copy link

pingcheater commented Dec 12, 2024

Hi guys,
first of all, many thanks for what you're doing! It's great work and I appreciate it very much! Got several Shellys around my house running your fw!

And since I've damaged one of the chimes in my house some while ago, I wanted to make my hompepod ring, when someone rings at the door. Now I finally got to do it and seem to be very close. Here's my setup:

A non-smart doorbell on a 12V AC line with a button at the door closing and opening contact. Since there are several cable wire running up to the chime, I've connected one of the unused ones to the 12V AC as well, so I can feed my Shelly.

At the Chime, I've got a Shelly Uni, getting 12V AC and using the button signal as analog input. I've got the shelly to install the HomeKit FW and have set it up as in the screenshot:

Screenshot 2024-12-12 225120

But I don't have any way to setup the homepod to react to this. This is how they Switch looks in HK:
IMG_0205

Where did I go wrong?
Thanks alot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new-HAP-type new HomeKit Acessory Protocol type support.
Projects
None yet
Development

Successfully merging a pull request may close this issue.