Set Up a Reference Solution for Milli Temperature Sensor Data

A Sample Application for the Milli Developer Kit

Build Your Own Sensor Network. Order a Developer Kit.
This sample application demonstrates how to implement an end-to-end solution to ingest sensor measurements into the Data Platform and retrieve it through a user application that plots it on a web user interface.


The Milli Temperature Sensor sample application provides a web application for plotting temperature sensor measurements retrieved from the Data Platform using the Data Platform APIs.

To set up the Milli Temperature Sensor Application:  

  1. Setup a CoAP server on your Arduino processor board as described in the Example Sensor implementation with the Milli Dev Kit  
  2. Use the appropriate Itron reference application to use CoAP to communicate with your sensors. Itron strongly encourages integrators and developers to consume alerts/alarms through MQTT instead of CoAP OBSERVE.
    1. Itron Reference Application - MQTT Client (Recommended)
    2. Itron Reference Application - CoAP Client (Alternative)
  3. Plot the sensor measurements using the Data Platform Plot Reference Application



Option 2a - MQTT

MQTT diagram

Option 2b - CoAP

CoAP map diagram



Note: Itron no longer supports the miniAP and strongly recommends that developers use the IoT Edge Router solution instead. 

The architecture diagram below shows how the Milli Temperature Sensor application connects with sensors and to the network to gather data.

  1. The sensors are connected to the Arduino Board part of the Milli Developer Kit. The sensor code running on the Arduino processor is a CoAP server implementation.
  2. The Milli Developer Kit connects to a miniAP or an IoT Edge Router with WAN mode over a local RF mesh network.
  3. The miniAP or IoT Edge Router with WAN mode provides backhaul connectivity to the back-office software and the data platform Wide Area Network (WAN). 
  4. Sensor data (temperature) is sent across the network as MQTT and an MQTT client (running on a laptop or linux server) receive the sensor data as MQTT messages.
    1. Alternately the CoAP OBSERVE model is used where CoAP requests are sent from a CoAP client (running on a laptop or Linux server) to the CoAP server running on the Arduino board. The sensor temperature data is returned to the CoAP Client as an OBSERVE response. CoAP requests and responses are always proxied by the network Gateway. 
  5. Responses to sensor data requests are forwarded by the CoAP or MQTT client application to the Data Platform.
  6. The Milli Temperature Sensor application processes the sensor data for analytics or display purposes.


milli reference application map


MQTT is a publish/subscribe model (aka "bubble-up") with the data transmittal initiated by the Milli configured for MQTT. The data is collected by the MQTT client application which subscribes to the proper MQTT topics using the MQTT API. The MQTT API verifies that the requested device data can be accessed by the (this is accomplished by the MQTT API client connection providing an API token and the token checked to verify permission to access the data). Authorized requests are sent over the Wide Area Network (WAN) to the miniAP or IoT Edge Router with WAN mode to the MQTT Broker for delivery to the MQTT client subscriber. 

In the case of CoAP OBSERVE implementation, CoAP requests originate from a CoAP client and are sent to the Gateway. A CoAP request consists of a Uniform Resource Identifier (URI) to identify the sensor and CoAP headers. The gateway verifies that the requested device can be accessed (this is accomplished by the CoAP client providing an API token to the Gateway when establishing a Gateway session). Authorized requests are sent over the Wide Area Network (WAN) to the miniAP or IoT Edge Router with WAN mode.  Using the HDLC data link layer protocol, the MIlli5 shield then forwards the request to the CoAP server implemented in the Arduino (the Milli5 shield provides a CoAP proxy to faciltate this process). The Arduino-based CoAP server returns the requested sensor data to the CoAP client as a CoAP response for processing.

Installing the Milli Dev Kit Reference Application is the last step in setting up your Milli device. Congratulations!