Author Topic: How to Configure OpenWeatherMap on Meteobridge  (Read 4680 times)

0 Members and 1 Guest are viewing this topic.

Offline txweather.org

  • Forecaster
  • *****
  • Posts: 1597
    • Texas Weather
How to Configure OpenWeatherMap on Meteobridge
« on: July 13, 2016, 01:25:02 AM »
For some time now I am unable to upload to open weather map. I get:

2016-07-13 00:18:57 Error: http://openweathermap.org/data/post: 2016-07-13 00:18:58 ERROR 500: Internal Server Error

Any Ideas why?
Am I the only one?

Regards,
-

Edit 04/22/19 Solution here: https://www.wxforum.net/index.php?topic=29874.msg377490#msg377490
« Last Edit: April 22, 2019, 03:35:57 PM by txweather.org »

----
Davis Vantage Pro2 Plus +FARS|Meteobridge Nano SD|Meteohub|Meteobridge MR-3020|WU KTXSPRIN75/PWS JRARGWX75/CWOP EW2972/WBB TXWDVUE75/Blitzortung ID: 1142|AWEKAS: 12095
Donations are welcome: https://paypal.me/ffuentesb

Offline kevink619

  • Senior Member
  • **
  • Posts: 98
    • My G+
Re: Meteobridge uploads
« Reply #1 on: September 07, 2016, 02:19:12 AM »
For some time now I am unable to upload to open weather map. I get:

2016-07-13 00:18:57 Error: http://openweathermap.org/data/post: 2016-07-13 00:18:58 ERROR 500: Internal Server Error

Any Ideas why?
Am I the only one?

Regards,
-

You're not the only one. I'm seriously considering dropping support for OpenWeatherMap from my app. They seemed to have quietly abandoned support for the uploading of PWS data to their servers - yet the still have invalid instructions on how to upload your weather data. I don't know what is up with them these days.

Offline txweather.org

  • Forecaster
  • *****
  • Posts: 1597
    • Texas Weather
Re: Meteobridge uploads
« Reply #2 on: September 08, 2016, 08:32:57 AM »
For some time now I am unable to upload to open weather map. I get:

2016-07-13 00:18:57 Error: http://openweathermap.org/data/post: 2016-07-13 00:18:58 ERROR 500: Internal Server Error

Any Ideas why?
Am I the only one?

Regards,
-

You're not the only one. I'm seriously considering dropping support for OpenWeatherMap from my app. They seemed to have quietly abandoned support for the uploading of PWS data to their servers - yet the still have invalid instructions on how to upload your weather data. I don't know what is up with them these days.

That's what I did, I completely drop them.

----
Davis Vantage Pro2 Plus +FARS|Meteobridge Nano SD|Meteohub|Meteobridge MR-3020|WU KTXSPRIN75/PWS JRARGWX75/CWOP EW2972/WBB TXWDVUE75/Blitzortung ID: 1142|AWEKAS: 12095
Donations are welcome: https://paypal.me/ffuentesb

Offline docbee

  • Moderator
  • Forecaster
  • *****
  • Posts: 853
    • smartbedded
Re: Meteobridge uploads
« Reply #3 on: September 11, 2016, 08:14:26 AM »
They are much focused on selling data via their APIs. They never took reasonable care to make sending data easy and stable. Asking them to mention Meteobridge as a solution being able to send data in their list of supported SW/devices was never answered. Dropping them looks like a good idea. I can't see much that matches the "Open" phrase in their name.
founder of smartbedded.com - home of meteohub, meteoplug, meteobridge, meteostick

Offline SpringHillWeather

  • Weather Hobbyist
  • Forecaster
  • *****
  • Posts: 533
  • Spring Hill, Florida
    • Spring Hill
Re: Meteobridge uploads
« Reply #4 on: September 11, 2016, 01:41:03 PM »
Agreed.  I can login but can't find my Station Data on their site anymore.   They did make changes and as you mentioned they went to the 'API' model.   

One less service I'll be sending data to now.

Saratoga
HomeWeatherStation
Meteotemplate
Homebrew
Ambient 1001 | ObserverIP | Meteobridge | MeteoPlug

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Meteobridge uploads
« Reply #5 on: September 11, 2016, 02:27:16 PM »
I did not include OWM in Meteotemplate at all. I used to have a script for it on my personal page before I created MT and I remember that it was down every other week, and I remember many people complained on their FB site and they never even responded to anything. Very unreliable service.

Offline kevink619

  • Senior Member
  • **
  • Posts: 98
    • My G+
