Closed BeHappy2021 closed 11 months ago
Output from the debug log when I press record on the card - I was sure record worked previously:
2023-08-22 17:16:55.520 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140462457274048] {'type': 'result', 'success': False, 'messageId': 'device.stop_livestream.ab8af', 'errorCode': 'device_livestream_not_running'}
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 226, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1974, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2011, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 828, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 870, in entity_service_call
response_data = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 942, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/config/custom_components/eufy_security/camera.py", line 155, in _start_livestream
await self._stop_livestream()
File "/config/custom_components/eufy_security/camera.py", line 162, in _stop_livestream
await self.product.stop_livestream()
File "/config/custom_components/eufy_security/eufy_security_api/camera.py", line 159, in stop_livestream
await self.api.stop_livestream(self.product_type, self.serial_no)
File "/config/custom_components/eufy_security/eufy_security_api/api_client.py", line 218, in stop_livestream
await self._send_message_get_response(OutgoingMessage(OutgoingMessageType.stop_livestream, serial_no=serial_no))
File "/config/custom_components/eufy_security/eufy_security_api/api_client.py", line 319, in _send_message_get_response
return await future
^^^^^^^^^^^^
custom_components.eufy_security.eufy_security_api.exceptions.FailedCommandException: {'type': 'result', 'success': False, 'messageId': 'device.stop_livestream.ab8af', 'errorCode': 'device_livestream_not_running'}
2023-08-22 17:17:17.926 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140462457274048] Connection to add-on was broken. please reload the integration!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 226, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1974, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2011, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 828, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 870, in entity_service_call
response_data = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 942, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/config/custom_components/eufy_security/camera.py", line 155, in _start_livestream
await self._stop_livestream()
File "/config/custom_components/eufy_security/camera.py", line 162, in _stop_livestream
await self.product.stop_livestream()
File "/config/custom_components/eufy_security/eufy_security_api/camera.py", line 159, in stop_livestream
await self.api.stop_livestream(self.product_type, self.serial_no)
File "/config/custom_components/eufy_security/eufy_security_api/api_client.py", line 218, in stop_livestream
await self._send_message_get_response(OutgoingMessage(OutgoingMessageType.stop_livestream, serial_no=serial_no))
File "/config/custom_components/eufy_security/eufy_security_api/api_client.py", line 317, in _send_message_get_response
await self.send_message(message.content)
File "/config/custom_components/eufy_security/eufy_security_api/api_client.py", line 326, in send_message
await self._client.send_message(json.dumps(message))
File "/config/custom_components/eufy_security/eufy_security_api/web_socket_client.py", line 85, in send_message
raise WebSocketConnectionException("Connection to add-on was broken. please reload the integration!")
custom_components.eufy_security.eufy_security_api.exceptions.WebSocketConnectionException: Connection to add-on was broken. please reload the integration!
2023-08-22 17:17:22.500 INFO (MainThread) [aiortsp.rtsp.reader] try loading stream rtspt://127.0.0.1:8559/T8124P2022270E85
2023-08-22 17:17:22.500 INFO (MainThread) [aiortsp.rtsp.reader] connected!
2023-08-22 17:17:22.500 INFO (MainThread) [aiortsp.rtsp.reader] receiving interleaved RTP (0) and RTCP (1)
2023-08-22 17:17:22.503 INFO (MainThread) [aiortsp.rtsp.reader] session options: {'SETUP', 'TEARDOWN', 'GET_PARAMETER', 'RECORD', 'PAUSE', 'ANNOUNCE', 'DESCRIBE', 'PLAY'}
2023-08-22 17:17:23.050 INFO (MainThread) [aiortsp.rtsp.reader] using base url: rtsp://127.0.0.1:8559/T8124P2022270E85/
2023-08-22 17:17:23.053 INFO (MainThread) [aiortsp.rtsp.reader] setting up using URL: rtsp://127.0.0.1:8559/T8124P2022270E85/trackID=0
2023-08-22 17:17:23.054 INFO (MainThread) [aiortsp.rtsp.reader] stream correctly setup: <Response status=200 msg="OK"" headers={'cseq': '3', 'server': 'gortsplib', 'session': '1928670157', 'transport': 'RTP/AVP/TCP;unicast;interleaved=0-1'} content-length=0>
2023-08-22 17:17:23.055 INFO (MainThread) [aiortsp.rtsp.reader] session id: 1928670157, timeout: 60, keep_alive: 54
2023-08-22 17:17:23.056 INFO (MainThread) [aiortsp.rtsp.reader] playing stream...
2023-08-22 17:17:23.056 INFO (MainThread) [aiortsp.rtsp.reader] start playing rtsp://127.0.0.1:8559/T8124P2022270E85/ at time now
and speed 1
...
2023-08-22 17:17:23.102 INFO (MainThread) [aiortsp.rtsp.reader] stopping stream...
2023-08-22 17:17:23.102 INFO (MainThread) [aiortsp.rtsp.reader] stopping session/playback...
2023-08-22 17:17:23.111 INFO (MainThread) [aiortsp.rtsp.reader] connection closed, error:
2023-08-22 17:17:23.112 INFO (MainThread) [aiortsp.rtsp.reader] connection to RTSP server 127.0.0.1:8559 closed (error: None)
2023-08-22 17:17:33.290 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140462457274048] camera.T8124_cam does not support record service
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 226, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1974, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2011, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
return await service.entity_service_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 870, in entity_service_call
response_data = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 942, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 990, in async_handle_record_service
raise HomeAssistantError(f"{camera.entity_id} does not support record service")
homeassistant.exceptions.HomeAssistantError: camera.T8124_cam does not support record service
2023-08-22 17:17:35.030 DEBUG (Thread-68 (setup)) [custom_components.eufy_security.eufy_security_api] p2p 5 - q size: 7 - empty 0
2023-08-22 17:17:35.531 DEBUG (Thread-68 (setup)) [custom_components.eufy_security.eufy_security_api] p2p 5 - q size: 8 - empty 0
2023-08-22 17:17:41.039 DEBUG (Thread-68 (setup)) [custom_components.eufy_security.eufy_security_api] p2p 5 - q size: 8 - empty 0
2023-08-22 17:17:41.473 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140462457274048] camera.T8124_cam does not support record service
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 226, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1974, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2011, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
return await service.entity_service_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 870, in entity_service_call
response_data = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 942, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 990, in async_handle_record_service
raise HomeAssistantError(f"{camera.entity_id} does not support record service")
homeassistant.exceptions.HomeAssistantError: camera.T8124_cam does not support record service
2023-08-22 17:17:41.540 DEBUG (Thread-68 (setup)) [custom_components.eufy_security.eufy_security_api] p2p 5 - q size: 7 - empty 0
2023-08-22 17:17:42.041 DEBUG (Thread-68 (setup)) [custom_components.eufy_security.eufy_security_api] p2p 5 - q size: 8 - empty 0
2023-08-22 17:17:42.541 DEBUG (Thread-68 (setup)) [custom_components.eufy_security.eufy_security_api] p2p 5 - q size: 7 - empty 0
2023-08-22 17:17:43.042 DEBUG (Thread-68 (setup)) [custom_components.eufy_security.eufy_security_api] p2p 5 - q size: 7 - empty 0
This is all happening because I am too lazy to merge this into home assistant core. As they are making changes on code architecture of home assistant, I am missing to catch up with their latest changes. I will take a look at it.
By the way, the expected flow is;
I had checked the box in the configuration:
keep home assistant based streaming enabled on the configuration (DO NOT CHECK this: Do not use STREAM module inside Home Assistant (if you do not watch the video inside Home Assistant native streaming or you are using WebRTC, enable this to decrease CPU usage)
I have now unchecked it, reloaded the integration and all works as it should. Thanks for the pointer.
I have set up a conditional card based on the README and others sources I read from. I have T8400 cameras which are working fine but having issues with the T8124 (battery powered and P2P streaming).
On the card I can pretty much reliably turn P2P streaming on and off - I have also created an automation so that if it gets stuck at 'PREPARING' for more than 10 seconds the integration is reloaded to reset it. I can also take snapshots once the camera is streaming.
The only thing I can't figure out is how to get recording working.
Additional information
Go to Settings -> System -> Repairs -> Click on 3 dots (...) -> System Information and get Version and Installation Type to below fields;
Hardware Information;
Camera Model: T8124
Live Streaming Protocol (RTSP/P2P): P2P
Debug Logs from Home Assistant (https://github.com/fuatakgun/eufy_security/discussions/624) - Without this, I will automatically resolve this issue
Logger: homeassistant.components.websocket_api.http.connection Source: components/camera/init.py:990 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 09:25:39 (5 occurrences) Last logged: 09:53:26
[140646668983872] camera.T8124_cam does not support record service [140646743354816] camera.T8124_cam does not support record service [140646655199552] camera.T8124_cam does not support record service Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 226, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1974, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2011, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service return await service.entity_service_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 870, in entity_service_call response_data = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 942, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 990, in async_handle_record_service raise HomeAssistantError(f"{camera.entity_id} does not support record service") homeassistant.exceptions.HomeAssistantError: camera.T8124_cam does not support record service