Example links for the Catalogue

Wikis > LinkSmart.net > IoTResource Catalogue > Example links for the Catalogue

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, linksmart.cnet.se:44441. You can watch and see the effect of your commands at the demo setup at webcam.cnet.se.

Catalogue Meta Data

http://linksmart.cnet.se:44441/services (list all services of the catalogue)

http://linksmart.cnet.se:44441/iotresources (list all IoT Resources with their endpoints)

http://linksmart.cnet.se:44441/* (list all IoT Resources with complete meta data)

Searching the Catalogue

 http://linksmart.cnet.se:44441//upnp:friendlyName[contains(.,’Hue’)] (list all Philips Hue Resources )

http://linksmart.cnet.se:44441//upnp:device[upnp:friendlyName[contains(.,’Hue’)]][IoTObservation:Status[.=’off’]]  (list all Philips Hue Resources that are currently switched off)

Get IoT Resource meta data through the Catalogue

http://linksmart.cnet.se:44441/iotresources/AirQualityDevice/services (list all services provided by IoT Resource AirQualityDevice)

http://linksmart.cnet.se:44441/iotresources/AirQualityDevice/services/sensor/actions (list all actions provided in the “sensor” service)

 http://linksmart.cnet.se:44441/iotresources/AirQualityDevice/services/IoTObservation (list all statevariables that are logged)

Actuation on IoT Resources using resource id

http://linksmart.cnet.se:44441/iotresources/DiscoBall/services/IoTObservation/statevariables/currentconsumption?take=180 (list the energyconsumption of the DiscoBall for the last 3 hours)

http://linksmart.cnet.se:44441/iotresources/DiscoBall/services/switch/actions/TurnOn (start the DiscoBall)

http://linksmart.cnet.se:44441/iotresources/DiscoBall/services/switch/actions/TurnOff (stop the DiscoBall)

Actuation on IoT Resources using search expressions

 http://linksmart.cnet.se:44441//upnp:device[upnp:manufacturer=’CNet’][IoT:currentconsumption>200]/services/switch/actions/TurnOff (turn off all  switches from manufacturer CNet that is consuming more than 200W)