twrecked / hass-aarlo

Asynchronous Arlo Component for Home Assistant
GNU Lesser General Public License v3.0
372 stars 77 forks source link

Integration error with Homekit #258

Open jcollas opened 4 years ago

jcollas commented 4 years ago

Running latest version of aarlo 0.6.19 on HomeAssistant 0.110.1.

This is when trying to view the camera through the iOS Home app. This appeared to work with aarlo 0.6.17 and HomeAssistant 0.110.0


2020-05-21 09:40:40 ERROR (SyncWorker_18) [homeassistant.components.homekit.type_cameras] Failed to get stream source - this could be a transient error or your camera might not be compatible with HomeKit yet Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/homekit/type_cameras.py", line 198, in _async_get_stream_source stream_source = await camera.stream_source() File "/config/custom_components/aarlo/camera.py", line 314, in stream_source return await self.hass.async_add_executor_job(self._camera.get_stream) RuntimeError: Task <Task pending coro=<Camera._start_stream() running at /usr/local/lib/python3.7/site-packages/pyhap/camera.py:539>> got Future <Future pending cb=[_chain_future.._call_check_cancel() at /usr/local/lib/python3.7/asyncio/futures.py:351]> attached to a different loop 2020-05-21 09:40:40 ERROR (SyncWorker_18) [homeassistant.components.homekit.type_cameras] Camera has no stream source

twrecked commented 4 years ago

I modified stream_source to quiet down a "Direct I/O" message. I'll take a look.

edit: I guess this is what this guy is takling about - https://github.com/home-assistant/core/pull/35699

I guess you never saw the "Direct I/O" messages?

twrecked commented 4 years ago

Can you try 0.6.19.1 - it has this PR #260 in it. It should work but I can't really test it here.

jcollas commented 4 years ago

Running with 0.6.19.1, and now I just see this:

2020-05-21 13:19:25 WARNING (SyncWorker0) [homeassistant.util.async] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for aarlo doing I/O at custom_components/aarlo/pyaarlo/backend.py, line 77: r = self._session.post(url, json=params, headers=headers, timeout=timeout)

no response from the camera in HomeKit.

On May 21, 2020, at 12:31:52 PM, Steve Herrell notifications@github.com wrote:

Can you try 0.6.19.1 - it has this PR #260 in it. It should work but I can't really test it here.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

twrecked commented 4 years ago

Do you have debugging on? If not, can you turn it on.

Then do you see a "homekit detected" message? Do you see a stream URL?

With this release the code run path should be identical to 0.6.18.?? - hence the "direct I/o" message.

twrecked commented 4 years ago

Any update? You should have streaming + "Direct I/O" errors with the 0.6.19.1 build, it has the same runtime path a 0.6.18.x.

But I'm going to have to ask for some help from the Home Assistant people on this one. I think I'm going to have to handle HomeKit differently, I just don't know how at the moment.

jcollas commented 4 years ago

Here's the log:

I clicked on the camera within Homekit. Running in HomeAssistant 0.110.1, Aarlo 0.6.19.1

2020-05-22 11:42:30 DEBUG (SyncWorker_9) [custom_components.aarlo] homekit detected 2020-05-22 11:42:30 WARNING (SyncWorker9) [homeassistant.util.async] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for aarlo doing I/O at custom_components/aarlo/pyaarlo/backend.py, line 77: r = self._session.post(url, json=params, headers=headers, timeout=timeout) 2020-05-22 11:42:31 DEBUG (ArloEventStream) [custom_components.aarlo.camera] callback:Driveway:activityState:startUserStream 2020-05-22 11:42:31 DEBUG (ArloEventStream) [custom_components.aarlo.camera] callback:Driveway:activityState:startUserStream 2020-05-22 11:42:33 DEBUG (ArloEventStream) [custom_components.aarlo.camera] callback:Driveway:activityState:userStreamActive 2020-05-22 11:43:00 DEBUG (ArloEventStream) [custom_components.aarlo.camera] callback:Front Door:activityState:idle 2020-05-22 11:43:00 DEBUG (ArloEventStream) [custom_components.aarlo.camera] callback:Front Door:activityState:idle 2020-05-22 11:43:00 DEBUG (ArloEventStream) [custom_components.aarlo.sensor] callback:Battery Level Front Door:batteryLevel:78 2020-05-22 11:43:01 DEBUG (ArloEventStream) [custom_components.aarlo.camera] callback:Driveway:presignedLastImageUrl:https://arlolastimage-z2.s3.amazonaws.com/875bbf3d_438b_4d1c_bc82_5e16357e85f5/1 2020-05-22 11:43:01 DEBUG (ArloEventStream) [custom_components.aarlo.camera] callback:Driveway:recentActivity:True 2020-05-22 11:43:02 DEBUG (ArloEventStream) [custom_components.aarlo.camera] callback:Driveway:activityState:idle 2020-05-22 11:43:02 DEBUG (ArloEventStream) [custom_components.aarlo.camera] callback:Driveway:activityState:idle 2020-05-22 11:43:02 DEBUG (ArloEventStream) [custom_components.aarlo.camera] callback:Driveway:activityState:idle 2020-05-22 11:43:02 DEBUG (ArloBackgroundWorker) [custom_components.aarlo.sensor] callback:Last Driveway:lastCapture:05-22 11:42 2020-05-22 11:43:02 DEBUG (ArloBackgroundWorker) [custom_components.aarlo.camera] callback:Driveway:presignedLastImageData:b'\xff\xd8\xff\xfe\x00\x10Lavc58.31.100\x00\xff\xdb\x00C\x00\x08\n\n\x0b\n\x0b\r 2020-05-22 11:43:02 DEBUG (ArloBackgroundWorker) [custom_components.aarlo.camera] callback:Driveway:activityState:idle

