OpenWeatherMap 3.0?

All about the standard Meteobridge devices based on mobile routers from TP-Link, D-Link, ASUS

Moderator: Mattk

Post Reply
sonson123
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: Sat Feb 02, 2019 4:44 am

OpenWeatherMap 3.0?

Post by sonson123 » Sat Feb 02, 2019 4:47 am

Any chances of supporting openweathermap's station 3.0 APIposting.php?mode=post&f=56

SANdood
Senior Boarder
Senior Boarder
Posts: 48
Joined: Wed Jan 28, 2015 1:36 pm

Re: OpenWeatherMap 3.0?

Post by SANdood » Sat Feb 02, 2019 2:56 pm

+1

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 5754
Joined: Mon Oct 01, 2007 10:51 pm

Re: OpenWeatherMap 3.0?

Post by admin » Sun Mar 24, 2019 3:33 pm

Today I switched to API 3.0. You will need to give Meteobridge new credentials to have this working.

BigAlT
Junior Boarder
Junior Boarder
Posts: 32
Joined: Tue Jul 04, 2017 8:41 pm
Location: Washington State

Re: OpenWeatherMap 3.0?

Post by BigAlT » Sun Apr 14, 2019 7:48 am

The openweathermap v3 api upload doesn’t work at all. The automatic station Id feature creates a new station ID every time you login to your Meteobridge and your Meteobridge doesn’t upload weather data to any of the station IDs it creates. It’s described as “ experimental “ in the release log and so far it needs a lot more work before it’s ready to release.

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 5754
Joined: Mon Oct 01, 2007 10:51 pm

Re: OpenWeatherMap 3.0?

Post by admin » Sun Apr 14, 2019 11:15 am

I disagree. As far as I can see, it does not create a new station-id each time you login to Meteobridge.
BTW, what do you mean by "login" here? Pressing "save" on "weather network" tab"or just browsing to the "weather network" tab or browsing to any of the Meteobridge pages?

BigAlT
Junior Boarder
Junior Boarder
Posts: 32
Joined: Tue Jul 04, 2017 8:41 pm
Location: Washington State

Re: OpenWeatherMap 3.0?

Post by BigAlT » Sun Apr 14, 2019 4:38 pm

If I enter my login name & password to access my nanoSD a new openweathermap station ID is created with the name of the station being the MAC address of my nanoSD. It created 7 additional separate station IDs besides the one originally created upon entering my api in the NanoSD Weather Station openweathermap field before I removed openweathermap as a weather station on my nanoSD and manually removed the 8 stations from my openweathermap account.
I was also unable to find any weather data uploaded to any of the openweathermap station IDs using the GET command. It showed each of them being empty of data. These same issues are reported by Pigge in his post of March 30. He has a Meteobridge Pro as compared to my NanoSD.
In order to find out if you have more than one station IDs created on your api you need to access the information by using the GET command for seeing how many station IDs you have as described on the openweathermap website.
Here are the results of the GET command before I removed the station IDs including the Station ID I created manually using the POST command.
5ca635e76c634e000131b935",
"created_at": "2019-04-04T16:50:47.746Z",
"updated_at": "2019-04-04T16:50:47.746Z",
"external_id": "meteobridge-b8-d8-12-60-42-8c",
"name": "Mariners Outlook",
"longitude": -123.049881,
"latitude": 48.067455,
"altitude": 8,
"rank": 10
},
-{
"id": "5ca690416c634e000131b939",
"created_at": "2019-04-04T23:16:17.998Z",
"updated_at": "2019-04-04T23:16:17.998Z",
"external_id": "meteobridge-b8-d8-12-60-42-8c",
"name": "Mariners Outlook",
"longitude": -123.049881,
"latitude": 48.067455,
"altitude": 8,
"rank": 10
},
-{
"id": "5ca7801d6c634e000131b946",
"created_at": "2019-04-05T16:19:41.569Z",
"updated_at": "2019-04-05T16:19:41.569Z",
"external_id": "meteobridge-b8-d8-12-60-42-8c",
"name": "Mariners Outlook",
"longitude": -123.049881,
"latitude": 48.067455,
"altitude": 8,
"rank": 10
},
-{
"id": "5ca780ba6c634e000131b947",
"created_at": "2019-04-05T16:22:18.041Z",
"updated_at": "2019-04-05T16:22:18.041Z",
"external_id": "meteobridge-b8-d8-12-60-42-8c",
"name": "Mariners Outlook",
"longitude": -123.049881,
"latitude": 48.067455,
"altitude": 8,
"rank": 10
},
-{
"id": "5ca790046c634e000131b948",
"created_at": "2019-04-05T17:27:32.236Z",
"updated_at": "2019-04-05T17:27:32.236Z",
"external_id": "meteobridge-b8-d8-12-60-42-8c",
"name": "Mariners Outlook",
"longitude": -123.049881,
"latitude": 48.067455,
"altitude": 8,
"rank": 10
},
-{
"id": "5ca81ad86c634e000131b94d",
"created_at": "2019-04-06T03:19:52.551Z",
"updated_at": "2019-04-06T03:19:52.551Z",
"external_id": "M_Out1",
"name": "Mariners Outlook 1",
"longitude": -123.04,
"latitude": 48.06,
"altitude": 52,
"rank": 10
},
-{
"id": "5ca8233a6c634e000131b94e",
"created_at": "2019-04-06T03:55:38.713Z",
"updated_at": "2019-04-06T03:55:38.713Z",
"external_id": "meteobridge-b8-d8-12-60-42-8c",
"name": "Mariners Outlook",
"longitude": -123.049881,
"latitude": 48.067455,
"altitude": 8,
"rank": 10
},
-{
"id": "5caa2e6f6c634e000131b97f",
"created_at": "2019-04-07T17:07:59.156Z",
"updated_at": "2019-04-07T17:07:59.156Z",
"external_id": "meteobridge-b8-d8-12-60-42-8c",
"name": "Mariners Outlook",
"longitude": -123.049881,
"latitude": 48.067455,
"altitude": 8,
"rank": 10
},
-{
"id": "5caa2f4a6c634e000131b980",
"created_at": "2019-04-07T17:11:38.236Z",
"updated_at": "2019-04-07T17:11:38.236Z",
"external_id": "meteobridge-b8-d8-12-60-42-8c",
"name": "Mariners Outlook",
"longitude": -123.049881,
"latitude": 48.067455,
"altitude": 8,
"rank": 10
}

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 5754
Joined: Mon Oct 01, 2007 10:51 pm

