[REL] rFactor2 Weather Tool

Discussion in 'Other' started by Gerald Jacobson, Mar 30, 2013.

  1. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    6,578
    Likes Received:
    2,450
    Sorry if I missed something, has there been any progress on this? Recently updated a weather plugin/tool for league use and tried to eliminate cloud 'switching' when rain begins, with only intermittent success...
     
  2. lagg

    lagg Registered

    Joined:
    Oct 1, 2012
    Messages:
    1,125
    Likes Received:
    778
    The same for me.

    Enviado desde mi E2003 mediante Tapatalk
     
  3. anaussiejoe

    anaussiejoe Registered

    Joined:
    Dec 15, 2015
    Messages:
    22
    Likes Received:
    27
    Hi. Can anyone help please. We have two servers running, We have all the app files in the right DIR (atleast we think we do). One server we only have one track and the second server we have multiple tracks. With one track the app works fine but with the multiple track server, the weather seems to just stay on default even when we see the app change location with the right name and
    lat/long being correct in (WeatherServer)

    Also, Now when I use the WorldWeather exe, We now get this error msg,



    Information: This provider works for earlier date and forecast.

    Collect weather data for 16-Dec-15 12:00:00 AM
    http://uk.weather.com/weather/almanacHourly-ITXX0049:1:SP?day=0
    ERROR: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: startIndex
    at System.String.IndexOf(String value, Int32 startIndex, Int32 count, StringComparison comparisonType)
    at System.String.IndexOf(String value, Int32 startIndex)
    at rFactor2WorldWeather.Providers.TheWeatherChanelProvider.Collect(DateTime start, Int64 durationMinute, Int32 startPercentage, Int32 sizePercentage, Boolean hideWeatherData)
    Information: This provider works for earlier date and forecast.
     
  4. Gupster

    Gupster Registered

    Joined:
    May 19, 2013
    Messages:
    404
    Likes Received:
    25
    Also seeing this same message.

    sent from my electronic distraction device
     
  5. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    10
    I Will look tout this. But seems the website return an invalid JSON structure

    PS. I did not have enough time to look at the quick weather change.
     
    Last edited by a moderator: Dec 16, 2015
  6. Knackko Lovitch

    Knackko Lovitch Registered

    Joined:
    Feb 22, 2013
    Messages:
    22
    Likes Received:
    0
    Nice tool as I already testing such a tool with rf1+RFE, here there is some more nice features, Old Drivers Spirit is testing on our ODS_School server since yesterday with realtime weather at Limerock and Sebring Club.
    First thing I notice is that the track temperature is always set to 20°C, even if air temperature is 5°C or 45°C, is there a way to have a more accurate track temperature regarding the air temperature? Maybe I miss a parameter in Weather tool or rF2 json files? Thanks.
     
  7. TOCA2FREAK

    TOCA2FREAK Registered

    Joined:
    Apr 6, 2011
    Messages:
    831
    Likes Received:
    106
    I'm getting this error now.

    Code:
    Information: This provider works for earlier date and forecast.
    
    Collect weather data for 17/12/2015 00:00:00
    http://uk.weather.com/weather/almanacHourly-MYXX0031:1:SP?day=0
    ERROR: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: startIndex
       at System.String.IndexOf(String value, Int32 startIndex, Int32 count, StringComparison comparisonType)
       at System.String.IndexOf(String value, Int32 startIndex)
       at rFactor2WorldWeather.Providers.TheWeatherChanelProvider.Collect(DateTime start, Int64 durationMinute, Int32 startPercentage, Int32 sizePercentage, Boolean hideWeatherData)
    Information: This provider works for earlier date and forecast.
    
    Collect weather data for 17/12/2015 00:00:00
    http://uk.weather.com/weather/almanacHourly-MYXX0031:1:SP?day=0
    ERROR: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: startIndex
       at System.String.IndexOf(String value, Int32 startIndex, Int32 count, StringComparison comparisonType)
       at System.String.IndexOf(String value, Int32 startIndex)
       at rFactor2WorldWeather.Providers.TheWeatherChanelProvider.Collect(DateTime start, Int64 durationMinute, Int32 startPercentage, Int32 sizePercentage, Boolean hideWeatherData)
    Information: This provider works for earlier date and forecast.
    
    Collect weather data for 17/12/2015 00:00:00
    http://uk.weather.com/weather/almanacHourly-MYXX0031:1:SP?day=0
    ERROR: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: startIndex
       at System.String.IndexOf(String value, Int32 startIndex, Int32 count, StringComparison comparisonType)
       at System.String.IndexOf(String value, Int32 startIndex)
       at rFactor2WorldWeather.Providers.TheWeatherChanelProvider.Collect(DateTime start, Int64 durationMinute, Int32 startPercentage, Int32 sizePercentage, Boolean hideWeatherData)
    
    I have noticed that the uk.weather.com website has changed it's url to www.weather.com now so is probably why this is happening. Please fix. ;)
     
  8. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    6,578
    Likes Received:
    2,450
    Unfortunately plugins aren't able to set this at the moment. I suspect (after all this time) we might have to wait for ISI to implement track temperature as part of realroad, so it's affected live by sunlight and water. (and wind, and humidity, ...)

    I've had varied results, I was thinking maybe x minutes of full cloud either side of rain would do it but even 5 mins of 1.0 cloud before any rain (even 0.01) didn't help, except in one series of tests that gave me false hope. The next test didn't work the same way.
     
  9. ucfquattroguy

    ucfquattroguy Registered

    Joined:
    Dec 23, 2011
    Messages:
    133
    Likes Received:
    25
    Looks like 'weather.com' is now directing out to 'wunderground.com' for historical weather data. What's worse, is that the location ID format ends up getting converted to something other than the 'USFL0208' format we're used to using.

    I'm guessing this is going to be a huge mess for Gerald to update/fix/whatever...
     
  10. BoothJoe

    BoothJoe Registered

    Joined:
    Oct 12, 2015
    Messages:
    202
    Likes Received:
    8
    I would feel better if he would acknowledge there's a problem and say whether he has time/inclination to look at it or not.

    If you do this Chrome link

    http://www.wunderground.com/history...&theprefset=SHOWMETAR&theprefvalue=0&format=1

    and replace the KMDT with the airport code and the date with the date you want, you can get a comma delimited file of the hourly weather data.
     
  11. ucfquattroguy

    ucfquattroguy Registered

    Joined:
    Dec 23, 2011
    Messages:
    133
    Likes Received:
    25
    :cool:
     
  12. BoothJoe

    BoothJoe Registered

    Joined:
    Oct 12, 2015
    Messages:
    202
    Likes Received:
    8
    Just to be clear:

    Does anyone have the weather tool working in any of its configurations (standalone/server)?
     
  13. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    10
    I start to work to fix UK-Weather

    Normally:
    Weather tool still work when using 7Timer provider (forecast only)
    Weather Server still work as it use an API to collect realtime weather
     
    Last edited by a moderator: Dec 27, 2015
  14. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    10
    Bad news, UK-Weather (aka World Weather) have totally changed its services, and data are now completly hidded (and no more historical (past) data are available).

    I try to find a replacement, but if someone know a website that provide past data (almanac) and forecast (world wide), tell me.

    PS: For forecast it could be possible to use the same API (with key) than the Weather Server - But no usable past data with it
     
    Last edited by a moderator: Dec 27, 2015
  15. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    10
    Weather Underground, the API used in realtime server provide also past data, so i start to add this provider to the Weather Tool (this provider will needs an API key -> like Weather Server)
     
  16. Marek Lesniak

    Marek Lesniak Car Team Staff Member

    Joined:
    Oct 6, 2010
    Messages:
    1,583
    Likes Received:
    101
    Great! Thanks for taking your time.
     
  17. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    10
    Weather Tool (Static HMI) available
    Only the rFactor2WorldWeather.exe and the WeatherConfig.xml have been updated.

    A new provider has been added to provide historical and hourly forecast (10 day). This provider is the same as the one used in weather server, so you need an API Key for this provider.

    - Edit the WeatherConfig.xml to add your own API key (replace the red part with your api key value)
    Code:
        <Provider id="3" class="WeatherUnderground">
          <Parameters>
            <Parameter name="ApiKey" value="[COLOR="#FF0000"][B]<Your API KEY here>[/B][/COLOR]"/>
          </Parameters>
        </Provider>
    
    - This provider take the same parameters as the 7Timer parameter, so instead of duplicate the parameter part of each track i have simply do the following
    Code:
    <Provider id="2[COLOR="#FF0000"][B],3[/B][/COLOR]">
              <Parameters>
                <Parameter name="Longitude" value="-84.17689"/>
                <Parameter name="Latitude" value="34.434611"/>
              </Parameters>
            </Provider>
    
    - I did not remove yet the Weather Chanel API, but you can do it if you want
     
    Last edited by a moderator: Dec 27, 2015
  18. lagg

    lagg Registered

    Joined:
    Oct 1, 2012
    Messages:
    1,125
    Likes Received:
    778
    Thank you very much Gerald.

    Enviado desde mi E2003 mediante Tapatalk
     
  19. TOCA2FREAK

    TOCA2FREAK Registered

    Joined:
    Apr 6, 2011
    Messages:
    831
    Likes Received:
    106
    Thanks so much :)
     
  20. BoothJoe

    BoothJoe Registered

    Joined:
    Oct 12, 2015
    Messages:
    202
    Likes Received:
    8
    I finally got home from work and had a chance to try it. After several attempts, I finally figured it all out. Just a couple of notes if anyone else has the same trouble. You must download the current build from the original post and replace the old rFactor2WorldWeather.exe with the new one you just downloaded. The WeatherConfig.xml file adds a new stanza for weatherunderground. When you put your key in there it says value=<xxxxx>", make sure you remove the < and > characters. If you put your key between the <> and leave them in, you will get a parsing error.

    Gerald, thank you for fixing this. I use this all the time in my offline races to get random weather.
     

Share This Page