Re: Meteobridge uploads
« Reply #6 on: September 11, 2016, 02:46:46 PM »
I did not include OWM in Meteotemplate at all. I used to have a script for it on my personal page before I created MT and I remember that it was down every other week, and I remember many people complained on their FB site and they never even responded to anything. Very unreliable service.

I was finally able to get a reply from OWM when they responded to my tweets. They basically said that they plan on fixing things "soon".

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: How to Configure OpenWeatherMap on Meteobridge
« Reply #7 on: September 13, 2018, 01:21:42 PM »
In December 2016 OpenWeatherMap updated their API protocol to version 3.0 I believe.

Has anyone tried to upload and see their data with OpenWeatherMap recently since the new API 3.0 version was introduced?

I'm using a Meteobridge. I got my station ID created using a Json Chrome add-on app called ARC (Adavanced REST Client). I think it is similar to the Postman app...but I think ARC is simpler and easier to use. The instructions on OpenWeatherMap are still terrible. But I'm able to query with the ARC app and see that my station got created and exists. I don't see a place in their website under your account settings for the station to even show up on though. Still I'm uploading wx data successfully according to the Meteobridge.

One confusing thing in the Meteobridge is that I wasn't sure if to use my Station ID name (that I created called external_ID), or the station ID that got generated when I created the station. But upon looking at the documentation of the format to send weather data it seems that they want the station ID that got generated. I have the Meteobridge set to upload every 5 minutes and I get the green check marks on both Weather Network and Live Data tabs. But I don't see the data on OpenWeatherMaps websites anywhere yet. I'll give it a few days and see what happens. I was just curious if anyone else has attempted this recently.

There is a Json query to GET published data from your station. So I used the ARC app to query. But after figuring out my Epoch date range and entering the query I get no weather data and just a rather basic with no error response of:  [array[0]],

The Meteobridge should really change that field name to something better than "Station Name." It should be called instead "Generated ID" I think, to clear up the confusion and so that the user doesn't use the "external_ID" to identify the station. Maybe part of the problem is that the Meteobridge has not been updated to support this new API??? But I think it has because I think one of the new things in the 3.0 API is that it now includes a way of identifying a specific station which was not possible before. I suppose it could be possible that the Meteobridge is still not fully supporting OpenWeatherMap or has some bugs. Please share if you've had any success or insight.
« Last Edit: April 22, 2019, 03:15:44 PM by galfert »
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline docbee

  • Moderator
  • Forecaster
  • *****
  • Posts: 853
    • smartbedded
Re: Meteobridge uploads
« Reply #8 on: September 13, 2018, 06:52:48 PM »
I can change the upload format to the new API v3, modern JSON style but very poor on content (no solar radiation, no UV, unclear what kind of pressure they like, etc). Only question is how the user generates a station_id before starting the upload by giving alt/long/lat etc. Do these OWM guys provide a web formular for the user to define a station? Or don't they care as usual?

I am not much interested to have setting up a station in their network being part of the Meteobridge interface.
« Last Edit: September 13, 2018, 06:55:01 PM by docbee »
founder of smartbedded.com - home of meteohub, meteoplug, meteobridge, meteostick

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: How to Configure OpenWeatherMap on Meteobridge
« Reply #9 on: September 13, 2018, 09:13:39 PM »
I read that OWM now only supports the new API v3. If the Meteobridge is currently using the old format then it wont work.

Since they are based out of the UK they want the weather data in metric units. They list the weather units on this basic information page on how to connect a weather station. They list the pressure type as hpa. Their example page lists an upload pressure of 1021. That is hpa and probably station pressure because they ask for altitude when setting up the station. They just call it Atmospheric pressure, and since they aren’t calling it Relative pressure or Sea Level Pressure is another clue that they want station pressure.

The other weird part (for me anyway, but I’m not a programmer) is that they want the weather uploaded where the time is in Epoch (Unix timestamp). It is a 10 digit number. I remember reading that Unix started counting seconds from 0 on January 1 at 12AM GMT in 1970.

The only way to create a station is with any JSON client software. OWM does not guide you nor recommend a software to use. I will create some documentation on using the JSON client app that I used in Chrome (ARC app) with steps on how to set up a station (and how to change static parameters of the station, and how to query it for test data). It was a bit tedious to copy and past IDs and API keys to create the custom URL and give it the data that it needs to generate the station ID (it generates the ID and creates the station in one step). Then you can use a different query in the JSON client app and the site responds back confirming that your station got created. Their website mentions that new tools are coming soon to make it easier to do more. But who knows when that will be.

