Do COV subscriptions

The data item at e.g. http://192.168.1.69/bacnetws/.subs is a collection of all current subscriptions in the DINGO device. Subscriptions are generally created by clients and can be deleted either by the clients when they are no longer needed or by the server when they time out.

Note: COV subscriptions created by trend-log objects are not visible or handled by the COV subscriptions in the BACnet web-services.

Values of BACnet properties can be read by polling values on regular intervals. A more sophisticated method, is to have the values pushed to the client, in the instant the value changes - this is what subscriptions can do.

The client can be a remote web-server that is hosting an HTTP-endpoint to deal with the incoming values. The HTTP-endpoint is a URI that will receive the callback POSTs from the subscription. This URI can be a remote web-server, Azure service etc., that will listen to HTTP POST requests from the DINGO device. These endpoints are also referred to as web-hooks and could look something like this: http://remote-server.com/endpoint

The client can also be a browser application, but this needs WebSockets instead of HTTP-endpoint.

A browser uses the GET method to do requests against the web services. To create, re-subscribe and delete subscriptions, one needs to use the POST, PUT and DELETE methods, respectively.

Fiddler can be used to do POST, PUT and DELETE requests, when experimenting with the subscriptions. All major development environments have components for doing HTTP requests (GET, POST, PUT and DELETE) - so read the documentation for your specific development environment.

When a subscription is created, a lifetime is specified. When that lifetime expires, the subscription is automatically deleted by the server. To prevent this, the client has to re-subscribe before the lifetime expires and thereby extend the lifetime of the subscription. We recommend resubscribing every half of the lifetime (lifetime / 2 seconds).

Note:

The maximum number of subscriptions in the DINGO-Stack is 2048. So creating 1 subscription in BACnet/WS with 2048 BACnet objects, accounts to 2048 subscriptions in the DINGO-Stack.

Also be aware of the limit that 1 subscription in BACnet/WS can only contain a maximum of 255 BACnet devices at the same time. If there is a need to subscribe to more than 255 devices, then do multiple BACnet/WS subscriptions (chunks) with max. 255 devices. We recommend however that you do not exceed 128 devices in each chunk (as other services can be using some of the 255 device-binding slots at the same time).

If you need to subscribe to more than one such 128 chunk a good practice is to wait maybe 5 seconds between chunks. The same wait-period apply to re-subscriptions and subscription cancellation.

Example: Lets say that the IP of the DINGO device is 192.168.1.100, then this data item and all its current subscriptions, can be browsed by entering this address into a browser: http://192.168.1.100/bacnetws/.subs?depth=1