jaburgeson commented 4 years ago

I can help out with troubleshooting as well once these fixes get applied to the 2FA Branch.

twrecked commented 4 years ago

@jaburgeson I'm hoping to this merged into the 0.7.x (2FA branch) later today. I don't have HomeKit soany help will be appreciated.

jaburgeson commented 4 years ago

I tried my best to show the area of the debug when I click the stream in HomeKit up until the time it fails.

A few things I've noticed...the Snapshot that appears in HomeKit seems to update often...however it isn't a true update. In reality, it ONLY updates the image if there is a new event detected. So it isn't a real time snapshot in HomeKit.

Here are the logs. - 192.168.2.120 is my Mac

2020-05-24 10:08:40 INFO (Thread-5) [pyhap.hap_server] 192.168.2.120 - "GET /characteristics?id=1819609410.16 HTTP/1.1" 207 - 2020-05-24 10:08:40 INFO (Thread-5) [pyhap.hap_server] 192.168.2.120 - "GET /characteristics?id=1819609410.14,1819609410.12,1819609410.13 HTTP/1.1" 207 - 2020-05-24 10:08:40 INFO (Thread-5) [pyhap.hap_server] 192.168.2.120 - "PUT /characteristics HTTP/1.1" 204 - 2020-05-24 10:08:40 INFO (Thread-5) [pyhap.hap_server] 192.168.2.120 - "GET /characteristics?id=1819609410.17 HTTP/1.1" 207 - 2020-05-24 10:08:40 INFO (Thread-5) [pyhap.hap_server] 192.168.2.120 - "PUT /characteristics HTTP/1.1" 204 - 2020-05-24 10:08:40 INFO (SyncWorker_14) [homeassistant.components.homekit.type_cameras] [dc8bd229-4574-41e4-9c51-bf61287b2f0a] Started stream process - PID 343 2020-05-24 10:08:48 DEBUG (ArloBackgroundWorker) [pyaarlo] turning recent OFF for Kitchen 2020-05-24 10:08:48 DEBUG (ArloBackgroundWorker) [custom_components.aarlo.camera] callback:Kitchen:recentActivity:False 2020-05-24 10:09:00 DEBUG (MainThread) [custom_components.aarlo.switch] get state Left Side Front Siren form 2020-05-24 10:09:00 DEBUG (MainThread) [custom_components.aarlo.switch] get state Driveway Siren form 2020-05-24 10:09:00 DEBUG (MainThread) [custom_components.aarlo.switch] get state Left Side Rear Siren form 2020-05-24 10:09:00 DEBUG (MainThread) [custom_components.aarlo.switch] get state Flower Bed Siren form 2020-05-24 10:09:00 DEBUG (MainThread) [custom_components.aarlo.switch] get state Backyard Right Siren form 2020-05-24 10:09:00 DEBUG (MainThread) [custom_components.aarlo.switch] get state Backyard Left Siren form 2020-05-24 10:09:00 DEBUG (MainThread) [custom_components.aarlo.switch] get state for All Sirens 2020-05-24 10:09:10 INFO (SyncWorker_14) [homeassistant.components.homekit.type_cameras] [dc8bd229-4574-41e4-9c51-bf61287b2f0a] close stream. 2020-05-24 10:09:10 INFO (Thread-5) [pyhap.hap_server] 192.168.2.120 - "PUT /characteristics HTTP/1.1" 204 - 2020-05-24 10:09:17 INFO (Thread-5) [pyhap.hap_server] 192.168.2.120 - "POST /resource HTTP/1.1" 200 - 2020-05-24 10:09:27 INFO (Thread-5) [pyhap.hap_server] 192.168.2.120 - "POST /resource HTTP/1.1" 200 -

