onvif
    Preparing search index...

    Class Events

    Events service — pull-point / WS-BaseNotification, topic filters, brokers.

    import { Onvif } from 'onvif';

    const onvif = new Onvif({ hostname: '192.168.1.13', username: 'admin', password: 'admin' });
    await onvif.connect();

    const props = await onvif.events.getEventProperties();
    console.log(Object.keys(props.topicSet ?? {}));

    onvif.on('event', (msg) => {
    console.log(msg.topic, msg.message?.message?.data);
    });
    onvif.on('eventsError', (err) => console.error(err));

    // Or a dedicated filtered subscription:
    // const sub = new Subscription(onvif, 'pullPoint', {
    // filter: {
    // topicExpression: [{
    // expression: 'tns1:RuleEngine//.',
    // dialect: 'http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet',
    // }],
    // },
    // });
    // await sub.subscribe();
    Index
    agent: Agent | Agent
    globalSubscription: Subscription
    • 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.

      Parameters

      Returns Promise<void>

    • Cancel a pending push-notification renew scheduled by subscribe.

      Returns void

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

      Parameters

      Returns Promise<void>

    • 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.

      Returns Promise<GetEventPropertiesResponse>

    • Returns the capabilities of the event service. The result is returned in a typed answer.

      Returns Promise<Capabilities>

    • Drop in-flight PullMessages sockets (long-poll up to PULL_TIMEOUT) so unsubscribe does not leave Happytime / cameras stuck with an open request.

      Returns void