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

Binary sensor in ONVIF integration not available after last update with Bosch FLEXIDOME IP turret 3000i IR #91089

Closed
lucabress opened this issue Apr 8, 2023 · 98 comments · Fixed by #92711, #96560 or #96377

Comments

@lucabress
Copy link

The problem

Hi after the last update 2023.4, the binary sensors that are part of the ONVIF integration of my IP cams (Bosch) are no longer available (digital input, really triggered, motion detection)

What version of Home Assistant Core has the issue?

core-2023.4.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

ONVIF

Link to integration documentation on our website

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

Diagnostics information

config_entry-onvif-1b56b8f1e3dba44312f93d9deec90f3b.json.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Apr 8, 2023

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 Renames 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)

@bdraco
Copy link
Member

bdraco commented Apr 9, 2023

Please post debug logs using the troubleshooting steps here

https://www.home-assistant.io/docs/configuration/troubleshooting/#debug-logs-and-diagnostics

@lucabress
Copy link
Author

@bdraco
Copy link
Member

bdraco commented Apr 14, 2023

2023-04-09 19:02:07.545 ERROR (MainThread) [zeep.xsd.types.simple] Error during xml -> python translation
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/zeep/xsd/types/simple.py", line 79, in parse_xmlelement
    return self.pythonvalue(xmlelement.text)
  File "/usr/local/lib/python3.10/site-packages/zeep/xsd/types/builtins.py", line 44, in _wrapper
    return func(self, re.sub(r"[\n\r\t ]", " ", value).strip())
  File "/usr/local/lib/python3.10/site-packages/zeep/xsd/types/builtins.py", line 180, in pythonvalue
    return isodate.parse_datetime(value)
  File "/usr/local/lib/python3.10/site-packages/isodate/isodatetime.py", line 56, in parse_datetime
    tmptime = parse_time(timestring)
  File "/usr/local/lib/python3.10/site-packages/isodate/isotime.py", line 148, in parse_time
    raise ISO8601Error('Unrecognised ISO 8601 time format: %r' % timestring)
isodate.isoerror.ISO8601Error: Unrecognised ISO 8601 time format: '-07:03:03Z'
2023-04-09 19:02:07.547 ERROR (MainThread) [zeep.xsd.types.simple] Error during xml -> python translation
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/zeep/xsd/types/simple.py", line 79, in parse_xmlelement
    return self.pythonvalue(xmlelement.text)
  File "/usr/local/lib/python3.10/site-packages/zeep/xsd/types/builtins.py", line 44, in _wrapper
    return func(self, re.sub(r"[\n\r\t ]", " ", value).strip())
  File "/usr/local/lib/python3.10/site-packages/zeep/xsd/types/builtins.py", line 180, in pythonvalue
    return isodate.parse_datetime(value)
  File "/usr/local/lib/python3.10/site-packages/isodate/isodatetime.py", line 56, in parse_datetime
    tmptime = parse_time(timestring)
  File "/usr/local/lib/python3.10/site-packages/isodate/isotime.py", line 148, in parse_time
    raise ISO8601Error('Unrecognised ISO 8601 time format: %r' % timestring)
isodate.isoerror.ISO8601Error: Unrecognised ISO 8601 time format: '-07:02:03Z'

@bdraco
Copy link
Member

bdraco commented Apr 14, 2023

It looks like the camera is sending an invalid time stamp which is tripping up the XML parser

@lucabress
Copy link
Author

Ok, thanks, what can I do? I did various tests such as disabling and changing the NTP invert month and day I also updated the camera to the latest firmware but the problem remains...

@bdraco
Copy link
Member

bdraco commented Apr 15, 2023

The expected datetime format is
%Y-%m-%dT%H:%M:%S.%f%Z ex 2023-04-10T04:00:32Z

It looks like your camera sends the datetime as
%Y-%m-%d-%H:%M:%S.%f%Z ex 2023-04-10-04:00:32Z

There is a - where it should be sending a T

This is likely a bug in the firmware of the camera.

@bdraco
Copy link
Member

bdraco commented Apr 15, 2023

I opened a PR to zeep to handle this

mvantellingen/python-zeep#1370

I have other PRs waiting so it might be a few months before they merge the workaround.

@bdraco
Copy link
Member

bdraco commented Apr 15, 2023

I'd try to get the camera vendor to fix their firmware in the meantime

@bdraco bdraco changed the title Binary sensor in ONVIF integration not available after last update Binary sensor in ONVIF integration not available after last update with Bosch FLEXIDOME IP turret 3000i IR Apr 15, 2023
@bdraco
Copy link
Member

bdraco commented Apr 18, 2023

Please try 2023.4.5

#91485 will add support for webhooks which might work around this problem if 2023.4.5 doesn't fix it

