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

Can not filtering events #171

Open
mkolbusz opened this issue Jan 21, 2020 · 0 comments
Open

Can not filtering events #171

mkolbusz opened this issue Jan 21, 2020 · 0 comments
Labels
bug Something isn't working investigate

Comments

@mkolbusz
Copy link

mkolbusz commented Jan 21, 2020

I am trying to create a subscription to events with filter as follows:

camera.events.createPullPointSubscription(
            '<wsnt:TopicExpression Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:RuleEngine/CellMotionDetector//.</wsnt:TopicExpression>',
        ).then((response) => {
            console.log(response)
        }).catch(error => {
            console.error(error)
        })

But the validator of the createPullPointSubscription method in modules/events.js file does not allow XML in the string, because in the line number 176 it requires to be a "clean string" (without < and > characters). Getting error:

Error: The "filter" argument for createPullPointSubscription is invalid:  Invalid characters were found in the value ("<", ">")

It seems to me that it is not consistent with the ONVIF 16.12 standard and WS-BaseNotification. See here page 117/118: https://www.onvif.org/specs/core/ONVIF-Core-Specification-v1612.pdf

With my IP Camera using the below SOAP message I can create a subscription:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
 xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
 xmlns:wsa="http://www.w3.org/2005/08/addressing"
 xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
 xmlns:tet="http://www.onvif.org/ver10/events/wsdl"
 xmlns:tns1="http://www.onvif.org/ver10/topics">
 <SOAP-ENV:Header>
 <wsa:Action>http://www.onvif.org/ver10/events/wsdl/EventPortType/CreatePullPointSubscriptionRequest</wsa:Action>
 </SOAP-ENV:Header>
 <SOAP-ENV:Body>
 <tet:CreatePullPointSubscription>
 	<tet:Filter>
 		<wsnt:TopicExpression Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:RuleEngine/CellMotionDetector//.</wsnt:TopicExpression>
 	</tet:Filter>
 <tet:InitialTerminationTime>PT1H</tet:InitialTerminationTime>
 </tet:CreatePullPointSubscription>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope> 

Should it be changed to allow XML values?

@hawkeye64 hawkeye64 added bug Something isn't working investigate labels Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working investigate
Projects
None yet
Development

No branches or pull requests

2 participants