When a thing is added to the RubiThings, a unique key called the Thing Key is generated for the device/sensor by which it is uniquely identified. The Thing is activated when it is commissioned.
For commissioning a Thing, make sure to install the following beforehand.
Paho-MQTT 1.6.1
| Use following command for Paho-MQTT installation: |
For commissioning a thing,
The image below shows a typical sample file for commissioning an IoT-enabled device.
In the above image, configure the details in the highlighted regions.
Line | Content |
2 | Add your customized code to import the packages as per your requirement |
5 | Rubiscape = folder |
8 | Add the Thing Key, the Universal Unique Identifier (UUID) generated by RubiThings while creating the Thing. |
19 | Add an integer value in place of the term 'n' in time.sleep(n),n is the time (in second). It defines the frequency at which data is fetched from the Thing. |
23 & 24 | Write your custom code to fetch data from the Thing |
28 | Add the correct Property Name and Data Type (respect case sensitivity) as defined in the Data Template |
32 | Command used to publish the data. |
To authenticate and validate a thing, make sure that