Re: OpenWeatherMap 3.0?

Post by admin » Mon Apr 15, 2019 10:37 am

I made some changes in the way Meteobridge handles station setup on OpenWeatherMap. Please give just released version a try. Please also read here: https://www.meteobridge.com/wiki/index.php/Forum

Hopefully, this will then come to a good end. Sorry for being slow on this, but it is not on my top prio list. A few weeks ago I asked OpenWeatherMap about their promise to integrate creation/maintenance/deletion of stations into their web interface, where it should be from day one. Their short answer was: "This feature still under development."

BigAlT
Junior Boarder
Junior Boarder
Posts: 32
Joined: Tue Jul 04, 2017 8:41 pm
Location: Washington State

Re: OpenWeatherMap 3.0?

Post by BigAlT » Tue Apr 16, 2019 2:35 am

Unfortunately, the new OpenWeathermap station ID changes don’t work for me. Even though I removed OpenWeathermap as a weather network in my NanoSD, the old original station ID that my NanoSD created is still there along with my previously entered api ID which I can remove by deleting it and doing a save but my original station ID still remains. I’m unable to have my NanoSD use the station ID I created manually ( which is the only one left on my api ID since I removed all 8 station IDs that my nanoSD previously created ) as there is no way to remove the station ID it created when I used the earlier firmware version to add openweathermap as a weather network.
Under the latest April 15 firmware upgrade, selecting openweathermap as a weather network still shows my api ID and the station ID it created under the older firmware with a green check mark next to it. Even if I delete my api key and save the network ( either as not reporting at all or using any of the different reporting periods ) it still saves the original Station ID it first created though now with a red X rather than a green check mark but still does not check for and save my manually created station ID.
Since I’ve already deleted that station ID from my OpenWeatherMap API it leaves me with no Station ID that is useable.
Am I going to have to do a full reset of my NanoSD to clear the old openweathermap Station ID ?.
If so, that will create a major problem as I will have to reset all my other weather networks as well.
You should also be aware that the OpenWeatherMap api adding a weather station example only shows that you should use 2 decimal places when setting the latitude & longitude of your Station ID. On my Meteobridge system page I use the standard 4 decimal places which is what the Meteobridge uses in setting up a Station ID automatically and that is used by OpenWeatherMap in generating the automatically created Station ID. I don’t know if setting up a Station ID using 4 decimal places will cause the OpenWeatherMap api to reject the weather data upload.

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 5754
Joined: Mon Oct 01, 2007 10:51 pm

Re: OpenWeatherMap 3.0?

Post by admin » Thu Apr 18, 2019 11:01 am

You can just purge the "xowmstation" line from the /root/meteobridge.conf file, if you are familiar with login into the Meteobridge via ssh.
I will change the long/lat decimals to two with todays update.

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 5754
Joined: Mon Oct 01, 2007 10:51 pm

