Revision for “Example links for the Catalogue” created on November 21, 2015 @ 15:31:25
Title | Example links for the Catalogue |
---|---|
Content | Here are some examples of how to use the catalogue to search for IoT Resources and perform actions on them. These can be tested against the demo catalogue at CNet, <span style="text-decoration: underline;"><span style="color: #0066cc;">linksmart</span></span>.cnet.se:44441. You can watch and see the effect of your commands at the demo setup at webcam.cnet.se.
<h3>Catalogue Meta Data</h3>
<a href="http://linksmart.cnet.se:44441/services">http://linksmart.cnet.se:44441/services</a> (list all services of the catalogue)
<a href="http://linksmart.cnet.se:44441/iotresources">http://linksmart.cnet.se:44441/iotresources</a> (list all IoT Resources with their endpoints)
<a title="http://linksmart.cnet.se:44441/*" href="http://linksmart.cnet.se:44441/*">http://linksmart.cnet.se:44441/*</a> (list all IoT Resources with complete meta data)
<h3>Searching the Catalogue</h3>
<a href="http://linksmart.cnet.se:44441//upnp:friendlyName[contains(.,'Hue')]"> http://linksmart.cnet.se:44441//upnp:friendlyName[contains(.,'Hue')]</a> (list all Philips Hue Resources )
<a title="http://hydra.cnet.se:44441//upnp:device[upnp:friendlyName[contains(.,'Hue')]][IoTObservation:Status[.='off']] " href="http://hydra.cnet.se:44441//upnp:device[upnp:friendlyName[contains(.,'Hue')]][IoTObservation:Status[.='off']]">http://<span style="text-decoration: underline;"><span style="color: #0066cc;">linksmart</span></span>.cnet.se:44441//upnp:device[upnp:friendlyName[contains(.,'Hue')]][IoTObservation:Status[.='off']]</a> (list all Philips Hue Resources that are currently switched off)
<h3>Get IoT Resource meta data through the Catalogue</h3>
<a href="http://linksmart.cnet.se:44441/iotresources/AirQualityDevice/services">http://linksmart.cnet.se:44441/iotresources/AirQualityDevice/services</a> (list all services provided by IoT Resource AirQualityDevice)
<a href="http://linksmart.cnet.se:44441/iotresources/AirQualityDevice/services/sensor/actions">http://linksmart.cnet.se:44441/iotresources/AirQualityDevice/services/sensor/actions</a> (list all actions provided in the "sensor" service)
<a href="http://linksmart.cnet.se:44441/iotresources/AirQualityDevice/services/IoTObservation"> http://linksmart.cnet.se:44441/iotresources/AirQualityDevice/services/IoTObservation</a> (list all statevariables that are logged)
<h3>Actuation on IoT Resources using resource id</h3>
<a href="http://linksmart.cnet.se:44441/iotresources/DiscoBall/services/IoTObservation/statevariables/currentconsumption?take=180">http://linksmart.cnet.se:44441/iotresources/DiscoBall/services/IoTObservation/statevariables/currentconsumption?take=180</a> (list the energyconsumption of the DiscoBall for the last 3 hours)
<a href="http://linksmart.cnet.se:44441/iotresources/DiscoBall/services/switch/actions/TurnOn" target="_blank">http://linksmart.cnet.se:44441/iotresources/DiscoBall/services/switch/actions/TurnOn</a><a href="http://webcam.cnet.se/"> (start the DiscoBall)</a>
<a href="http://linksmart.cnet.se:44441/iotresources/DiscoBall/services/switch/actions/TurnOff" target="_blank"><u><span style="color: #0066cc;">http://linksmart.cnet.se:44441/iotresources/DiscoBall/services/switch/actions/TurnOff (stop the DiscoBall)</span></u></a>
<h3>Actuation on IoT Resources using search expressions</h3>
<a href="http://linksmart.cnet.se:44441//upnp:device[upnp:manufacturer=’CNet’][IoT:currentconsumption>200]/services/switch/actions/TurnOff"> http://linksmart.cnet.se:44441//upnp:device[upnp:manufacturer=’CNet’][IoT:currentconsumption>200]/services/switch/actions/TurnOff</a> (turn off all switches from manufacturer CNet that is consuming more than 200W) |
Excerpt |