Replace `metar` with custom parser of NOAA XML API
[khatus.git] / x2 / src / bash / exe / khatus_sensor_weather.sh
index 371010f..a41f14a 100644 (file)
@@ -5,4 +5,9 @@ set -e
 dir_bin="$1"
 weather_station_id="$2"
 
-metar -d "$weather_station_id" 2>&1 | "$dir_bin"/khatus_parse_metar_d_output
+curl \
+    -X GET \
+    -H "accept: application/vnd.noaa.obs+xml" \
+    "https://api.weather.gov/stations/${weather_station_id}/observations/latest?require_qc=false" \
+| hxpipe \
+| "$dir_bin"/khatus_parse_noaa_api
This page took 0.01781 seconds and 4 git commands to generate.