41
IoT general functions
The device itself has the type "device".
IoT Services
The following services can be used on the root element of the type device:
Service
Description
../gettree
Provide the complete tree or subtree of the device description
../getidentity
Reading device information
../querytree
Search device description for specific elements
../getsubscriberlist
Print a list of all active notification subscriptions
../getdatamulti
Reading several parameter values sequentially
../subscribe
Subscribe to an event
../unsubscribe
Unsubscribe from an event
Depending on the read and write access rights, the following services can be applied to elements of type data :
Service
Description
../getdata
Reading the value of the element
../setdata
Write the value of the element
Example
: Reading device information
Task
: Determine the device information .
Solution:
Read the properties of the element /deviceinfo/.. of the getelementinfo service. The fields type (data type)
and valuation (range of values) contain the required information.
First possibility, call of request over URL and POST method
URL:
Method: POST
Request body data:
{ "code":10, "cid":4711,"adr":"/deviceinfo/productcode/getdata"}
Response data:
{"cid":-1,"data":{"value":"DTE105"},"code":200}