How to Connect a Ring Doorbell to Apple HomeKit (Step-by-Step with go2rtc + Home Assistant)
Ring cameras do not speak HomeKit. The doorbell in this setup sends H.265 video and Opus audio. Apple Home, and the Home Assistant camera path in front of it, want H.264 and AAC. This how-to is the route that works on a Linux home server: go2rtc transcodes the stream, the Ring integration in Home Assistant handles the ding and the motion events, and a HomeKit Bridge in accessory mode exposes that one camera to the Home app. When it is paired, see how to show Ring and Reolink cameras together in Apple Home.
The server this was worked out on runs Home Assistant in Docker with host networking. That matters later, because the camera URLs use 127.0.0.1 and mean the host, not a container. Anywhere a real id, token, or address would have been, there is a placeholder instead.
The page is dressed like a 1998 personal site. The commands are current. Copy them from the terminal boxes.
Where each piece sits
- go2rtc
- Pulls the Ring stream, transcodes it, re-shares it over local RTSP, and serves the snapshot.
- Ring integration
- Doorbell and motion events only. It does not provide the camera video.
- Generic Camera
- Binds the go2rtc URLs to one Home Assistant camera entity.
- HomeKit Bridge
- Publishes that camera, in accessory mode, to the Apple Home app.
1 Install go2rtc and run it as a service
go2rtc is a single native binary. On this server it lives in ~/go2rtc/ next to its config, ~/go2rtc/go2rtc.yaml, and systemd keeps it running after a reboot.
The web UI and API listen on port 1984. RTSP listens on port 8554. Those are the defaults, so the config file does not have to set them.
Download the binary for your machine, put it in the folder, and mark it executable.
mkdir -p ~/go2rtc
cd ~/go2rtc
chmod +x go2rtc
./go2rtc --version
Then add a system unit named go2rtc.service. The description string is go2rtc camera streamer. systemd does not expand ~, so the unit spells the folder out as /home/user/go2rtc. Replace user with the account that owns the folder before you enable the service.
[Unit]
Description=go2rtc camera streamer
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=user
WorkingDirectory=/home/user/go2rtc
ExecStart=/home/user/go2rtc/go2rtc -config /home/user/go2rtc/go2rtc.yaml
Restart=on-failure
RestartSec=3
[Install]
WantedBy=multi-user.target
Save that file as /etc/systemd/system/go2rtc.service, then load it and start it.
sudo systemctl daemon-reload
sudo systemctl enable --now go2rtc
systemctl status go2rtc
2 Sign in to Ring and keep the token private
go2rtc’s built-in Ring source authenticates with a Ring refresh token. Get that token from go2rtc’s own web UI, the Ring add flow at http://SERVER_IP:1984, or from a refresh-token tool you already trust. go2rtc stores it in ~/go2rtc/go2rtc.yaml.
Treat the token like a password.
- Keep it out of screenshots, chat, and git. If the config is in a repo, the committed copy should still say
YOUR_REFRESH_TOKEN. - Back up the config before you change it.
cp ~/go2rtc/go2rtc.yaml ~/go2rtc/go2rtc.yaml.bak
3 Write the streams
Ring publishes H.265 video with Opus audio. Apple Home and Home Assistant need H.264 and AAC, so ffmpeg transcodes the source. A second stream re-shares that transcoded output over local RTSP, and a snapshot stream feeds the HomeKit preview tile.
The # marks on the ffmpeg line are go2rtc’s output options: video codec, size, and audio codec. The ? query on the source asks for the codecs Ring is already sending. 1280 by 1280 is the frame size used for this doorbell. Change those two numbers if you want a different size.
streams:
ring_source: "ring:?camera_id=YOUR_CAMERA_ID&device_id=YOUR_DEVICE_ID&refresh_token=YOUR_REFRESH_TOKEN"
ring_front_door: "ffmpeg:rtsp://127.0.0.1:8554/ring_source?video=h265&audio=opus#video=h264#width=1280#height=1280#audio=aac"
ring_h264: "rtsp://127.0.0.1:8554/ring_front_door?video=h264&audio=aac"
ring_front_door_snapshot:
- ring:?camera_id=YOUR_CAMERA_ID&device_id=YOUR_DEVICE_ID&refresh_token=YOUR_REFRESH_TOKEN&snapshot
log:
level: info # bump to debug / ring: trace when troubleshooting
ring_source- Pulls the camera straight from Ring and leaves the codec as the camera sends it, H.265 and Opus. Fill in the camera id, the device id, and the refresh token. Do not commit the filled-in file.
ring_front_door- Reads that RTSP stream on localhost port 8554 and transcodes it to H.264, 1280 by 1280, with AAC audio. This is the stream Home Assistant will open.
ring_h264- Re-shares the transcoded stream over local RTSP, so another client can take H.264 and AAC without starting ffmpeg again.
ring_front_door_snapshot- A still from the same camera. The list item with
&snapshotis what HomeKit uses for the preview tile. The log line stays at info until something breaks. Step 9 shows the debug form.
4 Restart and verify
Restart the service, confirm it is running, and follow the log. journalctl -f keeps printing until you stop it with Ctrl+C.
sudo systemctl restart go2rtc
systemctl status go2rtc
journalctl -u go2rtc -f
Open http://SERVER_IP:1984 and confirm the streams are listed and actually produce a picture. Then test the snapshot on the server itself.
curl -o /tmp/ring-snapshot.jpg "http://127.0.0.1:1984/api/frame.jpeg?src=ring_front_door_snapshot"
The same still is at http://127.0.0.1:1984/api/frame.jpeg?src=ring_front_door_snapshot in a browser on the server. You want a real frame of the camera, not an empty response.
5 Ring events in Home Assistant
In Home Assistant, open Settings, then Devices & services, then add the Ring integration. This integration is here for the doorbell ding and the motion events. On this server those entities are event.front_door_ding and event.front_door_motion. Yours will follow the device name Home Assistant assigns.
Camera video does not come from this integration. Video stays on go2rtc.
This block is a note of the entity ids, so you can copy them into the HomeKit options in step 7. It is not a config file, and it does not add the Ring integration. You add Ring from the UI.
ding: event.front_door_ding
motion: event.front_door_motion
6 Generic Camera
Still in Settings, Devices & services, add the Generic Camera integration. Because Home Assistant uses host networking, 127.0.0.1 is the server, which is where go2rtc is listening. On a bridge network that address would be the container, and these URLs would miss go2rtc. This note does not cover that layout.
Enter these in the dialog. The names are the ones from this setup. Yours can differ, as long as the URLs match the go2rtc streams.
name: Front Door
still_image_url: "http://127.0.0.1:1984/api/frame.jpeg?src=ring_front_door_snapshot&cache=10s"
stream_source: "rtsp://127.0.0.1:8554/ring_front_door"
rtsp_transport: tcp
framerate: 2
- Still image URL:
http://127.0.0.1:1984/api/frame.jpeg?src=ring_front_door_snapshot&cache=10s - Stream source:
rtsp://127.0.0.1:8554/ring_front_door - RTSP transport: TCP
- Frame rate: 2
The stream source is ring_front_door, the ffmpeg transcode, not ring_h264. The cache=10s parameter is part of the still URL that kept the preview updating in this setup.
7 HomeKit Bridge in accessory mode
Add a HomeKit Bridge, or a second one if you already have a bridge, and set it to accessory mode for just that camera entity. Name the bridge something like Front Door Cam. The UI path is Settings, Devices & services, HomeKit Bridge, then the Front Door Cam entry, then the camera’s entity options.
The options used here:
- Video codec:
libx264 - Linked doorbell sensor:
event.front_door_ding - Linked motion sensor:
event.front_door_motion - Audio: off
Audio was turned off on purpose. The Home app tile will show video, snapshots, and the doorbell and motion alerts, and it will not carry the camera’s microphone.
On a host with more than one address, or a Docker install that HomeKit cannot see cleanly, set advertise_ip to the address the home hub should use. The placeholder below is 192.168.1.50. Use the LAN address of your server.
The same options, written out. camera.front_door stands in for whatever you named the Generic Camera. Include only that camera. The events stay linked from the camera options. They are not added as extra accessories.
homekit:
- name: Front Door Cam
mode: accessory
advertise_ip: "192.168.1.50"
filter:
include_entities:
- camera.front_door
entity_config:
camera.front_door:
video_codec: libx264
support_audio: false
linked_doorbell_sensor: event.front_door_ding
linked_motion_sensor: event.front_door_motion
If the bridge was created in the UI, set these as entity options there. The YAML is the same set of options, for a bridge that is configured in configuration.yaml instead.
8 Pair it in the Apple Home app
Home Assistant posts a notification with the HomeKit pairing code. In the Apple Home app, add an accessory, choose More options, pick Front Door Cam, and scan that code. If the notification shows digits instead of a code you can scan, type them in. The code is only on that notification. It is not printed here.
Open the Apple Home app
Add Accessory
More options
Front Door Cam
Scan the code on the Home Assistant notification
Once it is paired you get a live view, snapshots on the tile, doorbell notifications, and motion notifications.
9 Troubleshooting
These are the failures that actually showed up while this path was put together, and the change that fixed each one.
Black video
A codec mismatch. Ring is H.265, and a client that wanted H.264 drew a black frame. The ring_front_door line has to transcode with #video=h264 and #audio=aac, and the HomeKit entity codec stays libx264.
The Home Assistant stream never loads
Point the Generic Camera stream source at rtsp://127.0.0.1:8554/ring_front_door and set RTSP transport to TCP. A UDP guess, or a URL that is not the transcoded stream, sits there and never starts.
Snapshots do not update
Use the snapshot stream, ring_front_door_snapshot, and keep cache=10s on the still image URL. A frame URL that is not the snapshot source will sit on one image.
The Ring token expired
Refresh tokens die. Get a new one from the go2rtc Ring add flow, put it in go2rtc.yaml in place of the old one, and restart the service. Keep the new token out of git and out of screenshots, and keep the backup habit from step 2.
No Response in Apple Home
Restart the home hub, the HomePod or the Apple TV. If the server and the hub are on different VLANs, mDNS (UDP 5353) has to pass both ways, and advertise_ip has to be an address the hub can actually reach.
While you are chasing the Ring source, the log block can be raised, then put back to info when the stream is healthy again.
log:
level: debug
ring: trace
sudo systemctl restart go2rtc
journalctl -u go2rtc -f
Comments
Loading comments…