Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ONVIF Integration: Tapo C320WS Motion Detection sensor not appearing #85902

Closed
mahuttoro opened this issue Jan 14, 2023 · 23 comments · Fixed by #90382 or #91470
Closed

ONVIF Integration: Tapo C320WS Motion Detection sensor not appearing #85902

mahuttoro opened this issue Jan 14, 2023 · 23 comments · Fixed by #90382 or #91470
Assignees

Comments

@mahuttoro
Copy link

The problem

When adding a Tapo C320WS to HA via ONVIF integration or Tapo custom component, which uses ONVIF for motion detection, the motion detection binary sensor does not appear. A Tapo C110 works flawlessly.

What version of Home Assistant Core has the issue?

core-2023.1.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

ONVIF

Link to integration documentation on our website

https://www.home-assistant.io/integrations/onvif/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: custom_components.tapo_control
Source: components/onvif/event.py:82
Integration: Tapo: Kamerasteuerung (documentation, issues)
First occurred: 13. Januar 2023 um 14:56:20 (2520 occurrences)
Last logged: 10:03:48

Unexpected error fetching Tapo resource status data: illegal status line: bytearray(b'POST /onvif/service\x00HTTP/1.1\x00\x00Host\x00 192.168.20.108:2020\x00\x00Accept\x00 /\x00\x00Accept-Encoding\x00 gzip, deflate, br\x00\x00Connection\x00 keep-alive\x00\x00User-Agent\x00 ZHTTP/1.1 500 Internal Server Error')
Unexpected error fetching Tapo resource status data: All connection attempts failed
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/httpcore/_exceptions.py", line 10, in map_exceptions
yield
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 188, in _receive_event
event = self._h11_state.next_event()
File "/usr/local/lib/python3.10/site-packages/h11/_connection.py", line 487, in next_event
exc._reraise_as_remote_protocol_error()
File "/usr/local/lib/python3.10/site-packages/h11/_util.py", line 77, in _reraise_as_remote_protocol_error
raise self
File "/usr/local/lib/python3.10/site-packages/h11/_connection.py", line 469, in next_event
event = self._extract_next_receive_event()
File "/usr/local/lib/python3.10/site-packages/h11/_connection.py", line 411, in _extract_next_receive_event
event = self._reader(self._receive_buffer)
File "/usr/local/lib/python3.10/site-packages/h11/_readers.py", line 104, in maybe_read_from_SEND_RESPONSE_server
matches = validate(status_line_re, lines[0], "illegal status line: {!r}", lines[0])
File "/usr/local/lib/python3.10/site-packages/h11/_util.py", line 91, in validate
raise LocalProtocolError(msg)
h11._util.RemoteProtocolError: illegal status line: bytearray(b'POST /onvif/service\x00HTTP/1.1\x00\x00Host\x00 192.168.20.108:2020\x00\x00Accept\x00 /\x00\x00Accept-Encoding\x00 gzip, deflate, br\x00\x00Connection\x00 keep-alive\x00\x00User-Agent\x00 ZHTTP/1.1 500 Internal Server Error')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions
yield
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 353, in handle_async_request
resp = await self._pool.handle_async_request(req)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 253, in handle_async_request
raise exc
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 237, in handle_async_request
response = await connection.handle_async_request(request)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 90, in handle_async_request
return await self._connection.handle_async_request(request)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 112, in handle_async_request
raise exc
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 91, in handle_async_request
) = await self._receive_response_headers(**kwargs)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 155, in _receive_response_headers
event = await self._receive_event(timeout=timeout)
File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 187, in _receive_event
with map_exceptions({h11.RemoteProtocolError: RemoteProtocolError}):
File "/usr/local/lib/python3.10/contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.10/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
raise to_exc(exc)
httpcore.RemoteProtocolError: illegal status line: bytearray(b'POST /onvif/service\x00HTTP/1.1\x00\x00Host\x00 192.168.20.108:2020\x00\x00Accept\x00 /\x00\x00Accept-Encoding\x00 gzip, deflate, br\x00\x00Connection\x00 keep-alive\x00\x00User-Agent\x00 ZHTTP/1.1 500 Internal Server Error')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 225, in _async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 181, in _async_update_data
return await self.update_method()
File "/config/custom_components/tapo_control/init.py", line 210, in async_update_data
await setupOnvif(hass, entry)
File "/config/custom_components/tapo_control/utils.py", line 431, in setupOnvif
hass.data[DOMAIN][entry.entry_id]["eventsSetup"] = await setupEvents(
File "/config/custom_components/tapo_control/utils.py", line 441, in setupEvents
if await events.async_start():
File "/usr/src/homeassistant/homeassistant/components/onvif/event.py", line 82, in async_start
if await self.device.create_pullpoint_subscription():
File "/usr/local/lib/python3.10/site-packages/onvif/client.py", line 311, in create_pullpoint_subscription
pullpoint = await events.CreatePullPointSubscription()
File "/usr/local/lib/python3.10/site-packages/zeep/proxy.py", line 64, in call
return await self._proxy._binding.send_async(
File "/usr/local/lib/python3.10/site-packages/zeep/wsdl/bindings/soap.py", line 156, in send_async
response = await client.transport.post_xml(
File "/usr/local/lib/python3.10/site-packages/zeep/transports.py", line 235, in post_xml
response = await self.post(address, message, headers)
File "/usr/local/lib/python3.10/site-packages/zeep/transports.py", line 220, in post
response = await self.client.post(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1848, in post
return await self.request(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1533, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1620, in send
response = await self._send_handling_auth(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1648, in _send_handling_auth
response = await self._send_handling_redirects(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1685, in _send_handling_redirects
response = await self._send_single_request(request)
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1722, in _send_single_request
response = await transport.handle_async_request(request)
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 352, in handle_async_request
with map_httpcore_exceptions():
File "/usr/local/lib/python3.10/contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.RemoteProtocolError: illegal status line: bytearray(b'POST /onvif/service\x00HTTP/1.1\x00\x00Host\x00 192.168.20.108:2020\x00\x00Accept\x00 /\x00\x00Accept-Encoding\x00 gzip, deflate, br\x00\x00Connection\x00 keep-alive\x00\x00User-Agent\x00 ZHTTP/1.1 500 Internal Server Error')

Additional information

No response

@home-assistant
Copy link

Hey there @hunterjm, mind taking a look at this issue as it has been labeled with an integration (onvif) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of onvif can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Change the title of the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign onvif Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


onvif documentation
onvif source
(message by IssueLinks)

@jannesaarinen
Copy link

jannesaarinen commented Jan 16, 2023

I have exactly same issue.

Camera
Model: C320WS
Firmware: 1.0.4 Build 221031 Rel.40874n (latest)

Homeassistant
Version: 2023.1.1
(EDIT: Same issue also with 2023.1.4)

@xlemassacre
Copy link

same issue with different model:

Camera
Model: C225
Firmware: 1.0.12

Homeassistant
Version: 2023.1.4

@GrumpyMeow
Copy link
Contributor

GrumpyMeow commented Jan 22, 2023

Hi,

The exception indicates that the camera responds with a generic error code: HTTP/1.1 500 Internal Server Error
This error is the response for the method create_pullpoint_subscription. It might actually be that the camera does not support "PullPoint subscriptions". At this moment the Onvif integration does not seem to first validate if the camera indicates to support this functionality.

It would help if you would enable extra logging. Especially the "zeep.transports" will help to find the reason for the error. The logging of "zeep.transports" will result in the communication with the camera to be logged. In the log you should be able to find strings related to "Capabilities".

logger:
  default: error
  logs:
    homeassistant.components.onvif.camera: info
    homeassistant.components.camera: info
    zeep.transports: debug

My camera does support PullPoint-subscription and i can see this snippet in the Capability-response of my camera:

<tt:Events>
   <tt:XAddr>http://192.168.178.175:80/onvif/Events</tt:XAddr>
   <tt:WSSubscriptionPolicySupport>true</tt:WSSubscriptionPolicySupport>
   <tt:WSPullPointSupport>true</tt:WSPullPointSupport>			 
   <tt:WSPausableSubscriptionManagerInterfaceSupport>false</tt:WSPausableSubscriptionManagerInterfaceSupport>
</tt:Events>

Hope this helps...

@jannesaarinen
Copy link

jannesaarinen commented Jan 23, 2023

Hi,

In my case (Tapo C320WS, version 1.0.4 Build 221031 Rel.40874n) it looks like the camera reports to support PullPoint:

<tt:Events>
  <tt:XAddr>http://192.168.4.114:2020/onvif/service</tt:XAddr>
  <tt:WSSubscriptionPolicySupport>true</tt:WSSubscriptionPolicySupport>
  <tt:WSPullPointSupport>true</tt:WSPullPointSupport>
  <tt:WSPausableSubscriptionManagerInterfaceSupport>false</tt:WSPausableSubscriptionManagerInterfaceSupport>
</tt:Events>

But for me the method create_pullpoint_subscription seems to cause the issue as well as @GrumpyMeow explains above:

2023-01-23 10:00:19.749 DEBUG (MainThread) [zeep.transports] HTTP Post to http://192.168.4.114:2020/onvif/service:
b'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<soap-env:Envelope xmlns:soap-env="http://www.w3.org/2003/05/soap-envelope">
    <soap-env:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
        <wsa:Action>http://www.onvif.org/ver10/events/wsdl/EventPortType/CreatePullPointSubscriptionRequest</wsa:Action>
        <wsa:MessageID>urn:uuid:8a3be80f-0771-43a4-8ed6-851934240ff6</wsa:MessageID>
        <wsa:To>http://192.168.4.114:2020/onvif/service</wsa:To>
        <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
            <wsse:UsernameToken>
                <wsse:Username>homeassistant</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">xxx</wsse:Password>
                <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">xxx</wsse:Nonce>
                <wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2023-01-23T08:00:19+00:00</wsu:Created>
            </wsse:UsernameToken>
        </wsse:Security>
    </soap-env:Header>
    <soap-env:Body>
        <ns0:CreatePullPointSubscription xmlns:ns0="http://www.onvif.org/ver10/events/wsdl"/>
    </soap-env:Body>
</soap-env:Envelope>'

2023-01-23 10:00:19.805 ERROR (MainThread) [custom_components.tapo_control] Unexpected error fetching Tapo resource status data: illegal status line: bytearray(b'POST /onvif/service\x00HTTP/1.1\x00\x00Host\x00 192.168.4.114:2020\x00\x00Accept\x00 */*\x00\x00Accept-Encoding\x00 gzip, deflate, br\x00\x00Connection\x00 keep-alive\x00\x00User-Agent\x00 ZeHTTP/1.1 500 Internal Server Error')

Full zeep.transports:debug log:
Tapo_C320WS.log

@gmwubs
Copy link

gmwubs commented Jan 30, 2023

I couldn't get this to work either, and re-adding the cameras didn't work. Today, it sprung to mind that I disabled Motion detection on the outside cameras via the Tapo app last week. I did this because my NAS runs Surveillance Station, which not only allows you to define zones / areas of interest, it has the ability to detect motion in those zones / areas.

To verify that (me turning off motion detection on the camera using the Tapo app) caused the problem, I just enabled motion detection in the app for one of the outside cameras. And, lo and behold, the Cell Motion detection sensor instantly became available again in the ONVIF integration:

afbeelding

I am still missing the PTZ controls via ONVIF, which is why I reverted to the custom component for Tapo Cameras.

@rikosk
Copy link

rikosk commented Feb 24, 2023

Camera: C320WS
Harware Version: 2
Firmware: 1.0.4 Build 221031 Rel. 40874n

Homeassistant
Version: 2023.2.5

Same problem with #85902 (comment)
If you need more info I will be happy to provide

Capabilities snippet

2023-02-24 09:40:18.271 DEBUG (MainThread) [zeep.transports] HTTP Response from http://192.168.1.124:2020/onvif/device_service (status: 200):
b'
...
				<tt:Events>
					<tt:XAddr>http://192.168.1.124:2020/onvif/service</tt:XAddr>
					<tt:WSSubscriptionPolicySupport>true</tt:WSSubscriptionPolicySupport>
					<tt:WSPullPointSupport>true</tt:WSPullPointSupport>
...

And the error

2023-02-24 09:40:18.718 DEBUG (MainThread) [zeep.transports] HTTP Post to http://192.168.1.124:2020/onvif/service:
b'
<?xml version=\'1.0\' encoding=\'utf-8\'?>\n
<soap-env:Envelope
	xmlns:soap-env="http://www.w3.org/2003/05/soap-envelope">
	<soap-env:Header
		xmlns:wsa="http://www.w3.org/2005/08/addressing">
		<wsa:Action>http://www.onvif.org/ver10/events/wsdl/EventPortType/CreatePullPointSubscriptionRequest</wsa:Action>
		<wsa:MessageID>urn:uuid:7373c6b1-0bf0-4b10-9a35-fe08562014d2</wsa:MessageID>
		<wsa:To>http://192.168.1.124:2020/onvif/service</wsa:To>
		<wsse:Security
			xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
			<wsse:UsernameToken>
				<wsse:Username>akarta</wsse:Username>
				<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">REDUCTED</wsse:Password>
				<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">REDUCTED</wsse:Nonce>
				<wsu:Created
					xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2023-02-24T07:40:18+00:00
				</wsu:Created>
			</wsse:UsernameToken>
		</wsse:Security>
	</soap-env:Header>
	<soap-env:Body>
		<ns0:CreatePullPointSubscription
			xmlns:ns0="http://www.onvif.org/ver10/events/wsdl"/>
		</soap-env:Body>
	</soap-env:Envelope>'
2023-02-24 09:40:18.732 ERROR (MainThread) [custom_components.tapo_control] Unexpected error fetching Tapo resource status data: illegal status line: bytearray(b'POST /onvif/service\x00HTTP/1.1\x00\x00Host\x00 192.168.1.124:2020\x00\x00Accept\x00 */*\x00\x00Accept-Encoding\x00 gzip, deflate, br\x00\x00Connection\x00 keep-alive\x00\x00User-Agent\x00 ZeHTTP/1.1 500 Internal Server Error')

tapoc320ws.log

@allankosowan
Copy link

allankosowan commented Mar 8, 2023

i have this problem.. after I disabled motion on camera it won't work in HA even after Enabling it again. all that time the tapo App is receiving the motion notifications though

@mahuttoro
Copy link
Author

Unfortunately, nothing changed with 2023.3.5.
The issue still persists.

@khrisperry
Copy link

I'm having the same issues with my 320ws cameras as well. I just installed them hoping to replace my current ring doorbell camera, but I need the motion sensor to work. If you need someone to provide logs or anything, I'm happy to do so.

@mahuttoro
Copy link
Author

Thanks for your effort!
Could you please explain how to test?

Is it just replacing the client.py?
I have replaced the client.py and the event.py. Unfortunately, the issue still persists.

@bdraco
Copy link
Member

bdraco commented Mar 28, 2023

You need onvif-zeep-async 1.2.3 which isn't released yet

@JurajNyiri
Copy link

@JurajNyiri
Copy link

@AndreiArdelean1 reported that the issue is still not fixed in onvif-zeep-async 1.2.3.

@pierrebateau
Copy link

I encountered the same issue with a Tapo C225 and discovered that the request fails if no InitialTerminationTime is passed in the CreatePullPointSubscription request.

It works for me if I change https://github.com/hunterjm/python-onvif-zeep-async/blob/async/onvif/client.py#L350 to

pullpoint = await events.CreatePullPointSubscription(
    {"InitialTerminationTime": "PT2H"}
)

I'm willing to PR this but I don't know what a sensible default value should be.

thomasramm added a commit to thomasramm/python-onvif-zeep-async that referenced this issue Mar 31, 2023
Fix for TP-Tapo Camera, see repports in home-assistant/core#85902 (comment)
@alexoueb
Copy link

alexoueb commented Apr 6, 2023

Is it the same error? I have tried with Tapo C500, with the lastest HA version (2023.4.0), I have not the motion detection binary sensor too.

Unexpected error fetching Tapo resource status data: illegal status line: bytearray(b'POST /onvif/service\x00HTTP/1.1\x00\x00Host\x00 192.168.1.63:2020\x00\x00Accept\x00 */*\x00\x00Accept-Encoding\x00 gzip, deflate, br\x00\x00Connection\x00 keep-alive\x00\x00User-Agent\x00 ZeeHTTP/1.1 500 Internal Server Error')
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/httpcore/_exceptions.py", line 10, in map_exceptions
    yield
  File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 188, in _receive_event
    event = self._h11_state.next_event()
  File "/usr/local/lib/python3.10/site-packages/h11/_connection.py", line 487, in next_event
    exc._reraise_as_remote_protocol_error()
  File "/usr/local/lib/python3.10/site-packages/h11/_util.py", line 77, in _reraise_as_remote_protocol_error
    raise self
  File "/usr/local/lib/python3.10/site-packages/h11/_connection.py", line 469, in next_event
    event = self._extract_next_receive_event()
  File "/usr/local/lib/python3.10/site-packages/h11/_connection.py", line 411, in _extract_next_receive_event
    event = self._reader(self._receive_buffer)
  File "/usr/local/lib/python3.10/site-packages/h11/_readers.py", line 104, in maybe_read_from_SEND_RESPONSE_server
    matches = validate(status_line_re, lines[0], "illegal status line: {!r}", lines[0])
  File "/usr/local/lib/python3.10/site-packages/h11/_util.py", line 91, in validate
    raise LocalProtocolError(msg)
h11._util.RemoteProtocolError: illegal status line: bytearray(b'POST /onvif/service\x00HTTP/1.1\x00\x00Host\x00 192.168.1.63:2020\x00\x00Accept\x00 */*\x00\x00Accept-Encoding\x00 gzip, deflate, br\x00\x00Connection\x00 keep-alive\x00\x00User-Agent\x00 ZeeHTTP/1.1 500 Internal Server Error')

@thomasramm
Copy link

I encountered the same issue with a Tapo C225 and discovered that the request fails if no InitialTerminationTime is passed in the CreatePullPointSubscription request.

It works for me if I change https://github.com/hunterjm/python-onvif-zeep-async/blob/async/onvif/client.py#L350 to

pullpoint = await events.CreatePullPointSubscription(
    {"InitialTerminationTime": "PT2H"}
)

I'm willing to PR this but I don't know what a sensible default value should be.

@pierrebateau: How can i test this? Is there a file where i can add these lines of code? i can't find the file with 'find -iname client.py' on my HA

@bdraco: should we re-open this ticket? The new Version of onvif hasn't fix the error.

@bdraco bdraco reopened this Apr 6, 2023
@bdraco
Copy link
Member

bdraco commented Apr 6, 2023

Reopened it. Works for me now with the latest firmware in the camera.

someone who can replicate will need to pick it up and fix it as I no longer have a valid test case

@pierrebateau
Copy link

@thomasramm It works for me if I change the line in /usr/local/lib/python3.10/site-packages/onvif/client.py

@thomasramm
Copy link

@thomasramm It works for me if I change the line in /usr/local/lib/python3.10/site-packages/onvif/client.py

i don't have the python3.10 folder, if i try to go for this folder in ha terminal. in the terminal it shows me core-ssh$ i guess im in the wrong docker conatiner. So i tried to connect to the core os via this tutorial: https://developers.home-assistant.io/docs/operating-system/debugging/. after i connected to the basic os, i found the script in the folder: /mnt/data/docker/overlay2/b725a088fa592f72edc7163b25228033fa1994580b2b006a8b897eed48cde389/diff/usr/local/lib/python3.10/site-packages/onvif
i add the line and restart the server. Now, it seems that the authentication error is gone, no more error messages.
But the motion sensor still not comming up (the cam is in front of mee, lots of detection in app, camera restarted, ha restarted) ???

@jcorreaes
Copy link

From JurajNyiri/HomeAssistant-Tapo-Control#308

Errors log:

Logger: custom_components.tapo_control
Source: components/onvif/event.py:89
Integration: Tapo: Cameras Control ([documentation](https://github.com/JurajNyiri/HomeAssistant-Tapo-Control), [issues](https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/issues))
First occurred: 18:08:47 (293 occurrences)
Last logged: 19:22:15

Unexpected error fetching Tapo resource status data: illegal status line: bytearray(b'POST /onvif/service\x00HTTP/1.1\x00\x00Host\x00 192.168.1.111:2020\x00\x00Accept\x00 */*\x00\x00Accept-Encoding\x00 gzip, deflate\x00\x00Connection\x00 keep-alive\x00\x00User-Agent\x00 Zeep/4HTTP/1.1 500 Internal Server Error')
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.10/site-packages/httpcore/_exceptions.py", line 10, in map_exceptions
    yield
  File "/srv/homeassistant/lib/python3.10/site-packages/httpcore/_async/http11.py", line 188, in _receive_event
    event = self._h11_state.next_event()
  File "/srv/homeassistant/lib/python3.10/site-packages/h11/_connection.py", line 487, in next_event
    exc._reraise_as_remote_protocol_error()
  File "/srv/homeassistant/lib/python3.10/site-packages/h11/_util.py", line 77, in _reraise_as_remote_protocol_error
    raise self
  File "/srv/homeassistant/lib/python3.10/site-packages/h11/_connection.py", line 469, in next_event
    event = self._extract_next_receive_event()
  File "/srv/homeassistant/lib/python3.10/site-packages/h11/_connection.py", line 411, in _extract_next_receive_event
    event = self._reader(self._receive_buffer)
  File "/srv/homeassistant/lib/python3.10/site-packages/h11/_readers.py", line 104, in maybe_read_from_SEND_RESPONSE_server
    matches = validate(status_line_re, lines[0], "illegal status line: {!r}", lines[0])
  File "/srv/homeassistant/lib/python3.10/site-packages/h11/_util.py", line 91, in validate
    raise LocalProtocolError(msg)
h11._util.RemoteProtocolError: illegal status line: bytearray(b'POST /onvif/service\x00HTTP/1.1\x00\x00Host\x00 192.168.1.111:2020\x00\x00Accept\x00 */*\x00\x00Accept-Encoding\x00 gzip, deflate\x00\x00Connection\x00 keep-alive\x00\x00User-Agent\x00 Zeep/4HTTP/1.1 500 Internal Server Error')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.10/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions
    yield
  File "/srv/homeassistant/lib/python3.10/site-packages/httpx/_transports/default.py", line 353, in handle_async_request
    resp = await self._pool.handle_async_request(req)
  File "/srv/homeassistant/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 253, in handle_async_request
    raise exc
  File "/srv/homeassistant/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 237, in handle_async_request
    response = await connection.handle_async_request(request)
  File "/srv/homeassistant/lib/python3.10/site-packages/httpcore/_async/connection.py", line 90, in handle_async_request
    return await self._connection.handle_async_request(request)
  File "/srv/homeassistant/lib/python3.10/site-packages/httpcore/_async/http11.py", line 112, in handle_async_request
    raise exc
  File "/srv/homeassistant/lib/python3.10/site-packages/httpcore/_async/http11.py", line 91, in handle_async_request
    ) = await self._receive_response_headers(**kwargs)
  File "/srv/homeassistant/lib/python3.10/site-packages/httpcore/_async/http11.py", line 155, in _receive_response_headers
    event = await self._receive_event(timeout=timeout)
  File "/srv/homeassistant/lib/python3.10/site-packages/httpcore/_async/http11.py", line 187, in _receive_event
    with map_exceptions({h11.RemoteProtocolError: RemoteProtocolError}):
  File "/usr/lib/python3.10/contextlib.py", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/srv/homeassistant/lib/python3.10/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
    raise to_exc(exc)
httpcore.RemoteProtocolError: illegal status line: bytearray(b'POST /onvif/service\x00HTTP/1.1\x00\x00Host\x00 192.168.1.111:2020\x00\x00Accept\x00 */*\x00\x00Accept-Encoding\x00 gzip, deflate\x00\x00Connection\x00 keep-alive\x00\x00User-Agent\x00 Zeep/4HTTP/1.1 500 Internal Server Error')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/helpers/update_coordinator.py", line 250, in _async_refresh
    self.data = await self._async_update_data()
  File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/helpers/update_coordinator.py", line 206, in _async_update_data
    return await self.update_method()
  File "/home/homeassistant/.homeassistant/custom_components/tapo_control/__init__.py", line 234, in async_update_data
    await setupOnvif(hass, entry)
  File "/home/homeassistant/.homeassistant/custom_components/tapo_control/utils.py", line 550, in setupOnvif
    hass.data[DOMAIN][entry.entry_id]["eventsSetup"] = await setupEvents(
  File "/home/homeassistant/.homeassistant/custom_components/tapo_control/utils.py", line 560, in setupEvents
    if await events.async_start():
  File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/onvif/event.py", line 89, in async_start
    if not await self.device.create_pullpoint_subscription():
  File "/srv/homeassistant/lib/python3.10/site-packages/onvif/client.py", line 350, in create_pullpoint_subscription
    pullpoint = await events.CreatePullPointSubscription()
  File "/srv/homeassistant/lib/python3.10/site-packages/zeep/proxy.py", line 64, in __call__
    return await self._proxy._binding.send_async(
  File "/srv/homeassistant/lib/python3.10/site-packages/zeep/wsdl/bindings/soap.py", line 156, in send_async
    response = await client.transport.post_xml(
  File "/srv/homeassistant/lib/python3.10/site-packages/zeep/transports.py", line 234, in post_xml
    response = await self.post(address, message, headers)
  File "/srv/homeassistant/lib/python3.10/site-packages/zeep/transports.py", line 219, in post
    response = await self.client.post(
  File "/srv/homeassistant/lib/python3.10/site-packages/httpx/_client.py", line 1848, in post
    return await self.request(
  File "/srv/homeassistant/lib/python3.10/site-packages/httpx/_client.py", line 1533, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "/srv/homeassistant/lib/python3.10/site-packages/httpx/_client.py", line 1620, in send
    response = await self._send_handling_auth(
  File "/srv/homeassistant/lib/python3.10/site-packages/httpx/_client.py", line 1648, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "/srv/homeassistant/lib/python3.10/site-packages/httpx/_client.py", line 1685, in _send_handling_redirects
    response = await self._send_single_request(request)
  File "/srv/homeassistant/lib/python3.10/site-packages/httpx/_client.py", line 1722, in _send_single_request
    response = await transport.handle_async_request(request)
  File "/srv/homeassistant/lib/python3.10/site-packages/httpx/_transports/default.py", line 352, in handle_async_request
    with map_httpcore_exceptions():
  File "/usr/lib/python3.10/contextlib.py", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/srv/homeassistant/lib/python3.10/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.RemoteProtocolError: illegal status line: bytearray(b'POST /onvif/service\x00HTTP/1.1\x00\x00Host\x00 192.168.1.111:2020\x00\x00Accept\x00 */*\x00\x00Accept-Encoding\x00 gzip, deflate\x00\x00Connection\x00 keep-alive\x00\x00User-Agent\x00 Zeep/4HTTP/1.1 500 Internal Server Error')
Logger: custom_components.tapo_control
Source: components/onvif/event.py:104
Integration: Tapo: Cameras Control ([documentation](https://github.com/JurajNyiri/HomeAssistant-Tapo-Control), [issues](https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/issues))
First occurred: 18:13:18 (15 occurrences)
Last logged: 19:20:18

Unexpected error fetching Tapo resource status data:
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.10/site-packages/httpcore/backends/asyncio.py", line 111, in connect_tcp
    stream: anyio.abc.ByteStream = await anyio.connect_tcp(
  File "/srv/homeassistant/lib/python3.10/site-packages/anyio/_core/_sockets.py", line 213, in connect_tcp
    async with create_task_group() as tg:
  File "/srv/homeassistant/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 662, in __aexit__
    raise exceptions[0]
  File "/srv/homeassistant/lib/python3.10/site-packages/anyio/_core/_sockets.py", line 164, in try_connect
    stream = await asynclib.connect_tcp(remote_host, remote_port, local_address)
  File "/srv/homeassistant/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 1691, in connect_tcp
    await get_running_loop().create_connection(
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.10/site-packages/httpcore/_exceptions.py", line 10, in map_exceptions
    yield
  File "/srv/homeassistant/lib/python3.10/site-packages/httpcore/backends/asyncio.py", line 110, in connect_tcp
    with anyio.fail_after(timeout):
  File "/srv/homeassistant/lib/python3.10/site-packages/anyio/_core/_tasks.py", line 118, in __exit__
    raise TimeoutError
TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.10/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions
    yield
  File "/srv/homeassistant/lib/python3.10/site-packages/httpx/_transports/default.py", line 353, in handle_async_request
    resp = await self._pool.handle_async_request(req)
  File "/srv/homeassistant/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 253, in handle_async_request
    raise exc
  File "/srv/homeassistant/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 237, in handle_async_request
    response = await connection.handle_async_request(request)
  File "/srv/homeassistant/lib/python3.10/site-packages/httpcore/_async/connection.py", line 86, in handle_async_request
    raise exc
  File "/srv/homeassistant/lib/python3.10/site-packages/httpcore/_async/connection.py", line 63, in handle_async_request
    stream = await self._connect(request)
  File "/srv/homeassistant/lib/python3.10/site-packages/httpcore/_async/connection.py", line 111, in _connect
    stream = await self._network_backend.connect_tcp(**kwargs)
  File "/srv/homeassistant/lib/python3.10/site-packages/httpcore/backends/auto.py", line 29, in connect_tcp
    return await self._backend.connect_tcp(
  File "/srv/homeassistant/lib/python3.10/site-packages/httpcore/backends/asyncio.py", line 109, in connect_tcp
    with map_exceptions(exc_map):
  File "/usr/lib/python3.10/contextlib.py", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/srv/homeassistant/lib/python3.10/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
    raise to_exc(exc)
httpcore.ConnectTimeout

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/helpers/update_coordinator.py", line 250, in _async_refresh
    self.data = await self._async_update_data()
  File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/helpers/update_coordinator.py", line 206, in _async_update_data
    return await self.update_method()
  File "/home/homeassistant/.homeassistant/custom_components/tapo_control/__init__.py", line 234, in async_update_data
    await setupOnvif(hass, entry)
  File "/home/homeassistant/.homeassistant/custom_components/tapo_control/utils.py", line 550, in setupOnvif
    hass.data[DOMAIN][entry.entry_id]["eventsSetup"] = await setupEvents(
  File "/home/homeassistant/.homeassistant/custom_components/tapo_control/utils.py", line 560, in setupEvents
    if await events.async_start():
  File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/onvif/event.py", line 104, in async_start
    response = await pullpoint.PullMessages(
  File "/srv/homeassistant/lib/python3.10/site-packages/zeep/proxy.py", line 64, in __call__
    return await self._proxy._binding.send_async(
  File "/srv/homeassistant/lib/python3.10/site-packages/zeep/wsdl/bindings/soap.py", line 156, in send_async
    response = await client.transport.post_xml(
  File "/srv/homeassistant/lib/python3.10/site-packages/zeep/transports.py", line 234, in post_xml
    response = await self.post(address, message, headers)
  File "/srv/homeassistant/lib/python3.10/site-packages/zeep/transports.py", line 219, in post
    response = await self.client.post(
  File "/srv/homeassistant/lib/python3.10/site-packages/httpx/_client.py", line 1848, in post
    return await self.request(
  File "/srv/homeassistant/lib/python3.10/site-packages/httpx/_client.py", line 1533, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "/srv/homeassistant/lib/python3.10/site-packages/httpx/_client.py", line 1620, in send
    response = await self._send_handling_auth(
  File "/srv/homeassistant/lib/python3.10/site-packages/httpx/_client.py", line 1648, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "/srv/homeassistant/lib/python3.10/site-packages/httpx/_client.py", line 1685, in _send_handling_redirects
    response = await self._send_single_request(request)
  File "/srv/homeassistant/lib/python3.10/site-packages/httpx/_client.py", line 1722, in _send_single_request
    response = await transport.handle_async_request(request)
  File "/srv/homeassistant/lib/python3.10/site-packages/httpx/_transports/default.py", line 352, in handle_async_request
    with map_httpcore_exceptions():
  File "/usr/lib/python3.10/contextlib.py", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/srv/homeassistant/lib/python3.10/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ConnectTimeout

@thomasramm
Copy link

thomasramm commented Apr 9, 2023

Today, I made a clean fresh install of HA on RPI for testing. Only with needed Add-on and Integrations:

Hardware

  • Camera C320WS HW:2, FW:1.0.4

Installation

  • Home Assistant 2023.4.2
  • Supervisor 2023.04.0
  • Operating System 9.5
  • Frontend 20230406.1 - latest
  • HACS 1.31.0
  • Tapo: Cameras Control 5.1.0.beta.3
  • (additional Add-on installed: Samba share, terminal & ssh, nothing else)

HA configuration changes from default

  • Log: set to debug
  • Tapo App: Motion Detection on (i get notifications from the Tapo app)
  • Cam IP=192.168.188.81

There is an error 500 in the log if onvif try to register the motion sensor event.
I add a line to the onvif component see my prev comment,
now the error in the log is away.
The Debug Log shows me "Motion sensor or time sync is enabled" and "Motion sensor: OK".
Still no motion sensor in HA. Both logs are appended.

For further testing i do the following:

  • i moved in front of the camera (Tapo app sends messages about the movements),
  • restart the camera,
  • move in front of the camera ageain (Tapo app sends messages about the movements),
  • restart HA
  • move in front of the camera ageain (Tapo app sends messages about the movements),
  • remove HA camera device and add it again,
  • move in front of the camera ageain (Tapo app sends messages about the movements),
  • ADD ONVIF Integration (host=192.168.188.81, Port 2020, username&password)
    • It shows me 2 Integrations, with 1 device and 20 entities (tapo) or 7 entities (onvif)
    • If i click on the device, both link to the same device, all the entities are together in one device.
  • move in front of the camera ageain (Tapo app sends messages about the movements),
  • restart the camera

maybe the attached log with zeep.transport debugging help for further investigation (after my code change). It seems that there is no error message on registration, but still no motion message is recived by HA (I don't know how a good log looks like, but i can't find error or warn messages)

debug_registering.log

First Log:

part of the first log after clear installation:
2023-04-09 12:49:08.792 DEBUG (MainThread) [custom_components.tapo_control] async_update_data - entry
2023-04-09 12:49:08.792 DEBUG (MainThread) [custom_components.tapo_control] Motion sensor or time sync is enabled.
2023-04-09 12:49:08.792 DEBUG (MainThread) [custom_components.tapo_control] Setting up subcription to motion sensor events...
2023-04-09 12:49:08.792 DEBUG (MainThread) [custom_components.tapo_control] setupEvents - entry
2023-04-09 12:49:08.792 DEBUG (MainThread) [custom_components.tapo_control] Setting up events...
2023-04-09 12:49:08.799 DEBUG (MainThread) [zeep.transports] HTTP Post to http://192.168.188.81:2020/onvif/service:
b'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<soap-env:Envelope xmlns:soap-env="http://www.w3.org/2003/05/soap-envelope"><soap-env:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:Action>http://www.onvif.org/ver10/events/wsdl/EventPortType/CreatePullPointSubscriptionRequest</wsa:Action><wsa:MessageID>urn:uuid:b1a371f7-8c7a-41ce-b56d-e0980acc1193</wsa:MessageID><wsa:To>http://192.168.188.81:2020/onvif/service</wsa:To><wsa:Action>http://www.onvif.org/ver10/events/wsdl/EventPortType/CreatePullPointSubscriptionRequest</wsa:Action><wsa:MessageID>urn:uuid:9a3589d7-300d-4397-b88e-f09b105102ed</wsa:MessageID><wsa:To>http://192.168.188.81:2020/onvif/service</wsa:To><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsse:UsernameToken><wsse:Username>hauser</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">fFb4EXVublvIVK1Iq/YzQ08xJcY=</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">r2gtuONgvu7Yxlqxl/JB6g==</wsse:Nonce><wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2023-04-09T10:49:08+00:00</wsu:Created></wsse:UsernameToken></wsse:Security></soap-env:Header><soap-env:Body><ns0:CreatePullPointSubscription xmlns:ns0="http://www.onvif.org/ver10/events/wsdl"/></soap-env:Body></soap-env:Envelope>'
2023-04-09 12:49:08.907 ERROR (MainThread) [custom_components.tapo_control] Unexpected error fetching Tapo resource status data: illegal status line: bytearray(b'POST /onvif/service\x00HTTP/1.1\x00\x00Host\x00 192.168.188.81:2020\x00\x00Accept\x00 */*\x00\x00Accept-Encoding\x00 gzip, deflate, br\x00\x00Connection\x00 keep-alive\x00\x00User-Agent\x00 ZHTTP/1.1 500 Internal Server Error')
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/httpcore/_exceptions.py", line 10, in map_exceptions
    yield
  File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 188, in _receive_event
    event = self._h11_state.next_event()
  File "/usr/local/lib/python3.10/site-packages/h11/_connection.py", line 487, in next_event
    exc._reraise_as_remote_protocol_error()
  File "/usr/local/lib/python3.10/site-packages/h11/_util.py", line 77, in _reraise_as_remote_protocol_error
    raise self
  File "/usr/local/lib/python3.10/site-packages/h11/_connection.py", line 469, in next_event
    event = self._extract_next_receive_event()
  File "/usr/local/lib/python3.10/site-packages/h11/_connection.py", line 411, in _extract_next_receive_event
    event = self._reader(self._receive_buffer)
  File "/usr/local/lib/python3.10/site-packages/h11/_readers.py", line 104, in maybe_read_from_SEND_RESPONSE_server
    matches = validate(status_line_re, lines[0], "illegal status line: {!r}", lines[0])
  File "/usr/local/lib/python3.10/site-packages/h11/_util.py", line 91, in validate
    raise LocalProtocolError(msg)
h11._util.RemoteProtocolError: illegal status line: bytearray(b'POST /onvif/service\x00HTTP/1.1\x00\x00Host\x00 192.168.188.81:2020\x00\x00Accept\x00 */*\x00\x00Accept-Encoding\x00 gzip, deflate, br\x00\x00Connection\x00 keep-alive\x00\x00User-Agent\x00 ZHTTP/1.1 500 Internal Server Error')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions
    yield
  File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 353, in handle_async_request
    resp = await self._pool.handle_async_request(req)
  File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 253, in handle_async_request
    raise exc
  File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 237, in handle_async_request
    response = await connection.handle_async_request(request)
  File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 90, in handle_async_request
    return await self._connection.handle_async_request(request)
  File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 112, in handle_async_request
    raise exc
  File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 91, in handle_async_request
    ) = await self._receive_response_headers(**kwargs)
  File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 155, in _receive_response_headers
    event = await self._receive_event(timeout=timeout)
  File "/usr/local/lib/python3.10/site-packages/httpcore/_async/http11.py", line 187, in _receive_event
    with map_exceptions({h11.RemoteProtocolError: RemoteProtocolError}):
  File "/usr/local/lib/python3.10/contextlib.py", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/usr/local/lib/python3.10/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
    raise to_exc(exc)
httpcore.RemoteProtocolError: illegal status line: bytearray(b'POST /onvif/service\x00HTTP/1.1\x00\x00Host\x00 192.168.188.81:2020\x00\x00Accept\x00 */*\x00\x00Accept-Encoding\x00 gzip, deflate, br\x00\x00Connection\x00 keep-alive\x00\x00User-Agent\x00 ZHTTP/1.1 500 Internal Server Error')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 250, in _async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 206, in _async_update_data
    return await self.update_method()
  File "/config/custom_components/tapo_control/__init__.py", line 246, in async_update_data
    ] = await setupEvents(hass, entry)
  File "/config/custom_components/tapo_control/utils.py", line 701, in setupEvents
    if await events.async_start():
  File "/usr/src/homeassistant/homeassistant/components/onvif/event.py", line 89, in async_start
    if not await self.device.create_pullpoint_subscription():
  File "/usr/local/lib/python3.10/site-packages/onvif/client.py", line 350, in create_pullpoint_subscription
    pullpoint = await events.CreatePullPointSubscription()
  File "/usr/local/lib/python3.10/site-packages/zeep/proxy.py", line 64, in __call__
    return await self._proxy._binding.send_async(
  File "/usr/local/lib/python3.10/site-packages/zeep/wsdl/bindings/soap.py", line 156, in send_async
    response = await client.transport.post_xml(
  File "/usr/local/lib/python3.10/site-packages/zeep/transports.py", line 235, in post_xml
    response = await self.post(address, message, headers)
  File "/usr/local/lib/python3.10/site-packages/zeep/transports.py", line 220, in post
    response = await self.client.post(
  File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1848, in post
    return await self.request(
  File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1533, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1620, in send
    response = await self._send_handling_auth(
  File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1648, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1685, in _send_handling_redirects
    response = await self._send_single_request(request)
  File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1722, in _send_single_request
    response = await transport.handle_async_request(request)
  File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 352, in handle_async_request
    with map_httpcore_exceptions():
  File "/usr/local/lib/python3.10/contextlib.py", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.RemoteProtocolError: illegal status line: bytearray(b'POST /onvif/service\x00HTTP/1.1\x00\x00Host\x00 192.168.188.81:2020\x00\x00Accept\x00 */*\x00\x00Accept-Encoding\x00 gzip, deflate, br\x00\x00Connection\x00 keep-alive\x00\x00User-Agent\x00 ZHTTP/1.1 500 Internal Server Error')
2023-04-09 12:49:08.920 DEBUG (MainThread) [custom_components.tapo_control] Finished fetching Tapo resource status data in 0.129 seconds (success: False)

Second Log

second log after changing the onvif component:
2023-04-09 13:51:06.376 DEBUG (MainThread) [custom_components.tapo_control] Motion sensor or time sync is enabled.
2023-04-09 13:51:06.376 DEBUG (MainThread) [custom_components.tapo_control] Setting up subscription to motion sensor...
2023-04-09 13:51:06.376 DEBUG (MainThread) [custom_components.tapo_control] Initiating onvif.
2023-04-09 13:51:07.142 DEBUG (MainThread) [zeep.transports] HTTP Post to http://192.168.188.81:2020/onvif/device_service:
b'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<soap-env:Envelope xmlns:soap-env="http://www.w3.org/2003/05/soap-envelope"><soap-env:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:Action>http://www.onvif.org/ver10/device/wsdl/GetCapabilities</wsa:Action><wsa:MessageID>urn:uuid:296705db-e2ef-467c-a779-6f90eb07c6ed</wsa:MessageID><wsa:To>http://192.168.188.81:2020/onvif/device_service</wsa:To><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsse:UsernameToken><wsse:Username>hauser</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">ABZC7bUzfBrUjLCNMCLT0/2xcEY=</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">WpCLhrjfhamEHVeC8bUimw==</wsse:Nonce><wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2023-04-09T11:51:07+00:00</wsu:Created></wsse:UsernameToken></wsse:Security></soap-env:Header><soap-env:Body><ns0:GetCapabilities xmlns:ns0="http://www.onvif.org/ver10/device/wsdl"><ns0:Category>All</ns0:Category></ns0:GetCapabilities></soap-env:Body></soap-env:Envelope>'
2023-04-09 13:51:07.339 DEBUG (MainThread) [zeep.transports] HTTP Response from http://192.168.188.81:2020/onvif/device_service (status: 200):
b'<?xml version="1.0" encoding="UTF-8"?>\n<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:xmime="http://tempuri.org/xmime.xsd" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:tdn="http://www.onvif.org/ver10/network/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl"><SOAP-ENV:Header><wsa:MessageID>urn:uuid:296705db-e2ef-467c-a779-6f90eb07c6ed</wsa:MessageID><wsa:To SOAP-ENV:mustUnderstand="true">http://192.168.188.81:2020/onvif/device_service</wsa:To><wsa:Action SOAP-ENV:mustUnderstand="true">http://www.onvif.org/ver10/device/wsdl/GetCapabilities</wsa:Action></SOAP-ENV:Header><SOAP-ENV:Body><tds:GetCapabilitiesResponse><tds:Capabilities><tt:Analytics><tt:XAddr>http://192.168.188.81:2020/onvif/service</tt:XAddr><tt:RuleSupport>true</tt:RuleSupport><tt:AnalyticsModuleSupport>true</tt:AnalyticsModuleSupport></tt:Analytics><tt:Device><tt:XAddr>http://192.168.188.81:2020/onvif/service</tt:XAddr><tt:Network><tt:IPFilter>false</tt:IPFilter><tt:ZeroConfiguration>false</tt:ZeroConfiguration><tt:IPVersion6>false</tt:IPVersion6><tt:DynDNS>false</tt:DynDNS><tt:Extension><tt:Dot11Configuration>true</tt:Dot11Configuration></tt:Extension></tt:Network><tt:System><tt:DiscoveryResolve>false</tt:DiscoveryResolve><tt:DiscoveryBye>true</tt:DiscoveryBye><tt:RemoteDiscovery>false</tt:RemoteDiscovery><tt:SystemBackup>false</tt:SystemBackup><tt:SystemLogging>false</tt:SystemLogging><tt:FirmwareUpgrade>false</tt:FirmwareUpgrade><tt:SupportedVersions><tt:Major>20</tt:Major><tt:Minor>6</tt:Minor></tt:SupportedVersions><tt:Extension><tt:HttpFirmwareUpgrade>false</tt:HttpFirmwareUpgrade><tt:HttpSystemBackup>false</tt:HttpSystemBackup><tt:HttpSystemLogging>false</tt:HttpSystemLogging><tt:HttpSupportInformation>false</tt:HttpSupportInformation></tt:Extension></tt:System><tt:IO></tt:IO><tt:Security><tt:TLS1.1>false</tt:TLS1.1><tt:TLS1.2>false</tt:TLS1.2><tt:OnboardKeyGeneration>false</tt:OnboardKeyGeneration><tt:AccessPolicyConfig>false</tt:AccessPolicyConfig><tt:X.509Token>false</tt:X.509Token><tt:SAMLToken>false</tt:SAMLToken><tt:KerberosToken>false</tt:KerberosToken><tt:RELToken>false</tt:RELToken></tt:Security></tt:Device><tt:Events><tt:XAddr>http://192.168.188.81:2020/onvif/service</tt:XAddr><tt:WSSubscriptionPolicySupport>true</tt:WSSubscriptionPolicySupport><tt:WSPullPointSupport>true</tt:WSPullPointSupport><tt:WSPausableSubscriptionManagerInterfaceSupport>false</tt:WSPausableSubscriptionManagerInterfaceSupport></tt:Events><tt:Imaging><tt:XAddr>http://192.168.188.81:2020/onvif/service</tt:XAddr></tt:Imaging><tt:Media><tt:XAddr>http://192.168.188.81:2020/onvif/service</tt:XAddr><tt:StreamingCapabilities><tt:RTPMulticast>false</tt:RTPMulticast><tt:RTP_TCP>true</tt:RTP_TCP><tt:RTP_RTSP_TCP>true</tt:RTP_RTSP_TCP></tt:StreamingCapabilities></tt:Media><tt:Extension><tt:DeviceIO><tt:XAddr></tt:XAddr><tt:VideoSources>0</tt:VideoSources><tt:VideoOutputs>0</tt:VideoOutputs><tt:AudioSources>1</tt:AudioSources><tt:AudioOutputs>1</tt:AudioOutputs><tt:RelayOutputs>0</tt:RelayOutputs></tt:DeviceIO></tt:Extension></tds:Capabilities></tds:GetCapabilitiesResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>\r\n'
2023-04-09 13:51:07.355 DEBUG (MainThread) [zeep.transports] HTTP Post to http://192.168.188.81:2020/onvif/device_service:
b'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<soap-env:Envelope xmlns:soap-env="http://www.w3.org/2003/05/soap-envelope"><soap-env:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:Action>http://www.onvif.org/ver10/device/wsdl/GetDeviceInformation</wsa:Action><wsa:MessageID>urn:uuid:42f310dc-36cd-47d5-a840-b05a9c884f7c</wsa:MessageID><wsa:To>http://192.168.188.81:2020/onvif/device_service</wsa:To><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsse:UsernameToken><wsse:Username>hauser</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">i8YxUUC6e1oq5yMbjhjTU1PQKNE=</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">lnux9ELtQvTYAJLIkfgZOQ==</wsse:Nonce><wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2023-04-09T11:51:07+00:00</wsu:Created></wsse:UsernameToken></wsse:Security></soap-env:Header><soap-env:Body><ns0:GetDeviceInformation xmlns:ns0="http://www.onvif.org/ver10/device/wsdl"/></soap-env:Body></soap-env:Envelope>'
2023-04-09 13:51:07.394 DEBUG (MainThread) [zeep.transports] HTTP Response from http://192.168.188.81:2020/onvif/device_service (status: 200):
b'<?xml version="1.0" encoding="UTF-8"?>\n<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:xmime="http://tempuri.org/xmime.xsd" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:tdn="http://www.onvif.org/ver10/network/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl"><SOAP-ENV:Header><wsa:MessageID>urn:uuid:42f310dc-36cd-47d5-a840-b05a9c884f7c</wsa:MessageID><wsa:To SOAP-ENV:mustUnderstand="true">http://192.168.188.81:2020/onvif/device_service</wsa:To><wsa:Action SOAP-ENV:mustUnderstand="true">http://www.onvif.org/ver10/device/wsdl/GetDeviceInformation</wsa:Action></SOAP-ENV:Header><SOAP-ENV:Body><tds:GetDeviceInformationResponse><tds:Manufacturer>tp-link</tds:Manufacturer><tds:Model>Tapo C320WS</tds:Model><tds:FirmwareVersion>1.0.4 Build 221031 Rel.40874n</tds:FirmwareVersion><tds:SerialNumber>227673d8</tds:SerialNumber><tds:HardwareId>2.0</tds:HardwareId></tds:GetDeviceInformationResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>\r\n'
2023-04-09 13:51:07.399 DEBUG (MainThread) [custom_components.tapo_control] {'device': <onvif.client.ONVIFCamera object at 0x7f775cb760>, 'device_mgmt': <onvif.client.ONVIFService object at 0x7f8460c6a0>}
2023-04-09 13:51:07.399 DEBUG (MainThread) [custom_components.tapo_control] setupOnvif - entry
2023-04-09 13:51:07.399 DEBUG (MainThread) [custom_components.tapo_control] Setting up onvif...
2023-04-09 13:51:07.400 DEBUG (MainThread) [custom_components.tapo_control] setupEvents - entry
2023-04-09 13:51:07.400 DEBUG (MainThread) [custom_components.tapo_control] Setting up events...
2023-04-09 13:51:07.964 DEBUG (MainThread) [zeep.transports] HTTP Post to http://192.168.188.81:2020/onvif/service:
b'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<soap-env:Envelope xmlns:soap-env="http://www.w3.org/2003/05/soap-envelope"><soap-env:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:Action>http://www.onvif.org/ver10/events/wsdl/EventPortType/CreatePullPointSubscriptionRequest</wsa:Action><wsa:MessageID>urn:uuid:0d2ef27b-17df-48a3-9c0a-642f69f2e823</wsa:MessageID><wsa:To>http://192.168.188.81:2020/onvif/service</wsa:To><wsa:Action>http://www.onvif.org/ver10/events/wsdl/EventPortType/CreatePullPointSubscriptionRequest</wsa:Action><wsa:MessageID>urn:uuid:c3dacb59-0b6c-4088-b8c3-b35bb7445366</wsa:MessageID><wsa:To>http://192.168.188.81:2020/onvif/service</wsa:To><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsse:UsernameToken><wsse:Username>hauser</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">0l54vhjFkKjoeVNO9d05PkRHCeg=</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">4alg5WA6aoSii4ETyp4Z3A==</wsse:Nonce><wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2023-04-09T11:51:07+00:00</wsu:Created></wsse:UsernameToken></wsse:Security></soap-env:Header><soap-env:Body><ns0:CreatePullPointSubscription xmlns:ns0="http://www.onvif.org/ver10/events/wsdl"><ns0:InitialTerminationTime>PT2H</ns0:InitialTerminationTime></ns0:CreatePullPointSubscription></soap-env:Body></soap-env:Envelope>'
2023-04-09 13:51:08.247 DEBUG (MainThread) [zeep.transports] HTTP Response from http://192.168.188.81:2020/onvif/service (status: 200):
b'<?xml version="1.0" encoding="UTF-8"?>\n<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:xmime="http://tempuri.org/xmime.xsd" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:tdn="http://www.onvif.org/ver10/network/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl"><SOAP-ENV:Header><wsa:MessageID>urn:uuid:c3dacb59-0b6c-4088-b8c3-b35bb7445366</wsa:MessageID><wsa:To SOAP-ENV:mustUnderstand="true">http://192.168.188.81:2020/onvif/service</wsa:To><wsa:Action SOAP-ENV:mustUnderstand="true">http://www.onvif.org/ver10/events/wsdl/EventPortType/CreatePullPointSubscriptionRequest</wsa:Action><wsa5:Action SOAP-ENV:mustUnderstand="true">http://www.onvif.org/ver10/events/wsdl/EventPortType/CreatePullPointSubscriptionResponse</wsa5:Action></SOAP-ENV:Header><SOAP-ENV:Body><tev:CreatePullPointSubscriptionResponse><tev:SubscriptionReference><wsa5:Address>http://192.168.188.81:1024/event-1024_1024</wsa5:Address></tev:SubscriptionReference><wsnt:CurrentTime>2023-04-09T11:51:07Z</wsnt:CurrentTime><wsnt:TerminationTime>2023-04-09T13:51:07Z</wsnt:TerminationTime></tev:CreatePullPointSubscriptionResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>\r\n'
2023-04-09 13:51:09.236 DEBUG (MainThread) [zeep.transports] HTTP Post to http://192.168.188.81:1024/event-1024_1024:
b'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<soap-env:Envelope xmlns:soap-env="http://www.w3.org/2003/05/soap-envelope"><soap-env:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:Action>http://docs.oasis-open.org/wsn/bw-2/SubscriptionManager/RenewRequest</wsa:Action><wsa:MessageID>urn:uuid:89f7f366-a21b-4293-938f-47feeacf02dd</wsa:MessageID><wsa:To>http://192.168.188.81:1024/event-1024_1024</wsa:To><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsse:UsernameToken><wsse:Username>hauser</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">uu2qoHGN8XuxBBjyam1hR6aolp4=</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">wRiiMaZKTIPTgCrXXmm9oQ==</wsse:Nonce><wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2023-04-09T11:51:09+00:00</wsu:Created></wsse:UsernameToken></wsse:Security></soap-env:Header><soap-env:Body><ns0:Renew xmlns:ns0="http://docs.oasis-open.org/wsn/b-2"><ns0:TerminationTime>2023-04-10T11:51:09Z</ns0:TerminationTime></ns0:Renew></soap-env:Body></soap-env:Envelope>'
2023-04-09 13:51:09.276 DEBUG (MainThread) [zeep.transports] HTTP Response from http://192.168.188.81:1024/event-1024_1024 (status: 200):
b'<?xml version="1.0" encoding="UTF-8"?>\n<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:xmime="http://tempuri.org/xmime.xsd" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:tdn="http://www.onvif.org/ver10/network/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl"><SOAP-ENV:Header><wsa:MessageID>urn:uuid:89f7f366-a21b-4293-938f-47feeacf02dd</wsa:MessageID><wsa:To SOAP-ENV:mustUnderstand="true">http://192.168.188.81:1024/event-1024_1024</wsa:To><wsa:Action SOAP-ENV:mustUnderstand="true">http://docs.oasis-open.org/wsn/bw-2/SubscriptionManager/RenewRequest</wsa:Action><wsa5:Action SOAP-ENV:mustUnderstand="true">http://docs.oasis-open.org/wsn/bw-2/SubscriptionManager/RenewResponse</wsa5:Action></SOAP-ENV:Header><SOAP-ENV:Body><wsnt:RenewResponse><wsnt:TerminationTime>2023-04-10T11:51:09Z</wsnt:TerminationTime><wsnt:CurrentTime>2023-04-09T11:51:08Z</wsnt:CurrentTime></wsnt:RenewResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>\r\n'
2023-04-09 13:51:09.843 DEBUG (MainThread) [zeep.transports] HTTP Post to http://192.168.188.81:1024/event-1024_1024:
b'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<soap-env:Envelope xmlns:soap-env="http://www.w3.org/2003/05/soap-envelope"><soap-env:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:Action>http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/SetSynchronizationPointRequest</wsa:Action><wsa:MessageID>urn:uuid:fc2103e9-3273-42b2-9e84-e68d527beba5</wsa:MessageID><wsa:To>http://192.168.188.81:1024/event-1024_1024</wsa:To><wsa:Action>http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/SetSynchronizationPointRequest</wsa:Action><wsa:MessageID>urn:uuid:2f443faa-1cea-4ed4-8ac6-5458fdce85eb</wsa:MessageID><wsa:To>http://192.168.188.81:1024/event-1024_1024</wsa:To><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsse:UsernameToken><wsse:Username>hauser</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">GeH+t8F7o8kDLoKKp0UKetwJU7E=</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">F/4pPD6SaOUQMlTjqzNH/A==</wsse:Nonce><wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2023-04-09T11:51:09+00:00</wsu:Created></wsse:UsernameToken></wsse:Security></soap-env:Header><soap-env:Body><ns0:SetSynchronizationPoint xmlns:ns0="http://www.onvif.org/ver10/events/wsdl"/></soap-env:Body></soap-env:Envelope>'
2023-04-09 13:51:09.862 DEBUG (MainThread) [zeep.transports] HTTP Response from http://192.168.188.81:1024/event-1024_1024 (status: 200):
b'<?xml version="1.0" encoding="UTF-8"?>\n<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:xmime="http://tempuri.org/xmime.xsd" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:tdn="http://www.onvif.org/ver10/network/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl"><SOAP-ENV:Header><wsa:MessageID>urn:uuid:2f443faa-1cea-4ed4-8ac6-5458fdce85eb</wsa:MessageID><wsa:To SOAP-ENV:mustUnderstand="true">http://192.168.188.81:1024/event-1024_1024</wsa:To><wsa:Action SOAP-ENV:mustUnderstand="true">http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/SetSynchronizationPointRequest</wsa:Action><wsa5:Action SOAP-ENV:mustUnderstand="true">http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/SetSynchronizationPointResponse</wsa5:Action></SOAP-ENV:Header><SOAP-ENV:Body><tev:SetSynchronizationPointResponse></tev:SetSynchronizationPointResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>\r\n'
2023-04-09 13:51:09.868 DEBUG (MainThread) [zeep.transports] HTTP Post to http://192.168.188.81:1024/event-1024_1024:
b'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<soap-env:Envelope xmlns:soap-env="http://www.w3.org/2003/05/soap-envelope"><soap-env:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:Action>http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesRequest</wsa:Action><wsa:MessageID>urn:uuid:29a422b8-f44b-4dbc-887b-d0836aa78f8c</wsa:MessageID><wsa:To>http://192.168.188.81:1024/event-1024_1024</wsa:To><wsa:Action>http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesRequest</wsa:Action><wsa:MessageID>urn:uuid:9226e2cc-ee97-4772-9a5b-0f80304502c6</wsa:MessageID><wsa:To>http://192.168.188.81:1024/event-1024_1024</wsa:To><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsse:UsernameToken><wsse:Username>hauser</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">ew1yeS26YGMHcjFpWtFKZ0nB5hY=</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">rWS5xCurQwTvHy6rZrKTiQ==</wsse:Nonce><wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2023-04-09T11:51:09+00:00</wsu:Created></wsse:UsernameToken></wsse:Security></soap-env:Header><soap-env:Body><ns0:PullMessages xmlns:ns0="http://www.onvif.org/ver10/events/wsdl"><ns0:Timeout>PT5S</ns0:Timeout><ns0:MessageLimit>100</ns0:MessageLimit></ns0:PullMessages></soap-env:Body></soap-env:Envelope>'
2023-04-09 13:51:15.087 DEBUG (MainThread) [zeep.transports] HTTP Response from http://192.168.188.81:1024/event-1024_1024 (status: 200):
b'<?xml version="1.0" encoding="UTF-8"?>\n<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:xmime="http://tempuri.org/xmime.xsd" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:tdn="http://www.onvif.org/ver10/network/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl"><SOAP-ENV:Header><wsa:MessageID>urn:uuid:9226e2cc-ee97-4772-9a5b-0f80304502c6</wsa:MessageID><wsa:To SOAP-ENV:mustUnderstand="true">http://192.168.188.81:1024/event-1024_1024</wsa:To><wsa:Action SOAP-ENV:mustUnderstand="true">http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesRequest</wsa:Action><wsa5:Action SOAP-ENV:mustUnderstand="true">http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesResponse</wsa5:Action></SOAP-ENV:Header><SOAP-ENV:Body><tev:PullMessagesResponse><tev:CurrentTime>2023-04-09T11:51:09Z</tev:CurrentTime><tev:TerminationTime>2023-04-10T11:51:09Z</tev:TerminationTime></tev:PullMessagesResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>\r\n'
2023-04-09 13:51:15.093 DEBUG (MainThread) [custom_components.tapo_control] Events started.
2023-04-09 13:51:15.094 DEBUG (MainThread) [custom_components.tapo_control] Creating binary sensor entity.
2023-04-09 13:51:15.094 DEBUG (MainThread) [custom_components.tapo_control] Binary sensor creation for motion has been forwarded to component.
2023-04-09 13:51:15.094 DEBUG (MainThread) [custom_components.tapo_control] Initiating media cleanup for entity a351970a8d807a05bdddce118bdbe58c...
2023-04-09 13:51:15.094 DEBUG (MainThread) [custom_components.tapo_control] Deleting cold storage files older than 86400 seconds for entity a351970a8d807a05bdddce118bdbe58c...
2023-04-09 13:51:15.095 DEBUG (MainThread) [custom_components.tapo_control] Deleting hot storage files older than 3600 seconds for entity a351970a8d807a05bdddce118bdbe58c...
2023-04-09 13:51:15.197 DEBUG (MainThread) [custom_components.tapo_control] async_update_data - before someCameraEnabled check
2023-04-09 13:51:15.198 DEBUG (MainThread) [custom_components.tapo_control] <entity camera.tapocamera_hd_stream=idle>
2023-04-09 13:51:15.198 DEBUG (MainThread) [custom_components.tapo_control] async_update_data - enabling someCameraEnabled check
2023-04-09 13:51:15.198 DEBUG (MainThread) [custom_components.tapo_control] getCamData
2023-04-09 13:51:16.038 DEBUG (MainThread) [custom_components.tapo_control] Raw update data:
2023-04-09 13:51:16.038 DEBUG (MainThread) [custom_components.tapo_control] {'getDeviceInfo': {'device_info': {'basic_info': {'device_type': 'SMART.IPCAMERA', 'device_info': 'C320WS 2.0 IPC', 'features': 3, 'barcode': '', 'device_model': 'C320WS', 'sw_version': '1.0.4 Build 221031 Rel.40874n', 'device_name': 'C320WS 2.0', 'hw_version': '2.0', 'device_alias': 'TapoCamera', 'mobile_access': '0', 'mac': '9C-53-22-76-73-D8', 'dev_id': '802127B7ADD5DC17163833BC1FF03FBF20E04E2F', 'hw_id': '7CBEFF2024F8C58B8756345E724F7AF4', 'oem_id': 'D8DD33E50CAB9D9EDA7E5BF9C0D370C9', 'hw_desc': '00000000000000000000000000000000', 'manufacturer_name': 'TP-LINK', 'ffs': False, 'is_cal': True, 'avatar': 'camera c310', 'has_set_location_info': 1, 'longitude': 94656, 'latitude': 514256}}}, 'getDetectionConfig': {'motion_detection': {'motion_det': {'enabled': 'on', 'sensitivity': 'high', 'digital_sensitivity': '80', 'people_enabled': 'off', 'vehicle_enabled': 'off', 'non_vehicle_enabled': 'off'}}}, 'getPersonDetectionConfig': {'people_detection': {'detection': {'enabled': 'off', 'sensitivity': '60'}}}, 'getVehicleDetectionConfig': {'vehicle_detection': {'detection': {'enabled': 'off', 'sensitivity': '60'}}}, 'getBCDConfig': False, 'getPetDetectionConfig': False, 'getBarkDetectionConfig': False, 'getMeowDetectionConfig': False, 'getGlassDetectionConfig': False, 'getTamperDetectionConfig': {'tamper_detection': {'tamper_det': {'enabled': 'off', 'sensitivity': 'medium', 'digital_sensitivity': '50'}}}, 'getLensMaskConfig': {'lens_mask': {'lens_mask_info': {'enabled': 'off'}}}, 'getLdc': {'image': {'switch': {'schedule_end_time': '64800', 'schedule_start_time': '21600', 'clear_licence_plate_mode': 'off', 'switch_mode': 'common', 'rotate_type': 'off', 'flip_type': 'off', 'ldc': 'off', 'night_vision_mode': 'md_night_vision', 'full_color_people_enhance': 'off', 'full_color_min_keep_time': '5', 'wtl_intensity_level': '3', 'wtl_force_time': '300', 'overexposure_people_suppression': 'off', 'best_view_distance': '0', 'image_scene_mode': 'normal', 'image_scene_mode_common': 'normal', 'image_scene_mode_shedday': 'normal', 'image_scene_mode_shednight': 'normal', 'image_scene_mode_autoday': 'normal', 'image_scene_mode_autonight': 'normal'}, 'common': {'chroma': '50', 'luma': '50', 'sharpness': '50', 'saturation': '50', 'contrast': '50', 'inf_delay': '5', 'wd_gain': '50', 'exp_gain': '0', 'smartir_level': '0', 'auto_exp_gain_max': '0', 'wb_R_gain': '50', 'wb_B_gain': '50', 'wb_G_gain': '50', 'wtl_sensitivity': '4', 'wtl_delay': '5', 'wtl_sensitivity_day2night': '1400', 'wtl_sensitivity_night2day': '9100', 'iris_level': '160', 'lock_red_gain': '0', 'lock_gr_gain': '0', 'lock_gb_gain': '0', 'lock_blue_gain': '0', 'lock_red_colton': '0', 'lock_green_colton': '0', 'lock_blue_colton': '0', 'focus_limited': '10', 'inf_start_time': '64800', 'inf_end_time': '21600', 'wtl_start_time': '64800', 'wtl_end_time': '21600', 'inf_sensitivity_day2night': '1400', 'inf_sensitivity_night2day': '9100', 'wide_dynamic': 'off', 'high_light_compensation': 'off', 'dehaze': 'off', 'eis': 'off', 'auto_exp_antiflicker': 'off', 'inf_type': 'auto', 'inf_sensitivity': '4', 'wtl_type': 'auto', 'backlight': 'off', 'area_compensation': 'default', 'smartir': 'auto_ir', 'exp_type': 'auto', 'exp_level': '0', 'shutter': '1/25', 'focus_type': 'manual', 'wb_type': 'auto', 'lock_source': 'local', 'smartwtl': 'auto_wtl', 'smartwtl_level': '5', 'smartwtl_digital_level': '100', 'light_freq_mode': 'auto'}}}, 'getLastAlarmInfo': {'msg_alarm': {'chn1_msg_alarm_info': {'enabled': 'off', 'light_alarm_enabled': 'on', 'alarm_mode': ['light', 'sound'], 'alarm_type': '0', 'light_type': '0', 'sound_alarm_enabled': 'on'}}}, 'getLedStatus': {'led': {'config': {'enabled': 'on'}}}, 'getTargetTrackConfig': False, 'getPresetConfig': False, 'getFirmwareUpdateStatus': {'cloud_config': {'upgrade_status': {'state': 'normal', 'lastUpgradingSuccess': True}}}, 'getMediaEncrypt': {'cet': {'media_encrypt': {'enabled': 'on'}}}, 'getConnectionType': {'link_type': 'wifi', 'ssid': 'DarkNet', 'rssiValue': -57, 'rssi': '3'}, 'getAlarmConfig': False, 'getAlarmPlan': False, 'getSirenTypeList': False, 'getLightTypeList': False, 'getSirenStatus': False, 'getLightFrequencyInfo': {'image': {'common': {'chroma': '50', 'luma': '50', 'sharpness': '50', 'saturation': '50', 'contrast': '50', 'inf_delay': '5', 'wd_gain': '50', 'exp_gain': '0', 'smartir_level': '0', 'auto_exp_gain_max': '0', 'wb_R_gain': '50', 'wb_B_gain': '50', 'wb_G_gain': '50', 'wtl_sensitivity': '4', 'wtl_delay': '5', 'wtl_sensitivity_day2night': '1400', 'wtl_sensitivity_night2day': '9100', 'iris_level': '160', 'lock_red_gain': '0', 'lock_gr_gain': '0', 'lock_gb_gain': '0', 'lock_blue_gain': '0', 'lock_red_colton': '0', 'lock_green_colton': '0', 'lock_blue_colton': '0', 'focus_limited': '10', 'inf_start_time': '64800', 'inf_end_time': '21600', 'wtl_start_time': '64800', 'wtl_end_time': '21600', 'inf_sensitivity_day2night': '1400', 'inf_sensitivity_night2day': '9100', 'wide_dynamic': 'off', 'high_light_compensation': 'off', 'dehaze': 'off', 'eis': 'off', 'auto_exp_antiflicker': 'off', 'inf_type': 'auto', 'inf_sensitivity': '4', 'wtl_type': 'auto', 'backlight': 'off', 'area_compensation': 'default', 'smartir': 'auto_ir', 'exp_type': 'auto', 'exp_level': '0', 'shutter': '1/25', 'focus_type': 'manual', 'wb_type': 'auto', 'lock_source': 'local', 'smartwtl': 'auto_wtl', 'smartwtl_level': '5', 'smartwtl_digital_level': '100', 'light_freq_mode': 'auto'}}}, 'getLightFrequencyCapability': False, 'getChildDeviceList': False, 'getRotationStatus': {'image': {'switch': {'schedule_end_time': '64800', 'schedule_start_time': '21600', 'clear_licence_plate_mode': 'off', 'switch_mode': 'common', 'rotate_type': 'off', 'flip_type': 'off', 'ldc': 'off', 'night_vision_mode': 'md_night_vision', 'full_color_people_enhance': 'off', 'full_color_min_keep_time': '5', 'wtl_intensity_level': '3', 'wtl_force_time': '300', 'overexposure_people_suppression': 'off', 'best_view_distance': '0', 'image_scene_mode': 'normal', 'image_scene_mode_common': 'normal', 'image_scene_mode_shedday': 'normal', 'image_scene_mode_shednight': 'normal', 'image_scene_mode_autoday': 'normal', 'image_scene_mode_autonight': 'normal'}}}, 'getNightVisionModeConfig': {'image': {'switch': {'schedule_end_time': '64800', 'schedule_start_time': '21600', 'clear_licence_plate_mode': 'off', 'switch_mode': 'common', 'rotate_type': 'off', 'flip_type': 'off', 'ldc': 'off', 'night_vision_mode': 'md_night_vision', 'full_color_people_enhance': 'off', 'full_color_min_keep_time': '5', 'wtl_intensity_level': '3', 'wtl_force_time': '300', 'overexposure_people_suppression': 'off', 'best_view_distance': '0', 'image_scene_mode': 'normal', 'image_scene_mode_common': 'normal', 'image_scene_mode_shedday': 'normal', 'image_scene_mode_shednight': 'normal', 'image_scene_mode_autoday': 'normal', 'image_scene_mode_autonight': 'normal'}}}}
2023-04-09 13:51:16.039 DEBUG (MainThread) [custom_components.tapo_control] getCamData - done
2023-04-09 13:51:16.039 DEBUG (MainThread) [custom_components.tapo_control] Processed update data:
2023-04-09 13:51:16.039 DEBUG (MainThread) [custom_components.tapo_control] {'raw': {'getDeviceInfo': {'device_info': {'basic_info': {'device_type': 'SMART.IPCAMERA', 'device_info': 'C320WS 2.0 IPC', 'features': 3, 'barcode': '', 'device_model': 'C320WS', 'sw_version': '1.0.4 Build 221031 Rel.40874n', 'device_name': 'C320WS 2.0', 'hw_version': '2.0', 'device_alias': 'TapoCamera', 'mobile_access': '0', 'mac': '9C-53-22-76-73-D8', 'dev_id': '802127B7ADD5DC17163833BC1FF03FBF20E04E2F', 'hw_id': '7CBEFF2024F8C58B8756345E724F7AF4', 'oem_id': 'D8DD33E50CAB9D9EDA7E5BF9C0D370C9', 'hw_desc': '00000000000000000000000000000000', 'manufacturer_name': 'TP-LINK', 'ffs': False, 'is_cal': True, 'avatar': 'camera c310', 'has_set_location_info': 1, 'longitude': 94656, 'latitude': 514256}}}, 'getDetectionConfig': {'motion_detection': {'motion_det': {'enabled': 'on', 'sensitivity': 'high', 'digital_sensitivity': '80', 'people_enabled': 'off', 'vehicle_enabled': 'off', 'non_vehicle_enabled': 'off'}}}, 'getPersonDetectionConfig': {'people_detection': {'detection': {'enabled': 'off', 'sensitivity': '60'}}}, 'getVehicleDetectionConfig': {'vehicle_detection': {'detection': {'enabled': 'off', 'sensitivity': '60'}}}, 'getBCDConfig': False, 'getPetDetectionConfig': False, 'getBarkDetectionConfig': False, 'getMeowDetectionConfig': False, 'getGlassDetectionConfig': False, 'getTamperDetectionConfig': {'tamper_detection': {'tamper_det': {'enabled': 'off', 'sensitivity': 'medium', 'digital_sensitivity': '50'}}}, 'getLensMaskConfig': {'lens_mask': {'lens_mask_info': {'enabled': 'off'}}}, 'getLdc': {'image': {'switch': {'schedule_end_time': '64800', 'schedule_start_time': '21600', 'clear_licence_plate_mode': 'off', 'switch_mode': 'common', 'rotate_type': 'off', 'flip_type': 'off', 'ldc': 'off', 'night_vision_mode': 'md_night_vision', 'full_color_people_enhance': 'off', 'full_color_min_keep_time': '5', 'wtl_intensity_level': '3', 'wtl_force_time': '300', 'overexposure_people_suppression': 'off', 'best_view_distance': '0', 'image_scene_mode': 'normal', 'image_scene_mode_common': 'normal', 'image_scene_mode_shedday': 'normal', 'image_scene_mode_shednight': 'normal', 'image_scene_mode_autoday': 'normal', 'image_scene_mode_autonight': 'normal'}, 'common': {'chroma': '50', 'luma': '50', 'sharpness': '50', 'saturation': '50', 'contrast': '50', 'inf_delay': '5', 'wd_gain': '50', 'exp_gain': '0', 'smartir_level': '0', 'auto_exp_gain_max': '0', 'wb_R_gain': '50', 'wb_B_gain': '50', 'wb_G_gain': '50', 'wtl_sensitivity': '4', 'wtl_delay': '5', 'wtl_sensitivity_day2night': '1400', 'wtl_sensitivity_night2day': '9100', 'iris_level': '160', 'lock_red_gain': '0', 'lock_gr_gain': '0', 'lock_gb_gain': '0', 'lock_blue_gain': '0', 'lock_red_colton': '0', 'lock_green_colton': '0', 'lock_blue_colton': '0', 'focus_limited': '10', 'inf_start_time': '64800', 'inf_end_time': '21600', 'wtl_start_time': '64800', 'wtl_end_time': '21600', 'inf_sensitivity_day2night': '1400', 'inf_sensitivity_night2day': '9100', 'wide_dynamic': 'off', 'high_light_compensation': 'off', 'dehaze': 'off', 'eis': 'off', 'auto_exp_antiflicker': 'off', 'inf_type': 'auto', 'inf_sensitivity': '4', 'wtl_type': 'auto', 'backlight': 'off', 'area_compensation': 'default', 'smartir': 'auto_ir', 'exp_type': 'auto', 'exp_level': '0', 'shutter': '1/25', 'focus_type': 'manual', 'wb_type': 'auto', 'lock_source': 'local', 'smartwtl': 'auto_wtl', 'smartwtl_level': '5', 'smartwtl_digital_level': '100', 'light_freq_mode': 'auto'}}}, 'getLastAlarmInfo': {'msg_alarm': {'chn1_msg_alarm_info': {'enabled': 'off', 'light_alarm_enabled': 'on', 'alarm_mode': ['light', 'sound'], 'alarm_type': '0', 'light_type': '0', 'sound_alarm_enabled': 'on'}}}, 'getLedStatus': {'led': {'config': {'enabled': 'on'}}}, 'getTargetTrackConfig': False, 'getPresetConfig': False, 'getFirmwareUpdateStatus': {'cloud_config': {'upgrade_status': {'state': 'normal', 'lastUpgradingSuccess': True}}}, 'getMediaEncrypt': {'cet': {'media_encrypt': {'enabled': 'on'}}}, 'getConnectionType': {'link_type': 'wifi', 'ssid': 'DarkNet', 'rssiValue': -57, 'rssi': '3'}, 'getAlarmConfig': False, 'getAlarmPlan': False, 'getSirenTypeList': False, 'getLightTypeList': False, 'getSirenStatus': False, 'getLightFrequencyInfo': {'image': {'common': {'chroma': '50', 'luma': '50', 'sharpness': '50', 'saturation': '50', 'contrast': '50', 'inf_delay': '5', 'wd_gain': '50', 'exp_gain': '0', 'smartir_level': '0', 'auto_exp_gain_max': '0', 'wb_R_gain': '50', 'wb_B_gain': '50', 'wb_G_gain': '50', 'wtl_sensitivity': '4', 'wtl_delay': '5', 'wtl_sensitivity_day2night': '1400', 'wtl_sensitivity_night2day': '9100', 'iris_level': '160', 'lock_red_gain': '0', 'lock_gr_gain': '0', 'lock_gb_gain': '0', 'lock_blue_gain': '0', 'lock_red_colton': '0', 'lock_green_colton': '0', 'lock_blue_colton': '0', 'focus_limited': '10', 'inf_start_time': '64800', 'inf_end_time': '21600', 'wtl_start_time': '64800', 'wtl_end_time': '21600', 'inf_sensitivity_day2night': '1400', 'inf_sensitivity_night2day': '9100', 'wide_dynamic': 'off', 'high_light_compensation': 'off', 'dehaze': 'off', 'eis': 'off', 'auto_exp_antiflicker': 'off', 'inf_type': 'auto', 'inf_sensitivity': '4', 'wtl_type': 'auto', 'backlight': 'off', 'area_compensation': 'default', 'smartir': 'auto_ir', 'exp_type': 'auto', 'exp_level': '0', 'shutter': '1/25', 'focus_type': 'manual', 'wb_type': 'auto', 'lock_source': 'local', 'smartwtl': 'auto_wtl', 'smartwtl_level': '5', 'smartwtl_digital_level': '100', 'light_freq_mode': 'auto'}}}, 'getLightFrequencyCapability': False, 'getChildDeviceList': False, 'getRotationStatus': {'image': {'switch': {'schedule_end_time': '64800', 'schedule_start_time': '21600', 'clear_licence_plate_mode': 'off', 'switch_mode': 'common', 'rotate_type': 'off', 'flip_type': 'off', 'ldc': 'off', 'night_vision_mode': 'md_night_vision', 'full_color_people_enhance': 'off', 'full_color_min_keep_time': '5', 'wtl_intensity_level': '3', 'wtl_force_time': '300', 'overexposure_people_suppression': 'off', 'best_view_distance': '0', 'image_scene_mode': 'normal', 'image_scene_mode_common': 'normal', 'image_scene_mode_shedday': 'normal', 'image_scene_mode_shednight': 'normal', 'image_scene_mode_autoday': 'normal', 'image_scene_mode_autonight': 'normal'}}}, 'getNightVisionModeConfig': {'image': {'switch': {'schedule_end_time': '64800', 'schedule_start_time': '21600', 'clear_licence_plate_mode': 'off', 'switch_mode': 'common', 'rotate_type': 'off', 'flip_type': 'off', 'ldc': 'off', 'night_vision_mode': 'md_night_vision', 'full_color_people_enhance': 'off', 'full_color_min_keep_time': '5', 'wtl_intensity_level': '3', 'wtl_force_time': '300', 'overexposure_people_suppression': 'off', 'best_view_distance': '0', 'image_scene_mode': 'normal', 'image_scene_mode_common': 'normal', 'image_scene_mode_shedday': 'normal', 'image_scene_mode_shednight': 'normal', 'image_scene_mode_autoday': 'normal', 'image_scene_mode_autonight': 'normal'}}}}, 'user': 'admin', 'basic_info': {'device_type': 'SMART.IPCAMERA', 'device_info': 'C320WS 2.0 IPC', 'features': 3, 'barcode': '', 'device_model': 'C320WS', 'sw_version': '1.0.4 Build 221031 Rel.40874n', 'device_name': 'C320WS 2.0', 'hw_version': '2.0', 'device_alias': 'TapoCamera', 'mobile_access': '0', 'mac': '9C-53-22-76-73-D8', 'dev_id': '802127B7ADD5DC17163833BC1FF03FBF20E04E2F', 'hw_id': '7CBEFF2024F8C58B8756345E724F7AF4', 'oem_id': 'D8DD33E50CAB9D9EDA7E5BF9C0D370C9', 'hw_desc': '00000000000000000000000000000000', 'manufacturer_name': 'TP-LINK', 'ffs': False, 'is_cal': True, 'avatar': 'camera c310', 'has_set_location_info': 1, 'longitude': 94656, 'latitude': 514256}, 'motion_detection_enabled': 'on', 'motion_detection_sensitivity': 'high', 'person_detection_enabled': 'off', 'person_detection_sensitivity': 'normal', 'vehicle_detection_enabled': 'off', 'vehicle_detection_sensitivity': 'normal', 'babyCry_detection_enabled': None, 'babyCry_detection_sensitivity': None, 'pet_detection_enabled': None, 'pet_detection_sensitivity': None, 'bark_detection_enabled': None, 'bark_detection_sensitivity': None, 'meow_detection_enabled': None, 'meow_detection_sensitivity': None, 'glass_detection_enabled': None, 'glass_detection_sensitivity': None, 'tamper_detection_enabled': 'off', 'tamper_detection_sensitivity': 'high', 'privacy_mode': 'off', 'lens_distrotion_correction': 'off', 'light_frequency_mode': 'auto', 'day_night_mode': 'auto', 'force_white_lamp_state': None, 'flip': 'off', 'alarm': 'off', 'alarm_mode': ['light', 'sound'], 'led': 'on', 'auto_track': None, 'presets': {}, 'firmwareUpdateStatus': {'upgrade_status': {'state': 'normal', 'lastUpgradingSuccess': True}}, 'childDevices': False}
2023-04-09 13:51:16.040 DEBUG (MainThread) [custom_components.tapo_control] Updating entities...```
</details>

bdraco added a commit that referenced this issue Apr 15, 2023
balloob pushed a commit that referenced this issue Apr 15, 2023
…me is required (#91470)

* Fix creating onvif pull point subscriptions when InitialTerminationTime is required

fixes #85902

* Bump again because I got it wrong the first time.. this is why retest is good
frenck pushed a commit that referenced this issue Apr 17, 2023
…me is required (#91470)

* Fix creating onvif pull point subscriptions when InitialTerminationTime is required

fixes #85902

* Bump again because I got it wrong the first time.. this is why retest is good
@bdraco
Copy link
Member

bdraco commented Apr 18, 2023

These camera run out of subscriptions quickly. #91485 should help with that

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.