Re: OpenWeatherMap 3.0?

Post by admin » Thu Apr 18, 2019 12:11 pm

update available.

BigAlT
Junior Boarder
Junior Boarder
Posts: 32
Joined: Tue Jul 04, 2017 8:41 pm
Location: Washington State

Re: OpenWeatherMap 3.0?

Post by BigAlT » Fri Apr 19, 2019 1:35 am

The upload to openweathermap 3.0 is now functioning. If you’ve created an openweathermap Station ID using the automatic creation function on your weatherbridge web interface using the original March 24 firmware release you will need to remove it from your weatherbridge manually if you’ve already removed that station ID from your OpenWeatherMap API Account. If that is the only station ID you’ve ever created and you haven’t already removed it from your OpenWeatherMap API Account then all you need to do is make sure that the latitude and longitude of your station ID are only listed to 2 decimal places as that is the format shown in the OpenWeatherMap API station ID creation example. If you used a 4 decimal place latitude & longitude location on your Meteobridge system page that was also used in creating the automatic station ID ( this has just been fixed ). Apparently, using more than 2 decimal places will cause the data upload to be rejected.
To find out if your station ID has too many decimal places you need to use a GET command as shown in the OpenWeatherMap API examples. If it is more than 2 decimal places you can either change the latitude/longitude to 2 decimal places using the PUT command as shown in the OpenWeatherMap API examples. Or, you can delete your station ID from both your OpenWeatherMap api using the delete command example on OpenWeatherMap and delete your station ID from your weatherbridge manually using winSCP. Then create a new station ID on your Meteobridge. You can do this automatically by just filling in your OWM api Id in the box when setting up your OWM weather net on your Meteobridge. Your meteobridge will create a new station ID ( using only 2 decimal places ) and external station name which you have also entered.
To delete your old station ID using winSCP. Login to your Meteobridge using WinSCP using the IP address of your Meteobridge on your network.. The user name is root and the password is meteobridge. That will bring up a list of files on the right side of the winSCP window. Double click on the file meteobridge.conf. That will bring up the lines of code. Scroll down to the line xowmstation. Remove your station key and save. When you go to create a new OpenWeatherMap weather station on your meteobridge it will either create a new station ID using only 2 decimal places or will create a station ID using the first station ID on your OpenWeatherMap api if you still have any also with only 2 decimal places.
Since I had already deleted all of the Station IDs created by the March 24 firmware and created a new station ID with the examples 2 decimal places, I decided to just edit the meteobridge.conf file to replace my original NanoSD created station ID with the one I created myself on the OpenWeatherMap api as well as replace the external name with the one I created as well. I edited the meteobridge.conf file with winSCP as described above. I saved the changes and closed winSCP.
After waiting a few hours I then did a GET command for the measurements as shown in the OpenWeatherMap API examples. It returned with all of my station data.
I hope my post isn’t too long winded.
Last edited by BigAlT on Tue Apr 23, 2019 1:57 am, edited 3 times in total.

pigge
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: Tue Sep 18, 2018 2:24 am

Re: OpenWeatherMap 3.0?

Post by pigge » Mon Apr 22, 2019 5:03 pm

i also have it working now, i used a different method to editing the /root/meteobridge.conf file since i didn't have direct network access to my meteobridge - only the web proxy access through admin.meteobridge.com,
i disabled the upload to OpenWeatherMap in the "weather nets" tab, then created a backup of my meteobridge config on the system tab, edited the file generated and removed all config for owm, then i restored the edited file.
I then created a station via owm API and enabled the owm upload from the "weather nets" tab using my newly generated station id

BigAlT
Junior Boarder
Junior Boarder
Posts: 32
Joined: Tue Jul 04, 2017 8:41 pm
Location: Washington State

Re: OpenWeatherMap 3.0?

Post by BigAlT » Mon Apr 22, 2019 8:25 pm

Pigge,
Your solution to using the web interface to edit the config file is certainly just as easy as using winSCP. Kudos.

User avatar
gus
Junior Boarder
Junior Boarder
Posts: 30
Joined: Sun Jun 24, 2018 10:31 pm
Location: Orlando, FL

Re: OpenWeatherMap 3.0?

Post by gus » Mon Apr 22, 2019 10:38 pm

I've written a HOW TO documentation for newbies.

How To Create and Configure OpenWeatherMap Station on Meteobridge
https://www.wxforum.net/index.php?topic ... #msg377490

My method of station creation is different using REST client. Using REST client you can have access to all the commands that OpenWeatherMap has published.
https://openweathermap.org/stations#create_station

Post Reply