Skip to content

Events

Events (Core) service implementation.

Events

Bases: ONVIFService

0.0.1 1.0 pull_live_events.py

Events service client.

Property Details
First introduced ONVIF 1.0 (November 2008)
Binding name EventBinding (ver10/events/wsdl/event-vs.wsdl)
Operations event-vs.wsdl
Spec Core

GetServiceCapabilities

GetServiceCapabilities()

Returns the capabilities of the event service.

The result is returned in a typed answer.

Output
  • Capabilities [Capabilities]
    The capabilities for the event service is returned in the Capabilities element.
    • WSSubscriptionPolicySupport - optional; [boolean]
      Indicates that the WS Subscription policy is supported.
    • WSPausableSubscriptionManagerInterfaceSupport - optional; [boolean]
      Indicates that the WS Pausable Subscription Manager Interface is supported.
    • MaxNotificationProducers - optional; [int]
      Maximum number of supported notification producers as defined by WS-BaseNotification.
    • MaxPullPoints - optional; [int]
      Maximum supported number of notification pull points.
    • PersistentNotificationStorage - optional; [boolean]
      Indication if the device supports persistent notification storage.
    • EventBrokerProtocols - optional; [string]
      A space separated list of supported event broker protocols as defined by the tev:EventBrokerProtocol datatype.
    • MaxEventBrokers - optional; [int]
      Maxiumum number of event broker configurations that can be added to the device.
    • MetadataOverMQTT - optional; [boolean]
      Indicates that metadata streaming over MQTT is supported

CreatePullPointSubscription

CreatePullPointSubscription(
    Filter=None,
    InitialTerminationTime=None,
    SubscriptionPolicy=None,
)

This method returns a PullPointSubscription that can be polled using PullMessages.

This message contains the same elements as the SubscriptionRequest of the WS-BaseNotification without the ConsumerReference.

If no Filter is specified the pullpoint notifies all occurring events to the client.

This method is mandatory.

Input
  • Filter - optional; [FilterType]
    Optional XPATH expression to select specific topics.
  • InitialTerminationTime - optional; [AbsoluteOrRelativeTimeType]
    Initial termination time.
  • SubscriptionPolicy - optional; [complexType]
Output
  • SubscriptionReference [EndpointReferenceType]
    Endpoint reference of the subscription to be used for pulling the messages.
    • Address [AttributedURIType]
    • ReferenceParameters - optional; [ReferenceParametersType]
    • Metadata - optional; [MetadataType]
  • CurrentTime [dateTime]
    Current time of the device for synchronization purposes.
  • TerminationTime [dateTime]
    Date time when the PullPoint will be shut down without further pull requests.

GetEventProperties

GetEventProperties()

The WS-BaseNotification specification defines a set of OPTIONAL WS-ResouceProperties.

This specification does not require the implementation of the WS-ResourceProperty interface. Instead, the subsequent direct interface shall be implemented by an ONVIF compliant device in order to provide information about the FilterDialects, Schema files and topics supported by the device.

Output
  • TopicNamespaceLocation - unbounded; [anyURI]
    List of topic namespaces supported.
  • FixedTopicSet [boolean]
    True when topicset is fixed for all times.
    Default: true
  • TopicSet [TopicSetType]
    Set of topics supported.
    • documentation - optional; [Documentation]
  • TopicExpressionDialect - unbounded; [anyURI]
    Defines the XPath expression syntax supported for matching topic expressions.
    The following TopicExpressionDialects are mandatory for an ONVIF compliant device :
    • http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete
    • http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet.
  • MessageContentFilterDialect - unbounded; [anyURI]
    Defines the XPath function set supported for message content filtering.
    The following MessageContentFilterDialects should be returned if a device supports the message content filtering:
    • http://www.onvif.org/ver10/tev/messageContentFilter/ItemFilter.
    A device that does not support any MessageContentFilterDialect returns a single empty url.
  • ProducerPropertiesFilterDialect - optional, unbounded; [anyURI]
    Optional ProducerPropertiesDialects. Refer to Web Services Base Notification 1.3 (WS-BaseNotification) for advanced filtering.
  • MessageContentSchemaLocation - unbounded; [anyURI]
    The Message Content Description Language allows referencing of vendor-specific types. In order to ease the integration of such types into a client application, the GetEventPropertiesResponse shall list all URI locations to schema files whose types are used in the description of notifications, with MessageContentSchemaLocation elements.
    This list shall at least contain the URI of the ONVIF schema file.

