Last active
March 2, 2019 18:27
-
-
Save donpdonp/99a321bea83ccea6639f15c77ca82dfc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#https://feedback.weather.com/customer/en/portal/articles/2924682-pws-upload-protocol?b_id=17298 | |
ID=stationid | |
PASS=pass | |
URL=http://weatherstation.wunderground.com/weatherstation/updateweatherstation.php | |
# convert command line C to F (requires bc util) | |
TEMPF=$(echo "scale=2;((9/5) * $1) + 32" |bc) | |
# dateutc format is YYYY-MM-DD HH:MM:SS (mysql format) | |
DATEUTC=now | |
curl --get $URL \ | |
-d action=updateraw \ | |
-d ID=$ID \ | |
-d PASSWORD=$PASS \ | |
-d dateutc=$DATEUTC \ | |
-d softwaretype=raspberrypi \ | |
-d tempf=$TEMPF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment