JurajNyiri / HomeAssistant-Tapo-Control

Control for Tapo cameras as a Home Assistant component
Apache License 2.0
1.08k stars 85 forks source link

Cant Configure a Tapo camera after a firewall #343

Closed fir3burn closed 1 year ago

fir3burn commented 1 year ago

Description

When I want to add a new C500 camera in a protected subnet with a firewall, the camera is configuring forever after added in hassio. Hassio host can reach ports 443, 554 and 2020 of the camera ip.

If the same cam, is added in the same subnet, the camera works perfectly.

The camera is working in the app, in both subnets

Reproduction Steps

  1. Add Tapo Camera C500 with the ip in the protected subnet
  2. Integration add to hassio, but is in failed, and try to reconfigure the device forever.

Expected behavior

Add the Camera to hassio without errors

If applicable, add error logs.

Error logs from the camera in protected subnet

2023-05-10 19:47:35.007 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE] Setup process for tapo initiated by user. 2023-05-10 19:47:35.007 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE] Showing config flow for IP. 2023-05-10 19:47:40.145 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE] Verifying IP address 2023-05-10 19:47:40.145 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.200.30] Verifying port 443. 2023-05-10 19:47:40.407 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.200.30] Port 443 is opened, verifying access to control of camera. 2023-05-10 19:47:41.113 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.200.30] Verifying ports all required camera ports. 2023-05-10 19:47:41.376 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.200.30] All camera ports are opened, proceeding to requesting Camera Account. 2023-05-10 19:47:41.377 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.200.30] Showing config flow for Camera Account. 2023-05-10 19:47:56.649 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.200.30] Verifying Camera Account. 2023-05-10 19:47:56.649 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.200.30] Verifying ports all required camera ports. 2023-05-10 19:47:56.917 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.200.30] All camera ports are opened. 2023-05-10 19:47:56.918 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.200.30] Testing RTSP stream. 2023-05-10 19:47:56.918 DEBUG (MainThread) [custom_components.tapo_control] [isRtspStreamWorking][192.168.200.30] Testing RTSP stream. 2023-05-10 19:47:56.919 DEBUG (MainThread) [custom_components.tapo_control] [isRtspStreamWorking][192.168.200.30] Creating image frame. 2023-05-10 19:47:56.919 DEBUG (MainThread) [custom_components.tapo_control] [isRtspStreamWorking][192.168.200.30] Encoding username and password. 2023-05-10 19:47:56.919 DEBUG (MainThread) [custom_components.tapo_control] [isRtspStreamWorking][192.168.200.30] Getting image from rtsp://HIDDEN_USERNAME:HIDDEN_PASSWORD@192.168.200.30:554/stream1. 2023-05-10 19:48:02.776 DEBUG (MainThread) [custom_components.tapo_control] [isRtspStreamWorking][192.168.200.30] Image data received. 2023-05-10 19:48:02.777 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.200.30] RTSP stream works. 2023-05-10 19:48:02.777 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.200.30] Testing control of camera using Camera Account. 2023-05-10 19:48:03.504 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.200.30] Camera Account does not work for control, requesting cloud password. 2023-05-10 19:48:03.504 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.200.30] Showing config flow for cloud password. 2023-05-10 19:48:10.763 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.200.30] Verifying cloud password. 2023-05-10 19:48:13.230 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.200.30] Cloud password works for control. 2023-05-10 19:48:13.230 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.200.30] Showing config flow for other options. 2023-05-10 19:48:24.707 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.200.30] Verifying other options. 2023-05-10 19:48:24.708 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.200.30] Saving entry. 2023-05-10 19:48:26.956 DEBUG (MainThread) [custom_components.tapo_control] getCamData 2023-05-10 19:48:33.239 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) 2023-05-10 19:48:56.132 DEBUG (MainThread) [custom_components.tapo_control] getCamData 2023-05-10 19:49:02.229 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) 2023-05-10 19:49:15.689 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: HTTPSConnectionPool(host='192.168.200.30', port=443): Max retries exceed ed with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x56bace80>: Failed to establish a new connection: [Errno 113] Host is unreachable')) 2023-05-10 19:49:38.659 DEBUG (MainThread) [custom_components.tapo_control] getCamData 2023-05-10 19:49:44.769 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) 2023-05-10 19:50:27.242 DEBUG (MainThread) [custom_components.tapo_control] getCamData 2023-05-10 19:50:33.538 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) 2023-05-10 19:51:56.348 DEBUG (MainThread) [custom_components.tapo_control] getCamData 2023-05-10 19:52:02.569 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) 2023-05-10 19:53:41.310 ERROR (MainThread) [custom_components.tapo_control] Unable to connect to Tapo: Cameras Control controller: HTTPSConnectionPool(host='192.168.200.30', port=443): Max retries exceed ed with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x5aa9cdf0>: Failed to establish a new connection: [Errno 113] Host is unreachable'))

Error logs from the camera in same subnet

2023-05-10 21:06:06.473 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE] Setup process for tapo initiated by user. 2023-05-10 21:06:06.473 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE] Showing config flow for IP. 2023-05-10 21:06:10.081 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE] Verifying IP address 2023-05-10 21:06:10.081 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.190.30] Verifying port 443. 2023-05-10 21:06:10.087 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.190.30] Port 443 is opened, verifying access to control of camera. 2023-05-10 21:06:10.423 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.190.30] Verifying ports all required camera ports. 2023-05-10 21:06:10.431 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.190.30] All camera ports are opened, proceeding to requesting Camera Account. 2023-05-10 21:06:10.432 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.190.30] Showing config flow for Camera Account. 2023-05-10 21:06:33.196 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.190.30] Verifying Camera Account. 2023-05-10 21:06:33.197 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.190.30] Verifying ports all required camera ports. 2023-05-10 21:06:33.208 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.190.30] All camera ports are opened. 2023-05-10 21:06:33.208 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.190.30] Testing RTSP stream. 2023-05-10 21:06:33.209 DEBUG (MainThread) [custom_components.tapo_control] [isRtspStreamWorking][192.168.190.30] Testing RTSP stream. 2023-05-10 21:06:33.209 DEBUG (MainThread) [custom_components.tapo_control] [isRtspStreamWorking][192.168.190.30] Creating image frame. 2023-05-10 21:06:33.209 DEBUG (MainThread) [custom_components.tapo_control] [isRtspStreamWorking][192.168.190.30] Encoding username and password. 2023-05-10 21:06:33.210 DEBUG (MainThread) [custom_components.tapo_control] [isRtspStreamWorking][192.168.190.30] Getting image from rtsp://HIDDEN_USERNAME:HIDDEN_PASSWORD@192.168.190.30:554/stream1. 2023-05-10 21:06:35.920 DEBUG (MainThread) [custom_components.tapo_control] [isRtspStreamWorking][192.168.190.30] Image data received. 2023-05-10 21:06:35.921 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.190.30] RTSP stream works. 2023-05-10 21:06:35.921 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.190.30] Testing control of camera using Camera Account. 2023-05-10 21:06:36.267 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.190.30] Camera Account does not work for control, requesting cloud password. 2023-05-10 21:06:36.268 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.190.30] Showing config flow for cloud password. 2023-05-10 21:06:43.862 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.190.30] Verifying cloud password. 2023-05-10 21:06:44.984 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.190.30] Cloud password works for control. 2023-05-10 21:06:44.985 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.190.30] Showing config flow for other options. 2023-05-10 21:06:52.256 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.190.30] Verifying other options. 2023-05-10 21:06:52.257 DEBUG (MainThread) [custom_components.tapo_control] [ADD DEVICE][192.168.190.30] Saving entry. 2023-05-10 21:06:53.369 DEBUG (MainThread) [custom_components.tapo_control] getCamData 2023-05-10 21:06:54.459 DEBUG (MainThread) [custom_components.tapo_control] Raw update data: 2023-05-10 21:06:54.459 DEBUG (MainThread) [custom_components.tapo_control] {'getDeviceInfo': {'device_info': {'basic_info': {'device_type': 'SMART.IPCAMERA', 'device_info': 'C500 1.0 IPC', 'features': 3 , 'barcode': '', 'device_model': 'C500', 'sw_version': '1.0.3 Build 230404 Rel.64834n', 'device_name': 'C500 1.0', 'hw_version': '1.0',etc etc etc

Device Firmware

1.0.3 Build 230404 Rel.64834n

Using stream component

Yes

Does camera work via official integrations?

Yes

Camera has all attributes filled out in developer tools

Yes

HASS Environment

RPI4 Hassio 2023.5.2 Supervisor 2023.04.1 Operating System 10.1

Search for similar issues

Yes

Additional information

No response

JurajNyiri commented 1 year ago

Not an integration issue, network needs to be fixed.