jaburgeson commented 4 years ago

I have also enabled debug on HAP (HomeKit) as well incase that helps.

Some more info on this one - 192.168.50.249 is my dedicated HomeKit AppleTV, and the Camera I'm using for the test is called "Kitchen" and it is an Arlo Q.

Strangely enough, I actually got live video to work one time over LTE, however, it was extremely pixelated and low FPS.

Not sure if we need to adjust ffmpeg settings for the stream to make this work. I know HomeKit Camera's are very picky on the stream they need in order to work.

Removed Snapshot URL's and replaced with SNAPSHOT

2020-05-24 10:29:30 DEBUG (MainThread) [homeassistant.components.homekit.type_sensors] binary_sensor.aarlo_motion_bailey_s_room: Set to 0 2020-05-24 10:29:30 DEBUG (Thread-3) [pyhap.accessory_driver] Send event: topic(1339166836.9), data(b'{"characteristics": [{"aid": 1339166836, "iid": 9, "value": false}]}'), sender_client_addr(None) 2020-05-24 10:29:30 DEBUG (Thread-3) [pyhap.accessory_driver] Sending event to client: ('192.168.2.120', 51768) 2020-05-24 10:29:30 DEBUG (Thread-3) [pyhap.accessory_driver] Sending event to client: ('192.168.50.249', 49817) 2020-05-24 10:29:30 DEBUG (Thread-6) [pyhap.hap_server] Request GET from address '('192.168.50.249', 49817)' for path '/characteristics?id=1372456940.16'. 2020-05-24 10:29:30 DEBUG (Thread-6) [pyhap.accessory_driver] Get chars response: [{'aid': 1372456940, 'iid': 16, 'value': 'AQEA', 'status': 0}] 2020-05-24 10:29:30 INFO (Thread-6) [pyhap.hap_server] 192.168.50.249 - "GET /characteristics?id=1372456940.16 HTTP/1.1" 207 - 2020-05-24 10:29:30 DEBUG (Thread-6) [pyhap.hap_server] Request PUT from address '('192.168.50.249', 49817)' for path '/characteristics'. 2020-05-24 10:29:30 DEBUG (Thread-6) [pyhap.hap_server] Set characteristics content: {'characteristics': [{'aid': 1372456940, 'iid': 17, 'value': 'ARAC1vM4CAdNYrRE094tVoEUAxsBAQACDjE5Mi4xNjguNTAuMjQ5AwKPzAQC4PQEJQIQiLmQf0V3gHt/0/xflF6neQMO41m7FNvzd9A0Kie/chYBAQAFJQIQNZf2Ln9spfy8wHNa30XsUAMOv8LH7ra/zDzuK3v+cM8BAQA='}]} 2020-05-24 10:29:30 DEBUG (Thread-6) [pyhap.characteristic] client_update_value: SetupEndpoints to ARAC1vM4CAdNYrRE094tVoEUAxsBAQACDjE5Mi4xNjguNTAuMjQ5AwKPzAQC4PQEJQIQiLmQf0V3gHt/0/xflF6neQMO41m7FNvzd9A0Kie/chYBAQAFJQIQNZf2Ln9spfy8wHNa30XsUAMOv8LH7ra/zDzuK3v+cM8BAQA= from client: ('192.168.50.249', 49817) 2020-05-24 10:29:30 DEBUG (Thread-6) [pyhap.camera] Received endpoint configuration: session_id: 02d6f338-0807-4d62-b444-d3de2d568114 address: 192.168.50.249 is_ipv6: False target_video_port: 52367 target_audio_port: 62688 video_crypto_suite: 0 video_srtp: iLmQf0V3gHt/0/xflF6neeNZuxTb83fQNConv3IW audio_crypto_suite: 0 audio_srtp: NZf2Ln9spfy8wHNa30XsUL/Cx+62v8w87it7/nDP 2020-05-24 10:29:30 DEBUG (Thread-6) [pyhap.characteristic] set_value: SetupEndpoints to ARAC1vM4CAdNYrRE094tVoEUAgEAAxoBAQACDTE5Mi4xNjguNTAuNTEDAo/MBALg9AQlAQEAAhCIuZB/RXeAe3/T/F+UXqd5Aw7jWbsU2/N30DQqJ79yFgUlAQEAAhA1l/Yuf2yl/LzAc1rfRexQAw6/wsfutr/MPO4re/5wzwYEFTSLAAcEZiXmAA== 2020-05-24 10:29:30 INFO (Thread-6) [pyhap.hap_server] 192.168.50.249 - "PUT /characteristics HTTP/1.1" 204 - 2020-05-24 10:29:30 DEBUG (Thread-6) [pyhap.hap_server] Request GET from address '('192.168.50.249', 49817)' for path '/characteristics?id=1372456940.17'. 2020-05-24 10:29:30 DEBUG (Thread-6) [pyhap.accessory_driver] Get chars response: [{'aid': 1372456940, 'iid': 17, 'value': 'ARAC1vM4CAdNYrRE094tVoEUAgEAAxoBAQACDTE5Mi4xNjguNTAuNTEDAo/MBALg9AQlAQEAAhCIuZB/RXeAe3/T/F+UXqd5Aw7jWbsU2/N30DQqJ79yFgUlAQEAAhA1l/Yuf2yl/LzAc1rfRexQAw6/wsfutr/MPO4re/5wzwYEFTSLAAcEZiXmAA==', 'status': 0}] 2020-05-24 10:29:30 INFO (Thread-6) [pyhap.hap_server] 192.168.50.249 - "GET /characteristics?id=1372456940.17 HTTP/1.1" 207 - 2020-05-24 10:29:31 DEBUG (ArloBackgroundWorker) [pyaarlo] turning recent OFF for Office 2020-05-24 10:29:31 DEBUG (ArloBackgroundWorker) [custom_components.aarlo.camera] callback:Office:recentActivity:False 2020-05-24 10:29:31 DEBUG (Thread-6) [pyhap.hap_server] Request PUT from address '('192.168.50.249', 49817)' for path '/characteristics'. 2020-05-24 10:29:31 DEBUG (Thread-6) [pyhap.hap_server] Set characteristics content: {'characteristics': [{'aid': 1372456940, 'iid': 15, 'value': 'ARUCAQEBEALW8zgIB01itETT3i1WgRQCNAEBAAIJAQECAgECAwEAAwsBAoACAgJoAQMBHgQXAQFjAgTp7GE7AwKEAAQEAAAAPwUCYgUDLAEBAwIMAQEBAgEAAwECBAE8AxYBAW4CBDcYVlQDAhgABAQAAKBABgENBAEA'}]} 2020-05-24 10:29:31 DEBUG (Thread-6) [pyhap.characteristic] client_update_value: SelectedRTPStreamConfiguration to ARUCAQEBEALW8zgIB01itETT3i1WgRQCNAEBAAIJAQECAgECAwEAAwsBAoACAgJoAQMBHgQXAQFjAgTp7GE7AwKEAAQEAAAAPwUCYgUDLAEBAwIMAQEBAgEAAwECBAE8AxYBAW4CBDcYVlQDAhgABAQAAKBABgENBAEA from client: ('192.168.50.249', 49817) 2020-05-24 10:29:31 DEBUG (Thread-6) [pyhap.camera] set_selected_stream_config - value - ARUCAQEBEALW8zgIB01itETT3i1WgRQCNAEBAAIJAQECAgECAwEAAwsBAoACAgJoAQMBHgQXAQFjAgTp7GE7AwKEAAQEAAAAPwUCYgUDLAEBAwIMAQEBAgEAAwECBAE8AxYBAW4CBDcYVlQDAhgABAQAAKBABgENBAEA 2020-05-24 10:29:31 DEBUG (Thread-6) [pyhap.camera] Set stream config request: 1 2020-05-24 10:29:31 INFO (Thread-6) [pyhap.hap_server] 192.168.50.249 - "PUT /characteristics HTTP/1.1" 204 - 2020-05-24 10:29:31 DEBUG (SyncWorker_7) [homeassistant.components.homekit.type_cameras] [02d6f338-0807-4d62-b444-d3de2d568114] Starting stream with the following parameters: {'v_profile_id': b'\x02', 'v_level': b'\x02', 'width': 640, 'height': 360, 'fps': 30, 'v_ssrc': 9122837, 'v_payload_type': b'c', 'v_max_bitrate': 132, 'v_rtcp_interval': 0.5, 'v_max_mtu': b'b\x05', 'a_codec': b'\x03', 'a_comfort_noise': b'\x00', 'a_channel': 1, 'a_bitrate': False, 'a_sample_rate': 24, 'a_packet_time': 60, 'a_ssrc': 15082854, 'a_payload_type': b'n', 'a_max_bitrate': 24, 'a_rtcp_interval': 5.0, 'a_comfort_payload_type': b'\r', 'id': UUID('02d6f338-0807-4d62-b444-d3de2d568114'), 'address': '192.168.50.249', 'v_port': 52367, 'v_srtp_key': 'iLmQf0V3gHt/0/xflF6neeNZuxTb83fQNConv3IW', 'a_port': 62688, 'a_srtp_key': 'NZf2Ln9spfy8wHNa30XsUL/Cx+62v8w87it7/nDP'} 2020-05-24 10:29:31 DEBUG (SyncWorker_7) [homeassistant.components.homekit.type_cameras] FFmpeg output settings: -map 0✌️0 -an -c:v libx264 -profile:v high -tune zerolatency -pix_fmt yuv420p -r 30 -b:v 132k -bufsize 528k -maxrate 132k -payload_type 99 -ssrc 9122837 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params iLmQf0V3gHt/0/xflF6neeNZuxTb83fQNConv3IW srtp://192.168.50.249:52367?rtcpport=52367&localrtcpport=52367&pkt_size=1316 2020-05-24 10:29:31 INFO (SyncWorker_7) [homeassistant.components.homekit.type_cameras] [02d6f338-0807-4d62-b444-d3de2d568114] Started stream process - PID 317 2020-05-24 10:29:32 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state camera.aarlo_office=idle; access_token=1437eac34f819b3ea728af69326518c134fdd30817be85fa919f9c74df194913, model_name=VMC3040, brand=Netgear Arlo, battery_level=100, battery_tech=None, brightness=0, flipped=False, mirrored=False, motion_detection_sensitivity=80, power_save_mode=optimized, signal_strength=4, unseen_videos=8, recent_activity=False, image_source=capture/05-22 17:11, charging=False, charger_type=None, wired=False, wired_only=False, last_thumbnail=*SNAPSHOT***, time_zone=America/New_York, attribution=Data provided by my.arlo.com, device_id=5KY188SA70304, model_id=VMC3040, parent_id=5KY188SA70304, friendly_name=Office, siren=False, entity_picture=/api/camera_proxy/camera.aarlo_office?token=1437eac34f819b3ea728af69326518c134fdd30817be85fa919f9c74df194913, supported_features=0 @ 2020-05-24T10:29:31.108360-04:00> 2020-05-24 10:29:35 DEBUG (MainThread) [custom_components.aarlo.switch] get state Left Side Front Siren form 2020-05-24 10:29:35 DEBUG (MainThread) [custom_components.aarlo.switch] get state Driveway Siren form 2020-05-24 10:29:35 DEBUG (MainThread) [custom_components.aarlo.switch] get state Left Side Rear Siren form 2020-05-24 10:29:35 DEBUG (MainThread) [custom_components.aarlo.switch] get state Flower Bed Siren form 2020-05-24 10:29:35 DEBUG (MainThread) [custom_components.aarlo.switch] get state Backyard Right Siren form 2020-05-24 10:29:35 DEBUG (MainThread) [custom_components.aarlo.switch] get state Backyard Left Siren form 2020-05-24 10:29:35 DEBUG (MainThread) [custom_components.aarlo.switch] get state for All Sirens 2020-05-24 10:29:39 DEBUG (ArloBackgroundWorker) [pyaarlo] turning recent OFF for Bailey's Room 2020-05-24 10:29:39 DEBUG (ArloBackgroundWorker) [custom_components.aarlo.camera] callback:Bailey's Room:recentActivity:False 2020-05-24 10:29:40 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state camera.aarlo_bailey_s_room=idle; access_token=870990ebd2b4ec88c22bb7646751a2ee8e3e64715362a40ec865880e21b894a1, model_name=VMC3040, brand=Netgear Arlo, battery_level=100, battery_tech=None, brightness=0, flipped=False, mirrored=False, motion_detection_sensitivity=80, power_save_mode=optimized, signal_strength=4, unseen_videos=102, recent_activity=False, image_source=capture/05-24 09:12, charging=False, charger_type=None, wired=False, wired_only=False, last_thumbnail=SNAPSHO, time_zone=America/New_York, attribution=Data provided by my.arlo.com, device_id=5KY189SS72B52, model_id=VMC3040, parent_id=5KY189SS72B52, friendly_name=Bailey's Room, siren=False, entity_picture=/api/camera_proxy/camera.aarlo_bailey_s_room?token=870990ebd2b4ec88c22bb7646751a2ee8e3e64715362a40ec865880e21b894a1, supported_features=0 @ 2020-05-24T10:29:39.109086-04:00> 2020-05-24 10:29:51 DEBUG (ArloEventStream) [pyaarlo] sending cameras/5KY189SS72B52 to 5KY189SS72B52 2020-05-24 10:29:51 DEBUG (ArloEventStream) [pyaarlo] Bailey's Room BASE got cameras/5KY189SS72B52 2020-05-24 10:29:51 DEBUG (ArloEventStream) [pyaarlo] set:ArloBase/5KY189SS72B52/motionDetected=True 2020-05-24 10:29:51 DEBUG (ArloEventStream) [pyaarlo] Bailey's Room CAMERA got one cameras/5KY189SS72B52 2020-05-24 10:29:51 DEBUG (ArloEventStream) [pyaarlo] recent activity key 2020-05-24 10:29:51 DEBUG (ArloEventStream) [pyaarlo] turning recent ON for Bailey's Room 2020-05-24 10:29:51 DEBUG (ArloEventStream) [custom_components.aarlo.camera] callback:Bailey's Room:recentActivity:True 2020-05-24 10:29:51 DEBUG (ArloEventStream) [pyaarlo] set:ArloCamera/5KY189SS72B52/motionDetected=True 2020-05-24 10:29:51 DEBUG (ArloEventStream) [custom_components.aarlo.binary_sensor] callback:Motion Bailey's Room:motionDetected:True 2020-05-24 10:29:52 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state camera.aarlo_bailey_s_room=recently active; access_token=870990ebd2b4ec88c22bb7646751a2ee8e3e64715362a40ec865880e21b894a1, model_name=VMC3040, brand=Netgear Arlo, battery_level=100, battery_tech=None, brightness=0, flipped=False, mirrored=False, motion_detection_sensitivity=80, power_save_mode=optimized, signal_strength=4, unseen_videos=102, recent_activity=True, image_source=capture/05-24 09:12, charging=False, charger_type=None, wired=False, wired_only=False, last_thumbnail=SNAPSHOT***, time_zone=America/New_York, attribution=Data provided by my.arlo.com, device_id=5KY189SS72B52, model_id=VMC3040, parent_id=5KY189SS72B52, friendly_name=Bailey's Room, siren=False, entity_picture=/api/camera_proxy/camera.aarlo_bailey_s_room?token=870990ebd2b4ec88c22bb7646751a2ee8e3e64715362a40ec865880e21b894a1, supported_features=0 @ 2020-05-24T10:29:51.532569-04:00> 2020-05-24 10:29:52 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state binary_sensor.aarlo_motion_bailey_s_room=on; attribution=Data provided by my.arlo.com, brand=Netgear Arlo, friendly_name=Motion Bailey's Room, camera_name=Bailey's Room, device_class=motion @ 2020-05-24T10:29:51.542479-04:00> 2020-05-24 10:29:52 DEBUG (MainThread) [pyhap.characteristic] set_value: MotionDetected to True 2020-05-24 10:29:52 DEBUG (MainThread) [homeassistant.components.homekit.type_sensors] binary_sensor.aarlo_motion_bailey_s_room: Set to 1 2020-05-24 10:29:52 DEBUG (Thread-3) [pyhap.accessory_driver] Send event: topic(1339166836.9), data(b'{"characteristics": [{"aid": 1339166836, "iid": 9, "value": true}]}'), sender_client_addr(None) 2020-05-24 10:29:52 DEBUG (Thread-3) [pyhap.accessory_driver] Sending event to client: ('192.168.2.120', 51768) 2020-05-24 10:29:52 DEBUG (Thread-3) [pyhap.accessory_driver] Sending event to client: ('192.168.50.249', 49817) 2020-05-24 10:29:56 DEBUG (ArloEventStream) [pyaarlo] sending cameras/5KY189SS72B52 to 5KY189SS72B52 2020-05-24 10:29:56 DEBUG (ArloEventStream) [pyaarlo] Bailey's Room BASE got cameras/5KY189SS72B52 2020-05-24 10:29:56 DEBUG (ArloEventStream) [pyaarlo] set:ArloBase/5KY189SS72B52/motionDetected=False 2020-05-24 10:29:56 DEBUG (ArloEventStream) [pyaarlo] Bailey's Room CAMERA got one cameras/5KY189SS72B52 2020-05-24 10:29:56 DEBUG (ArloEventStream) [pyaarlo] recent activity key 2020-05-24 10:29:56 DEBUG (ArloEventStream) [pyaarlo] turning recent ON for Bailey's Room 2020-05-24 10:29:56 DEBUG (ArloEventStream) [custom_components.aarlo.camera] callback:Bailey's Room:recentActivity:True 2020-05-24 10:29:56 DEBUG (ArloEventStream) [pyaarlo] set:ArloCamera/5KY189SS72B52/motionDetected=False 2020-05-24 10:29:57 DEBUG (ArloEventStream) [custom_components.aarlo.binary_sensor] callback:Motion Bailey's Room:motionDetected:False 2020-05-24 10:29:57 DEBUG (ArloBackgroundWorker) [pyaarlo] fast refresh 2020-05-24 10:29:57 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state binary_sensor.aarlo_motion_bailey_s_room=off; attribution=Data provided by my.arlo.com, brand=Netgear Arlo, friendly_name=Motion Bailey's Room, camera_name=Bailey's Room, device_class=motion @ 2020-05-24T10:29:57.015729-04:00> 2020-05-24 10:29:57 DEBUG (ArloBackgroundWorker) [pyaarlo] day testing with 2020-05-24! 2020-05-24 10:29:57 DEBUG (MainThread) [pyhap.characteristic] set_value: MotionDetected to False 2020-05-24 10:29:57 DEBUG (MainThread) [homeassistant.components.homekit.type_sensors] binary_sensor.aarlo_motion_bailey_s_room: Set to 0 2020-05-24 10:29:57 DEBUG (Thread-3) [pyhap.accessory_driver] Send event: topic(1339166836.9), data(b'{"characteristics": [{"aid": 1339166836, "iid": 9, "value": false}]}'), sender_client_addr(None) 2020-05-24 10:29:57 DEBUG (Thread-3) [pyhap.accessory_driver] Sending event to client: ('192.168.2.120', 51768) 2020-05-24 10:29:57 DEBUG (Thread-3) [pyhap.accessory_driver] Sending event to client: ('192.168.50.249', 49817) 2020-05-24 10:29:57 DEBUG (ArloBackgroundWorker) [pyaarlo] pinging Kitchen 2020-05-24 10:29:57 DEBUG (ArloBackgroundWorker) [pyaarlo] notify+response running 2020-05-24 10:29:57 DEBUG (ArloBackgroundWorker) [pyaarlo] post+response running 2020-05-24 10:29:57 DEBUG (ArloBackgroundWorker) [pyaarlo] set:ArloBase/4CD15CSL05152/connectionState=available 2020-05-24 10:29:57 DEBUG (ArloBackgroundWorker) [pyaarlo] pinging Dining Room 2020-05-24 10:29:57 DEBUG (ArloBackgroundWorker) [pyaarlo] notify+response running 2020-05-24 10:29:57 DEBUG (ArloBackgroundWorker) [pyaarlo] post+response running 2020-05-24 10:29:57 DEBUG (ArloBackgroundWorker) [pyaarlo] set:ArloBase/4CD15CSM05153/connectionState=available 2020-05-24 10:29:57 DEBUG (ArloBackgroundWorker) [pyaarlo] pinging Office 2020-05-24 10:29:57 DEBUG (ArloBackgroundWorker) [pyaarlo] notify+response running 2020-05-24 10:29:57 DEBUG (ArloBackgroundWorker) [pyaarlo] post+response running 2020-05-24 10:29:58 DEBUG (ArloBackgroundWorker) [pyaarlo] set:ArloBase/5KY188SA70304/connectionState=available 2020-05-24 10:29:58 DEBUG (ArloBackgroundWorker) [pyaarlo] pinging Playroom 2020-05-24 10:29:58 DEBUG (ArloBackgroundWorker) [pyaarlo] notify+response running 2020-05-24 10:29:58 DEBUG (ArloBackgroundWorker) [pyaarlo] post+response running 2020-05-24 10:29:58 DEBUG (ArloBackgroundWorker) [pyaarlo] set:ArloBase/5KY188SU70296/connectionState=available 2020-05-24 10:29:58 DEBUG (ArloBackgroundWorker) [pyaarlo] pinging Bailey's Room 2020-05-24 10:29:58 DEBUG (ArloBackgroundWorker) [pyaarlo] notify+response running 2020-05-24 10:29:58 DEBUG (ArloBackgroundWorker) [pyaarlo] post+response running 2020-05-24 10:29:58 DEBUG (ArloBackgroundWorker) [pyaarlo] set:ArloBase/5KY189SS72B52/connectionState=available 2020-05-24 10:29:58 DEBUG (ArloBackgroundWorker) [pyaarlo] pinging Closet SmartHub 2020-05-24 10:29:58 DEBUG (ArloBackgroundWorker) [pyaarlo] notify+response running 2020-05-24 10:29:58 DEBUG (ArloBackgroundWorker) [pyaarlo] post+response running 2020-05-24 10:29:59 DEBUG (ArloBackgroundWorker) [pyaarlo] set:ArloBase/A0829B73A0371/connectionState=available 2020-05-24 10:29:59 DEBUG (ArloBackgroundWorker) [pyaarlo] pinging Office SmartHub 2020-05-24 10:29:59 DEBUG (ArloBackgroundWorker) [pyaarlo] notify+response running 2020-05-24 10:29:59 DEBUG (ArloBackgroundWorker) [pyaarlo] post+response running 2020-05-24 10:29:59 DEBUG (ArloBackgroundWorker) [pyaarlo] set:ArloBase/A0829A7EA29CF/connectionState=available 2020-05-24 10:30:01 DEBUG (Thread-6) [pyhap.hap_server] Request PUT from address '('192.168.50.249', 49817)' for path '/characteristics'. 2020-05-24 10:30:01 DEBUG (Thread-6) [pyhap.hap_server] Set characteristics content: {'characteristics': [{'aid': 1372456940, 'iid': 15, 'value': 'ARUCAQABEALW8zgIB01itETT3i1WgRQ='}]} 2020-05-24 10:30:01 DEBUG (Thread-6) [pyhap.characteristic] client_update_value: SelectedRTPStreamConfiguration to ARUCAQABEALW8zgIB01itETT3i1WgRQ= from client: ('192.168.50.249', 49817) 2020-05-24 10:30:01 DEBUG (Thread-6) [pyhap.camera] set_selected_stream_config - value - ARUCAQABEALW8zgIB01itETT3i1WgRQ= 2020-05-24 10:30:01 DEBUG (Thread-6) [pyhap.camera] Set stream config request: 0 2020-05-24 10:30:01 INFO (Thread-6) [pyhap.hap_server] 192.168.50.249 - "PUT /characteristics HTTP/1.1" 204 - 2020-05-24 10:30:01 INFO (SyncWorker_7) [homeassistant.components.homekit.type_cameras] [02d6f338-0807-4d62-b444-d3de2d568114] close stream. 2020-05-24 10:30:03 DEBUG (Thread-6) [pyhap.hap_server] Request POST from address '('192.168.50.249', 49817)' for path '/resource'. 2020-05-24 10:30:03 INFO (Thread-6) [pyhap.hap_server] 192.168.50.249 - "POST /resource HTTP/1.1" 200 -

