Commit 6857094b authored by Peter Waher's avatar Peter Waher

Adding event subscription examples

parent 29d8006f
......@@ -113,3 +113,55 @@ within this time frame, plus an additional latency coefficient, the subscription
Note: Only reissue subscription requests if the device is online. If the device comes back online after having been offline, the subscription request can be
### Simple event subscription
Subscription request:
<iq type='get' id='28' to=''>
<subscribe xmlns='urn:ieee:iot:events:1.0' id='d4fe61155cb14e649e302092d3b406a8' m='true' minInt='PT1S' maxInt='PT1M'>
<f n='Light' v='25.72' by='1'/>
<f n='Motion' v='0' by='1'/>
Subscription response:
<iq id='28' type='result' to='' from=''>
<accepted xmlns='urn:ieee:iot:sd:1.0' id='d4fe61155cb14e649e302092d3b406a8'/>
<message to='' from=''>
<resp id="d4fe61155cb14e649e302092d3b406a8" xmlns="urn:ieee:iot:sd:1.0">
<ts v="2018-07-18T15:19:57.732">
<q n="Light" m="true" ar="true" v="26.11" u="%" />
<b n="Motion" m="true" ar="true" v="true" />
Unsubscription request:
<iq type='get' id='29' to=''>
<unsubscribe xmlns='urn:ieee:iot:events:1.0' id='d4fe61155cb14e649e302092d3b406a8'/>
Subscription response:
<iq id='29' type='result' to='' from=''/>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment