core
core copied to clipboard
Homekit - Eufy Doorbell Camera Not Streaming in Home App
The problem
I am having trouble getting my Eufy 2k Doorbell to stream within the Home app on my phone.
I am using the eufy_security integration which creates an RSTP stream for my camera. This works flawlessly in my home assistant dashboard, but the stream fails to load within the Home app.
What version of Home Assistant Core has the issue?
2023.1.7
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Homekit
Link to integration documentation on our website
https://www.home-assistant.io/integrations/homekit/
Diagnostics information
From the Home Assistant Core Logs:
2023-02-02 18:56:14.527 ERROR (MainThread) [homeassistant.components.homekit.type_cameras] [456e3f10-a1ac-4aae-8eac-994e47b2c992] Failed to close stream
From the Homekit Integration debug logging:
2023-01-29 21:18:19.274 DEBUG (MainThread) [homeassistant.components.homekit.type_cameras] Doorbell: ffmpeg: b'rtsp://xxx.x.x.x:yyyy/T8210P342127221E: Server returned 400 Bad Request' [x and y are the url and port]
Example YAML snippet
In homekit.yaml:
- name: V2 Camera Bridge
port: 21065
mode: accessory
filter:
include_entities:
camera.doorbell
entity_config:
camera.doorbell:
linked_battery_sensor: sensor.doorbell_battery_percentage
linked_doorbell_sensor: binary_sensor.doorbell_ringing
linked_motion_sensor: binary_sensor.doorbell_motion_detected
low_battery_threshold: 20
stream_source: -rtsp_transport tcp -i rtsp://xxx.x.x.x:yyy/T8210P342127221E
support_audio: true
max_width: 1280
max_height: 720
video_codec: copy
Anything in the logs that might be useful for us?
See above for error messages. For clarity, this is what the logs show when the stream works within Home assistant:
2023-02-02 18:50:45.173 INFO (MainThread) [aiortsp.rtsp.reader] try loading stream rtspt://xxx.x.x.x:yyyy/T8210P342127221E
2023-02-02 18:50:45.181 INFO (MainThread) [aiortsp.rtsp.reader] connected!
2023-02-02 18:50:45.182 INFO (MainThread) [aiortsp.rtsp.reader] receiving interleaved RTP (0) and RTCP (1)
2023-02-02 18:50:45.186 INFO (MainThread) [aiortsp.rtsp.reader] session options: {'ANNOUNCE', 'DESCRIBE', 'PAUSE', 'SETUP', 'GET_PARAMETER', 'RECORD', 'TEARDOWN', 'PLAY'}
2023-02-02 18:50:46.825 INFO (MainThread) [aiortsp.rtsp.reader] using base url: rtsp://xxx.x.x.x:yyyy/T8210P342127221E/
2023-02-02 18:50:46.826 INFO (MainThread) [aiortsp.rtsp.reader] setting up using URL: rtsp://xxx.x.x.x:yyyy/T8210P342127221E/trackID=0
2023-02-02 18:50:46.841 INFO (MainThread) [aiortsp.rtsp.reader] stream correctly setup: <Response status=200 msg="OK"" headers={'cseq': '3', 'server': 'gortsplib', 'session': '3540717761', 'transport': 'RTP/AVP/TCP;unicast;interleaved=0-1'} content-length=0>
2023-02-02 18:50:46.841 INFO (MainThread) [aiortsp.rtsp.reader] session id: 3540717761, timeout: 60, keep_alive: 54
2023-02-02 18:50:46.842 INFO (MainThread) [aiortsp.rtsp.reader] playing stream...
2023-02-02 18:50:46.842 INFO (MainThread) [aiortsp.rtsp.reader] start playing rtsp://xxx.x.x.x:yyyy/T8210P342127221E/ at time `now` and speed `1`...
2023-02-02 18:50:46.868 INFO (MainThread) [aiortsp.rtsp.reader] stopping stream...
2023-02-02 18:50:46.868 INFO (MainThread) [aiortsp.rtsp.reader] stopping session/playback...
2023-02-02 18:50:46.873 INFO (MainThread) [aiortsp.rtsp.reader] connection closed, error:
Additional information
As mentioned above, the camera works flawlessly within my Home Assistant dashboard. Additionally, the camera appears in the Apple Home app, updates the frame picture as it should, and correctly reports the battery level. If I had a suspicion, it would be that my configuration of the stream source is not correct. I confirmed I have the right stream source from copy/pasting the logs above for a stream that works, and that matches what the eufy_security integration is showing as the stream source as well. Additionally, from what I've read within the integration's documentation is that a stream needs to be "started" first, which lead me to an experiment of starting the stream in Home Assistant before starting it on the Home app, which yielded no results. Hoping someone has come across this and solved it.
Hey there @bdraco, mind taking a look at this issue as it has been labeled with an integration (homekit) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of homekit can trigger bot actions by commenting:
@home-assistant closeCloses the issue.@home-assistant rename Awesome new titleChange the title of the issue.@home-assistant reopenReopen the issue.@home-assistant unassign homekitRemoves the current integration label and assignees on the issue, add the integration domain after the command.
(message by CodeOwnersMention)
homekit documentation homekit source (message by IssueLinks)
I have the exact same problem and i use the Frigate integration to create my camera entities.
I think the problem is that homekit is not calling the camera.turn on service. the camera is idle by default in home assistant unless you call the service to switch it on. I tried listening for events to see if homekit sent anything to HA when you click on the camera but it doesnt seem to from what I can see. The is the last thing I have to get working to have all of my smart home in HA. There is a homebridge addon, which uses the same codebase as this addon, that works fine with homekit so it has to be possible.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
This is an issue with the custom integration eufy_security. It is documented here.