Hi! I registered on openweathermap, I got a key, but I cannot realize how can I get a station_id in order to put it in weewx.con as explained in https://github.com/weewx/weewx/wiki/openweathermap
Any hint is appreciated.
Il giorno domenica 12 febbraio 2017 07:23:56 UTC+1, Andrew Milner ha scritto:It says:"Register your station in our system using the new API version and get a unique identifier for the station."The problem is: how?
the openweathermap web site is a bit confusing. it is oriented toward people who need to download data more than for people who want to upload data, the terms they use have changed over the years, and their step-by-step instructions are not accurate if taken literally.
fwiw, i have been using the 'name' associated with a 'key' as the 'station_id' and 'appid', respectively.
that works for me with either their 3.0 api or their pre-3.0 api
if that does not work for you, contact the openweathermap support then let us know what you discover
m
--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/3rCKMUCcEF0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
2017-02-12 15:15 GMT+01:00 mwall:the openweathermap web site is a bit confusing. it is oriented toward people who need to download data more than for people who want to upload data, the terms they use have changed over the years, and their step-by-step instructions are not accurate if taken literally.
fwiw, i have been using the 'name' associated with a 'key' as the 'station_id' and 'appid', respectively.
that works for me with either their 3.0 api or their pre-3.0 apino, it doesn't work, I get in syslog:restx: OWM: Failed to publish record 2017-02-12 20:15:00 CET (1486926900): Failed upload after 3 tries
{
"code": 400001,
"message": "unmarshal type error: expected=[]types.MeasurementRequest, got=object, offset=1"
}
{
"external_id": "ktxlames3",
"name": "Lamesa, Texas",
"latitude": 32.742908,
"longitude": -101.965671,
"altitude": 3004
}
access-control-allow-credentials →true
access-control-allow-methods →GET, POST
access-control-allow-origin →*
connection →keep-alive
content-length →107
content-type →application/json; charset=utf-8
date →Fri, 18 Aug 2017 02:38:16 GMT
server →openrestyhttp://api.openweathermap.org/data/3.0/stations?appid=<your app id>
POST /data/3.0/stations?appid=myAppID HTTP/1.1
Host: api.openweathermap.org
Content-Type: application/json
Cache-Control: no-cache
Postman-Token: myPostmanToken
{
"external_id": "myExternalID",
"name": "SPMS Lamesa Weather Station",
"latitude": myLatitude,
"longitude": myLongitude,
"altitude": 3004
} Sep 18 03:00:26 IQLDCOOM4 weewx[2043]: restx: OWM: Failed upload attempt 2: HTTP Error 401: UnauthorizedSep 18 03:00:35 IQLDCOOM4 weewx[2043]: restx: OWM: Failed upload attempt 3: HTTP Error 401: UnauthorizedSep 18 03:00:40 IQLDCOOM4 weewx[2043]: restx: OWM: Failed to publish record 2017-09-18 03:00:00 +01 (1505700000): Failed upload after 3 tries
POST /data/3.0/stations?appid=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxdd17df6c HTTP/1.1Postman-Token: xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxx
{ "external_id": "COOMQLDAU", "name": "Coomera Live Weather", "latitude": -xxxxxxxx, "longitude": xxxxxxxxx, "altitude": 32}