Nivis Versa Router 1100 Titan - User Guide
v1.2
Page 38 of 111
3.9.1.1.8.3
Enable observation for target resource
HTTP query:
http://observe-resources-set?enable=1&device=device_ipv6_addr&path=resource_path
HTTP response:
If the request is well formed, a 200 "OK" "Observation request for SUBSCRIPTION passed forward"
message will be retrieved to the client. This is a sign that the request was processed and HttpCoapProxy
will subscribe for observing the specified resource.
If the request is not well formed, a 400 “Bad Request" response will be retrieved.
Every time a client makes a request for a resource, http://[device ipv6 addr]/resource_path, HttpCoapProxy will
look for it in its Observation Cache:
If it is found, it will be retrieved to the client, and it means that the resource is observable and that the
client or another client made an earlier request to put it under observation.
If that resource does not exist in the HttpCoapProxy Observation Cache, the normal flow will be
followed: Send Coap request, wait for Coap response, translate to Http, and send back to Http client.
NOTE
http://observe-resourcesset?enable=1&device=device_ipv6_addr&path=resource_path &pb=publish_time can
be used to determine the observed resource to be publish every “publish_time” seconds.
A successful request will result in assigning the observation state “Started” for the target resource (see
description in
Get observation list
). Once a resource is in the “Subscribed” state, it is assumed that periodic
notifications will be received for it, often enough so that the proxy will always have valid cached data available
(data is valid for a max-age interval as indicated by the CoAP notification, or until newer data is received). If the
max-age time interval passes and there are no new notifications, the CoAP subscription may be automatically
renewed depending on the configurable option ALLOW_RESUBSCRIPTION_ON_TIMEOUT (option is set to NO by
default, meaning subscription is NOT renewed).