Actuating on IoTResources

Revision for “Actuating on IoTResources” created on December 17, 2014 @ 10:25:50

Actuating on IoTResources
The IoTResource Catalogue provides  two means to actuate on an IoTResource: <ul> <li>By providing the unique identifier  of a specific IoTResource</li> <li>By providing the local endpoint of a specific IoTResource</li> <li>By providing a semantic description that matches one or several IoTResource</li> </ul> <h3>Using identifier</h3> The keyword is <em>IoTResource </em> to be supplied directly after the &lt;catalogueendpoint&gt; followed by the specific identifier and then the actuation expression: http://&lt;catalogueendpoint&gt;/IoTResources/&lt;IoTresourceid&gt;/services/switch/actions/TurnOn <h3>Using endpoint</h3> By first calling the action GetIoTResourcesEndpoint in the <a title="Catalogue Services and Actions" href="">catalogue </a>service of the IoTResourceCatalogue  you will be able to retrieve  the local endpoint of the device and can start communicating direclty with the IoTResource. This method is recommended if you need to do a massive amount of  calls to IoTResource and then you don´t have to go throught the central IoTResourceCatalogue. However, it will only work if your Application is executing in the same local network as the IoTResources. &nbsp; <h3>Using Semantic Description</h3> Provide an xpath expression directly after the &lt;catalogueendpoint&gt; followed by the actuation expression: http://&lt;catalogueendpoint&gt;/&lt;xpath&gt;/services/switch/actions/TurnOn <strong><span style="text-decoration: underline;">Example</span></strong> Turn on all IoTResources that are of type <em>switchdevice:</em> http://&lt;catalogueendpoint&gt;//upnp:devicetype[contains(.,'switchdevice')]/services/switch/actions/TurnOn <span style="text-decoration: underline;"><strong>Example</strong></span> Turn off all IoTResources that are from CNet and that currently consumes more than 200W. http://&lt;catalogueendpoint&gt;//upnp:device[upnp:manufacturer='CNet'][IoT:currentconsumption&gt;200]/services/switch/actions/TurnOff <strong><span style="text-decoration: underline;">Notes</span></strong> One current limitation when using semantic descriptions is that the xpath expression cannot  contain the word <em>services.</em>

OldNewDate CreatedAuthorActions
December 17, 2014 @ 10:25:50 Peter Rosengren
December 17, 2014 @ 10:24:58 [Autosave] Peter Rosengren
December 14, 2014 @ 20:02:00 Peter Rosengren
December 14, 2014 @ 19:59:27 Peter Rosengren
December 14, 2014 @ 19:54:54 Peter Rosengren
December 14, 2014 @ 19:17:28 Peter Rosengren