[MISC] WeatherSync v2.0_1 - The real-world weather - Now with multiworld and more! [1337-1597]

Discussion in 'Inactive/Unsupported Plugins' started by cppchriscpp, Apr 22, 2011.

  1. Offline


    Moving to BukkitDev! Click here!

    WeatherSync - The real-world weather in Minecraft
    Version: 2.0_1

    Important note for those upgrading from 1.2: Your old configuration files will not work as-is. You'll need to copy over the new config file, and move over any old settings that still apply.

    This plugin keeps the weather in the worlds on your server synchronized with the real-world weather in a location you specify. It does this by connecting to weather underground every few minutes (configurable; 5 minutes by default) and parsing the weather. This means if it's raining outside, it will be raining in minecraft. This is also true of thunderstorms.

    You will want to configure it before you try to use it; otherwise it will synchronize your default world (named "world") with the weather in San Francisco, California. (Used for testing.)

    This should work for any place you can get an RSS feed with weather in it from WeatherUnderground. See the directions below for how to find this, and if it does not work, feel free to ask for help. Please be sure to provide the URL you are using!

    RSS feeds are now the only way to synchronize with this plugin. Old location information will be ignored by the plugin as of version 1.3.

    You can now view the forecast with the /forecast command, which is available to all users. It will also show the current weather. This command can be disabled, if desired.

    As a warning, I have not been able to test this to the level I test most things due to the nature of it. Please let me know if/when you have issues.

    Download (Source code is in there too!)

    Future Features:
    • Heavy/severe thunderstorms? (Sorry guys, there's no chance I'm going to have time for this. Maybe another plugin can hook into thunderstorms and make this happen, if it doesn't already exist.)
    • unit selection (determined by rss feed; see the ?units=metric/english at the end? change that)
    • None; I implemented everything else here! :)
    Time synchronization:

    Some people in this thread expressed interest in having the real world time on their servers alongside this. I was going to code this myself, however there is something out there already that can do this. Check out RealTime by Mechestrial for this!


    How to find your RSS feed (open)
    This plugin now asks you to provide the URL to an RSS feed to get the weather. The old method will not work past version 1.2. The method to get the URL to your RSS feed is as follows:

    Navigate to http://wunderground.com, and find your location.

    Around the height of the title of the page on the far right is an RSS icon. You need to get the URL of this -- right click it and copy the link address. It should look like:
    Take this entire thing, and put it in the worlds section of your config file.

    If you have problems finding this, just ask. My explanation here is not that good.


    Due to how this thread has been going, I am going to require all reports to include this information, or your bug report may be ignored.
    • An extremely detailed description of the problem.
    • That you have turned debug mode on in the config file, and then caused the problem to happen-- this will provide me with helpful insights into what is going wrong.
    • Your configuration file
    • The major error that occurred
    • The rest of the server.log surrounding that error. If you aren't sure, just give me the whole thing.
    • Any errors a client might have seen
    • Anything you think might have gone wrong -- your insights often lead me to the problem quickly; even if you are wrong.
    • Your build of craftbukkit
    • Any changes in your setup that preceeded the problems (installed plugins, mainly)
    • Your system information (Some of this is in /debug info)
      • (Ideally, just include all output from these two commands.)
      • Operating system
      • Java version
      • Any wrapper software you might be using
      • A list of plugins you use (As reported by /plugins or "plugins" at the server command line)
    • Any other details that could be relevant.
    Yeah, I know it's a lot and it's kind of a pain in the rear. Some of it won't be useful in some situations, but I only get a very little time to work on this now, and I really don't like having to put that time to waste just because I don't have all the information I could about what went wrong.


    Version 2.0_1
    • Fixed a dumb mistake causing some users to get the forecast for the last day available instead of the first.
    Version 2.0
    • Multiworld support!!!!111 (Sorry; had to do it.)
    • Re-enabled messages to users on the weather changing
    • Redid the configuration file for multiworld and some other stuff
    • Customization options for messages; you can now set what the plugin sends to users!
    Version 1.3
    • Never existed; I jumped straight to 2.0. Not sure what I was on when I put this version here. >_>
    Version 1.2
    • Fixed (hopefully) the bug with weather not updating once and for all. The weather will be FORCIBLY updated every time the weather is checked.
      • Note that client desynchronization issues may still occur. If you disconnect and reconnect and the weather is correct again, there is nothing I can do to fix this, sorry.
    • Changed the default method of specifying location to an RSS feed. Let's see how this can break things D:
    • Accidentally removed the show-forecast option which shows when the weather changes in chat. Did anyone actually use this? Redoing it for multiworld is going to be a massive pain if people want it.
    • Fixed broken forecasts
    Version 1.1_3
    • Fixed debug mode -- anyone who had problems please try again and report your issues again. Sorry for the inconvenience; it was my fault.
    Version 1.1_2

    • Fixed the weather randomly changing bug. Really this time! (I think)
    Version 1.1_1

    • Program now accepts blank configuration options correctly
      • (This fixes the null pointer issues.)
    Version 1.1

    • Weather forecasting (w/ forecast command)
    • Ability to show forecast on join
    • Debug mode that will display what the weather is on start and when it changes (new config option -- use this to report bugs!)
    • More failure-checking in the forecast changes.
    • Support for weather stations
    • Fixed threading/recursion..
    • Clarified config files.
    • Fixed various bugs
      • Weather duration not being set (cause of random weather at times)
      • Improper string conversion (That boolean bug that someone had on page 4)
      • (More that have been forgotten since being fixed..)
    Version 1.0

    • Initial release
    JonasD, zhuowei, Stoepsel and 5 others like this.
  2. Offline


    For now, just turn off forecasting in the config file. I'll look into what is going wrong in your case later. The next small update will NOT address this; it is just a quick update to deal with the null pointer exceptions so many users are seeing. If you get them before this comes out, just comment out any lines where you set a variable to a blank string.
  3. Offline


    ye, i dont rly care about that, but would be cool if it works ;P
  4. Offline


    Same problem here but only with citys in EU.
  5. Offline


    Alright, so the forecast forecast for EU cities is in a different format than those in the US. I'll get to the bottom of it when I have more than 5 minutes to work with it. For now EU users, just turn off the forecast feature. Sorry for the inconvenience.

    ALSO, the update I mentioned is now out -- it fixes the null pointer exceptions when you fill out the config files wrong; nothing else.
  6. Offline


    Just a little question: Do I need to type "the" too in "The Netherlands"? And where do I need to type it?
  7. Offline


    No the, I don't think. It should just be city=amsterdam and state=netherlands (lowercase might actually matter) -- forecasting may not work at the moment. Apparently my method for extracting the forecast only works for the US. Should have tested better, I guess. I'll work on it soon.
  8. Offline


    Okay, thanks for the info. I don't think I need forecasting now, so I'll wait for that. :)
    The names must be lowercase, right?

    I get this an error that the plugin "can't read the weather" when I start my server. :(
    This is my config file:
    # WeatherSync configuration file
    # How frequently to update the weather, in minutes.
    updatetime: 5
    # Which world to update the weather on, in multiworld setups.
    world: world
    # The zip or postal code of the location to sync with.
    # You need either this or a city and state. You do not need both.
    # If you are not using one, comment it out with a # sign.
    #zipcode: 94101
    # The city to get weather for.
    # Not needed if you provided a zip code.
    city: waalwijk
    # The state (or Country) to get weather for.
    # Not needed if you provided a zip code.
    state: netherlands
    # The weather station to use.
    # Don't use this if you are using a zip/postal code or a city/state combination.
    # (Remove the # and change the weather station to use this.)
    #station: 12372
    # Whether to show the weather/forecast to users on join.
    # (Formatting of this may be possible in the future; request it if
    # you're interested!)
    forecast-on-join: false
    # Whether to show the forecast when weather changes.
    show-forecast: false
    # Whether to have debug mode on.
    # You'll want this off for most servers, but turn it on if you have problems and
    # it will give you extra information about what is going wrong.
    # Please turn this on if you have issues, and report any unusual output.
    debug: false
  9. Offline


    Nice to see you have brought an update out!

    I presume you still havn't made it so that the server doesn't just randomly generate weather? It just generated thunder and in the server log it says:

    "18:37:06 [INFO] Weather remains unchanged.
    18:39:06 [INFO] Weather remains unchanged."

    And its still thundering.
  10. Offline


    Could you turn on debugging and get the full message that comes up? I can't find any problems with your config file, so the problem must be elsewhere.

    Well, I thought I had fixed it with the duration thing. THEN I grew a brain. Fix forthcoming -- I think I only set the weather's duration to be a minecraft day. I'll make it reset the duration every cycle and that should fix it.
  11. Offline


    I already put the debug-mode on, but it doesn't change anything with the message either
    I'll try again in two weeks (I'm on vacation next week).
  12. Offline


    http://pastebin.com/WpcVNixe - error
    http://pastebin.com/EbthaCRH - config, will turn on debug here soon
  13. Offline


    You do have to reload the plugin when you change the config file. All of the locations that provide errors similar to what you said provide a full stack trace in relation to the error received. This information is vital to my figuring out the problem. If nothing else, please at least post the FULL error you ran into, rather than paraphrasing it. Doing so leaves out information that could help me determine your exact problem.
  14. Offline


    I just tried it with the debug-mode on, but it says excactly the same.
    Here's everyting I get from your plugin:
    22:23:38 [INFO] WeatherSync version 1.11 is enabled!
    22:24:41 [SEVERE] WeatherSync: Could not read the weather; check your settings.
    22:24:41 [SEVERE] WeatherSync: Could not read the weather; check your settings.
    That's without the messages from other plugins.
  15. Offline


  16. Offline


    bugreport ;)

    if you go to bed (all players, serer performance fucks up cause all monsters start to burn and respawn)
  17. Offline


    add suppor to turn on and off things like thunder and rain? maybe commands like /ws rain off
    or something anyway great plugin!
  18. Offline


    Short of preventing players from going to bed I don't know any way to fix this.

    If you want that use one of the 15 plugins that already exist for weather control.
  19. Offline


    i dont know how deep you can modify bukkit, but maybe disabling the "skip night" function if realtime is installed ?
  20. Offline


    could u add the option to sync also the daytime? I think it would be cool if not only the weather would be synced but also the time of night and day.
  21. Offline


    Not a good idea.

    Please read the first post.
  22. Offline


    Because I live in Australia, is it possible for you to add an option to change the measurements to the metric system?
  23. Offline


    Will add this in the next version as long as it is easily possible. Pretty sure it is.
  24. Offline


    I love your plugin!!
    Your doing a great job! ;)
  25. Offline


    Alright guys, so it turns out I goofed up. Download the latest version, turn on debug mode (if it's not still) and try this again. I broke debug mode with that update, and I just realized it now. It should give a nice big exception which I will be able to use to find out what's going wrong.

    Sorry about that guys.
  26. Offline


    http://pastebin.com/6MPcsTrF - error
    http://pastebin.com/BUz4xKXU - config
  27. Offline


  28. Offline


  29. Offline


    Never mind that fix; it returned a very valid-looking error when I tested it in my browser. Sorry for the confusion.

    Well, this stems from my entirely misunderstanding how this system works for non-US areas. I'm going to have to do a bit of a rewrite, particularly of the config files.

    This raises the question of why what I've been saying works for other places.. My head hurts. I'll try to sort it out when I have more than a few minutes to devote. To anyone else having issues, try just using your country and the province; or use your country and city if that works.

    Edit again: Your station is 71731 -- use that for now. I promise I'm looking into the problem.
  30. Offline


    Will try that now, whenever you can look into it :), Thanks for answering quickly

    It worked, changed setting to rain

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 14, 2016
  31. Offline


    No problem; sorry it took so long for me to figure out what was going on. I've added a guide to finding weather stations to the first post -- for anyone else having problems, use this if you want a nice quick solution that will work. Meanwhile I'll try to figure out what I've managed to do to this thing. You can still report any issues you have, but realize that I know the weather synchronization is essentially FUBAR if you're not in the US. Postal codes apparently do not work as expected in many cases either.

Share This Page