To modify the created station you also need to use the JSON client app. You would need to do this to correct or change any station static parameter like Latitude, Longitude, altitude, external_id, station name.

The Meteobridge does not need to pass Latitude and Longitude. They get Lat & Long when the station ID was generated (via JSON client app). This example below (plus some recommended extra variables) is the only thing the Meteobridge needs to send (I would remove the clouds section from their example):

Code: [Select]
[
  {
    "station_id": "583436dd9643a9000196b8d6",
    "dt": 1479817340,
    "temperature": 18.7,
    "wind_speed": 1.2,
    "wind_gust": 3.4,
    "pressure": 1021,
    "humidity": 87,
    "rain_1h": 2,
    "clouds": [
        {
            "condition": "NSC"
        }
    ]
  }
]

…and I would add some variables to the Meteobridge if possible that they omitted in the example above (at least wind direction should be no problem):

“wind_deg”:                                 (0 to 360)
“rain_6h”:                                    (using mm for amount in last 6 hours)
“rain_24h”:                                  (using mm for amount in last 24 hours or last day)
“dew_point”:                                (using Celsius)
“heat_index”:                               (using Celsius)

Here is where all this is documented:
https://openweathermap.org/stations

I don’t know what the variable “humidex” even means. It is described as Index of temperature and humidity. I thought oh like heat index. But they already have a different variable for that called “heat_index.”

If the Meteobridge could get updated to support this new API v3 then I can check with the JSON client app to tell it to retrieve weather data. If I get data back then and the weather data numbers look good then I would let everyone know that it is working. Then I would see if the data shows up on their weather maps. It should. Unless their weather maps are only a basic overview of specific spots with aggregated data from different weather sources. Then that would mean that the only way to get your weather data would be by creating a website that called the JSON API to then publish to your website. If that is the case then OpenWeatherMap I’d say is pretty useless and they are only interested in selling weather data rather than hosting individual weather stations. If that happens then I would probably recommend removing OWM from the Meteobridge.  I’m willing to do any testing if the Meteobrige gets updated and I’ll report back.

« Last Edit: December 06, 2019, 02:24:17 PM by galfert »
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline Bushman

  • Forecaster
  • *****
  • Posts: 7549
    • Eagle Bay Weather
Re: Meteobridge uploads
« Reply #10 on: September 14, 2018, 10:25:18 AM »
Humidex is a Canadian invention!  :)   https://simple.wikipedia.org/wiki/Humidex
Need low cost IP monitoring?  http://wirelesstag.net/wta.aspx?link=NisJxz6FhUa4V67/cwCRWA or PM me for 50% off Wirelesstags!!

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: How to Configure OpenWeatherMap on Meteobridge
« Reply #11 on: April 22, 2019, 02:45:37 PM »
The Meteobridge recently got updated to support the new OpenWeatherMap 3.0. I've got my Meteobridge successfully uploading to OpenWeatherMap.

Follow these instructions to get your Meteobridge to upload your data to OpenWeatherMap.

How To Create and Configure OpenWeatherMap Station on Meteobridge

•   Create an account in the Members area of OpenWeatherMap: https://openweathermap.org/register
•   Generate an API key in the API keys section of your OpenWeatherMap account: https://home.openweathermap.org/api_keys
•   To create a new API key first type in a name for the key (not a station name). I used Default as the name but it can be anything you want. Then click Generate button.
 [ You are not allowed to view attachments ]
•   You should now see your new API Key. You have not yet created a station ID.
 [ You are not allowed to view attachments ]
•   Install the ARC (Advanced REST Client) application: https://advancedrestclient.com
•   Open ARC application.
•   Change Method to be POST.
•   Enter in the following URL: http://api.openweathermap.org/data/3.0/stations?appid=XXX-Your-Generated-API-Key-Goes-Here
•   Be sure to replace your API key after the ?appid= in the URL.
 [ You are not allowed to view attachments ]
•   Don’t hit send yet…
•   Click on Body and change type to application/json
•   Enter the following into the Body section filling in the details for your station. *** Be sure to enter Altitude in Meters ***
Code: [Select]
{
    "external_id": "Anything-you-want-as-an-ID-with-no-spaces",
    "name": "Your Station Name Station spaces okay",
    "latitude": 42.677427,
    "longitude": -110.241215,
    "altitude": 150
}
•   Click Send.
•   Now add the OpenWeatherMap service to the Meteobridge and fill in the required fields and click Save.
 [ You are not allowed to view attachments ]
