The Java MQTT client is a standalone utility that can be used to retrieve payloads generated by Itron based IoT devices generating MQTT "bubble-up" data. The MQTT client is packaged as a jar and accepts a property file that defines Itron network parameters and options. You can run the client on Linux, Windows, or MacOS.
The client is designed for extended runtime. It acts as a simple server that you can use to retrieve device payloads and consume them. The reference client is designed to work with the DHT-11 temperature sensor. It sends device payloads to the Starfish Data Platform where you can retrieve them using the Starfish Data Platform "observations" API.
The MQTT client works especially well running in a virtual machine environment (such as an AWS EC2).
In addition to providing a reference on using the Java MQTT Client, you will be able to specifically confirm communication with your HDK and read sensor data. The following documentation outlines the steps required to achieve the following:
- Install the build prerequisites and build the Java MQTT Client (or download the pre-built all in one jar, available below)
- Run the client
- Determine your Starfish account Client ID and Client Secret
- Determine the Starfish Tenant ID of your Itron IoT device
- Set up the MQTT Client properties file
- Use the MQTT Client
This tutorial uses the pre-built Java MQTT Client, an all-in-one jar file. If you prefer to clone the source code and build the Java Client, detailed instructions are included in the Readme.md file in the Java MQTT Client portion of the Itron GitHub Repository.
You will need to install Java 8 and either download or build the sdkcoapclient:
- Java 8
- Maven (version 3+)
- This is required only for those who intend to build the MQTT client
You will need a laptop or desktop computer to run the Java MQTT client and a working internet connection.
Milli Firmware Version
Ensure that you have the latest firmware flashed to your Milli device.