Hi all the smarter people (than me) out there.
I have just installed an Amcrest AD410 doorbell. It is working within Home Assistant using the Dahua integration. It presents a number of useful sensors that should be able to be passed to HomeKit via the HomeKit Controller plugin. These include;
binary_sensor.doorbell_button_pressed
camera.doorbell_main
I am trying to get HomeKit to recognise when the button is pressed and treat it as a doorbell, play a chime on all the HomePods and display Picture in Picture on the ATV.
When I enable the “binary sensor” domain in the HomeKit Controller config I get a doorbell button appear in HomeKit on my phone but it reports that there are “42 unconfigured buttons” which it will allow me to assign to trigger scenes and accessories.
Has anyone got this working and can point me in the right direction?
I have read that some people had to create a Button Helper that was linked to the state of the binary_sensor. But I’m still not sure how that helps HomeKit realise that it needs to treat that entity as a doorbell?
Thought I would reply to my own post just in case anyone else hit this issue in the future and wanted to know if there was a solution.
In the end it turned out to be quite easy, I just had to get my head around the HomeKit integration.
This is something that has to be performed in the HomeAssistant configuration.yaml and cannot be done via the GUI as of late 2022.
You need to create a bridge, then include two entities, the camera feed and the doorbell button. Then define the doorbell button entity as the linked_doorbell_sensor for Apple HomeKit to know when the button was pressed.
My code is included below which should make it fairly clear.
Thank you for figuring this out! It’s my hope to eventually have everything working in Homekit via HA. Can you please elaborate on this a bit? If I copy and paste your lines above into my configuration.yaml I get errors stating that it’s missing property platform. Which platform should I be using? Homekit?
I figured it out. I was able to just add the platform “homekit:” on line 58 with no indent and that did the trick.
I have another issue now though. I was experimenting with this and I ended up deleting the newly created Homekit bridge and not I can’t get it to show up again. I have removed the entry from configuration.yaml and restarted and then re-added the entry but it doesn’t seem to want to add it again. Any thoughts on how I can get the manual entry to show back up again?
@cat2devnull Does your camera stream in homekit work? I have my doorbell (also AD410) exposed to homekit via the Dahua integration in HA, but the stream doesn’t work at all in homekit. It just tells me the camera is not responding after spinning for 30s to 1min.
Sorry for the delay… I wasn’t getting thread updates.
@magic7s - No never got 2 way audio going. HomeKit thinks it’s available but it doesn’t actually work.
@HA_fanatic - The camera works just fine in HomeKit on my iPhone, iPad and Mac.
I did have a few issues. For a while the doorbell was flipping between 2.4 and 5.8GHz and each has its own unique MAC address. So my DHCP server was handing out 2 different IP addresses, one for each network. Thus it would work one day and then not the next. Once I realised what was happening I just added the second MAC address to my DHCP server so it handed out the same IP for both.
I have also had it just stop working once in HomeKit (No sure when but may have been after upgrading to IOS 16). The still frames updates every 10s worked but video either spun or just reported being unavailable. I had to delete the bridge out of HomeKit, increment the port number in the HomeKit plugin (so Home Assistant would advertise it as a newly configured bridge) and then re-add it to HomeKit.
Ok cool. After changing some more settings I got it to work too the very next day in fact. Now I’m debating if it was worth it as I may switch to using Scrypted for HomeKit secure video or using frigate or blue iris and exposing those rtsp feeds to HomeKit.
I went with Frigate and found it great. I just exposed the camera feeds into Home Assistant and enabled the AI auto-detection to send alerts. I’m still using HomeBridge to push camera feeds into HomeKit. I know Scrypted is supposed to be faster and support secure video but I haven’t found it necessary.