* Station Name on Meteobridge is your external_id not your long station name with spaces (that doesn't get used anywhere that I can see...but you need to specify it during creation), and on the Meteobridge station ID automatically shows up and is a totally different identification for the station that OWM created when you did the POST command to create the station in the REST client. You don't need to know is but if you were curious now you know.
•   Check the Meteobridge Live Data tab that you are successfully posting data.
 [ You are not allowed to view attachments ]

Boris is right. This is the most complicated weather service to configure and use. It is unbelievable that OpenWeatherMap requires their users to go through all this work. Its like they didn't create the correct user interface on their website to mange station creation and management. Perhaps this whole process is actually simpler than I described where you don't need to use the ARC app or other REST client as it seems reading the Meteobridge notes it can create a station. As I've not tested this other station creation method I can't comment. Try it and let me know. Regardless using the ARC application or other REST client is not that difficult and it gives you some insight into how it all works. Plus then you gain the knowledge to do a lot other testing and queries for troubleshooting or to change station parameters (see next post).

Now that I have this working well I don't really know how useful this will be. But I had fun figuring this much out and sharing the process.
« Last Edit: April 22, 2019, 08:43:20 PM by galfert »
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: How to Configure OpenWeatherMap on Meteobridge
« Reply #12 on: April 22, 2019, 03:04:21 PM »
Now if you run into trouble there is a a lot of fixing that might be required with the ARC application.

Essentially if you goof creating a station ID or you need to double check that your station ID got created correctly all this is accomplished via the ARC application. You don't have to use this ARC application. If you have a favorite other REST application you can use that. POSTMAN is another favorite.

This is a good reference page with all the commands you can send:
https://openweathermap.org/stations#create_station

Formatting is critical. Sometimes there is a / after stations and sometimes there isn't. Sometimes you need to include the station ID (not the external_id but rather the other confusing ID that you'll see when you GET the stations that have been created. after /stations/ and other times you don't. Depends on the command you need to issue. These instructions are not that well written. The examples are confusing. One thing is true though. You ALWAYS need to use the ?appid=YOUR-API-KEY at the end of every URL statement.

TIP: If you need to change your station details you cannot just change one detail. You do use the PUT command but you have to enter in all the station descriptions, station_ID, station name, latitude, longitude, and height.

One thing everyone should know how to do is to verify that your station is really there. So this command is almost a must for troubleshooting (this is not done in the browser...this is done in the ARC app or your favorite REST client):
GET http://api.openweathermap.org/data/3.0/stations?appid=YOUR-API-KEY

That should list your station details. In some cases you may have more than one station. The Meteobridge only uses the first one. You may want to delete extra stations. You may need to fix existing stations.
« Last Edit: April 22, 2019, 04:03:34 PM by galfert »
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: How to Configure OpenWeatherMap on Meteobridge
« Reply #13 on: April 22, 2019, 04:55:44 PM »
One thing Boris should hopefully do is to add a reset button the OpenWeatherMap settings. It seems that after you have successfully published data to OpenWeatherMap there is no simple way to delete the settings on the Meteobridge. You can disable the upload and set it to No Upload. But if you use the ARC application or other REST client and you delete your station then you won't be able easily reconfigure your Meteobridge to upload to the newly generated station ID because the Meteobridge stays locked into the original configuration. So even if you attempt to bring the OpenWeatherMap upload back into operation the settings are in there and you can't erase them and they may not work if you made changes on the OpenWeatherMap server side.

For now to erase the configuration on the Meteobridge there are two options (both a bit involved).
  • Method 1: Backup your Meteobridge configuration using the Backup button in the System tab. Then edit the configuration file you downloaded to you computer and remove the OpenWeatherMap section of the config file, which is the line that starts with xowmstation. Then Restore the configuration file that you edited. You will now have a Meteobridge without the OpenWeatherMap service configured.
  • Method 2: You can log into the Meteobrige as root using winSCP. Then you can edit the the files on the Meteobridge. The file we need to edit is meteobridge.conf and remove the xowmstation line.

If such a button did exist on the Meteobridge you would want to make sure you didn't use it haphazardly. Because if you delete this configuration from the Meteobridge then it is possible that the Meteobridge would just create a new station ID. But that station ID would probably not work if you didn't also go through the steps to remove or update the station on OpenWeatherMap's web servers....which you need to do then using the ARC application or the REST client of your choice.
« Last Edit: April 23, 2019, 03:11:25 AM by galfert »
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: How to Configure OpenWeatherMap on Meteobridge
« Reply #14 on: April 22, 2019, 06:24:23 PM »
Okay so now you want to see the data that you are sending is actually posting over at OpenWeatherMap. To do this requires converting the current date or time to Epoch time which is also referred to as Unix time.

I used the following website to do the time conversions to Epoch required.
https://www.epochconverter.com/

Use documentation at the bottom of this link to pull measurements:
https://openweathermap.org/stations#create_station

Here is a sample GET statement to pull todays high and low and average measurements using the ARC application or your preferred REST client.
Code: [Select]
GET http://api.openweathermap.org/data/3.0/measurements?station_id=YOURStationID&type=d&limit=100&appid=API-KEY-HERE&from=1555905600&to=1555991999

And I got the following Results (this is just my first day posting data and so it isn't even a complete day):
Code: [Select]
[
  {
"type": "d",
"date": 1555977600,
"station_id": "5b9a830b199f030001c1c97c",
"temp": {
"max": 28.2,
"min": 26.1,
"average": 26.67,
"weight": 676
},
"humidity": {
"average": 32.19,
"weight": 676
},
"wind": {
"deg": 331.85,
"speed": 0.4
},
"pressure": {
"min": 1019.6,
"max": 1022.1,
"average": 1021.62,
"weight": 676
},
"precipitation": {
"rain": 0
}
}
],
The range I specified and defined as type=d was for day. You could change this to other types if you wanted. Everything comes back in metric only.
« Last Edit: April 22, 2019, 08:52:47 PM by galfert »
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline BigAlT

  • Senior Member
  • **
  • Posts: 95
Re: How to Configure OpenWeatherMap on Meteobridge
« Reply #15 on: April 22, 2019, 07:48:38 PM »
For those of us that are Mac users and have an iPad, there is a free client app that works fine for using the GET, POST, PUT and DELETE commands to access and modify the OWM api. It’s HTTBot available for free on the App Store.
Davis Vantage Vue ISS & Console with WiFi Logger 2
2nd Davis Vantage Vue Console with WiFi Logger 2
Davis Vantage Pro2 Console with Meteobridge Nano SD
Davis Weather Envoy with USB Logger connected to RPi 3B+ running WEEWX
WeatherFlow Smart Weather Station

Offline Bahni

  • Member
  • *
  • Posts: 14
Re: How to Configure OpenWeatherMap on Meteobridge
« Reply #16 on: January 23, 2021, 01:53:54 PM »
Hello George,
have now tried to register my weather station according to your instructions.
I have also succeeded so far, it is displayed on Meteobridge under transmission status successful.
But now I don't know how to get / check my data sent to OpenWeatherMap.
Shouldn't the weather station be displayed on the OpenWeatherMap homepage?
« Last Edit: January 23, 2021, 01:57:50 PM by Bahni »
Gruß Bahni

wunderground

Meteohub
Raspberry Pi 3
Meteostick
Davis Vantage Vue
ELV WS 300 PC mit KS300
ELV (Velleman) WS 3080
NAS-QNAP TS-209 PRO II

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: How to Configure OpenWeatherMap on Meteobridge
« Reply #17 on: January 23, 2021, 02:12:54 PM »
But now I don't know how to get / check my data sent to OpenWeatherMap.

To get data back you'll need to use a script that your write or use another tool that is designed to use OpenWeatherMap data along with your API key.

Quote

Shouldn't the weather station be displayed on the OpenWeatherMap homepage?
Unfortunately, no, they don't display individual stations on their map. It does seem strange since the name of the site has the word map and they have a map. Weird right?
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline Bahni

  • Member
  • *
  • Posts: 14
Re: How to Configure OpenWeatherMap on Meteobridge
« Reply #18 on: January 24, 2021, 02:59:10 AM »
Thank you George.
It's a shame that you can't even query your own data via URL, e.g. like this:
Code: [Select]
http://api.openweathermap.org/data/2.5/weather?q=Berlin%20Tempelhof,DE&units=metric&lang=de&APPID=0815The OpenWeatherMap is therefore only for technical use such as e.g. To use Smart Home (Homematic) but not to quickly graphically display the weather at home.
Gruß Bahni

wunderground

Meteohub
Raspberry Pi 3
Meteostick
Davis Vantage Vue
ELV WS 300 PC mit KS300
ELV (Velleman) WS 3080
NAS-QNAP TS-209 PRO II