@lucabress
Copy link
Author

Hi, sorry but I can only answer now, thanks for all the support and interest you are giving me, anyway even after the last update 2023.4.5 the entities still doesn't work...

@bdraco
Copy link
Member

bdraco commented Apr 19, 2023

#37545 (comment)

@lucabress
Copy link
Author

Tried but the problem remains :(

@bdraco
Copy link
Member

bdraco commented Apr 19, 2023

I think we are going to have to wait for the vendor to fix the firmware or mvantellingen/python-zeep#1370 to merge and release the workaround

@lucabress
Copy link
Author

I think the vendor's firmware is ok from a certain point of view because everything worked until a month ago, I ran an update after finding the problem... hopefully the next updates will fix something, thanks again

@bdraco
Copy link
Member

bdraco commented Apr 19, 2023

Can you downgrade the firmware to the previous version?

@lucabress
Copy link
Author

lucabress commented Apr 20, 2023

i’ve just do the downgrade, it works…
Ps downgrade to 2023.3.5

@bdraco
Copy link
Member

bdraco commented Apr 21, 2023

mkdir -p /config/custom_components
cd /config/custom_components
git clone https://github.com/bdraco/onvif
cd /config/custom_components/onvif
git pull
git log -1

This version should work better with cameras with broken timezone handling.

@lucabress
Copy link
Author

upgraded to 2023.4.6 and the problem reoccurred, performed the above but the problem remains...

@bdraco
Copy link
Member

bdraco commented Apr 23, 2023

I'm not having any luck figuring out a solution here as the zeep logging doesn't give another trace data.

I ended up ordered the camera to see if I can come up with a workaround

@bdraco bdraco added the problem in device Issue lies within the device, such firmware, software, or user customization/config label Apr 23, 2023
@lucabress
Copy link
Author

Ok, thank you!
I am currently working with the 2023.3.5 and everything continues to work fine, as soon as I can I will install HA in my old raspberry, in order to comfortably try the next releases, if I can help you in any way let me know, thanks again for the support and the interest!

@bdraco
Copy link
Member

bdraco commented May 4, 2023

There are some more fixes in 2023.5.x from other camera I received over the last few weeks. That might help, but if not the debug logs should give a lot more information

@lucabress
Copy link
Author

Hi, I tried update 2023.5.0

The problem apparently seemed solved because it sees the "digital input" entity (the entity that interests me the most) but in reality it doesn't read it correctly, because it doesn't see the change from on to off

In addition to this, it asked to reconfigure my 2 Hikvision ipcams, I re-enter th
e credentials but it still gives me an error, so the 2 ipcams remain unavailable 😩😩😩

Back to 2023.3.5 and all back to work

Attached are the debugs

config_entry-onvif-1b56b8f1e3dba44312f93d9deec90f3b.json.txt

home-assistant_onvif_2023-05-04T20-23-34.843Z.log

home-assistant_onvif_2023-05-04T20-24-44.768Z.log

@bdraco
Copy link
Member

bdraco commented May 4, 2023

It looks like you still have the custom version in there

2023-05-04 22:21:23.526 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration onvif which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-05-04 22:21:23.526 ERROR (SyncWorker_2) [homeassistant.loader] The custom integration 'onvif' does not have a version key in the manifest file and was blocked from loading. See https://developers.home-assistant.io/blog/2021/01/29/custom-integration-changes#versions for more details

Can you try taking it out and try again?

@lucabress
Copy link
Author

Ok, how do I get it off like you say?

However, I tried again to delete the bosch camera and reintegrate it, the entities disappear as in previous updates

regarding hikvision continues authentication error

@bdraco
Copy link
Member

bdraco commented Jul 11, 2023

First observation when testing the 2023.3.5 package with that system:

  • The camera definitely supports PullPoint even though it claims it does not

bdraco added a commit that referenced this issue Jul 11, 2023
Some AXIS and Bosch (#91089) cameras report they do not support
PullPoint but they really do. The only way to know is try.
@bdraco
Copy link
Member

bdraco commented Jul 13, 2023

It works as expected with the 2023.3.5 code running on top of 2023.7.1. The renew gets rejected with the new code which explains why the updates stop flowing but I haven't figured out why yet. It might be the WSAs

@bdraco
Copy link
Member

bdraco commented Jul 14, 2023

#96377 gets pull point going for the camera, but it ends up in a failed state. Working though that problem now

      "pullpoint_manager_state": {
        "__type": "<enum 'PullPointManagerState'>",
        "repr": "<PullPointManagerState.FAILED: 3>"
      }

@bdraco
Copy link
Member

bdraco commented Jul 14, 2023

2023-07-15 00:40:30.491 DEBUG (MainThread) [zeep.transports] HTTP Post to http://192.168.0.101/onvif/event_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:30a8b33c-45a3-47e8-9b76-42e609f1236e</wsa:MessageID><wsa:To>http://192.168.0.101/onvif/event_service</wsa:To><wsa:Action>http://www.onvif.org/ver10/events/wsdl/EventPortType/CreatePullPointSubscriptionRequest</wsa:Action><wsa:MessageID>urn:uuid:fd5771f2-a725-4d0f-8fdc-1062b00510ed</wsa:MessageID><wsa:To>http://192.168.0.101/onvif/event_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>cameratest</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">LdTNH2mnPz4Cr0E1eFx7AFzQWGw=</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">YtW6kFenKajkIK/7hIdXgg==</wsse:Nonce><wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2023-07-14T22:40:30+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>PT600S</ns0:InitialTerminationTime></ns0:CreatePullPointSubscription></soap-env:Body></soap-env:Envelope>'
2023-07-15 00:40:30.528 INFO (MainThread) [httpx] HTTP Request: POST http://192.168.0.101/onvif/event_service "HTTP/1.1 401 Unauthorized"
2023-07-15 00:40:30.531 DEBUG (MainThread) [zeep.transports] HTTP Response from http://192.168.0.101/onvif/event_service (status: 401):
b'<?xml version="1.0" encoding="UTF-8"?><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:ter="http://www.onvif.org/ver10/error"><SOAP-ENV:Body><SOAP-ENV:Fault><SOAP-ENV:Code><SOAP-ENV:Value>SOAP-ENV:Sender</SOAP-ENV:Value><SOAP-ENV:Subcode><SOAP-ENV:Value>ter:NotAuthorized</SOAP-ENV:Value></SOAP-ENV:Subcode></SOAP-ENV:Code><SOAP-ENV:Reason><SOAP-ENV:Text xml:lang="en">The requested action requires authorization</SOAP-ENV:Text></SOAP-ENV:Reason><SOAP-ENV:Node>http://www.w3.org/2003/05/soap-envelope/node/ultimateReceiver</SOAP-ENV:Node><SOAP-ENV:Role>http://www.w3.org/2003/05/soap-envelope/node/ultimateReceiver</SOAP-ENV:Role></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>'
2023-07-15 00:40:30.536 DEBUG (MainThread) [custom_components.onvif] Test: Device does not support PullPoint service or has too many subscriptions: The requested action requires authorization (code:SOAP-ENV:Sender) (subcodes:{http://www.onvif.org/ver10/error}NotAuthorized)

The camera rejects the request with a 401 with the newer code

@bdraco
Copy link
Member

bdraco commented Jul 14, 2023

Here is the old code

2023-07-15 00:48:56.320 DEBUG (MainThread) [zeep.transports] HTTP Post to http://192.168.0.101/onvif/event_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:f69a4105-a457-4dae-aff8-e6b585116025</wsa:MessageID><wsa:To>http://192.168.0.101/onvif/event_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>cameratest</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">jEZUv6xUOq5eMQEUGYbYQSEAsVs=</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">gIA7iYacBxe9SQLjBMJIlA==</wsse:Nonce><wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2023-07-14T22:48:56+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-07-15 00:48:56.375 INFO (MainThread) [httpx] HTTP Request: POST http://192.168.0.101/onvif/event_service "HTTP/1.1 200 OK"
2023-07-15 00:48:56.378 DEBUG (MainThread) [zeep.transports] HTTP Response from http://192.168.0.101/onvif/event_service (status: 200):
b'<?xml version="1.0" encoding="UTF-8"?><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:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:tns1="http://www.onvif.org/ver10/topics"><SOAP-ENV:Header><wsa5:Action>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.0.101/Web_Service?Idx=0</wsa5:Address></tev:SubscriptionReference><wsnt:CurrentTime>2023-07-14T22:48:56Z</wsnt:CurrentTime><wsnt:TerminationTime>2023-07-14T22:49:56Z</wsnt:TerminationTime></tev:CreatePullPointSubscriptionResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>'

No 401

@bdraco
Copy link
Member

bdraco commented Jul 14, 2023

It looks like the WSA are being duplicated !

<wsa:Action>http://www.onvif.org/ver10/events/wsdl/EventPortType/CreatePullPointSubscriptionRequest</wsa:Action><wsa:MessageID>urn:uuid:30a8b33c-45a3-47e8-9b76-42e609f1236e</wsa:MessageID><wsa:To>http://192.168.0.101/onvif/event_service</wsa:To><wsa:Action>http://www.onvif.org/ver10/events/wsdl/EventPortType/CreatePullPointSubscriptionRequest</wsa:Action><wsa:MessageID>urn:uuid:fd5771f2-a725-4d0f-8fdc-1062b00510ed</wsa:MessageID><wsa:To>http://192.168.0.101/onvif/event_service</wsa:To>

@bdraco
Copy link
Member

bdraco commented Jul 14, 2023

I was really hoping it would fail with one of my local cameras but I can't get it to fail even with the duplication

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:83657212-3886-4473-b9f0-842af8360615</wsa:MessageID><wsa:To>http://192.168.106.160:2020/onvif/service</wsa:To><wsa:Action>http://www.onvif.org/ver10/events/wsdl/EventPortType/CreatePullPointSubscriptionRequest</wsa:Action><wsa:MessageID>urn:uuid:2d0cb69c-7bdb-425c-8bcd-a501eeefecd3</wsa:MessageID><wsa:To>http://192.168.106.160: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>bdraco</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">vhc4ThdorF139DaU2swigvrt5KQ=</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">MejK+SQmCHZXPr8/EwVzHQ==</wsse:Nonce><wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2023-07-14T23:08:02+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>PT600S</ns0:InitialTerminationTime></ns0:CreatePullPointSubscription></soap-env:Body></soap-env:Envelope>'

@bdraco
Copy link
Member

bdraco commented Jul 14, 2023

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:f0f66b9c-a9ef-4d2d-9e2c-1e661c284adf</wsa:MessageID><wsa:To>http://192.168.106.160: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>bdraco</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">Nocdk5z+HmPHnHCCW9o6Q4/QE4w=</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">6FpATanO6o9/zkaoSso+qQ==</wsse:Nonce><wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2023-07-14T23:23:47+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>PT1M</ns0:Timeout><ns0:MessageLimit>100</ns0:MessageLimit></ns0:PullMessages></soap-env:Body></soap-env:Envelope>'

@bdraco
Copy link
Member

bdraco commented Jul 14, 2023

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: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><wsa5:MessageID>urn:uuid:cd8a60c4-5ccf-4b98-9c0e-d9e57fa8a321</wsa5:MessageID><wsa5:To SOAP-ENV:mustUnderstand="true">http://192.168.106.160:2020/onvif/service</wsa5:To><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.106.160:1024/event-1024_1024</wsa5:Address></tev:SubscriptionReference><wsnt:CurrentTime>2023-07-14T23:23:46Z</wsnt:CurrentTime><wsnt:TerminationTime>2023-07-14T23:33:46Z</wsnt:TerminationTime></tev:CreatePullPointSubscriptionResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>\r\n'

bdraco added a commit to hunterjm/python-onvif-zeep-async that referenced this issue Jul 14, 2023
I copied the WsAddressingPlugin from zeep and modified it
to not add the WSAs if they are already present and called it
WsAddressingIfMissingPlugin

home-assistant/core#91089
@bdraco bdraco removed the problem in device Issue lies within the device, such firmware, software, or user customization/config label Jul 14, 2023
@bdraco bdraco removed the help-wanted Wanna help? Jump in! label Jul 14, 2023
@bdraco
Copy link
Member

bdraco commented Jul 15, 2023

@lucabress

I had to make a new WSA plugin to workaround the problem. The lib bump in #96560 fixes this.

I added a workaround for the non-compliant time stamps in a previous version https://github.com/hunterjm/python-onvif-zeep-async/blob/async/onvif/types.py#L8

With both of those changes webhooks also work as well

I verified it on test test system you provided. thanks for that.

@bdraco bdraco reopened this Jul 15, 2023
@bdraco
Copy link
Member

bdraco commented Jul 15, 2023

Leaving open until #96377 merges

@lucabress
Copy link
Author

Hi @bdraco sorry for the delay but complex week at work.

Perfect, thanks a lot for the support!

Forgive my ignorance but so to make it work in my personal system am I waiting for the 2023.7.3 update or do I have to install something in particular?

@bdraco
Copy link
Member

bdraco commented Jul 15, 2023

You can wait for 2023.7.3 or install https://github.com/bdraco/onvif as a custom component

@lucabress
Copy link
Author

Ok, being quite busy with work these weeks, think at this point of waiting for the 2023.7.3 version.

Do you still need the equipment under test or can I remove everything?

Thank you!

@bdraco
Copy link
Member

bdraco commented Jul 17, 2023

Let's keep it up until you confirm it's fixed on your production. With onvif it's always good to be extras sure since the potential combinations are nearly infinite

@lucabress
Copy link
Author

Just update to 2023.7.3 It works very well!
Thank you so much! Great job! 💪🏻

@bdraco
Copy link
Member

bdraco commented Jul 27, 2023

Awesome. Thanks for confirming and the test system 👍

@github-actions github-actions bot locked and limited conversation to collaborators Aug 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.