The nbIoT-MQTT API allows device developers to bootstrap their devices against Cumulocity and allows subscribing and publishing with the MQTT-Broker without having to implement it themselves. The API is based on Vert.x.
Maven:
<dependency>
<groupId>com.telekom.m2m.cot</groupId>
<artifactId>cot-mqtt-sdk</artifactId>
<version>version-number</version>
</dependency>
Gradle:
compile "com.telekom.m2m.cot:cot-mqtt-sdk:version-number"
https://github.com/cloud-of-things/cot-mqtt-sdk
The API docs are located under https://cloud-of-things.github.io/cot-mqtt-sdk/
The API is licensed under MIT license. With the gradle task generateLicenseReport you can get a report of license included software uses
After the API is included in your Project, you can use the method getInstance()
to
initialise the API. In case you implemented your own Vert.x instance, you
should pass your instance in the aforementioned mentioned method (getInstance(Vertx)
).
- registerDevice(String, Properties, Consumer)
- subscribeToTopic(String, Properties, Consumer, Consumer)
- publishTopic(String, String, Properties, Consumer)
- unsubscribeFromTopic(String, Properties, Consumer)
- LICENSE and NOTICE files included
- improved stability of integration tests
- bootstrapping - nbIoT-devices can now be bootstrapped and receives the credentials from CoT, persists device data in the nbIoT environment and creates managed Objects over SmartREST for shell access.
- messaging - API helps the devices with subscribing on topics to receive messages from the MQTT-Broker and helps with sending SmartREST messages to the CoT.
For more information regarding these methods (explanation, examples, etc.) please see the asciidoc located at "asciidoc/README.adoc".