DATA WITH IOT DEVICE | UPDATE | WITH
COMPLETE SOLUTIONS - SNHU William Johnson-Moffet
IT 423
Module Six Lab: Retrieving Sensor Data with an IoT Device
1. Latitude and Longitude
Using the OpenWeather location search, I entered my ZIP code and retrieved the correct
geographic coordinates.
Latitude: 27.9475
Longitude: -82.4584s
Figure 1. OpenWeather Latitude/Longitude Search
2. Node-RED Flow Setup
I launched the Debian-NodeRed sandbox in uCertify and created the required flow using the
following nodes:
• Inject node (timestamp)
• HTTP request node
• JSON node
• Debug node
, The inject node triggers the HTTP request, the API returns weather data, the JSON node parses
it, and the debug node displays the output.
Figure 2. Node-RED Flow Setup
3. Weather API Call
I used the Current Weather Data API from OpenWeather and inserted my latitude, longitude, and
API key into the request URL.
API URL used:
https://api.openweathermap.org/data/2.5/weather?lat=27.9475&lon=-
82.4584&appid=64c02b9a16bb3e9beea65bd79f29557d&units=imperial
The HTTP request node in Node-RED was configured using this exact URL.
Figure 3. API URL in HTTP Request Node