In this code pattern, we’ll demonstrate how to track assets and visualize incoming sensor data from the Watson IoT Platform on a mapping application using Leaflet and ArcGIS.
By completing this code pattern, you’ll learn how to track moving assets. A moving asset is any IoT device that can have a GPS module attached to it, such as a shipping truck (or the contents in the shipping truck) or even a wild animal that has been tagged. You’ll also learn how to visualize sensor data associated with various connected IoT devices. This sensor data can represent any measurable physical property, such as temperature, sound, air quality, or humidity.
This pattern assumes that you’ve set up the hardware to collect sensor data, similar to this code pattern, “Setting up the hardware platform for long-range IoT systems that use LoRaWAN networking.”
When you have completed this pattern, you’ll understand how to:
- Publish sensor and location data to the Watson IoT Platform
- Import historical CSV datasets for visualization
- Persist data in a Cloudant database
- View the status of IoT assets on a map
- User registers end nodes (IoT devices) by using the mapping UI or an MQTT message. These end nodes represent trackable assets that are capable of publishing location and sensor data.
- Express back end subscribes to Watson IoT Platform channel corresponding to one or more end nodes.
- The end nodes continuously publish JSON objects that contain location, time, and sensor data to Watson IoT Platform.
- Watson IoT Platform persists the data to the Cloudant DB.
- Using Leaflet, the mapping UI updates the marker location on map.
Please see detailed instructions in the README.