derrickshowers commented 7 months ago

Are there any updates here? I've tried just about everything to get cameras working in HomeKit. Pretty sure I'm running into the same thing. Were you able to come up with any workarounds @jcollas?

2023-11-21 16:40:21.063 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.aarlo_doorbell] Error from stream worker: Error opening stream (INVALIDDATA, Invalid data f ound when processing input) rtsps://arlostreaming975-z2-prod.wowza.arlo.com:443/vzmodulelive/AC6338KM0150D_1700600925682?egressToken=bd5c48c6_a766_4349_829a_8061833b9929&userAgent=i0S&
cameraId=AC6338KM0150D_1700600925682&txnId=FE!dab8b9d5-6890-49af-9b48-7fa4f175f82b
twrecked commented 7 months ago

Not directly related to this but it might help, there is an issue with recordings not being made so I will be looking the streaming side of Arlo this week.

Also, I updated a lot of the pieces of the integration when I built the new alpha release because they were out of date. Again, not directly related to this but it might help.

Things I'll be looking at:

twrecked commented 7 months ago

I was wrong, we still get rtsp streams...

@derrickshowers can you turn on debug an upload the traces? Turn on verbose debug and then encrypt it here. You will need to paste the output here.

Can you also paste your aarlo: config. The error your seeing is user_agent related but I think we should be overriding the value you ask for for Homekit streams.

derrickshowers commented 7 months ago

Sure! thanks @twrecked.

home-assistant-log-encrypted.txt

Here's my config file

# Arlo Cameras
aarlo:
  username: !secret arlo_username
  password: !secret arlo_password
  tfa_source: push
  tfa_type: PUSH
  backend: sse
  mode_api: v2
  stream_snapshot: True
  stream_timeout: 120
  refresh_devices_every: 2
  verbose_debug: True
  packet_dump: True

camera:
  platform: aarlo
  ffmpeg_arguments: "-pred 1 -q:v 2"