eufy_security
eufy_security copied to clipboard
Can't start P2P streaming on Floodlight Camera T8420
Describe the bug I'm no longer able to start streaming P2P with one particular model of camera. Floodlight T8420. This worked fine up until v2.6.2
To Reproduce call service camera.turn_on
error log:
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 222, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 79, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 738, in get
return await self.handle(request, camera)
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 756, in handle
image = await _async_get_image(
File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 186, in _async_get_image
and ("jpeg" in content_type or "jpg" in content_type)
TypeError: argument of type 'NoneType' is not iterable
**Hardware Information about Cameras T8420, P2P
Additional context It was working fine until v2.6.2
logs from add-on please
The only thing in the add-on log is this line:
2022-08-26 12:11:38.299 INFO Stopping the station stream for the device T8420NXXXXXXXXXX, because we haven't received any data for 5000 seconds
logs from add-on please @fuatakgun
I have the same issue as OP but here are the logs from the add-on:
Logger: custom_components.eufy_security
Source: custom_components/eufy_security/websocket.py:59
Integration: Eufy Security ([documentation](https://github.com/fuatakgun/eufy_security), [issues](https://github.com/fuatakgun/eufy_security/issues))
First occurred: 6:51:56 PM (1 occurrences)
Last logged: 6:51:56 PM
eufy_security - Exception - process_messages: 'result' - traceback: Traceback (most recent call last): File "/config/custom_components/eufy_security/websocket.py", line 57, in process_messages await self.on_message(msg) File "/config/custom_components/eufy_security/websocket.py", line 68, in on_message await self.message_callback(message) File "/config/custom_components/eufy_security/coordinator.py", line 297, in on_message message_result = payload[message_type] KeyError: 'result' - message: WSMessage(type=<WSMsgType.TEXT: 1>, data='{"type":"result","success":false,"messageId":"start_livesteam","errorCode":"device_livestream_already_running"}', extra='')
I get that after clicking it just once after a restart. If I try to click the stop streaming button I get the following:
Logger: custom_components.eufy_security
Source: custom_components/eufy_security/websocket.py:59
Integration: Eufy Security ([documentation](https://github.com/fuatakgun/eufy_security), [issues](https://github.com/fuatakgun/eufy_security/issues))
First occurred: 6:55:06 PM (1 occurrences)
Last logged: 6:55:06 PM
eufy_security - Exception - process_messages: 'result' - traceback: Traceback (most recent call last): File "/config/custom_components/eufy_security/websocket.py", line 57, in process_messages await self.on_message(msg) File "/config/custom_components/eufy_security/websocket.py", line 68, in on_message await self.message_callback(message) File "/config/custom_components/eufy_security/coordinator.py", line 297, in on_message message_result = payload[message_type] KeyError: 'result' - message: WSMessage(type=<WSMsgType.TEXT: 1>, data='{"type":"result","success":false,"messageId":"start_livesteam","errorCode":"device_livestream_not_running"}', extra='')
LivestreamAlreadyRunningError Livestream for device T8420N10202700C8 is already running
error stack:
• message_handler.ts:139 handle
src/lib/device/message_handler.ts:139:31
• task_queues:96 processTicksAndRejections
node:internal/process/task_queues:96:5
• server.ts:103 receiveMessage
src/lib/server.ts:103:21
2022-09-14 18:03:19.851 ERROR Message error
LivestreamAlreadyRunningError Livestream for device T8420N10202700C8 is already running
error stack:
• message_handler.ts:139 handle
src/lib/device/message_handler.ts:139:31
• task_queues:96 processTicksAndRejections
node:internal/process/task_queues:96:5
• server.ts:103 receiveMessage
src/lib/server.ts:103:21
2022-09-14 18:03:21.029 INFO Stopping the station stream for the device T8420N10202700C8, because we haven't received any data for 5000 seconds
Let me know if there's anything else I can do to help debug this.
Please check if latest version of eufy-security-client repository supports your device, if not, work with @bropat for support
@fuatakgun T8420 is supported: https://bropat.github.io/eufy-security-client/#/supported_devices
I've checked the version and everything is good from that perspective.
Hoping this will be fixed by this
I just updated to latest addon and integration but still getting the same results
addon log:
2022-11-13 16:07:01.147 INFO Stopping the station stream for the device T8420XXXXXXXXXXX, because we haven't received any data for 5000 seconds
Home Assistant log:
eufy_security - Exception - process_messages: 'result' - traceback: Traceback (most recent call last): File "/config/custom_components/eufy_security/websocket.py", line 57, in process_messages await self.on_message(msg) File "/config/custom_components/eufy_security/websocket.py", line 68, in on_message await self.message_callback(message) File "/config/custom_components/eufy_security/coordinator.py", line 297, in on_message message_result = payload[message_type] KeyError: 'result' - message: WSMessage(type=<WSMsgType.TEXT: 1>, data='{"type":"result","success":false,"messageId":"start_livesteam","errorCode":"device_livestream_not_running"}', extra='')
It looks like there was a firmware update that broke T8420 in bropat's upstream library reported here.
I just tested with Bropat's latest update to the WS server 1.2.0 and it works!