Windy Community
    • Unread
    • Categories
    • Groups
    • Go to windy.com
    • Register
    • Login

    Using the new PWS API v2 - but nothing shows up on Windy

    Scheduled Pinned Locked Moved Windy Stations
    34 Posts 6 Posters 7.3k Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • RolandozR Offline
      Rolandoz @marekd | Premium
      last edited by Rolandoz

      @marekd @oleksandr-honcharov Hi guys, I have looked into your updated documentation and I can see that all three "precip" parameters now work with "the last 60 minutes" and will accept millimeters or inches. Is it correct that you prefer millimeters over inches if we talk about an order of presedence ?

      I am ready to go back and report in millimeters. I fetch data from Davis WeatherLink API and I can get any of these values: since midnight, last hour and both in mm or inches:

      • rainfall_daily_in
      • rainfall_daily_mm
      • rainfall_last_60_min_in (should I use this?)
      • rainfall_last_60_min_mm (or this?)

      So do you prefer mm or inches? I dont feel I should convert it one way and then you will convert it back. Then I will prefer to send you the value that fits Windy best with less convertion and rounding errors. :-)

      My stations rain tipping device measures in mm and in steps of 0,2 mm.

      1 Reply Last reply Reply Quote 0
      • RolandozR Offline
        Rolandoz @marekd | Premium
        last edited by

        @marekd @oleksandr-honcharov I have a few comments to the display of the reported data:

        d3580097-218f-441e-a75a-b3f24b9738ae-image.png

        As you see next to the picture showing the location of the station, I have placed a yellow arrow. It is the name of the station. Could we also have the name just below "About this station"?

        The marked text in yellow: What does reporting time and avg. delay mean in this context?

        I report every 5 minutes and the reporting time is withing 1 minute of the timestamp of the data:

        2026-01-21 21:21:06 : Windy URL: https://stations.windy.com/api/v2/observation/update?id=YZjgOxm&ts=1769026822&temp=-0.1&dewpoint=-1.9&humidity=88&wind=3.0&gust=6.7&winddir=66&pressure=101084&precip=0.0&uv=0.0&solarradiation=0&softwaretype=WLL2Windy_3.0.2.406

        2026-01-21 21:21:06 : Windy Success: YZjgOxm - Data timestamp: 21-01-2026 21:20:22

        As you can see from the log, I report to Windy at 21:21:06 and the data has timestamp 21:20:22, so it is about 44 seconds old data.

        I need to understand how 5 minute intervals and delay of data is as shown but it seems Windy tells other information?

        WeatherMan10W 1 Reply Last reply Reply Quote 0
        • WeatherMan10W Offline
          WeatherMan10 @Rolandoz | Premium
          last edited by

          @Rolandoz said in Using the new PWS API v2 - but nothing shows up on Windy:

          2026-01-21 21:21:06 : Windy Success: YZjgOxm - Data timestamp: 21-01-2026 21:20:22

          As you can see from the log, I report to Windy at 21:21:06 and the data has timestamp 21:20:22, so it is about 44 seconds old data.

          I need to understand how 5 minute intervals and delay of data is as shown but it seems Windy tells other information?

          Not a answer per say. But my PWS only updated that highlighted bit once the full 10 days of data was there, Then it changed to Reporting: 5m

          How far back does the data go?

          RolandozR 1 Reply Last reply Reply Quote 0
          • RolandozR Offline
            Rolandoz @WeatherMan10 | Premium
            last edited by

            @WeatherMan10 The total data (using API v1) goes back as far as possible. The we had a "drop out" for one night when I created the API v2 version.

            Very strange, but I just checked again. Since my report som hours ago something has changed. Now it shows the right number of minutes, but the information in the About box is a bit strange (yellow).

            6bc5eee0-1e09-4a03-a699-98d8397b3665-image.png

            It is the same for all 3 stations now - a few minutes in the "ago field" and NaNm in the reporting time fields...

            1 Reply Last reply Reply Quote 1
            • marekdM Offline
              marekd Windy Staff @marekd
              last edited by

              @rolandoz

              • Millimeters or inches, it does not matter. Feel free to send whichever you prefer. The data is consolidated into millimeters in our database and then served on Windy.com in the user’s preferred units.
              • Showing the station name somewhere is a great idea. @suty will probably know more about this, or at least can trigger the right people to handle it.
              • The reporting time issue is a bug. Thanks for reporting it (again). We will fix it ASAP. (cc @weatherman10)
              RolandozR 1 Reply Last reply Reply Quote 1
              • RolandozR Offline
                Rolandoz @marekd | Premium
                last edited by

                @marekd Did you fix something that made my 3 stations go offline? They worked yesterday but today they are offline. I have no errors in the local logfile, so my reporting works (or at least seems to work).

                6cfd998b-8c83-45e0-bdc8-8cf975899f73-image.png

                I have checked station ids and their passwords. Everything is as it should be on my side.

                Do you have any clue what happened?

                marekdM 1 Reply Last reply Reply Quote 0
                • marekdM Offline
                  marekd Windy Staff @Rolandoz
                  last edited by

                  @Rolandoz We made some changes today, but none were made at the time when your stations stopped reporting. We are investigating it further. Our logs are clear as well, but it could still be on our side. Other PWS reports and updates work as usual. Could you please check the response codes for your requests?

                  marekdM 1 Reply Last reply Reply Quote 0
                  • marekdM Offline
                    marekd Windy Staff @marekd
                    last edited by

                    @rolandoz We did not find any issues on our end. Could you please confirm that your script is running and check which HTTP status codes our API returns in response to your requests?

                    RolandozR 2 Replies Last reply Reply Quote 1
                    • RolandozR Offline
                      Rolandoz @marekd | Premium
                      last edited by Rolandoz

                      @marekd I dit not change anything at the time of the failure. The stations are online again. I had no error codes during all reporting in the time when they were offline.

                      e63944ef-c318-4a72-8d24-bb2cc786691c-image.png

                      Unfortunly my stations (I have just checked them all but only uses Hillerød Vejr as a reference) are no longer shown in the list of PWS stations. I have sorted on distance it it normally shows up at the top of the list.

                      59403227-e664-4fbe-aecf-a5bfef512be1-image.png

                      Red arrow points to my station. The list shows stations around me up to 30 kms aways, but not my station. So there is still something wrong.

                      Using the direct link to the station, shown here:

                      https://www.windy.com/station/pws-YZjgOxm

                      we can see it worked until Thursday 22nd at 10:46 CET... Does that tell you anything? I will check my logs for that time.

                      48ec124c-5014-4676-bded-0c9eee6eeac7-image.png

                      As you can see 10:46 and 10:51 in my logs I have NOT changed anything on my side. The application is same verison and only a few values inside the parameters have changed. So I must conclude the problem is caused by something outside my reach. :-) The bottle points to Windy... :-)

                      2026-01-22 10:46:02 : Reading data from WeatherLink station 'Hillerød Vejr'
                      2026-01-22 10:46:03 : WeatherLink Success: 122515
                      2026-01-22 10:46:03 : Sensor Community Success: esp8266-92238877
                      2026-01-22 10:46:03 : Windy URL: https://stations.windy.com/api/v2/observation/update?id=YZjgOxm&ts=1769075122&temp=-1.6&dewpoint=-3.9&humidity=84&wind=5.3&gust=8.9&winddir=90&pressure=100986&precip=0.0&uv=0.0&solarradiation=19&softwaretype=WLL2Windy_3.0.2.406
                      2026-01-22 10:46:03 : Windy Success: YZjgOxm - Data timestamp: 22-01-2026 10:45:22

                      2026-01-22 10:46:05 : Reading data from WeatherLink station 'Helligsø Drag'
                      2026-01-22 10:46:05 : WeatherLink Success: 122252
                      2026-01-22 10:46:05 : Windy URL: https://stations.windy.com/api/v2/observation/update?id=FDbhSie&ts=1769075133&temp=-0.4&dewpoint=-3.3&humidity=81&wind=3.8&gust=7.6&winddir=95&pressure=100969&precip=0.0&uv=0.0&solarradiation=18&softwaretype=WLL2Windy_3.0.2.406
                      2026-01-22 10:46:05 : Windy Success: FDbhSie - Data timestamp: 22-01-2026 10:45:33

                      2026-01-22 10:46:07 : Reading data from WeatherLink station 'Paradise Residence'
                      2026-01-22 10:46:08 : WeatherLink Success: 124735
                      2026-01-22 10:46:08 : Windy URL: https://stations.windy.com/api/v2/observation/update?id=EWtLHK4&ts=1769075151&temp=8.7&dewpoint=7.4&humidity=92&wind=0.0&gust=1.3&winddir=310&pressure=101328&precip=3.6&uv=0.0&solarradiation=53&softwaretype=WLL2Windy_3.0.2.406
                      2026-01-22 10:46:08 : Windy Success: EWtLHK4 - Data timestamp: 22-01-2026 10:45:51

                      2026-01-22 10:51:02 : Reading data from WeatherLink station 'Hillerød Vejr'
                      2026-01-22 10:51:03 : WeatherLink Success: 122515
                      2026-01-22 10:51:03 : Sensor Community Success: esp8266-92238877
                      2026-01-22 10:51:03 : Windy URL: https://stations.windy.com/api/v2/observation/update?id=YZjgOxm&ts=1769075422&temp=-1.5&dewpoint=-3.9&humidity=84&wind=5.3&gust=9.4&winddir=85&pressure=100982&precip=0.0&uv=0.0&solarradiation=19&softwaretype=WLL2Windy_3.0.2.406
                      2026-01-22 10:51:04 : Windy Success: YZjgOxm - Data timestamp: 22-01-2026 10:50:22

                      2026-01-22 10:51:06 : Reading data from WeatherLink station 'Helligsø Drag'
                      2026-01-22 10:51:06 : WeatherLink Success: 122252
                      2026-01-22 10:51:06 : Windy URL: https://stations.windy.com/api/v2/observation/update?id=FDbhSie&ts=1769075433&temp=-0.4&dewpoint=-3.2&humidity=82&wind=3.8&gust=7.6&winddir=87&pressure=100965&precip=0.0&uv=0.0&solarradiation=19&softwaretype=WLL2Windy_3.0.2.406
                      2026-01-22 10:51:06 : Windy Success: FDbhSie - Data timestamp: 22-01-2026 10:50:33

                      2026-01-22 10:51:08 : Reading data from WeatherLink station 'Paradise Residence'
                      2026-01-22 10:51:08 : WeatherLink Success: 124735
                      2026-01-22 10:51:08 : Windy URL: https://stations.windy.com/api/v2/observation/update?id=EWtLHK4&ts=1769075451&temp=8.7&dewpoint=7.5&humidity=92&wind=0.0&gust=0.4&winddir=3&pressure=101321&precip=3.6&uv=0.0&solarradiation=21&softwaretype=WLL2Windy_3.0.2.406
                      2026-01-22 10:51:09 : Windy Success: EWtLHK4 - Data timestamp: 22-01-2026 10:50:51

                      The two other stations, Helligsø Drag and Paradise Residence, which is located in Antalya, Türkiye, also stopped after 10:46. Meaning they no longer show data on Windy. Antalya had 241 mm rain in the last 24 hours and that would have been nice to see on the map...

                      If you cannot find a solution should I then delete and re-create all 3 stations? Then we do a 100% cleanup.

                      1 Reply Last reply Reply Quote 0
                      • RolandozR Offline
                        Rolandoz @Oleksandr Honcharov | Premium
                        last edited by

                        @Oleksandr-Honcharov @marekd Hi guys, I think we are back to the original problem. The reason I think this is that all my stations stopped reporting to Windy on 22nd at 10:46 CET. They went offline, later online, and now offline again. I have created a NEW station (using the Hillerød Vejr to report data) and it never shows up on Windy.com. It shows exactly the same error page that I saw first time I started to use API v2.

                        https://www.windy.com/station/pws-VtofQu2

                        0ed3f6d4-2df2-4df9-8c1c-8b4110f31825-image.png

                        It is a strange window at the bottom of www.windy.com. I have even tried to run the above URL in MS Edge in a in-private window where I am not logged into Windy.com. It looks like two windows are on top of each other. Notice the small "close" button at the left, the text "Loading observation data..." and that some other window is shown behind this.

                        I hopw you can take a look at it soon. I would love to continue having API v2 working correctly. And when I create a new station it should show up without problems, right?

                        marekdM 1 Reply Last reply Reply Quote 0
                        • RolandozR Offline
                          Rolandoz @marekd | Premium
                          last edited by

                          @marekd The list of problems since I switched to API v2 is "endless".

                          Now I get another problem this morning. I am reporting as I have done for a week or more now. Suddenly your server rejecs my ts-timestamp as being in the future as seen here:

                          2026-01-26 09:31:08 : Windy URL: https://stations.windy.com/api/v2/observation/update?id=EWtLHK4&ts=1769416250&temp=15.7&dewpoint=13.3&humidity=86&wind=3.9&gust=8.9&winddir=138&pressure=101497&precip=0.0&uv=1.0&solarradiation=299&softwaretype=WLL2Windy_3.0.2.406
                          2026-01-26 09:31:08 : Windy Error: BadRequest - {"message":["ts must not be in the future"],"error":"Bad Request","statusCode":400}

                          We can see that reporting time is 2026-01-26 09:31:08 and the ts-value is 1769416250. I have decoded this value and it is this timestamp: 2026-01-26 09:30:50. That is NOT in the future.

                          Where are we now? I see my 3 stations as offline, my reported data does not show up on windy.com and now I also get ts-errors. Finally a new station I created 2-3 days ago also shows offline. Should I stop reporting or switch back to API v1 until all problems have been fixed? I am ready to help you if you want.

                          1 Reply Last reply Reply Quote 0
                          • marekdM Offline
                            marekd Windy Staff @Rolandoz
                            last edited by

                            @Rolandoz Thank you for the logs, they helped us a lot. The issue is fixed now. Thanks again. You have almost developed our new API thanks to your feedback and technical knowledge 🙂

                            It was confusing because we have 68 other stations reporting via the new API and they work without any problems. However, those stations do not report the ts property. We expect this property to be in seconds, but our systems were treating it as milliseconds. In a previous deployment, this property was skipped. When we fixed the handling of this property, we accidentally broke it for you. Sorry about that.

                            We hope no further development will be needed and that everything is stable now. Thank you again. Your feedback is very valuable to us and we are glad you tested this API with us. And of course, sorry for all the complications we caused.

                            Regarding the online or offline status on stations.windy.com, toggling it likely distracted you from the real issue. We recently changed the threshold for showing a station as online or offline from hours to two days. Sorry about that. We will probably switch it back to hours.

                            RolandozR N 2 Replies Last reply Reply Quote 0
                            • RolandozR Offline
                              Rolandoz @marekd | Premium
                              last edited by

                              @marekd The only reason I am sending the ts value is that I read data from Davis WeatherLink cloud API and I dont know how old they are. My WeatherLink devices (I have one on each location) reports to WeatherLink cloud and from that I get "the current values". If they have some delay, these values could theorecially be very old. So I decided it is best I tell you the timestamp of the data and thereby "how old is the milk". ;-) If you want I can remove the ts-parameter. But my log shows that data is normally 45-60 seconds old when I report it to you and that is good, right? Yes, to ts - it is Unix seconds (not milliseconds) since 1970, so just one long integer value.

                              I see all my 3 stations (the new Hillerød Vejr and the two others) are online again. I agree with you that a 1-2-3 hours without data should say "offline", but several days is all too long.

                              I can also confirm that my station with the NEW ID is showing again since 9:55 this morning, so it is fine now.

                              If you dont want the ts parameter I will recommend you remove it from API documentation to avoid confusion about it. Until further I will let it stay in the URL. Let us see what happens.

                              1784a25a-9485-4efb-a3db-8941379da8a9-image.png

                              RolandozR 1 Reply Last reply Reply Quote 0
                              • RolandozR Offline
                                Rolandoz @Rolandoz | Premium
                                last edited by

                                @marekd I have a suggestion for the My Stations page. As shown here, there is free space right to the Status column. Maybe you could insert a "Last updated" column and show, for each station, the timestamp of the latest valid data you have received from the station, fx 26-01-2026 17:05:24.

                                In that way station owner can quickly see if data is very delayed etc.

                                9080c12f-449c-45d7-840b-b397d1b35fe2-image.png

                                marekdM 1 Reply Last reply Reply Quote 2
                                • marekdM Offline
                                  marekd Windy Staff @Rolandoz
                                  last edited by

                                  @rolandoz Thank you for the confirmation. Do not remove the ts parameter, it makes your data more precise. That was our fault. It is impossible to test all possible cases during development, there are always production bugs. You were (un)lucky to be the first one who migrated to the new API. Luckily for us, you were extremely helpful. Thank you again.

                                  Your idea regarding the last observation is great, we will add that feature.

                                  RolandozR 1 Reply Last reply Reply Quote 1
                                  • RolandozR Offline
                                    Rolandoz @marekd | Premium
                                    last edited by

                                    @marekd Thanks for your nice comments and feedback.

                                    Yesterday I decided to delete my old stations that reported under API v2 and create new stations. I was surprised that my old station ids were reused and now, because I created them in a new order, the ids were mixed so fx. Paradise Residence got the old Helligsø Drag id. That was not so good as I really wanted to get rid of them including their old data. Then I created a total of 6 ids - the 3 old + 3 new and that gave me complete new ids for my stations. Now there is only left to ask you to 100% remove my old ids and their data from your system. The ids we talk about are these:

                                    e88e6f3e-bfe8-4854-9c42-eb29cc57ed5e-image.png

                                    It has been a pleasure to help improve Windy. :-)

                                    Maybe you can write in the documentation not only about parameter names and what values you expect but also how they are used later on in app and website. Fx. I expected solar radiation to be shown on the website (and in the app) but as I understand you dont use it. So in my mind "why should I send it to you if you dont use it?".

                                    marekdM 1 Reply Last reply Reply Quote 0
                                    • N Offline
                                      neronde @marekd | Premium
                                      last edited by

                                      @marekd I think I understand why my PWS station was not showing up anymore since yesterday morning. I switched to API V2 and my ts was in (ms) as it was working in v1 before.I just put it in seconds right now and it's working.

                                      marekdM 1 Reply Last reply Reply Quote 1
                                      • marekdM Offline
                                        marekd Windy Staff @Rolandoz
                                        last edited by

                                        @Rolandoz Regarding reusing station IDs: we are aware of the issue, but there is nothing we can do about it right now. To be honest, there is a fix, but it is not worth the effort. This can be easily resolved once the old API v1 is fully terminated.

                                        The root cause is a poor decision in the old implementation: the station ID contains the userId combined with the station index. We removed this in the new implementation, but it must be kept for backward compatibility. As a result, when you remove a station and create a new one, the ID is composed of your userId and the first available station index. After API v1 is dropped, this will be removed and the ID will be randomly generated.

                                        Sorry about that, but we are not going to change it at the moment. It is quite an edge case, and hopefully you will not need to create stations anymore. And it will be fixed at the end of 2026.

                                        RolandozR 1 Reply Last reply Reply Quote 0
                                        • marekdM Offline
                                          marekd Windy Staff @neronde
                                          last edited by

                                          @neronde Thanks for the feedback. Just to be sure, I have improved the error message to: "ts must not be in the future. Ensure the provided value is in seconds, not milliseconds."

                                          1 Reply Last reply Reply Quote 1
                                          • RolandozR Offline
                                            Rolandoz @marekd | Premium
                                            last edited by

                                            @marekd Good answer. I saw it when I started on API v2 but did not give it much attention. :-)

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Windy Community  |  Powered by excellent NodeBB
                                            Terms of Use     Privacy Policy     Windy.com