AddEventBroker

AddEventBroker(EventBroker)

The AddEventBroker command allows an ONVIF client to add an event broker configuration to device to enable ONVIF events to be transferred to an event broker.

If an existing event broker configuration already exists with the same Address, the existing configuration shall be modified.

Input
  • EventBroker [EventBrokerConfig]
    • Address [anyURI]
      Event broker address in the format "scheme://host:port[/resource]". The supported schemes shall be returned by the EventBrokerProtocols capability. The resource part of the URL is only valid when using websocket. The Address must be unique.
    • TopicPrefix [string]
      Prefix that will be prepended to all topics before they are published. This is used to make published topics unique for each device. TopicPrefix is not allowed to be empty.
    • UserName - optional; [string]
      User name for the event broker.
    • Password - optional; [string]
      Password for the event broker. Password shall not be included when returned with GetEventBrokers.
    • CertificateID - optional; [token]
      Optional certificate ID in the key store pointing to a client certificate to be used for authenticating the device at the message broker.
    • PublishFilter - optional; [FilterType]
      Concrete Topic Expression to select specific event topics to publish.
    • QoS - optional; [int]
      Quality of service level to use when publishing. This defines the guarantee of delivery for a specific message: 0 = At most once, 1 = At least once, 2 = Exactly once.
    • Status - optional; [string]
      Current connection status (see tev:ConnectionStatus for possible values).
    • CertPathValidationPolicyID - optional; [string]
      The ID of the certification path validation policy used to validate the broker certificate. In case encryption is used but no validation policy is specified, the device shall not validate the broker certificate.
    • MetadataFilter - optional; [FilterType]
      Concrete Topic Expression to select specific metadata topics to publish.

DeleteEventBroker

DeleteEventBroker(Address)

The DeleteEventBroker allows an ONVIF client to delete an event broker configuration from an ONVIF device.

Input
  • Address [anyURI]

GetEventBrokers

GetEventBrokers(Address=None)

The GetEventBrokers command lets a client retrieve event broker configurations from the device.

Input
  • Address - optional; [anyURI]
Output
  • EventBroker - optional, unbounded; [EventBrokerConfig]
    • Address [anyURI]
      Event broker address in the format "scheme://host:port[/resource]". The supported schemes shall be returned by the EventBrokerProtocols capability. The resource part of the URL is only valid when using websocket. The Address must be unique.
    • TopicPrefix [string]
      Prefix that will be prepended to all topics before they are published. This is used to make published topics unique for each device. TopicPrefix is not allowed to be empty.
    • UserName - optional; [string]
      User name for the event broker.
    • Password - optional; [string]
      Password for the event broker. Password shall not be included when returned with GetEventBrokers.
    • CertificateID - optional; [token]
      Optional certificate ID in the key store pointing to a client certificate to be used for authenticating the device at the message broker.
    • PublishFilter - optional; [FilterType]
      Concrete Topic Expression to select specific event topics to publish.
    • QoS - optional; [int]
      Quality of service level to use when publishing. This defines the guarantee of delivery for a specific message: 0 = At most once, 1 = At least once, 2 = Exactly once.
    • Status - optional; [string]
      Current connection status (see tev:ConnectionStatus for possible values).
    • CertPathValidationPolicyID - optional; [string]
      The ID of the certification path validation policy used to validate the broker certificate. In case encryption is used but no validation policy is specified, the device shall not validate the broker certificate.
    • MetadataFilter - optional; [FilterType]
      Concrete Topic Expression to select specific metadata topics to publish.